Timeline for How to reformat SQL statement to export GeoJSON from PostGIS table?
Current License: CC BY-SA 4.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 21, 2022 at 18:00 | history | tweeted | twitter.com/StackGIS/status/1484586627250982918 | ||
| Jan 17, 2022 at 13:31 | history | edited | geozelot |
edited tags
|
|
| Jan 17, 2022 at 11:32 | vote | accept | nizz0k | ||
| Jan 17, 2022 at 11:07 | answer | added | geozelot | timeline score: 2 | |
| Jan 16, 2022 at 16:14 | comment | added | nizz0k | Thanks for your comment and example. The syntax is still pretty confusing as it's not clear how the tables are being referenced, which ID is necessary, and how to format the WHERE clause. I'm completely lost with referencing the tables as single letters, I just want to pull a collection of points with some supplemental descriptive data from another table into a feature collection. | |
| Jan 16, 2022 at 15:39 | history | edited | nizz0k | CC BY-SA 4.0 |
fixed grammar
|
| Jan 16, 2022 at 14:48 | comment | added | geozelot | This answer should help. | |
| Jan 16, 2022 at 14:41 | comment | added | geozelot |
I wrapped the ST_AsGeoJSON(RECORD) function into a moving aggregate UDF here: it returns a FeatureCollection as JSONB. You'd create a table with the desired properties and the geometry in a sub-query, as per the docs. Might be a handy function set if you need to create these regularly.
|
|
| Jan 16, 2022 at 10:46 | history | asked | nizz0k | CC BY-SA 4.0 |