Friday 1 March 2019

arcgis 10.1 - Automatically create polygons from top right and bottom left coordinates?


I have a CSV file with hundreds of records. Each record contains 2 matching coordinates, 1) top right corner of a rectangle, 2) bottom left corner of a rectangle.


Polygon ID, Lat 1,       Lat 2,       Long 1,       Long 2          
1, 27o 28' 28", 27o 33' 30", 86o 06' 04", 86o 15' 00"


Is there a method which I can use to automate the creation of these polygons? I anticipate there being a few steps.



Answer



For thoroughness, below I am providing the solution I implemented.



  1. Converted coordinates to decimal degrees in Excel using a simple macro.

  2. Added extra columns representing the 2 corners not present in the original file. Therefore, all 4 corners were stored in the file.

  3. Added an ID field (one ID for each set of 4 points (corners).

  4. Imported the CSV into ArcGIS and plotted the points.

  5. Converted the points to polygons using the ID field. This resulted in the final polygon 'footprint' layer.



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