Subscribe to this thread
Home - General / All posts - How to select lines from a polygon
krash41 post(s)
#09-Feb-16 22:17

This probably a simple task so hopefully it is a quick and simple solution.

I have a layer with line drawing and I would like to use another polygon layer to capture all the lines that resides inside the polygon. It would be nice to capture lines that intersects the polygon boundary as well.

For now I would be happy to just be able to select the lines but it would be nice to append to new drawing layer.

Many thanks to you expert users.

Mythman
49 post(s)
#09-Feb-16 23:50

With the line drawing layer active, select EXPLODE and Apply from the Transform toolbar. Then paste as a new drawing in the project pane.

tjhb
10,094 post(s)
#09-Feb-16 23:56

No--that's not at all what was asked for.

krash41 post(s)
#10-Feb-16 00:04

I am not sure if this is the solution from tjhb but I can give it a try.

I have used and had training on arcgis, and in that platform is fairly easy process to filter the line subset from another polygon layer.

tjhb
10,094 post(s)
#10-Feb-16 00:15

It's not hard in Manifold either.

But what about lines that are (reside) only partly within the area (polygon)? Do you want those all included, all excluded, or something else?

krash41 post(s)
#10-Feb-16 00:27

Yeah, tjhb. Most likely I will include the lines intersecting the boundaries since I rather overestimate the aggregated overall length captured. At the same time, it would be nice to know how to exclude them as well so that I can see the difference between inclusion and exclusion. Ideally I would just cut the segment at the boundary and only include that portion inside.

Thanks for your insight and coming solution if any.

tjhb
10,094 post(s)
#10-Feb-16 01:32

Let's say your lines are in a drawing called "Lines", and your areas are in a different drawing called "Areas".

Without using SQL, you can use a transform like this.

[All objects in Lines] Select Contained within [All objects in Areas]

That will select all lines lying entirely within some area.

You can copy the result and paste it as a new drawing.

To get all lines lying partly within some area, instead use a transform like this.

[All objects in Lines] Select Touching [All objects in Areas]

An SQL approach is more work at first, but overall easier (arguably).

tjhb
10,094 post(s)
#10-Feb-16 02:33

Re-reading

Ideally I would just cut the segment at the boundary and only include that portion inside.

For that it is nearly as easy.

Same suppositions as before, again avoiding SQL (for now).

Make a duplicate of the "Lines" drawing (right-click, select Duplicate)--which I'll call "Lines 2".

Then use transform

[All objects in Lines 2] Clip with (intersect) [All objects in Areas]

Now the sum of their lengths is... well, you get it.

In some cases like this (not necessarily this case) you might want to use a ViewBot to measure the figures you need. Very cool.

tjhb
10,094 post(s)
#10-Feb-16 02:48

(The transforms must be done with both relevant drawings included in the same map.)

BCowper


1,275 post(s)
online
#10-Feb-16 14:51

A tip: you don't need to worry about no stinking map if you use SQL.

krash41 post(s)
#10-Feb-16 18:37

Thanks for the detailed instructions, tjhb. I will give it try today.

I am comfortable using SQL language in MySQL and Access but I have not used it in Manifold. I am sure that I can pick it up quickly once I understand the syntax and key words used for Manifold.

Manifold is awesome for the price and performance. Learning curve is steeper than ArcGIS but this forum and users make it easier to learn. Much appreciate the user support here.

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.