4

I have 4 multipart polyline shapefiles (download a sample dataset here).

The geometries are identical, except for the length of segments in each shapefile. They represent 4 variables describing an identical shoreline. From these 4 overlapping polylines, I would like to create a resulting polyline that has segments for each unique set of the 4 input lines.

My approach was to use an intersect. This, however, breaks down when I try to run it on 4 huge feature classes.

My question is whether there is a more efficient way to combine polyline attributes stored in separate layers. I thought a union would be good, but it only works on polygons. Spatial Join seems inefficient, as I would end up with many to many joins for a single segment. Turning the segment end points into a point layer, then splitting the line at those points?

I have access to arcpy, PostGIS, and shapely.

Has anyone had experience doing this before on large datasets? Is there a more efficient way to store these variables?

3
  • You can run ST_Union in Postgis on Lines too. I don't completely understand your problem description, but when I have insanely complex intersection problems (millions of polygons against millions of polygons), I usually break it down into smaller chunks -- divide and conquer style that you learn in algorithms classes -- and then merge the results afterwards. This involves writing plpgsql (my language of choice) functions, but you could do the same in shapely, I'm sure. I have got orders of magnitude performance boosts over a straight intersection/union with spatial join approach. Commented Oct 21, 2014 at 18:26
  • When I starte reading I was thinking about your point based method. (splitting one of the feature class at the end points of the other feature classes).
    – radouxju
    Commented Oct 21, 2014 at 19:13
  • The DropBox is giving an Error (404), but in any event, to avoid link rot, I think it would be better providing just a picture and description of the data rather than a download. When you say that intersect "breaks down" do you mean that it throws an error or something else?
    – PolyGeo
    Commented Sep 29, 2015 at 8:01

1 Answer 1

1

This sounds like a use case for Overlay Route Events from the Linear Referencing toolbox:

Overlays two event tables to create an output event table that represents the union or intersection of the input.

...

  • Line-on-line, line-on-point, point-on-line, and point-on-point event overlays can be performed.
  • The input and overlay events should be based on the same route reference.

The "same route reference" sounds like your "identical shoreline" that can be easily turned into a route ready for dynamic segmentation.

You are trying to "intersect overlapping polylines" which sounds like a "line-on-line ... event overlay" to me.

2
  • Your answer is useful, as this was the advice I was given by ESRI as well. Unfortunately, however, the size of the layers was still too large, so we had to split them and then combine them in the end.
    – svh160
    Commented Oct 1, 2015 at 5:41
  • However, I no longer have access to ArcGIS, but am working on a solution using shapely.
    – svh160
    Commented Oct 1, 2015 at 5:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.