WKT .csv file to Polygons

312
4
10-20-2021 10:24 PM
OmarIsmail2
New Contributor II

Hello

I am trying to convert a .csv file with WKT geometry into a polygon shapefile in arcmap. I saw some examples where arcpy was used to do this but I am struggling to use the code despite experience with python (although in different syntax). Is there any other way of converting the data? if not does anyone have a clear resource for using the arcpy code. 

I included a screenshot of my table and the code I am trying to use. 

Any help would be much appreciated thanks.

Tags (3)
0 Kudos
4 Replies
JayantaPoddar
MVP Esteemed Contributor

Could you share a sample CSV for us to test?



Think Location
OmarIsmail2
New Contributor II

yes here is a sample csv. thank you. 

 

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

FromWKT() can be used using ArcPy, a sample explained in the comments of Utilizing 'fromWKT' function in python in version ... - Esri Community.

 

However, if you have QGIS, it could be pretty straightforward using "Add Delimited Text Layer" tool.

https://docs.qgis.org/3.16/en/docs/user_manual/managing_data_source/opening_data.html#importing-a-de...

JayantaPoddar_0-1634827958262.png

 

 

 

 

 

 

 

 

 

 



Think Location
OmarIsmail2
New Contributor II

Thank you. I ended up downloading Qgis just to do this. I find it strange that ArcGIS doesn't have a tool for this, although I guess arcpy works well for those familiar enough with it. 

0 Kudos