I am having a bunch of .csv files containing "x" and "y" of some locations (to be specific, Brazil and the coordinate system is SIRGAS 2000). I want to convert them into wgs84 i.e, lat/long using arcpy and rewrite the .csv files having lat/longs to corresponding "x" and"y" using python. Can anyone please help me doing that?
Here is one option to create the arcpy code:
- Create a ModelBuilder model
- Add/connect Make XY Event Layer -> Feature Class to Feature Class -> Project -> Add XY Coordinates -> Copy Rows tools, and define all parameters and run model. This will convert your .csv table to a layer that you can re-project and add new x/y field with the 4326 coord values
- Finally, in the model export out python script, Model (menu) -> Export -> To Python Script...
This will produce the related arcpy/python script which you may use and tweek as needed.