Wednesday 14 June 2017

sql - PostGIS: syntax-basics for function


I am a completely new in PostGIS.


I tried to solve a problem I had in QGIS (see Simplify multiple lines: create central axis?).


I just need to know how the correct syntax works to use the function ST_ApproximateMedialAxis(geometry geom);


I succesfully added the geometry to the pgAdmin4 Geometry Viewer with the query


select geom from public.bufferrail; - so that seems to be correct.


But how to include this geometry as argument to the function?


SELECT ST_ApproximateMedialAxis (select geom from public.bufferrail); does not work. I tried several variations, with no success.



Answer



The correct query is Select uid, ST_ApproximateMedialAxis(geom) from public.bufferrail;



No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...