# Triangulation in ArcGIS Pro

I have a telemetry dataset for bats where one person stood at Point A and aimed his telemetry antenna to find the location of a bat. His/Her Lat/Lon coordinates and the angle relative to true North is recorded. Similarly for person B at another spot. So given two lat/lons and two angles the triangulation gives the location of the bat.

I looked up TIN in the 3D Analyst toolset and it just creates triangulation between all the points and expects elevation input which is not what I am looking for. The triangulation/third point is a new point not in this table and has to be calculated. Here is a sample of the data. You can see Bat 3 has moved between two locations here while the person(s) holding the telemetry antenna has simply moved it while standing at the same spot (observation based on the difference in the angle seen).

Can you point me to any toolset in ArcGIS Pro that can take this datasheet and find the location of the bat?

• The TIN data type is completely wrong for this. The first and second problems of geodesy are exposed in the `arcpy.PointGeometry` class. You want to use the `pointFromAngleAndDistance()` method. Commented Oct 8, 2023 at 23:50
• Thank you for your reply. Is this a tool in ArcGIS Pro? Commented Oct 9, 2023 at 19:40

This is direct geodetic problem:

where Ctg(angle) is Cos(angle)/Sin(angle).

Formulae is very long and easy to mess up, so as suggested by @Vince will use pointFromAngleAndDistance() method to draw 2 rays coming from observer points and find their intersection point. I suggest to use projected coordinate system and assume that your tables are structured as follows:

Place N bats somewhere, their location doesn't matter:

and run this script:

``````import pandas as pd
maxDistance = 1.0e4
SR = arcpy.SpatialReference(2193) #projected coordinats system factory numbe
def makeRay(nXYA):
i,n,x,y,a = nXYA
pS = arcpy.Point(x,y)
pG = arcpy.PointGeometry(pS,SR)
pE = pG.pointFromAngleAndDistance (a, maxDistance,'PLANAR').firstPoint
pLine = arcpy.Polyline(arcpy.Array([pS,pE]),SR)
return pLine
# get all observers coordinates and angles
tbl=arcpy.da.TableToNumPyArray("OBSERVERS",['GRP_NO','POINT_X','POINT_Y','BEARING'])
DF = pd.DataFrame(tbl)
#iterate through pairs of observers
with arcpy.da.UpdateCursor("INITIAL_POINTS",("Shape@","GRP_NO")) as cursor:
for shp,no in cursor:
df = DF[DF.GRP_NO==no]
if not df.BEARING.std(): continue #parallel lines handling
twoRows = [row for row in df.itertuples()]
lineA,lineB = map(makeRay,twoRows)
isectP = lineA.intersect(lineB,1).firstPoint
thisPoint = arcpy.PointGeometry(isectP,SR)
cursor.updateRow((thisPoint,no))

``````

OUTPUT:

• Thank you so much for such a detailed reply. Truly appreciate it. -Prabha Commented Oct 10, 2023 at 0:33
• Could you please clarify how you set up the "Initial Points attribute table to reference in the script? Commented Oct 10, 2023 at 23:07
• Just use field names shown, e.g. create new field GRP_NO and populate it by values from your Grupo. Same applies to layers names in your table of content. Commented Oct 11, 2023 at 0:27
• Understood. I think my question was not clear in the first place. Did you create the "INITIAL_POINTS" table by running the PointGeometry-pointFromAngleAndDistance() method? Meaning- Do I need to first create the INITIAL_POINTS table before running the Pandas script? Or will the script create it since it is using PointGeometry. Commented Oct 11, 2023 at 20:13
• Create N random points anywhere inside your country and call them INITIAL_POINTS Commented Oct 11, 2023 at 22:31