Select to view content in your preferred language

How to collect Lines that were NOT affected by arcpy.management.UnsplitLine()

433
2
11-01-2023 04:56 AM
ZoltanSzecsei
New Contributor III

Hi,

I'm using arcpy and ArcGIS Pro 3.1.3

I have a Lines feature class with 'millions' of line features and I need to use arcpy.management.UnsplitLine() on it.

The trouble is, is that this outputs the unsplit lines to another (new) FeatureClass rather than replaces the unsplit lines.

How can I locate and copy from the original FeatureClass to this new FeatureClass, all the lines that were NOT 'unsplit'

I have a similar problem with dissolving polygons.

Thanks in advance,

Zoltan

0 Kudos
2 Replies
ShaunWalbridge
Esri Regular Contributor

Based on your description, you should be able to use Symmetrical Difference to remove the updated lines, then merge together this new feature class with the output from the unspilt operation.

0 Kudos
ZoltanSzecsei
New Contributor III

Hi Shaun,

Thanks for the pointer - will try it out.

For the lines I am now using the resultant unsplit lines to select lines that  "SHARE_A_LINE_SEGMENT_WITH" and then deleting that set.

I'll try the Symmetrical Difference for the dissolved polygon "left-behinds"

Not sure why ESRI chose to complicate what surely must be a 'standard' need.

 

Regards,

Zoltan

0 Kudos