Script Writing for attribute tables

308
1
06-06-2019 10:42 AM
by Anonymous User
Not applicable

Hey all, I am trying to write a script in python to using (lat, long) for beginning and end points for poly-lines, and trying to relate them to the street names where they begin and end. Anyone have an idea of where I can start with this? 

0 Kudos
1 Reply
simoxu
by MVP Regular Contributor
MVP Regular Contributor

First, you need make sure every street is one feature (one polyline, you can merge multiple lines into one polyline using GIS tools )

Then you can use python to iterate the feature class and read the geometry of each feature, when you have access to the geometry, you can read the  path and points in each feature.

You should be able to do it using Python API, or ArcPy environment in one of the desktop product, say ArcMap, ArcCatalog or ArcGIS Pro. ArcPy maybe easier and more straight-forward as its Ployline class provides firstPoint and lastPoint properties.

ArcPy Polyline Class help:

https://pro.arcgis.com/en/pro-app/arcpy/classes/polyline.htm

arcgis.geometry module:

https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.geometry.html?highlight=geometry#module-...

0 Kudos