TransWikia.com

ArcPy Intersect without self-intersection

Geographic Information Systems Asked by Hugh_Kelley on January 19, 2021

I’m doing an intersection between buffers around street centerlines and census block group geoms.

The extent and density of features is fairly large so I’m running into memory limitations consistent with Getting topology or out of memory errors with large dataset intersects and spatial joins in ArcMap.

I was able to avoid the memory error by reducing the buffer size but may need to find an actual solution.

Looking at the output of the successful intersection, the problem with my code is that the intersection is calculating not just the intersection of buffers with census geoms but also the intersection of the buffers with themselves, which raises the complexity enormously.

The self-intersection is pretty evident in the screen grab below. That’s a selection of all the intersection output features for a single buffer. While my goal is to have a few peices where it intersects the census geoms, it clearly is being cut up by the other buffers from the same layer.

Has anyone found a way to avoid the self-intersection?

Obviously I could dissolve after calculating the intersection but that doesn’t improve the efficiency of the calculation.

I don’t see a better option here but maybe I’m not thinking creatively enough.

As a note, the dice tool isn’t helpful I don’t think because the problem is the number of features not the complexity.

self_intersection

One Answer

You have sort of shot yourself in the foot by buffering all your roads and storing the buffers in a single FeatureClass. You either accept the issue and do the dissolve after processing as you have suggested or filter before you run the intersection.

A simple model iterating over buffers and feeding them one at a time into the intersection tool will generate the data you require. This may be even slower but it wont be generating all those self-intersections.

You could look at parallelizing the problem by using the multiprocessing module in Python, if you take a scripting approach.

A census block I assume will intersect multiple buffers, and double count them.

Answered by Hornbydd on January 19, 2021

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