Class
Bounds
public class Bounds: SFGeometryEnvelope
- Grid Bounds
Relationships
Conforms To
SFGeometryEnvelope
Initializers
init(_:_:_:_:)
public convenience init(_ minLongitude: Double, _ minLatitude: Double, _ maxLongitude: Double, _ maxLatitude: Double)
- Initialize
- @param minLongitude
-
min longitude
- @param minLatitude
-
min latitude
- @param maxLongitude
-
max longitude
- @param maxLatitude
-
max latitude
init(_:_:_:_:_:)
public init(_ minLongitude: Double, _ minLatitude: Double, _ maxLongitude: Double, _ maxLatitude: Double, _ unit: Unit)
- Initialize
- @param minLongitude
-
min longitude
- @param minLatitude
-
min latitude
- @param maxLongitude
-
max longitude
- @param maxLatitude
-
max latitude
- @param unit
-
unit
init(_:_:)
- Initialize
- @param southwest
-
southwest corner
- @param northeast
-
northeast corner
init(_:_:)
public init(_ envelope: SFGeometryEnvelope, _ unit: Unit)
- Initialize
- @param envelope
-
geometry envelope
- @param unit
-
unit
init?(coder:)
public required init?(coder: NSCoder)
Properties
hash
public override var hash: Int
Methods
degrees(_:_:_:_:)
public static func degrees(_ minLongitude: Double, _ minLatitude: Double, _ maxLongitude: Double, _ maxLatitude: Double) -> Bounds
- Create bounds in degrees
- @param minLongitude
-
min longitude
- @param minLatitude
-
min latitude
- @param maxLongitude
-
max longitude
- @param maxLatitude
-
max latitude
- @return bounds
meters(_:_:_:_:)
public static func meters(_ minLongitude: Double, _ minLatitude: Double, _ maxLongitude: Double, _ maxLatitude: Double) -> Bounds
- Create bounds in meters
- @param minLongitude
-
min longitude
- @param minLatitude
-
min latitude
- @param maxLongitude
-
max longitude
- @param maxLatitude
-
max latitude
- @return bounds
isUnit(_:)
public func isUnit(_ unit: Unit) -> Bool
- Is in the provided unit type
- @param unit
-
unit
- @return true if in the unit
toUnit(_:)
- Convert to the unit
- @param unit
-
unit
- @return bounds in units, same bounds if equal units
toDegrees()
public func toDegrees() -> Bounds
- Convert to degrees
- @return bounds in degrees, same bounds if already in degrees
toMeters()
public func toMeters() -> Bounds
- Convert to meters
- @return bounds in meters, same bounds if already in meters
centroidLongitude()
public func centroidLongitude() -> Double
- Get the centroid longitude
- @return centroid longitude
centroidLatitude()
public func centroidLatitude() -> Double
- Get the centroid latitude
- @return centroid latitude
centroid()
public override func centroid() -> GridPoint
overlap(_:)
- Create a new bounds as the overlapping between this bounds and the
- provided
- @param bounds
-
bounds
- @return overlap bounds
union(_:)
- Create a new bounds as the union between this bounds and the provided
- @param bounds
-
bounds
- @return union bounds
toPrecision(_:)
public func toPrecision(_ precision: Double) -> Bounds
- Convert the bounds to be precision accurate minimally containing the
- bounds. Each bound is equal to or larger by the precision degree amount.
- @param precision
-
precision in degrees
- @return precision bounds
pixelRange(_:)
public func pixelRange(_ tile: GridTile) -> PixelRange
- Get the pixel range where the bounds fit into the tile
- @param tile
-
tile
- @return pixel range
pixelRange(_:_:_:)
public func pixelRange(_ width: Int, _ height: Int, _ bounds: Bounds) -> PixelRange
- Get the pixel range where the bounds fit into the provided bounds
- @param width
-
width
- @param height
-
height
- @param bounds
-
bounds
- @return pixel range
mutableCopy(with:)
public override func mutableCopy(with zone: NSZone? = nil) -> Any
encode(with:)
public override func encode(with coder: NSCoder)
isEqual(_:)
public func isEqual(_ bounds: Bounds?) -> Bool
isEqual(_:)
public override func isEqual(_ object: Any?) -> Bool