-2

I have created a grid of width 67.056 and height 60.3504 making the boundary mark as a template extent. But its straight grid while i want its to rotate around -1.3 degree. Till here the size of the grid is appropriate but manual rotating through EDIT tool changes the area after three decimal places. Also guide me the Y-Axis coordinates using real world coordinate NOT those elaborated by ESRI as i m unable to understand it. The origin coordinate are 692989.52,3374721.27.

enter image description here

7
  • 2
    At what precision are your coordinates captured? If the area differs at 3 places, and the precision is 0.001, you have your explanation.
    – Vince
    Commented May 29, 2015 at 20:40
  • coordinate captured at upto 2 decimal places.. but with these two decimal places the area is accurate, the problem starts when i rotate the grid using EDIT Toolbar, the area has distortion.. Commented May 30, 2015 at 5:38
  • 1
    I don't understand the question (either of them). The coordinates used in that Esri help page are just small numbers to keep math simple. They're as real world in terms of projected coordinates as your 692989.52 value. I see you've already seen my answer at gis.stackexchange.com/questions/114713 which gives some other methods to set the rotation. I suspect the area change issue is related to the XY tolerance of the data (what units/CRS are you using?) and imprecision/rounding in computer storage (float or double for area?).
    – Chris W
    Commented May 30, 2015 at 6:39
  • Dear Chris, thank you for the reply. I m using UTM.. Commented May 30, 2015 at 6:41
  • Now what i want to learn is, how can i calculate mathematically the rotation angle for Y-axis..if i have origin coordinates Commented May 30, 2015 at 6:46

1 Answer 1

3

As Vince said initially, the default XY tolerance for a new UTM based feature class is 0.001. That means any points closer than that would be considered the same point. Rotating by 1.3 degrees is a fairly small amount, so the coordinates of your grid corners are probably going to fall on values that would be more precise than 0.001 units. That, combined with loss of precision in storage as discussed by Vince in his answer at Is scientific notation in ASCII grid files non-standard?, is what accounts for your area change (and your grid isn't perfectly square anymore either).

As an example, I created a fishnet of 100 x 100 cells and manually rotated it considerably more than 1.3 degrees. I will mention this was done in state plane, with feet, and an XY tolerance of 0.00328. Before I did so I calc'd an area column, then a new one after (both Double fields). You can see before rotation they were all the same even area, but after they're a complete mix/jumble of areas (as well as lengths). And if you look carefully at the grid, you'll note not everything is at 90 degrees anymore either.

enter image description here

But you'll also notice that if the values were rounded to two or even three decimal places, they'd be the same. This gets people into trouble with CAD and GIS - just because the computer gives you nine decimal places doesn't really mean that extra precision is at all accurate. I'm guilty of this myself, because I'll report areas to the 5th decimal (at client request) even though I know they're only accurate out to at most three.


As for your Y axis formula question, the formula is given both in my answer at the linked question and was taken from that Esri help file: tan (angle) = x coord / y coord. You have an origin point already. You need another point that is on a line passing through the origin at -1.3 degrees. You can solve that formula for either x or y, it doesn't matter. To get the one you don't solve for, you just pick an arbitrary modification to your origin coordinate.

Origin is X 692989.52, Y 3374721.27. You need a different point -X,Y to rotate your axis -1.3 degrees. So what would the X coordinate be at any Y coordinate on a line with an angle of -1.3 degrees passing through the origin? Reset the origin to 0,0 for the math and pick a random point, say 200 units greater Y: tan (-1.3) = x coord / 200 Now solve for X. -0.02269 * 200 = x which is -4.53863. So you know the point you want is 200 greater in the Y and 4.53863 less in the X from your origin. That means the Y axis coordinate you want to use is X 692984.93, Y 3374921.27.

enter image description here

The coordinate display in the lower right is based on cursor location, so I couldn't quite get the values to match the point I was snapping to, but you'll note they're pretty close to the math above. You can see in the screenshot that even if you create the fishnet with the rotation, instead of rotating it after, you're still going to have the same rounding issues because of XY precision and storage. You can really only address the XY precision by increasing the feature class' precision from 0.001 to something higher (and there are considerations if doing so). Since Fishnet is a geoprocessing tool, you'd have to change the Geoprocessing Environments XY Resolution/Tolerance settings prior to running the tool.

1
  • I had a point 3319 meter above the origin for which i calculated X coord using angle -1.3. Then i added the calculated X and Y coord values in origin and got the Y-axis coord ( which is to define the rotation angle). Also, managing XY Tolerance for feature dataset up to 6 decimal places made it. I m unable to load screen shot for the rotated grid here.. Commented Jun 1, 2015 at 4:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.