Violation of the GeoJSON specification in the server response
These parts of the code violate the GeoJSON specification (see RFC7946 https://datatracker.ietf.org/doc/html/rfc7946#section-3.3) regarding the allowed content of the FeatureCollection Object
A FeatureCollection object has a member with the name "features".
https://github.com/woodpeck/postpass/blob/57756589aec38a94ffd7ff20aff4ca408f89696e/postpass/main.go#L98-L101
https://github.com/woodpeck/postpass/blob/57756589aec38a94ffd7ff20aff4ca408f89696e/postpass/main.go#L112-L115
I am not super invested in having these two propterties items, I just thought it may be nice to have. Perhaps I should simply rename them extradata instead of properties and then they could sail under https://datatracker.ietf.org/doc/html/rfc7946#section-6.1:
Members not described in this specification ("foreign members") MAY be used in a GeoJSON document.
– would that be better?
https://datatracker.ietf.org/doc/html/rfc7946#section-6.1:
It's up to you. However, according to the GeoJSON specification, extra properties are added to a particular "type": "Feature" element, which can lead to output clogging with repeated lines of information, which can cause additional traffic and processing costs.
If this is possible, I would simplify the output by removing this additional property altogether. GeoJSON is fine when you need to render data visualisations, but it's not so great for data exchange.
I don't know of any actual issue with those additional fields. Its good to have them … but they do no harm – even if invalid from a schema point of view.
I don't know of any actual issue with those additional fields.
You can try using the output with https://geojson.io/ to run into some issues. 🤷♂
IMO It is better to follow standards, especially when they are established.