I am building a Python geoprocessing script for ArcGIS 9.3. In the script, I have a simple LINE feature class with one row, one line.
How can I use a linear referencing system to interpolate a point along the path?
I can use a cursor to access the feature geometry, and get the vertex geometries. But I can't find anything that could help me interpolate points along it.
Note: this is ridiculously simple with Shapely:
import shapely.wkt
line = shapely.wkt.loads('LINESTRING (380 60, 360 130, 230 350, 140 410)')
line.interpolate(0.0).xy # (array('d', [380.0]), array('d', [60.0]))
line.interpolate(100.0).xy # (array('d', [346.16312174913622]), array('d', [153.41625550146173]))
# ... etc
Is there any equivalent in ArcGIS?
I have all the common ArcGIS extensions to my disposal.
Or should I just bring the geometry over to Shapely to do the work?
The geometry processing needs to eventually go back to ArcGIS.
Best Answer
In case this is helpful to others, i was able to create the following python code using arcpy which will place points at a specified interval based on an input line feature layer.