Friday, 10 April 2015

Switch line direction for PostGIS-lines in QGIS or Pgadmin


I am trying to switch the line direction in a PostGIS-layer. The postgis-geometry column is e.g. "LINESTRING(0 0, 1 1, 2 1, 2 2)".


The reason is that my symbology is direction-dependent, but I drew some lines in the wrong direction.


I have tried using my usual approach that seems to only work for shapefiles. It is the code by Nathan W. that is in the answer that is linked below.



Link to similar question:




Answer



If postgis resolution is also good maybe you're looking for ST_Reverse function


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...