I'm creating a new point FC from an existing point FC. I have 600,000 address points in my database and a department a my work wants their own service point FC using the address point FC as a template. The catch is they don't want them to overlay the address point FC on the map. My question, how can I do a mass shift to slightly move the position of these new service points off of the existing address point I copied them from?
You could load your data, and perform a spatial adjustment.
Your could edit your points, and use "Move" to offset them.
If you have some experience with arcpy, here is a snippet of code that may help you:
Regards,
Jim
Shifting (or moving) features is a snap using the arcpy.da module’s UpdateCursor. By modifying the SHAPE@XY token, it modifies the centroid of the feature and shifts the rest of the feature to match. This approach will hold for point, polyline or polygon features.
To modify only a single or subset of features in a feature layer, apply a selection to that layer and pass the layer in as the input to shift_features.
Word of caution, this is using UpdateCursor, so features will be permanently modified. So, back up your data if you may potentially want to reverse the updates.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | import arcpy def shift_features(in_features, x_shift = None , y_shift = None 😞 """ Shifts features by an x and/or y value. The shift values are in the units of the in_features coordinate system. Parameters: in_features: string An existing feature class or feature layer. If using a feature layer with a selection, only the selected features will be modified. x_shift: float The distance the x coordinates will be shifted. y_shift: float The distance the y coordinates will be shifted. """ with arcpy.da.UpdateCursor(in_features, [ 'SHAPE@XY' ]) as cursor: for row in cursor: cursor.updateRow([[row[ 0 ][ 0 ] + (x_shift or 0 ), row[ 0 ][ 1 ] + (y_shift or 0 )]]) return |