Help adding X Y to a shapefile in arcmap

1035
4
05-03-2023 05:29 AM
vince19
New Contributor

I have csv excel file with northing and easting with their station names, I have an empty shapefile, I have tried adding the xy data after choosing the x and y field and connecting the table and the coordinate system it shows me this TABLE DOES NOT HAVE OBJECT ID FIELD it tells me to export the data and add it as a new layer After I do that I have a point shapefile and a polygon shapefile I want to superimpose the two I can’t do that I have tried clipping and union and intersect and I have failed What else can I do? I want the point to be shown on the polygon shapefile and I seem stuck I have tried join and relates What is it not working Can someone please help thank you in advance

0 Kudos
4 Replies
JeffHouser
Occasional Contributor

Im not sure exactly what you're trying to do.  If you're just trying to populate the 2-shapefiles (point and polygon) with values from the CSV, just add a field (linking field) in each of these shapefiles and in the CSV that can then be joined based on having the same value.  If there are values in the point shapefile that you want to transfer to the polygon shapefile, or vice versa, you can do a spatial join, which then results in a new shapefile with attributes from both layers where they intersect each other. 

-Jeff

0 Kudos
SaraJL
by
Occasional Contributor III

I'm not entirely sure of the scenario - are you trying to add an empty polygon shapefile and then add XY coordinates to it that you have stored in a CSV table? I assume, you ultimately want the shapefile to appear where those XY coordinates would technically appear?

I'm not sure if there is a good way to do that! It might actually be easier to display just the XY points, and then draw the shapefile manually using the points to connect at the corners of the shapefile.

The tool to use might be the Spatial Join - here is a youtube view that I found that explains it

But in general, if joining a CSV table to a feature in ArcGIS, there is one main thing you'll need:

  • There must be a common attribute between the 2 features. For example, this might be a Name field in the attribute table that matches on both layers. If there isn't a common attribute (Unique ID) field, then Joins and Relates won't work

I'm not exactly sure the best approach for your project! Could you let us know what the ultimate goal of the project is? There might be multiple ways to approach it depending on what you need it to visually do.

Good luck!

 

0 Kudos
JeffreyWilkerson
Occasional Contributor III

Whew, it's seems like forever since I've opened ArcMap, but here's how I'd handle what you are talking about using ArcGIS Pro, and I would look for the similar functions in ArcMap.

1. Add CSV to the map, right click on it and select 'Display X Y Data', and select the easting (X) and northing (Y) fields. A new featureclass (FC) layer is added to your map and you can export this to a shapefile or file GDB if you want.

2. To 'display' this new point FC with a polygon FC, you just add them both to a map. If you are trying to get the values from one to the other then yes, it's the Spatial Join command. You are basically joining them based on their XY, so if you want the values from the polygon into the points, you set the point as your tartget FC and the polygons as your join FC and decide how to handle the fields.

0 Kudos
JeffreyWilkerson
Occasional Contributor III

Just checked in ArcMap 10.8.2 and the functionality was the same. Added an Excel table using 'Excel to Table'. Righ clicked on the table in the TOC and ran 'Display X Y Data', using the right lat/long fields and making sure to set the projection to Geographic/World/WGS84 (WKID:4326). Then you can export it to a shapfile (if desired) by righ clicking the new point featurclass, selecting 'Data' and then 'Export Data...'. It'll try to export the featurclass to a file geodatabse, but if you select the file (browse) icon you can specify the output is a shapefile.

0 Kudos