0

I am working with a climate model that operates by means of a rotated grid of points. The rotation angle is about 15 degrees counterclockwise. The points are provided with (N, E) coordinates, but their IDs are nonconsecutive, and have irregular intervals.

In the image below, the bottom left point has OBJECTID=35, the one to its right has OBJECTID=40, the third to its right has OBJECTID=50, but then the leftmost point in the row above has OBJECTID=51.

My problem: I want to assign each point a new ID (integer) that starts from 0 (bottom left point) and increases towards the right hand side of the row, and row by row until it reaches the upper right point (highest ID).

The rotation causes problems because none of the coordinates are steady, but is there any way I could do this?

The grid has 400 points in the blue arrow direction, and 300 in the green arrow direction.


ArcGIS version: 10.3.1


enter image description here

  • 1
    This seems like a simple enough task, using basic trigonometry before applying some rounding. What have you attempted so far? Coding questions are expected to include code. Please also edit the question to specify the version of ArcGIS in use. – Vince Jan 20 '17 at 15:21
  • I cannot see this being done without code but for that we need you to include a coding attempt. Otherwise it looks like you are wanting GIS SE to be a free coding service. – PolyGeo Jan 20 '17 at 20:43
  • @PolyGeo This is solvable using standard tools, no scripting or trigonometry calculations needed. Voted to reopen – FelixIP Jan 21 '17 at 1:53
  • @FelixIP .OK - I've removed the Python aside so that its suitable for re-opening. – PolyGeo Jan 21 '17 at 4:09
2

As promised solution that requires knowledge of Pythagorean theorem only.

  • Connect points 98 and 42 and call layer X_AXIS.
  • Connect points 98 and 115 and call layer Y_AXIS.

enter image description here

# define X coordinates in a new system
arcpy.Near_analysis("points", "X-AXIS", search_radius="", location="LOCATION")
arcpy.AddField_management("points", "X_DISTANCE", "DOUBLE")

Populate newly created field using Python parser:

int(math.hypot( !NEAR_X!-1754349.55253, !NEAR_Y!-5912723.73683 ))

where numerics are coordinates of point 98, i.e. you'll need pen to write them down. If your points coordinates are in decimal degrees, use round to 3(?) decimals instead of Int() function.

Repeat 3 steps above by using Y_AXIS and new field Y_DISTANCE.

You can use sort tool by these new fields to rearrange points into new layer. I simply used solution from here to populate new integer field shown:

enter image description here

As mentioned in comments there is much easier way to calculate coordinates in a new system. If you decide to use it, I suggest to compute minimum bounding geometry (rectangle) of your points wich will compute precise rotation angle.

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.