geobase library

Geospatial data, spherical geodesy, projections, tiling schemes and vector data.

Key features:

  • position, bounding box and positions series (with coordinate arrays)
  • geographic (longitude-latitude) and projected positions and bounding boxes
  • spherical geodesy functions for great circle and rhumb line paths
  • simple geometries (point, line string, polygon, multi point, multi line string, multi polygon, geometry collection)
  • features (with id, properties and geometry) and feature collections
  • temporal data structures (instant, interval) and spatial extents
  • vector data formats supported (GeoJSON, WKT, WKB)
  • coordinate projections (web mercator + based on the external proj4dart library)
  • tiling schemes and tile matrix sets (web mercator, global geodetic)
  • common codes, constants, functions, presentation helpers and reference systems related to geospatial applications

Usage: import package:geobase/geobase.dart

Classes

Aligned
An aligned point within a geospatial box or tile.
Bounded
A positionable object with position data (directly or within child objects) and methods to resolve bounding boxes.
Box
A base class for axis-aligned bounding boxes with min & max coordinates.
ContentDecoder
An interface to decode content from a text or binary format.
ContentEncoder<Content extends Object>
An interface to encode Content into a text or binary format.
CoordRefSys
Metadata about a coordinate reference system (CRS) identified and specified by id.
CoordRefSysResolver
An abstract class for resolving coordinate reference system information.
DefaultFormat
The "default" text format for coordinate and geometry objects.
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.
Feature<T extends Geometry>
A feature is a geospatial entity with id, properties and geometry.
FeatureBuilder<T extends FeatureObject, E extends Geometry>
A builder to create geospatial feature objects of T from FeatureContent.
FeatureCollection<E extends Feature<Geometry>>
A feature collection contains an array of Feature items.
FeatureObject
A common base interface for geospatial feature objects (Feature and FeatureCollection).
GeoBox
A geographic bounding box with west, south, east and north values.
GeoExtent
A geospatial extent with spatial and optional temporal parts.
Geographic
A geographic position with longitude, latitude and optional elevation and m.
GeoJSON
The GeoJSON text format for coordinate, geometry and feature objects.
GeoJsonConf
Optional configuration parameters for formatting (and parsing) GeoJSON.
GeoJSONL
The newline-delimited GeoJSON (or "GeoJSON Text Sequences") text format for feature objects.
Geometry
A base interface for geometry classes.
GeometryBuilder<T extends Geometry, E extends Geometry>
A builder to create geometry objects of T from GeometryContent.
GeometryCollection<E extends Geometry>
A geometry collection with geometries.
GeoTileMatrixSet
A tile matrix set with conversions between tiles and geographic positions.
GlobalGeodeticQuad
"Global Geodetic Quad" tile matrix set ("World CRS84 Quad" for WGS 84).
Instant
An instant with a timestamp.
Interval
An interval between optional start and end instants.
LineString
A line string geometry with a chain of positions.
MultiLineString
A multi line string with an array of line strings (each with a chain of positions).
MultiPoint
A multi point geometry with an array of points (each with a position).
MultiPolygon
A multi polygon with an array of polygons (each with an array of rings).
Point
A point geometry with a position.
Polygon
A polygon geometry with one exterior and 0 to N interior rings.
Position
A base class for geospatial positions.
Positionable
A positionable object contains data structures for (geospatial) position data, directly or within child objects.
PositionScheme
A position scheme encapsulates position and bounding box factories for certain type of position data.
PositionSeries
A fixed-length (and random-access) view to a series of positions.
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.
ScaledConverter
A coordinate converter between geospatial positions and scaled coordinates.
SimpleGeometry
A base interface for "simple" geometry classes.
SimpleGeometryContent
An interface to write simple geometry data to format encoders and object builders.
SpatialExtent<T extends Box>
An extent with 1 to N bounding boxes in defined coordinate reference system.
SphericalGreatCircle
Latitude/longitude points on a spherical model earth, and methods for calculating distances, bearings, destinations, etc on (orthodromic) great-circle paths.
SphericalGreatCircleLineString
Calculations for line strings (as an iterable of geographic positions) on a spherical model earth (great-circle paths).
SphericalRhumbLine
Latitude/longitude points on a spherical model earth, and methods for calculating distances, bearings, destinations, etc on (loxodromic) rhumb lines.
Temporal
A base class for temporal objects like instants and intervals.
TemporalExtent
An extent with 1 to N intervals in defined temporal coordinate reference system.
TemporalRefSys
Metadata about a temporal coordinate reference system (TRS) identified and specified by id.
TemporalRefSysResolver
An abstract class for resolving temporal coordinate reference system information.
TextReaderFormat<Content extends Object>
An interface to access text format decoders (readers) for Content.
TextWriterFormat<Content extends Object>
An interface to access text format encoders (writers) for Content.
TileMatrixSet
A tiling scheme represented as a set of tile matrices (grids).
ValuePositionable
A positionable object that has (geospatial) coordinate values directly available.
WebMercatorQuad
"Web Mercator Quad" tile matrix set.
WGS84
Projections for the WGS 84 geographic coordinate system.
WKB
The Well-known binary (WKB) format, see geometry for the standard WKB and geometryExtended for the Extended WKB (EWKB).
WKT
The WKT text format for coordinate and geometry objects.
WktLikeFormat
The WKT (like) text format for coordinate and geometry objects.

Enums

AxisOrder
The axis order of coordinate values in position and point representations.
CanvasOrigin
The position of the origin in a canvas or a grid.
CardinalPrecision
The precision for cardinal directions (compass point).
Coords
An enum for coordinate types (by spatial dimension and whether is measured).
Dimensionality
An enum for dimensionality or topological dimension in the context of geospatial applications.
DmsType
An enum for common representation of geographic positions by coordinates (using degrees, minutes and seconds as components).
Geom
An enum for geometry types.
GeoRepresentation
An enum for spatial representations that can be used to code logic when need to choose some options based on a representation.
WkbFlavor
The flavor (or a variation) of the Well-known binary (WKB) specification.

Mixins

BinaryFormat<Content extends Object>
A mixin to access binary format encoders and decoders for Content
CoordinateContent
An interface to write coordinate data to format encoders and object builders.
FeatureContent
An interface to write geospatial feature objects to format encoders and object builders.
GeometryContent
An interface to write geometry data to format encoders and object builders.
Projection
A mixin defining an interface for (geospatial) projections.
ProjectionAdapter
A projection adapter bundles forward and inverse projections.
TextFormat<Content extends Object>
A mixin to access text format encoders and decoders for Content.

Extensions

BoxArrayExtension on Iterable<Box?>
A helper extension on Iterable<Box?>.
CoordinateArrayExtension on List<double>
A helper extension on List<double> to handle coordinate values.
DoubleAngleExtension on double
An extension on double with basic degrees and radians utility methods.
GeographicDoubleAngleExtension on double
An extension on double with basic degrees and radians utility methods ( (for geographic coordinate reference systems).
PositionArrayExtension on Iterable<Position>
A helper extension on Iterable<Position>.
SphericalGreatCircleExtension on Geographic
An extension for easier access to SphericalGreatCircle.
SphericalGreatCircleIterableExtension on Iterable<Geographic>
An extension for easier access to SphericalGreatCircleLineString for iterables of geographic positions.
SphericalGreatCirclePositionSeriesExtension on PositionSeries
An extension for easier access to SphericalGreatCircleLineString for series of positions.
SphericalRhumbLineExtension on Geographic
An extension for easier access to SphericalRhumbLine.

Constants

defaultEpsilon → const double
The default epsilon value 1.0e-9 used as a tolerance in equals2D, equals3D and similar methods in this package.
doublePrecisionEpsilon → const double
The maximum relative precision of double numbers (IEEE 754).
earthCircumferenceWgs84 → const double
The earth circumference in meters (from earth equatorial radius by WGS 84).
earthRadiusWgs84 → const double
The earth equatorial radius in meters as specified by WGS 84.
maxLatitude → const double
The maximum value for the geographic latitude.
maxLatitudeWebMercator → const double
The maximum value for the geographic latitude inside the Web Mercator projection coverage.
maxLongitude → const double
The maximum value for the geographic longitude.
minLatitude → const double
The minimum value for the geographic latitude.
minLatitudeWebMercator → const double
The minimum value for the geographic latitude inside the Web Mercator projection coverage.
minLongitude → const double
The minimum value for the geographic longitude.
screenPPIbyOGC → const double
OGC defines a screen pixel of 0.28 mm that approximates to 90.7 ppi.

Typedefs

AddGeometry<T extends Geometry> = void Function(T geometry, {String? name})
A function to add geometry to some collection with an optional name.
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 and maxY values.
CreatePosition<T extends Position> = T Function({double? m, required double x, required double y, double? z})
Creates a new position of T from x and y, and optional z and m.
ExpandPosition = Iterable<T> Function<T extends Position>(Position source, {required CreatePosition<T> to})
A function to expand the source position to an iterable of zero or more positions of T using to as a factory.
TransformPosition = T Function<T extends Position>(Position source, {required CreatePosition<T> to})
A function to transform the source position to a position of T using to as a factory.
WriteFeatures = void Function(FeatureContent output)
A function to write geospatial feature objects to output.
WriteGeometries = void Function(GeometryContent output)
A function to write geometry data to output.
WriteSimpleGeometries = void Function(SimpleGeometryContent output)
A function to write simple geometry data to output.