paulmach / orb

Types and utilities for working with 2d geometry in Golang
MIT License
886 stars 103 forks source link

ExtraMember concept but for GeoJSON Features #146

Open jjcfrancisco opened 5 months ago

jjcfrancisco commented 5 months ago

It would be great to be able to have ExtraMember concept for a GeoJSON feature. This is also in line with the GeoJSON specification https://www.rfc-editor.org/rfc/rfc7946#section-5.

paulmach commented 5 months ago

Is "Foreign/extra members in a feature collection" not what you need?

https://github.com/paulmach/orb/tree/master/geojson#foreignextra-members-in-a-feature-collection

jjcfrancisco commented 5 months ago

Thanks for the quick response. I meant at the Feature level so I could end up with a GeoJSON like this (note the new key myNewFeature):

{ "type": "FeatureCollection",
  "generator": "myapp",
  "timestamp": "2020-06-15T01:02:03Z",
  "features": [
    { "type": "Feature",
      "myNewFeature": "blah",
      "geometry": {"type": "Point", "coordinates": [102.0, 0.5]},
      "properties": {"prop0": "value0"}
    }
  ]
}