0

I was working with shape files when I recently decided to put all my shape files into a single file geodatabase. I just tried to add some more points to the feature class by inputting the coordinates in the columns I have created for the x y coordinates. However, the point is not displaying. I am thinking that the feature class is just not recognizing the xy columns as xy attributes since this is the first time I have tried to add points to the table. Originally to add the points to the map I just imported an excel sheet with the xyz and attribute data as a table then exported the table as a shapefile.

Is there a way to specify columns as coordinates so when adding points in the attribute table they will display without having to construct a point?

  • A few points or several points? – a1234 Jul 14 '16 at 18:17
  • See this question: gis.stackexchange.com/questions/115440/… – Stella Jul 14 '16 at 19:17
  • ArcMap reads the Shape field to determine the Geometry. Features such as Points will not appear on the map from X,Y fields because ArcMap does not query those fields. You run Add XY Event layer to properly map the features from X,Y fields. – klewis Jul 14 '16 at 19:49
  • Does the Add XY Event Layer work same the same as if I were to display XY values from a table and export the values as a new layer? – zanwigz Jul 14 '16 at 21:39
4

I do not know of a way to do so directly. If you only a few points, enter to editor, start editing, click "Create Features", select point, then right click on the map and select "Absolute XY". You can then input the coordinates, hit enter, and it will create the point location. You can then enter the table and input other attributes.

If you have a lot points to add, I'd recommmend bringing it in as table, display X,Y data, do a join to the existing point file, and then export to a new, replacement file.

  • Okay, I was hoping there was a work around so I didn't need to create each point individually, although the methods both you and @Midavalo mentioned seem like they would be a functional work around. Thanks for the help. – zanwigz Jul 14 '16 at 19:50
2

Unfortunately ArcMap doesn't work the way you describe. To create points using X/Y values you probably have three options:

  1. Create another table in your File Geodatabase (including the XY column) and populate that table with the records you want to add, then you can use the Add from X/Y function to create a new events layer. This could also be done from another Excel table.
    This method creates a new layer in ArcMap, so any features created will need to be copied to your existing feature class.
  2. Create another table as above, and use the tool Make XY Event Layer in ArcToolbox. This performs the same function as the Add from X/Y function above. This method creates a new layer in ArcMap, so any features created will need to be copied to your existing feature class.
  3. As mentioned by @Archaeojp in their answer, Create each new feature individually using Editor > Create Feature, and use Absolute X, Y from the edit right-click menu (shortcut key F6) and type in your coordinates to add the new feature.
    This method will add directly into your feature class, however is done one feature at a time.

I had thought there was an ArcToolbox tool that creates new features from XY, but can't find it.

I believe I have seen some arcpy that will take coordinates from XY Columns and create features from them. This solution may meet your requirements the best, however may require a bit of arcpy understanding to get it to work. I'll have a hunt and see if I can find a link to that solution.


I couldn't find the arcpy solution, but it would probably look something like this:

import arcpy

fc = arcpy.GetParameter(0)
xfield = arcpy.GetParameterAsText(1)
yfield = arcpy.GetParameterAsText(2)

def create_point(fc, xfield, yfield):
    fieldList = ['SHAPE@XY', xfield, yfield]
    with arcpy.da.UpdateCursor(fc, fieldList) as cursor:
        for row in cursor:
            xy = (row[1], row[2])
            if row[0] == (None, None):
                row[0] = xy
                cursor.updateRow(row)
    arcpy.RefreshActiveView()
    arcpy.RefreshTOC()

create_point(fc, xfield, yfield)

Attached to a ArcToolbox script tool with three parameters:

enter image description here

This will take X and Y values from a feature class table and create the points inside the same feature class if they don't already exist.

  • have added arcpy that will create the points from your X and Y fields – Midavalo Jul 14 '16 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.