Re:GeoJSON
by michaeljhg on Friday May 08, 2026 @08:22AM
(#48062053)
Also https://postgis.net/
[ Parent
| on HN ]
And with PostgREST [0], you can automatically convert any PostGIS table (with geometry or geography column) to GeoJSON by using an "Accept: application/geo+json" header in the request.
[0] https://docs.postgrest.org/en/v14/how-tos/working-with-postg...
At the SQL level, the ST_AsGeoJSON(record) variant will convert a tuple that includes a geometry and any combination of other columns into a GeoJSON output.
Re:GeoJSON
by steve-chavez on Friday May 08, 2026 @02:10PM
(#48066747)
Many thanks for your work pramsey. We use that exact function [1], do you have any plans for a similar function for TopoJSON? One that also has a record parameter? [2].
[1]: https://github.com/PostgREST/postgrest/blob/f1d0e8ea2266077d...
[2]: PostGIS has https://postgis.net/docs/AsTopoJSON.html but it doesn't take a record.
Also https://github.com/timescale/timescaledb
I've found it very useful for storing geospatial data over time.