Geospatial data structures, tools and utilities for Dart and Flutter mobile developers.
This repository is at BETA stage, interfaces not fully final yet.
The geocore library package, based on Dart code hosted by this repository, provides geospatial data structures (features, geometry and metadata) and utilities to parse GeoJSON and WKT (Well-known text representation of geometry) data. The package also supports representing both geographic (decimal degrees or longitude-latitude) and projected (or cartesian XYZ) coordinates in 2D and 3D.
Some samples from the geocore package, please see the package itself for more documentation:
As another library package, geodata provides a geospatial API client supporting reading GeoJSON and other geospatial data sources from web and file sources.
Please see also generic (non-geospatial) data structures, tools and utilities at the separate Dataflow tools for Dart repository.
This repository contains the following Dart code packages:
Code @ GitHub | SDK | Description |
---|---|---|
🌐 geocore | Dart | Geospatial data structures (features, geometry and metadata) and utilities (GeoJSON and partial support for Well-known text representation of geometry). |
🌎 geodata | Dart | A geospatial API client to read GeoJSON and other geospatial data sources. |
Packages and documentation are published at pub.dev.
Latest package releases:
Package @ pub.dev | Version | Documentation | Example code |
---|---|---|---|
🌐 geocore | API reference | Example | |
🌎 geodata | API reference | Example |
Previously part of this repository, but starting from the version 0.6.0 code for these are hosted at the dataflow repository:
Package @ pub.dev | Version | Documentation | Example code |
---|---|---|---|
🗒️ attributes | API reference | Example | |
☁️ datatools | API reference | Example |
All packages supports Dart null-safety and using them requires at least Dart 2.12 from the stable channel. Please see the official null-safety migration guide.
2021-05-22
- geocore with new BETA version 0.6.2 (updated documentation)
2021-05-16
- geocore with new BETA version 0.6.1
- initial support for Well-known text representation of geometry or WKT
- Also easier to use factories for points, line strings, polygons, etc.
- Make geometries from arrays of num values.
- Parse geometries from text with default implementation based on WKT.
2021-04-25
- BETA version 0.6.0
- Some code packages were moved out from this repository to the new dataflow repository as they are not geospatial at all
- Lint rules and analysis options updated
- Also
implicit-casts
andimplicit-dynamic
set to false requiring code changes
2021-03-03
- BETA version 0.5.0 with stable sound null-safety on all packages requiring the stable Dart 2.12
2021-02-28
- the first BETA version 0.5.0
- preparing to stabilize null-safety features as described by the official blog:
- datatools totally refactored
- Fetch API abstraction (content, control data, exceptions, fetch interface).
- Fetch API binding to HTTP and HTTPS resources (using http).
- Fetch API binding to file resources (based on
dart:io
).
- geodata also refactored, now with data source implementations:
- GeoJSON features from Web APIs or files
- OGC API Features based services
- other cleanup on other packages too
2021-01-10
- latest alpha version 0.4.1
- Point classes in geocore refactored to have
num
getters
2021-01-03
- alpha version 0.4.0
- refactored some code to new packages:
2020-11-29
- initial alpha version 0.1.0
- designed to Dart null-safety from start
- the first version with following packages
Future enhancement candidates for geocore, not in any order:
- Optimizations and consistency for geometry, feature and meta classes #27
- Coordinate reference system (CRS) identifiers enhanced #28
- WKT parser - add support for parsing GEOMETRYCOLLECTION #24
- Add EWKT support, handle axis order when reading WKT #29
- Coordinate transformations on core classes and reading datasource #15
- Add support for other geometry classes known by WKT #30
- Define consistent mini library exports with base classes included #31
See other issues too.
This project is authored by Navibyte.
This project is licensed under the "BSD-3-Clause"-style license.
Please see the LICENSE.
Some external links and other resources.
Geospatial:
- GeoJSON based on RFC 7946
- Simple Feature Access - Part 1: Common Architecture
- WKT (Well-known text representation of geometry)
- Coordinate Reference Systems by W3C
- EPSG (Geodetic Parameter Dataset)
OGC (The Open Geospatial Consortium) related:
W3C
SDKs:
Latest on SDKs
Packages
Null-safety:
- Dart null-safety
- The official null-safety migration guide
- Preparing the Dart and Flutter ecosystem for null safety
Guidelines
Roadmaps
There are thousands of excellent libraries available at pub.dev.
Here listed only those that are used (depended directly) by code packages of this repository:
Package @ pub.dev | Code @ GitHub | Description |
---|---|---|
equatable | felangel/equatable | Simplify Equality Comparisons |
meta | dart-lang/sdk | This package defines annotations that can be used by the tools that are shipped with the Dart SDK. |
synchronized | tekartik/synchronized.dart | Basic lock mechanism to prevent concurrent access to asynchronous code. |