JuliaGeo / GeoJSON.jl

Utilities for working with GeoJSON data in Julia
https://juliageo.org/GeoJSON.jl/stable/
MIT License
68 stars 10 forks source link

Review departures in behavior from GeoJSON #31

Open yeesian opened 3 years ago

yeesian commented 3 years ago

Follow-up from #30: in that PR, we're made it clearer that

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.

There was the following question (which is left unaddressed):

I wonder if GeoJSON.jl should also warn or error if it would overwrite existing properties when doing these transformations. I think it should.

Opening this issue for discussions before we have a resolution for it.