Opened 13 months ago
Last modified 12 months ago
#5596 closed enhancement
ST_ASGeoJSONRow: cannot set id directly on feature — at Version 1
Reported by: | jtojnar | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 3.5.0 |
Component: | postgis | Version: | 3.4.x |
Keywords: | json | Cc: | jtojnar |
Description (last modified by )
As per GeoJSON RFC, the id should go directly to the feature object rather than to properties:
If a Feature has a commonly used identifier, that identifier SHOULD be included as a member of the Feature object with the name "id"
But ST_ASGeoJSONRow
does not support this so one needs to tediously build JSON object manually with jsonb_build_object
as described in the manual.
Ideally, there would be a new argument that would allow specifying which column to promote to id.
Note:
See TracTickets
for help on using tickets.