I have a large point feature class, and I need to move a significant number of the features to new coordinates.
I can use the Move To tool to do it one at a time, but it would be significantly better if I could take a table of coordinates and do it all in one.
How could I do this?
I don't think I can create a new feature, because I need the GlobalID to stay the same.
You think there would be a shift and rotate tool builtin, but alas
Calculate Field Python examples—ArcGIS Pro | Documentation
Expression: shiftXCoordinate(!SHAPE!) Code Block: def shiftXCoordinate(shape): shiftValue = 100 point = shape.getPart(0) point.X += shiftValue return point
do the same for the Y
Are the features shifting consistently, or differently per field?
The you can select multiple features in the Move To tool, right-click, and select Delta XYZ to enter the shift amount.
You can use the Transform tool to modify your features in place, too.
albeit, the Transform requires an Advanced license, hence the old school suggestion for quick shifting
Unfortunately, they're shifting differently. We purchased a set of addresses, a number of which (mostly addresses for newly constructed roads) were only geocoded to a zip-code level. I'd like to update them with more accurate coordinates. Each address has a unique identifier, so I'd love to be able to make a table with the identifier, lat, and long, and be able to move the points to those new coordinates.
I thought about copying the attribute table for the records I want to change, adding lat and long columns, using the Display XY tool to locate them on the map, and then deleting the original features and appending the new feature class to the original feature class, but that would change the GlobalID for the address, which I can't do.
If you need to preserve the original except for the geometry, you could:
There's different ways to do something similar, but this is my generic no-coding-required approach to changing attributes in restricted tables and feature classes. I don't normally do this with geometry, but riffing on @DanPatterson's reply, I think you could set Shape properties from float attributes in the copy:
original.point.X = copy.corrected_longitude original.point.Y = copy.corrected_latitude
If anyone (including OP) is still watching this thread... I have a similar problem except in my case I have photos attached to the feature class in the geodatabase and now I need to update the location of those points (about 1,000 of them) to the X,Y coordinates (lat/long) in the attribute table.
So what I need to do is run a tool that will move the points to the latitude and longitude which I already have specified in the attribute table for each point. This seems like such a simple task for GIS and one that people run into often, but I cannot find any solutions.
You can use Calculate Field for points. This post covers it pretty well: Solved: Updating Shape Field from Lat/Long Fields - Esri Community The key is to make the result something ArcGIS will recognize as a geometry.
A quick and dirty version that works for me is just this: arcpy.Point(!long!, lat!).
Try it on a backup first though!
I figured out a solution using UpdateCursor that was actually really simple! See script below.
# Set the local parameters
inFeatures = "Survey"
# Move the Features
with arcpy.da.UpdateCursor(inFeatures, ["SHAPE@XY","Longitude","Latitude"]) as cursor:
for row in cursor:
row = ([row,row])
Hey, I am interested in using this script for a similar situation with a photos geodatabase but I am not entirely familiar with how to correctly use it. Could you walk me through it? Like on what attribute are you using the field calculator for the script?
Please correct me if I am wrong but my assumptions are:
Any help would be appreciated!