Geospatial tools for Dart
π§ Geospatial tools for Dart is a set of code packages for Dart π― and Flutter π written in the Dart language providing data structures and tools for coordinates, geometries, feature objects, metadata, ellipsoidal and spherical geodesy, projections, tiling schemes, vector data models and formats, and geospatial Web APIs.
These tools are available as two Dart code packages as described in the article Geospatial tools for Dartβ-βversion 1.0 published (October 2023).
π¦ Code packages
The code packages are published at pub.dev:
Code | Package | Description |
---|---|---|
π geobase | Geospatial data structures (coordinates, geometries, features, metadata), ellipsoidal and spherical geodesy, projections and tiling schemes. Vector data format support for GeoJSON, WKT and WKB. | |
π geodata | Geospatial feature service Web APIs with support for GeoJSON and OGC API Features clients. |
Packages help Dart and Flutter developers to model positions, bounding boxes, geometries (point, line string, polygon etc.), feature objects (that is geospatial entities with identifiers, geometries and properties) and geospatial metadata (temporal data like instants and intervals, spatial extents etc.) in their own application specific domain models.
Geometry and feature objects can be read and decoded (and also encoded) from common geospatial vector data formats like GeoJSON, WKT and WKB. A Web API client for geospatial feature services based on the OGC API Features standard is also included.
Basic support for geometry functions is available too. Line lengths, area perimeters, centroids, polylabels and distances can be computed in cartesian coordinates.
For geographic coordinates itβs possible to calculate distances, bearings, destinations points and intermediate points along the Earth surface based on ellipsoidal and spherical earth models.
Web Mercator Quad and Global Geodetic Quad are two WGS 84 based tiling schemes representing the world as tiles and pixels in hierarchical tile matrix sets. Calculations for these schemes as well as the basic support for geospatial projections between geographic and projected coordinate reference systems is also provided.
π οΈ Install
Code packages are published at pub.dev as stable versions.
Dart 2 and 3 language versions both are supported with Dart SDK 2.17 as a minimum requirement.
You can add dependencies in your pubspec.yaml
file (you should check pub.dev
for the latest versions):
Now itβs possible to import packages and start using these rich geospatial tools in your Dart or Flutter application:
If you donβt need Web API support for OGC API Features and GeoJSON resources,
then you can just omit geodata
and use only geobase
as a dependency.
π Shortcuts to docs
Overview
Package: geobase
Package: geodata
βΆοΈ Next steps
Next follow the reading path to the introduction, use shortcut links above or read usage guides on geobase and geodata packages.