2 Replies Latest reply on May 1, 2012 2:21 PM by dlee-esristaff

    Offsetting Points

    jadelaars2012
      Hey

      I've got a spatially referenced point shapefile, within the attribute table I have offset-distance and offset-direction (in degrees from North) columns. I want to shift the points to new positions based on those offset values. Any hints in the right direction would be much appreciated.

      Thanks,
      Jason
        • Re: Offsetting Points
          Hardolph
          Jason,

          Individually, this can be done as an editing task using the distance-direction edit tools, but as a geoprocessing task the best I can suggest is using some good old trigonometry to add the offsetting x and y to the X-Y coordinates, output a table and reinput to create a new feature class (Add XY Data tool in 9.3; and something similar in 10).

          steps (9.3 ArcView):

          1. explicitly show the original point coordinates in the attribute table either by adding fields and calculating Geometry or more conveniently using the Data Management > Features > Add XY Coordinates tool (gives default fields POINT_X and POINT_Y).

          2. add two more blank fields of numeric type double called NewX and NewY (or whatever) .

          3. use the Field Calculator on those fields to calculate the appropriate projected point coordinate (input your actual direction and distance fields)
          3a.  NewX = POINT_X + Distance_Field * Sin (Azimuth_Field*pi/180
          3b.  NewY = POINT_Y + Distance_Field * Cos (Azimuth_Field*pi/180)

          where pi = 3.1415 to convert degress to radians for trig function

          4. In the attribute table Options use Export and create an output table (this is most conveniently done in the same workspace as a geodatabase table but can be even a text file).

          5. use the Add XY Data tool to create a new shapefile or feature class from the output table using the NewX and NewY coordinates and making sure you use the Edit... button on the dialog to define the coordinate system.

          6. go to the Event_Table created by the tool in ArcMAPand use the right click menu DATA > Export Data to output a new feature class or shapefile. 

          I don't know if ArcGIS 10 has a geoprocessing tool to do that, but for ArcView 9.3 that is about the only way without the Survey Analyst extension or COGO in ArcEditor or ArcInfo

          good luck,

          Hardolph
          • Re: Offsetting Points
            dlee-esristaff
            If you have ArcGIS 10 (Arcinfo license), you can try the following:

            1. Use Add XY Coordinates tool (Data Management toolbox - Features toolset) to have the POINT_X and POINT_Y fields added to the input table. Also use Add Field tool (Field toolset) to add an ID field and use Calculate Field tool to calculate it by OBJECTID (unique values). This ID field will be used later as a common field to join tables and transfer attributes.
            2. Use the Bearing Distance To Line tool (same toolset) with the fields you have (POINT_X, POINT_Y, Distance, Direction, ID) to get lines starting at the points and ending at the locations you want to move your points to.
            3. Use Feature Vertices To Points tool (same toolset) with END option to get endpoints of the lines; they are at the locations you want.
            4. If you need attributes from the original points, you can use the Join Field tool (Joins toolset) through the ID field in the endpoints and the original points to transfer fields.

            You can throw the lines away when you are done.