So I got an email from one of our GIS users:
Hi Karl, I need to convert some large files with XY Easting/Northing coordinates to latitude and longitude. Do you have any idea how to do this in STATA or GIS?
I assume the input data is in some tabular format that ArcGIS can read – MS Excel, Access, CSV, etc, and the input coordinates are British National Grid. So this is how it works:
- Start ArcMap
- Load the input data:
- Fo to File > Add Data. Add your input table. This can be an Excel worksheet, CSV file, dBase file, MAS Acess table, Geodatabase table, ….
- Open the table and check that all data is loaded correctly
- Make it spatial:
- Right-click in the data frame and set the coordinate system to whatever your Easting/Northing is in, e.g. British National Grid
- File > Add Data > Add XY data
- Specify the input data table, X and Y field, and input coordinate system
- you now see a new map layer named <inputtable>$Events
- right-click the layer name , Export > Export data. This creates a Shapefile, call it e.g. MySurvey_BNG.shp. When asked if you want to add the new file to the project, say Yes.
- Convert to Lat/Lon
- Go to ArcToolbox > Data Management > Projections and Transformations > Features > Project.
- Select Input layer MySurvey_BNG. The Input Coordinate System will be set automatically. Specify output location and name, e.g. MySurvey_DD.shp. Click the icon next to Output Coordinate System and select Geographic > World > WGS1984, OK. From the transformation drop-down lists select ‘OSGB_1936_to_WGS_1984_Petroleum’ .
- Add fields with Lat/Lon coordinates
- Go to ArcToolbox > Data Management > Features > Add XY Coordinates.
- Specify the projected layer (MySurvey_DD). OK
- When the tool finishes open the attribute table for the projected Layer (MySurvey_DD). It now contains fields Point_X and Point_Y in Decimal Degrees on WGS1984.
- Export to other software (MS Excel, SPSS, etc.): In the table click the top left button > Export. Export to dBase or Text.
Note: If you work with Geodatabase instead of Shapefiles the X and Y fields will be added automatically, you don’t need to calculate them.