How to see the coordinates of the vertices of polygons in ArcMap?

2618
4
Jump to solution
03-02-2016 08:53 AM
JoseVazquez1
New Contributor

Hello and thank you in advance for helping me. I imported some data of the shapes of the buildings footprints into ArcMap, and when I open the attribute table I can only see the word "Polygon" in all the elements of the column Shape. However, I can see perfectly the shapes of the buildings displayed on the map. I'd need to access the actual coordinates of the vertexes of the polygons. For example: MULTIPOLYGON(((-0.033700 -6062.86549,-12.5930 -6065.154699,-12.00290 -6069.26459,-9.1801 -6068.803799,-6.70300 -6083.96449999977,1.136500 -6082.745000,-0.949500 -6069.855,1.0263 -6069.53539,-0.033700 -6062.8654)))

Does anyone know how to see the coordinates in that format?

0 Kudos
1 Solution

Accepted Solutions
DarrenWiens2
MVP Honored Contributor

That is the WKT property of polygon geometry:

>>> with arcpy.da.SearchCursor("YOUR_FEATURE_CLASS","SHAPE@") as cursor:
...    for row in cursor:
...        print row[0].WKT
...       
MULTIPOLYGON (((1104099.6953918971 1638644.7216630857, 1106049.9706553277 1640403.7934693154, 1104197.6684162933 1642457.4329082444, 1102247.3931528646 1640698.3611020166, 1104099.6953918971 1638644.7216630857)))

If you have a very long text field, you can also access this through Field Calculator with the expression (Python parser):

!Shape!.WKT

View solution in original post

4 Replies
DarrenWiens2
MVP Honored Contributor

That is the WKT property of polygon geometry:

>>> with arcpy.da.SearchCursor("YOUR_FEATURE_CLASS","SHAPE@") as cursor:
...    for row in cursor:
...        print row[0].WKT
...       
MULTIPOLYGON (((1104099.6953918971 1638644.7216630857, 1106049.9706553277 1640403.7934693154, 1104197.6684162933 1642457.4329082444, 1102247.3931528646 1640698.3611020166, 1104099.6953918971 1638644.7216630857)))

If you have a very long text field, you can also access this through Field Calculator with the expression (Python parser):

!Shape!.WKT
RobertBurke
Esri Contributor

Start an edit session, 1 double-click the polygon, 2 click the Sketch Properties button, and 3 see all the the polygon's vertices.  You can edit the coordinates of a Vertex there if you like.

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

You could convert feature vertices to points, and calculate their X and Y value in attribute table. Advanced License required.

Feature Vertices To Points—Data Management toolbox | ArcGIS for Desktop



Think Location
0 Kudos
DanPatterson_Retired
MVP Emeritus

If you want a table or array

FeatureClassToNumPyArray—Help | ArcGIS for Desktop

>>> import arcpy

>>> f = r"C:\DataFiles\some.shp"

>>> a = arcpy.da.FeatureClassToNumPyArray(f, ["OID@", "SHAPE@XY"],explode_to_points=True)

>>> a

array([(0, [347309.9062215363, 5036073.262497725]),

       (0, [347352.2036015694, 5036037.2590218065]),

       (0, [347355.2472312949, 5036033.558664559]), SNIPP

       (0, [346405.7337367749, 5036803.853031834]),

       (0, [346809.20026257884, 5036499.573655495]),

       (0, [347309.9062215363, 5036073.262497725])],

      dtype=[('OID@', '<i4'), ('SHAPE@XY', '<f8', (2,))])

0 Kudos