Skip to content

St_AsGeoJSON wkid? #421

Answered by Maxxen
DrewScatterday asked this question in Q&A
Oct 1, 2024 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

Hello! The ST_AsGeoJSON and ST_GeomFromGeoJSON, like most functions in DuckDB are agnostic the whatever SRID/WKID the input geometries are in, because DuckDB does not store nor track the SRID of individual geometries or columns. In this case you simply get out whatever you put in, the coordinate data itself just gets converted to/from string, but no other flipping/transformation takes place. If you want to transform the geometries into some other coordinate system you should use ST_Transform and provide both a source and target SRID.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@DrewScatterday
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by DrewScatterday
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants