Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

MakeXYEventLayer Issues with .csv

$
0
0
Hello!

I have been working on plotting points on to a world map using latitude longitude coordinates in a .csv file, but they are always plotted in the wrong location.

Here is my code:

arcpy.MakeXYEventLayer_management('C:/FilePath.../SafeCastData.csv',"Latitude","Longitude","TestPlot",
u'GeographicCoordinateSystem/World/WGS 1984',"Value")

This plots them all at the south pole in the World Topology Basemap.

What Works:
Creating a geodatabase, importing csv file into a table, adding data to ArcMAP table of contents, and clicking Display XY... with all of the same settings as above.

Why does using a geodatabase work, but not a csv file? I really need a way to work on the file directly in the python code, and not through ArcMAP.


Thanks in advance!

Viewing all articles
Browse latest Browse all 2485

Trending Articles