I have a pointfile of some 200 electrical boxes throughout the county. While the electrical boxes are "mapped", they are done so by using township range section data, so there actual location is not known. They are simply at the centroid of a section or subsection. My task is to verify their real world location and move them from the cetroid of the section or subsection to that real location.

I have a 2nd pointfile of electrical boxes that have been GPS located by workers from a utility company. This pointfile contains some 70 features that I know their location is correct. However, only 40 of the points in this file correspond to the 200 in the above file.

Both files contain a unique identifying number for all of the electrical boxes allowing for a 1:1 join of the files to be completed as the GPS points need the attribute data that is present on the county dat. However, since a tabular join like that doesn't actually change any spatial data, it isn't enough to call the job finished. I need to get the attribute data from the 200 to the matching 40, while eliminating those 40 points from the 200. I then need merge the 40 GPS'd points into the county dataset, so all my points are unified in one single file.

I cannot do a spatial join on these two files, because the distances between the GPS verified and the 200 from the county are not uniform due to the TSR mapping of the county data. In other words, joining them based off distance X wouldn't work because the closest points will not necessarily match in real life.

What I really need is to be able to select attributes across two different datasets. I tried merging the two and then running a selection of where UNIQUE_NO = UNIQUE_NO1, but while it was verified it returned no results.

Any idea how to move forward on this? Working in ArcMap 10.2

  • After you join by attributes you can either calculate fields or export the feature class which will append the joined fields... is that what you're after? Jul 16 '15 at 22:30
  • I don't believe that solves the problem as it is still only fiddling with the attribute data while it is the locations of the points and the need to merge the two files while deleting the redundant data is the issue. Jul 16 '15 at 22:37
  • When you join the GPS points to the attributes of the Electrical Boxes the geometry is that of the GPS points with the attributes of the Electrical Boxes - the correct location with the correct attributes, you just need to do a bit of juggling to get the fields right. Exporting the joined feature class makes the fields permanent (no longer joined). I don't know about your data structure so can't advise the best course. Jul 16 '15 at 22:55
  • Ah yes, that does work and I have tried it, however there are some significant problems that arise that have kept me from taking this course of action to completion. Mainly about the "juggling to get the fields right" aspect. While going county data -> GPS data yields 40 matches, going GPS -> County only finds 32 matches. So when I am to reintegrate that the GPS data with the joined attribute data from the county back into the county file for a single unified file, it there are 8 redundant points in the file that need to be purged. Since my SQL selections on the joined file return empty Jul 16 '15 at 23:12
  • 1
    Have a look at gis.stackexchange.com/questions/141177/… It seems to me that you are trying to modify geometry, while keeping the rest of attributes the same. If this is a case I can post a script, that I am using.
    – FelixIP
    Jul 16 '15 at 23:47

You can update the location of the points on the bad shapefile to that of the good doing a join and then using the Field Calculator to update the location:

  1. Using ArcToolbox>Add XY to the good shapefile, if not already in attributes.
  2. Perform the Join.
  3. Now that the bad shapefile has the attributes you need AND the POINT_X AND POINT_Y fields, you can update the SHAPE attributes using the Field Calculator.
  4. Using the Calculate Field Tool. (You could also use the Field Calculator)

    Field Name:
    updateCoords(!POINT_X!, !POINT_Y!)
    Code Block:
    def updateCoords(new_x, new_y):           
       point = arcpy.Point()
       point.X = new_x
       point.Y = new_y
    return point
  5. The bad shapefile should now coincide with the good.

  6. Continue with workflow to merge into master.

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.