Quantcast
Channel: Question and Answer » arcpy
Viewing all articles
Browse latest Browse all 767

Calculating distance from PointGeometry object to polyline in arcpy

$
0
0

I created a PointGeometry object on ARCPY and I’m trying to measure the distance from that point to the closest point on a polyline table..

The PointGeometry object has an easy function for that matter called distanceTo which works great between points.. I thought I’ll try it on the Polyline but not sure how I’m gonna use it as a parameter, so I created a query layer to that Polyline table as follow -

arcpy.MakeQueryLayer_management(dbConFilePath, "streets","select * from streets where SETL_CODE = " + str(City) + " and STR_CODE = " + str(Street),"OBJECTID","POLYLINE")

now I have no idea how to convert it into a Polyline for using it on the distanceTo function.

Am I at the wrong direction here? Any simple way to do this without messing with tables and such?


Viewing all articles
Browse latest Browse all 767

Latest Images

Trending Articles



Latest Images