GeoJSON.jl
This library is developed independently of, but is heavily influenced in design by the python-geojson package. It contains:
- Functions for encoding and decoding GeoJSON formatted data
- a type hierarchy (according to the GeoJSON specification)
- An implementation of the _geo_interface_, a GeoJSON-like protocol for geo-spatial (GIS) vector data.
Note that GeoJSON.jl loads features into the GeoInterface.jl format and that this differs from GeoJSON in the following ways:
- Julia Geometries do not provide a
bbox
andcrs
method. If you wish to provide abbox
orcrs
attribute, wrap the geometry into aFeature
orFeatureCollection
. - Features do not have special fields for
id
,bbox
, andcrs
. These are to be provided (or found) in theproperties
field, under the keysfeatureid
,bbox
, andcrs
respectively (if they exist).
When saving GeoJSON, these transformations will be reversed: if properties
has a key featureid
, that will be removed from properties
and a matching member id
will be added to the Feature; similarly for crs
and bbox
.
Documentation
Documentation for GeoJSON.jl can be found at https://juliageo.github.io/GeoJSON.jl/dev/.