TransWikia.com

segmentAlongLine() returning line with a gap in the middle

Geographic Information Systems Asked by rcaimano on September 19, 2020

I’m trying to use segmentAlongLine() to return a portion of a polyline based on percentage in my feature class. It works for most of my lines in the feature class, but in some cases, the polyline returned contains a gap in the middle.

For example, here is the original polyline.
This is what the original polyline looks like.

When I create a new line using polyline.segmentAlongLine(0, 0.5, True), I get the following line as an output:
Polyline starting at 0 and ending at 50% end up with a gap in the middle.

Has anyone else run into a similar issue or know what would be causing the gap? It happens for any value of end_measure greater than 0.27 (27%). I’ve also tried switching the start_measure and end_measure values but end up with the same issue.

I’m using Python 2.7 with ArcMap 10.7.1.

EDIT: one detail I failed to mention is the polyline is the result of a Dissolve with "DISSOLVE_LINES" set as my unsplit_lines attribute.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP