I received shape files, and imported it. I can see the shapes, but I need to export the cordinate points of the shape to an excel or csv file in order to import into another program.
You still have a shapefile...
Line 9.... it is Shape@ , not Shape*
""You still have a shapefile..."" what would file i need ??
i changed it to shape@ but still same, can you use this code and run it ? then you can find the point i fail, thanks you very much because help me ....
Hi Havan Cong ,
When you look at the original code I provided, you will see on line 4:
fc = r'C:\GeoNet\WKT\data.gdb\polygons' # the input polygons
In my case, I have a featureclass named "polygons" which is stored inside a file geodatabase called "data.gdb" inside the folder "C:\GeoNet\WKT".
In your case you have:
fc = r'C:\GeoNet\WKT\data.gdb\polygons.shp'
You are using a shapefile called "polygons.shp" which is located inside a folder called "C:\GeoNet\WKT\data.gdb". Possibly using a folder name with a point in it is causing the problems or maybe there is something wrong with the polygon shapefile. Is it possible to attach a ZIP file with the shapefile to this thread to see what is causing the problem?
The error indicates that it cannot open the shapefile.
Thank you for your help Xander, it's worked. But the result of a test run i get not like my wish
example: the coordinates of polygon i use is a GCS_WGS_1984 and the result show me like this
but the file result i want to receive like below :
the type coordinates is Degree same like coordinates of Google earth file
Could you please help me change a little bit of the code and then export the coordinates like i hope
thank you very much Xander....
I guess that if you project your coordinates to WGS 1984, the result will list the coordinates in WGS 1984 decimal degrees. The code will not change the coordinates, just make sure your shapefile or featureclass is in the right coordinate system before you run the code.