0

I have a layer with lines representing cables. The data set is huge, over 100 000 polylines. Some of these cables lies within the same shaft, some of them lies within the same shaft as an other cable for a bit and some of them lies within their own shaft.

Each individual line has the attributes of a unique ID, the year it was build, the voltage and the lenght of the line.

What I need to get to know is where these lines intersect with eachother. However, I also need to present cables dug down in the ground at the same time and the lenght of the shaft were they go together.

What I've done so far is to intersect the linelayer and by doing that I get a very very long list of were the lines intersect. My struggle is that if I want to keep all the attributes from the input layer, my output layer is even more fragmented. This is due to if on long cable intersect with three shorter ones, the output consist of six pieces.

What I realised is that I can sort the attribute table in the output layer after lenght and visually se the "shaft groups" since the output consisted of so many decimal no shaft was the same lenght as another. However, the dataset is way to big to sort it manually. So that is pretty much were I'm at right now, with a huge list of cable-intersects and the need to select all cables that are in the same shaft, and the lenght of the shaft, and from the same year.

  • What GIS software are you using to try and do this? – PolyGeo May 18 '18 at 9:16
1

If I am understanding you correctly, you want just one record returned for each intersection? This can be tackled with a bit of SQL e.g. in spatialite or PostGIS

SELECT * FROM ( SELECT DISTINCT ON (uid) * FROM cables WHERE ST_Intersects(cables.geom, cables.geom) AND <--any other attribute ORDER BY uid )t;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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