CSV to polygons?

1808
1
12-21-2018 01:20 AM
PredragMiljkovic
New Contributor

Hello,

I have CSV file with polygons and lines. Every polygon (row in CSV file) is represented with two opening and two closing brackets, with the XY coordinates of every point that makes that single polygon. Every line (row in CSV file) is represented with one opening and one closing bracket, with the XY coordinates of every point that makes that single line. 

examples 

LINESTRING(404330.95466888 5103773.3035789,404335.41731537 5103770.8243309,404341.53279388 5103769.6673485) 

POLYGON((404906.6444156 5103672.6880671,404908.95838045 5103653.8457819,404906.6444156 5103672.6880671))

How to import these files, so the lines are shown as lines and polygones as polygones in arcmap? 

Best regards 
Predrag

0 Kudos
1 Reply
XanderBakker
Esri Esteemed Contributor

It seems that you have a WKT string with the geometry. You could use a script to import the geometries using FromWKT—ArcPy Functions | ArcGIS Desktop