Skip to main content
Solved

Lines that exist outside a polygon


I have a file of 100+ polygons and need to find lines that exist outside of the polygon based on a join condition that links the line to the polygon.

ie find me the lines in file x that exist outside of a polygon where line.shape not in/not entirely within polygon.shape and line.auth = polygon.auth

I'm a new FME user - I've experimented with both the spatial relator and the spatial filter. I don't know if I'm just using them incorrectly! any help appreciated!

Thanks

Baz

Best answer by david_r

Both the SpatialRelator or the SpatialFilter should work. You should set the Group By to the "auth" attribute (which will need to have the exact same name on both the lines and the polygons).

With the SpatialFilter, try:

View original
Did this help you find an answer to your question?

4 replies

david_r
Celebrity
  • Best Answer
  • July 25, 2017

Both the SpatialRelator or the SpatialFilter should work. You should set the Group By to the "auth" attribute (which will need to have the exact same name on both the lines and the polygons).

With the SpatialFilter, try:


erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • July 25, 2017

Another option is the Clipper, again grouping on the join attribute.

The lines will be Clippee, the polygons Clipper.

The Outside port will contain all lines that are completely or partially outside (these will have the _clipped attribute to filter them).


jneujens
Forum|alt.badge.img
  • July 25, 2017

Could you tell us what is not working then? Or what you get in your translation?

 

 

The SpatialRelator or SpatialFilter should work indeed, but more specific information could lead to more helpful answers!

fmelizard
Safer
Forum|alt.badge.img+19
  • Safer
  • July 25, 2017
Hi @abbas_lokat. Welcome to FME! If you require additional assistance after reviewing the answers below, sharing a few more details will help the FME community help you. Please reply to this thread and provide additional details including:

 

  • The version of FME you are using, including build number and edition
  • A small sample of your data, or screenshots of the data in the FME Data Inspector
  • A description of your expected output, with screenshots if possible
  • Your FME workspace
  • Your FME translation log file
  • Any other information that may be useful to share
I would also suggest you review the tutorial Common GIS Operations which includes examples of using the SpatialRelator and SpatialFilter transformers. And the documentation may be helpful as well.

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