Wednesday 26 December 2018

open source gis - Converting tax map polygons from Shapefile to table of map number and corner coordinates


Fairfax County, Virginia provides a Shapefile here which shows the boundaries of the tax maps as polygons. Each polygon simply consists of four corners, and what I'd like to do is create a table showing the map number and the coordinates of the corners, such as the following:


Map number, bottom-left, bottom-right, top-right, top-left
77-1, -77 32, -76 32, -76 33, -77 33


(though they aren't quite square like this)


I don't have access to ArcGIS software, but do have QGIS and OpenJUMP, and can install any other software that is freely available. I believe this should be very easy but I'm just missing something. Thanks!




Answer



In QGIS you can use "Extract nodes" to first get the corner points of your polygons. Then, using "Export/Add geometry columns" you can add x and y coordinates to those points. The results will be four lines of data though.


Another way is to copy paste the geometries from QGIS' map window into a text editor. You'll get the WKT representation of the polygons, e.g.


wkt_geom
POLYGON((-0.971664 0.453443,-0.516714 0.827044,-0.245552 0.432353,-1.001793 -0.224462,-0.971664 0.453443))

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