Skip to main content
Solved

Finding lines within polygons

  • February 15, 2016
  • 3 replies
  • 295 views

Forum|alt.badge.img

Hi. I have a geodatabase with lots of overlapping polygons and line features. Each polygon has two line features which lie totally within it but also parts of other lines. How can I select only the lines which are totally contained within each polygon? I've tried the LineOnAreaOverlayer but this chops up the lines into smaller segments based on the overlapping polygons which is not what I'm looking for.

Best answer by ebygomm

You could try a spatialfilter, spatialrelator or the clipper transformers

Spatialfilter - areas going into the filter port, lines into the candidate port with the tests to perform set to contains will only output lines completely within an area.

Clipper - areas go into the clipper port, lines into the clippee then test for unclipped features coming out the inside port.

View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • Best Answer
  • February 15, 2016

You could try a spatialfilter, spatialrelator or the clipper transformers

Spatialfilter - areas going into the filter port, lines into the candidate port with the tests to perform set to contains will only output lines completely within an area.

Clipper - areas go into the clipper port, lines into the clippee then test for unclipped features coming out the inside port.


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • February 15, 2016

If the geodatabase is an Oracle geodatabase containing SDO_Geometry fields you can also use the SQLCreator and having the database do the hard work. The query would look like this:

SELECT line.id, polygon.id FROM line, polygon

WHERE SDO_INSIDE(line.shape,polygon.shape) = 'TRUE';


Forum|alt.badge.img
ebygomm wrote:

You could try a spatialfilter, spatialrelator or the clipper transformers

Spatialfilter - areas going into the filter port, lines into the candidate port with the tests to perform set to contains will only output lines completely within an area.

Clipper - areas go into the clipper port, lines into the clippee then test for unclipped features coming out the inside port.

Thanks for answers. The spatial relator seems to do the job.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings