geobase
1.5.0, released 2 years ago by navibyte.com
Geospatial data structures, geometry calculations, geodesy, projections, and vector formats in Dart.
WASM-ready
What it does
Geobase provides data structures and algorithms for geographic and projected coordinates, simple geometries, ellipsoidal and spherical geodesy, tiling schemes, coordinate projections, and vector formats like GeoJSON, WKT, and WKB.
AI-written summary of version 1.5.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to parse or encode vector formats like GeoJSON, WKT, or WKB in pure Dart.
- You need to perform geodesic calculations, spatial measurements, or coordinate transformations without a heavy map UI.
Skip it when
- You only need high-level interactive map widgets and UI rendering.
- You need built-in live device GPS tracking (use geolocator instead).
Strengths
- Comprehensive support for geometric calculations, projections, and formats (GeoJSON, WKT, WKB).
- Pure Dart package working across mobile, web, and desktop platforms.
Weaknesses
- Does not include visual map rendering widgets out of the box.
- Requires understanding of geospatial terminology and coordinate systems.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
import 'package:geobase/geobase.dart';
void main() {
final greenwich = Geographic.parseDms(lat: '51°28′40″ N', lon: '0°00′05″ W');
final sydney = Geographic.parseDms(lat: '33.8688° S', lon: '151.2093° E');
final distance = greenwich.vincenty().distanceTo(sydney);
print('Distance: $distance');
}Alternatives
Packages that do the same job and could replace geobase.
Works with
Packages commonly used together with geobase: ones it builds on, ones built on it, and its own family.
- proj4dartgeobase depends on itTransform point coordinates between different coordinate systems and datums.
- maplibreBuilt on geobasePerformant vector maps for Flutter supporting Mapbox Vector Tiles across all six platforms.
- geocoreBuilt on geobaseGeospatial data structures and parsers for GeoJSON and WKT in Dart.