Hi, I am trying to find the length of polyline in a polygon however clip only accepts envelop (rectangle). what can I do to get the total length of the polyline within a polygon. Thanks in advance.
Solved! Go to Solution.
ah glad it may work, I've no experience of doing it however. The documentation also seems a bit arcane.
I'm assuming it's returning a set of points where they intersect?
the doc here suggest a 'dimension' parameter https://developers.arcgis.com/python/guide/part3-spatial-operations-on-geometries/
so perhaps:
yourGeometry.intersect(yourOtherGeom, dimension=2)
The intersect() constructs a geometry that is the geometric intersection of the two input geometries. Different dimension values can be used to create different shape types. The intersection of two geometries of the same shape type is a geometry containing only the regions of overlap between the original geometries, and its arguments include:
try intersect()
wow, thanks @DavidPike . I simply assumed intersect returns True or False :D. I tested with intersect and it is returning a multipoint. Any advise on how to convert that to a polyline?
ah glad it may work, I've no experience of doing it however. The documentation also seems a bit arcane.
I'm assuming it's returning a set of points where they intersect?
the doc here suggest a 'dimension' parameter https://developers.arcgis.com/python/guide/part3-spatial-operations-on-geometries/
so perhaps:
yourGeometry.intersect(yourOtherGeom, dimension=2)
The intersect() constructs a geometry that is the geometric intersection of the two input geometries. Different dimension values can be used to create different shape types. The intersection of two geometries of the same shape type is a geometry containing only the regions of overlap between the original geometries, and its arguments include:
thank you 🙂 that worked. I should really learn to read the documentation.
I was reading - https://developers.arcgis.com/python/api-reference/arcgis.geometry.html#intersect