Opened 13 months ago
Closed 12 months ago
#5596 closed enhancement (fixed)
ST_ASGeoJSONRow: cannot set id directly on feature
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.
Change History (3)
comment:1 by , 13 months ago
Description: | modified (diff) |
---|
comment:2 by , 13 months ago
Note:
See TracTickets
for help on using tickets.
Forgot to mention, I have opened a PR with an implemententation: https://github.com/postgis/postgis/pull/749