Tuesday, November 8, 2016

ArcMAP : Pythagoras & Trigonometry for Point Movement

 
This posting is talking about how to move one or many point from current position to the new position. This method can be done in ArcMap or Excel, but on this time i will share how to do that using ArcMAP (ArcInfo License).
On this posting we will using Trigonometry and Pythagoras principles to adjust the Point data and we will adjusting the point data based on the Polyline data.
To move the Data Point we need the benchmark position that we will use as starting point. On the above picture you can see that the moving distance is 12 meters from the starting position (Polyline). To add the benchmark point on the polyline we can using "GENERATE NEAR TABLE" on the ArcToolBox. "GENERATE NEAR TABLE" is to create new point data which is located perpendicular with our Point data (picture below).
How to create the nearest point using "GENERATE NEAR TABLE" is very easy. You only need to open the toolbox or just use the toolbox search box. Open the tools and set the parameters like below picture.
The process will producing the new shapefile with below table structure
if you can see the above picture the green point is the Nearest point which is produced by Generate Near Table and the red point is our Data Point. On the table you can see also the Near angle from the North (-90 degree) direction.
We already get the neares point, so we need to join our Data Point and the Nearest point data. The joining process is needed because we need to use Near Angle, Near Lat, Near Long to be calculated with our Data Point latitude and longitude. You can using Join table in the field section.
After joining the table now we will starting to using the Pythagoras and Trigonomatery principle for the adjustment process. Before that we need to add some field for the calculation result. the field we need to add are :
See below picture to understanding above field
On above picture we will move the blue dot to the red dot.
Bearing = The angle of "New Loc" with X or Y
Bear Rads = The decimal value of Bearing
Bear Lat = the distance from X to "New Loc"
Bear Long = the distance in X line from Near point to "New Loc"
New Distance (ND)=Distance = the distance from Near point to New Loc (perpendicular) please use 10 meters for trial
To calculate the Bearing we can using below formula to the bearing field. Below formula using VB Script :
the above formula producing Bearing in degrees format, so we need to convert it to be Decimals format so we can do a mathematic procedure using ArcMap. For this formula we will trying to use Python parser.
Now we already have the angle and we ready to use it to calculate BEAR_LAT and BEAR_LONG.
BEAR_LAT formula is using Trigonometry :
BEAR_LONG calculated using Pythagoras principles because we already have all
The last step is to produce the new Latitude and Longitude for our Data Point.
The result will be :
Confused ? i can share to you the toolbox that i create using model builder for this topic so you didn't need to type any formula or do geoprocessing, you just need to use that tool to execute the process. Just give me your email address on the comment

No comments:

Post a Comment