coordinates library
Geographic (longitude-latitude) and projected positions and bounding boxes.
Contains also coordinate reference system (CRS) metadata and projection abstraction classes.
This libary exports a subset of package:geobase/geobase.dart
.
Usage: import package:geobase/coordinates.dart
Classes
- Aligned
- An aligned point within a geospatial box or tile.
- Box
- A base interface for axis-aligned bounding boxes with min & max coordinates.
- CoordRefSys
- Metadata about a coordinate reference system (CRS) identified and specified by id.
- CoordRefSysResolver
- An abstract class for resolving coordinate reference system information.
- Dms
- A default implementation for DmsFormat abstract base class, that defines methods for parsing and formatting degrees/minutes/seconds on latitude, longitude and bearing values.
- DmsFormat
- A base class for formatters with methods for parsing and formatting degrees/minutes/seconds on latitude, longitude and bearing values.
- GeoBox
- A geographic bounding box with west, south, east and north values.
- Geographic
- A geographic position with longitude, latitude and optional elevation and m.
- Position
- A base interface for geospatial positions.
- Positionable
- A positionable object has (geospatial) coordinate values available.
- ProjBox
- A bounding box with minX, minY, maxX and maxY coordinates.
- Projected
- A projected position with x, y, and optional z and m coordinates.
- Scalable
- A scalable object at the zoom level (a positive number).
- Scalable2i
- Scalable x, y coordinates at the zoom level.
Mixins
-
PositionData<
E extends Position> - A fixed-length and random-access view to positions with coordinate values.
- Projection
- A mixin defining an interface for (geospatial) projections.
- ProjectionAdapter
- A projection adapter bundles forward and inverse projections.
Extensions
- DoubleAngleExtension
- An extension on double with basic degrees and radians utility methods.
Constants
- defaultEpsilon → const double
-
The default epsilon value
1.0e-9
used as a tolerance inequals2D
,equals3D
and similar methods in this package.1.0e-9
- doublePrecisionEpsilon → const double
-
The maximum relative precision of double numbers (IEEE 754).
2.220446049250313e-16
Functions
-
clampLatitude(
double lat) → double -
Returns a clipped latitude in the range
[-90.0, 90.0]
. -
normalizeLongitude(
double lon) → double -
Returns a normalized longitude in the range
[-180.0, 180.0[
by using the formula(lon + 180.0) % 360.0 - 180.0
(if outside the range).
Enums
- AxisOrder
- The axis order of coordinate values in position and point representations.
- CardinalPrecision
- The precision for cardinal directions (compass point).
- Coords
- An enum for coordinate types (by spatial dimension and whether is measured).
- DmsType
- An enum for common representation of geographic positions by coordinates (using degrees, minutes and seconds as components).
- GeoRepresentation
- An enum for spatial representations that can be used to code logic when need to choose some options based on a representation.
Typedefs
-
CreateBox<
T extends Box> = T Function({double? maxM, required double maxX, required double maxY, double? maxZ, double? minM, required double minX, required double minY, double? minZ}) -
Creates a new bounding box from
minX
,minY
,maxX
andmaxY
values. -
CreatePosition<
T extends Position> = T Function({double? m, required double x, required double y, double? z}) -
Creates a new position of
T
fromx
andy
, and optionalz
andm
. -
TransformPosition
= T Function<
T extends Position>(T source) -
A function to transform the
source
position ofT
to a position ofT
.