Adding XY (Lon, Lat) Coordinates to a shapefile

Problem: I have a point shapefile that I want to use with Tableau, but the data does not have X,Y or Longitude, Latitude in the dataset. What do I do?

Both ArcGIS and QGIS have the ability to add this data to shapefiles relatively easily.

Important: The point file must first be projected, otherwise the coordinates will not work with Tableau.

ArcGIS

My layer/dataset is called “fdia_eng_pnt”.

1. Open ArcToolbox

2. Goto Data Management Tools -> Projections and Transformations -> Feature -> Project

3. Pick your input and output datasets

4. for the Output Coordinate system, pick WGS 1984 (EPSG:4326).

5. Click OK

Once this process is done, the new layer is added to ArcGIS.  Next…

6. Go to the Geoprocessing menu, then select Python. This will open the Python command window.

7. Type the following command (I know, so old-school…) and press enter:

arcpy.addxy_management("fdia_eng_pnt")

8. ArcGIS will create 4 columns in the dataset: Point_X, Point_Y, Point_Z, and Point_M.

addxy

QGIS

First, to reproject the data:

1. Go to Processing -> Toolbox.

2.  In the toolbox, go to Geoalgorithms -> Vector -> General tools -> Reproject layer.

3. For Target CRS, select EPSG:4326

4. Run, this will create a new layer.

Here is a link to an app company called Fulcrum that has step by step instructions for creating the same columns in QGIS.

Once the columns have been created, you can export the dataset to a CSV that can then be opened in Tableau.

ArcGIS: Advanced Labelling

Good article on how to create labels in ArcGIS.  Was specifically looking for information on how to create multi-line labels.

http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=About_building_label_expressions

 

Here’s a link to a list of the ArcGIS formatting codes – almost but not quite HTML.  Not sure why the custom tags instead of using html.

http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=Formatting_tags_available_in_ArcMap