ArcGIS: Adding XY Data

Introduction

Adding XY data is a basic geoprocess that I struggle with every time I encounter it. In my standard operating procedures at work, all data is set up and I dont have to think about the appropriate datum or projection to use. I can just "borrow" the predefined projection from the ArcSDE dataset, and I know that any data I create will be in the "correct" projection. This is lazy but efficient.

I'm doing an online mapping course with the Albury TAFE and they've some coordinates located in the Lockart Shire LGA. They embedded these control points in the Javascript files and I wanted to strip it from the code and present the data in ArcMap. I'll take real world practice data where ever I can get it!

Here's an example of the Javascript file:

var foxControl = {
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
                                                                                
"features": [
{ "type": "Feature", "properties": { "type": "shooting" }, "geometry": { "type": "Point", "coordinates": [ 147.09148550112403, -35.416454507343005 ] } },
{ "type": "Feature", "properties": { "type": "shooting" }, "geometry": { "type": "Point", "coordinates": [ 147.08663641399548, -35.411605420214457 ] } },
{ "type": "Feature", "properties": { "type": "baiting" }, "geometry": { "type": "Point", "coordinates": [ 147.08663641399548, -35.408141786551212 ] } },
{ "type": "Feature", "properties": { "type": "shooting" }, "geometry": { "type": "Point", "coordinates": [ 146.99658193875101, -35.266132806358037 ] } },
{ "type": "Feature", "properties": { "type": "baiting" }, "geometry": { "type": "Point", "coordinates": [ 146.99381103182043, -35.256434632100941 ] } },

The first task was stripping the Javascript from the geographic coordinates. I know the numbers represent latitudes and longitudes so I create a text file with the following:

type,longitude,latitude
shooting,147.09148550112403,-35.416454507343005
shooting,147.08663641399548,-35.411605420214457
baiting,147.08663641399548,-35.408141786551212
shooting,146.99658193875101,-35.266132806358037
baiting,146.99381103182043,-35.256434632100941

This then allows me to take the data to Excel. I open the data in Excel and format the data, then save the spreadsheet. This makes the data ready for ArcMap.

Preparing base maps

Before I import the data I need to figure out the geographic extent of the project area. I'm given some hints about the data being located in the Lockart Shire Council local government area. This is a real world location so I need the base maps for this area. I know that the data will be located in this LGA so when I import the XY data it should be located on the base maps. If the points don't appear within the extent then the projection is incorrect.

I downloaded the NSW Land and Property Information's Web Services - Aerial Imagery and Base Maps. This was found from a metadata search using data.nsw.gov.au. This site also allowed me to obtain:

  • The NSW state polygon dataset,
  • The NSW locality polygons dataset, and
  • The NSW local government area administrative boundaries dataset

The datasets are web service layers so adding these shouldn't be difficult. This completes base map preparation.

Adding XY data

After adding all the base maps data to a new workspace I begin importing the GPS points. The GPS coordinates will be in latitudes and longitudes, therefore the projection needs to be defined as WGS1984. Start with adding XY data using the main menu.

You'll need to locate the table or text file of the GPS coordinates. Set the corresponding X/Y values (longitude is X, latitude is Y). Define the projection if its not set yet. It should be WGS1984 if the coordinates are latitude and longitude. You then have to re-project the resultant feature class to GDA94 Zone 55.

Results

If all goes well, the points should now appear correctly in the project area.

Check that attributes have also transferred correctly. Change the alias of your fields. I added X_GDA94 and Y_GDA94 in addition to the default coordinate values for latitude and longitude.




arcgis, geoprocessing, cartography, datum, projections, lockart shire council