1

This question already has an answer here:

I am currently trying to export the geodata from a series of polygons in several .lyr files within my geodatabase in ArcGIS 10.2. I want to export the series of polygons within my layer as WKT (well known text format). So that I may assign a geodata column in my CSV file for later importation and data management.

Does anyone know how to achieve this?

marked as duplicate by PolyGeo Aug 4 '15 at 7:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

You may want to write a python script to achieve this using SearchCursor and SHAPE@WKT key word.

for row in arcpy.da.SearchCursor("PolygonLayer", ["SHAPE@WKT"]):
  print row[0]

Refer ESRI complete example here http://resources.arcgis.com/en/help/main/10.1/index.html#//002z0000001t000000

import arcpy

infc = arcpy.GetParameterAsText(0)

# Enter for loop for each feature
#
for row in arcpy.da.SearchCursor(infc, ["OID@", "SHAPE@WKT"]):
    # Print the current multipoint's ID
    #
    print("Feature {0}:".format(row[0]))
    partnum = 0

    # Step through each part of the feature
    #
    for part in row[1]:
        # Print the part number
        #
        print("Part {0}:".format(partnum))

        # Step through each vertex in the feature
        #
        for pnt in part:
            if pnt:
                # Print x,y coordinates of current point
                #
                print("{0}, {1}".format(pnt.X, pnt.Y))
            else:
                # If pnt is None, this represents an interior ring
                #
                print("Interior Ring:")
        partnum += 1

Not the answer you're looking for? Browse other questions tagged or ask your own question.