ST_DumpPoints(geom)
gives me something like this:
("{1,1}",0101000020E61000002DEDD45CEEB362C0CE1951DA1BC24E40)
("{1,2}",0101000020E6100000C94AD826F1B362C09D4B7BC72CC24E40)...
Where I want it to look like this
seq lat lon
1, 61.1, -149.1
2, 61.2, -149.2 ...
I've played around with ST_AsText
and ST_AsGeoJson
which gets me closer but I would like to parse it with SQL instead of the text.
ST_AsText
line in theSELECT
clause)ST_AsText
would return the WKB (binary) representation of the point. You just need to doST_X
/ST_Y
on the geometry to split it out as float values.