dv_geo_core library

Core geographic projections and GeoJSON parsing.

Classes

AlbersProjection
Albers equal-area conic projection. Preserves area, commonly used for US maps.
EquirectangularProjection
Equirectangular (Plate Carrée) projection. Maps longitude and latitude linearly to x and y.
GeoJsonFeature
A GeoJSON Feature.
GeoJsonFeatureCollection
A GeoJSON FeatureCollection.
GeoJsonGeometry
GeoJSON types and parsing utilities. A GeoJSON geometry object.
GeoJsonGeometryCollection
A GeoJSON GeometryCollection.
GeoJsonLineString
A GeoJSON LineString geometry.
GeoJsonMultiLineString
A GeoJSON MultiLineString geometry.
GeoJsonMultiPoint
A GeoJSON MultiPoint geometry.
GeoJsonMultiPolygon
A GeoJSON MultiPolygon geometry.
GeoJsonPoint
A GeoJSON Point geometry.
GeoJsonPolygon
A GeoJSON Polygon geometry.
GeoPath
Generates path data from GeoJSON geometries using a projection.
MercatorProjection
Mercator projection. Preserves angles and shapes locally, but distorts areas near poles.
OrthographicProjection
Orthographic projection (globe view). Shows the Earth as it appears from space.
Projection
Base class for geographic projections.
TransverseMercatorProjection
Transverse Mercator projection.

Mixins

ProjectionMixin
Helper for creating projections with common parameters.

Functions

clampLatitude(double lat) double
Clamps a value to valid latitude range.
clampLongitude(double lon) double
Clamps a value to valid longitude range.
geoAlbers({(double, double)? center, double scale = 1, Point? translate, double parallels0 = 29.5, double parallels1 = 45.5}) AlbersProjection
Creates an Albers projection.
geoAlbersUsa() AlbersProjection
Creates an Albers USA projection centered on the contiguous United States.
geoEquirectangular({(double, double)? center, double scale = 1, Point? translate}) EquirectangularProjection
Creates an equirectangular projection.
geoMercator({(double, double)? center, double scale = 1, Point? translate}) MercatorProjection
Creates a Mercator projection.
geoOrthographic({(double, double)? center, double scale = 1, Point? translate, (double, double, double)? rotate}) OrthographicProjection
Creates an orthographic projection.
geoPath(Projection projection) GeoPath
Creates a GeoPath generator.
geoTransverseMercator({(double, double)? center, double scale = 1, Point? translate}) TransverseMercatorProjection
Creates a transverse Mercator projection.
parseGeoJson(Map<String, dynamic> json) → dynamic
Parses a GeoJSON object from a map.
toDegrees(double radians) double
Converts radians to degrees.
toRadians(double degrees) double
Converts degrees to radians.