Skip to content
Switch branches/tags

Latest commit

I've just added an example of how to great a GeoInterface object and write it to disk as a geojson. 

I struggled to figure this out so thought an example might help whomever comes next

Git stats


Failed to load latest commit information.
Latest commit message
Commit time


CI Coverage Status Latest Documentation

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 and crs method. If you wish to provide a bbox or crs attribute, wrap the geometry into a Feature or FeatureCollection.
  • Features do not have special fields for id, bbox, and crs. These are to be provided (or found) in the properties field, under the keys featureid, bbox, and crs 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 for GeoJSON.jl can be found at