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.
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.
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';
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.