karoth4

MakeXYEventLayer Issues with .csv

Discussion created by karoth4 on Apr 16, 2014
Latest reply on Apr 21, 2014 by aimong
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",
[INDENT][INDENT][INDENT]u'GeographicCoordinateSystem/World/WGS 1984',"Value")[/INDENT] [/INDENT][/INDENT]


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!

Outcomes