Tuesday, 9 June 2015

Getting corners of polygon in latitude and longitude using PostGIS?



How can I get the corners of a polygon -a square/rectangle, to be precise- in latitude-longitude format by using its geom value -or some other way, using PostGIS?



Answer



ST_extent(geom) You will receive left, bottom, right and top value. Combining them you will get corners


http://postgis.net/docs/ST_Extent.html


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