-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow properties to be added to Geo types #74
Comments
There is no limitation that would prevent that. It would just be ignored unless used by something like the Geo.JSON module. I think adding properties is fine. If another request for adding a GeoJSON specific item comes up, I'm leaning towards making something that follows the spec exactly that wraps around the Geo structs. |
The GeoJSON RFC states that "FeatureCollection and Geometry objects, respectively, MUST NOT contain a "geometry" or "properties" member." This came up in a discussion I had with one of the RFC authors. It seems that the general theme here is a lack of support for metadata. Your cases is pretty custom, but there are some cases where metadata is vital to retaining information when converting between formats (GeoJSON to/from EWKT/EWKB, for example). Relevant issues: I would really like to see some official guidance for how to include metadata/extensions in the GeoJSON schema. I'll have to go and do a bit of research. |
Hi, That's exactly what the
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"name": "Hanoi",
"month_notes": [2, 2, 3, 4, 3, 2, 2, 2, 3, 4, 5, 3],
"location": "Hanoi, Vietnam",
"country": "vietnam"
},
"geometry": {
"type": "Point",
"coordinates": [
105.8341598,
21.0277644
]
}
},
... Any plans to implement it ? |
I've been thinking about this a lot and I think instead of trying to shoehorn geojson features into the geometry types, maybe it would be cleaner to create struct(s) around geojson itself. Maybe that's a better direction to move towards |
But this is not stoehorning, the Feature type exists for this sole purpose : have geometry and properties in one entity ... |
Looking at the spec and thinking on it a bit, I think adding |
Fixed in 4647ed3 |
Is there a PostGIS (or other) limitation that would prevent us from adding
properties
to the Geo structs?For example it would be very nice to be able to do the following:
The text was updated successfully, but these errors were encountered: