Skip to main content
Solved

how to get cross line on polygon?


spiderman
Contributor
Forum|alt.badge.img+7

i have lines and i have polygon

my question that i would like to find which line intersects with polygon and which lines crosses with polygon

so i have transformed polygon to lines by geometry coercer then i used spatial filter ,predicate crosses

and another time i used spatial filter with predicate intersect

 

but i have found that the output in passed port even if i have chosen predicate cross or intersect ,i get this line in output

 

why did this line appear when i choose predicate intersect ,because no intersection point between line and polygon .

 

i would like to have it only when i use predicate cross .

i hope someone has idea for me

 

 

FME 2020question

Best answer by geomancer

Now if you want to test for vertices in common, you can do a SpatialFilter on the vertices, like this.

Common_Vertices

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

4 replies

geomancer
Evangelist
Forum|alt.badge.img+50
  • Evangelist
  • July 13, 2022

You misinterpret 'Intersect'. Objects intersect when they are 'Not Disjoint', see Spatial Relations Defined. So when two objects cross, they also intersect (but not necessarily the other way around).

Also you don't have to coerce your polygons into polylines to test for intersection (or crossing).


spiderman
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • July 13, 2022
geomancer wrote:

You misinterpret 'Intersect'. Objects intersect when they are 'Not Disjoint', see Spatial Relations Defined. So when two objects cross, they also intersect (but not necessarily the other way around).

Also you don't have to coerce your polygons into polylines to test for intersection (or crossing).

why did they consider as intersect object also ,if they have not intersection in point between both of them ?


geomancer
Evangelist
Forum|alt.badge.img+50
  • Evangelist
  • Best Answer
  • July 13, 2022

Now if you want to test for vertices in common, you can do a SpatialFilter on the vertices, like this.

Common_Vertices


geomancer
Evangelist
Forum|alt.badge.img+50
  • Evangelist
  • July 13, 2022
geomancer wrote:

You misinterpret 'Intersect'. Objects intersect when they are 'Not Disjoint', see Spatial Relations Defined. So when two objects cross, they also intersect (but not necessarily the other way around).

Also you don't have to coerce your polygons into polylines to test for intersection (or crossing).

When objects are not disjoint, they intersect. Look at the definitions in Spatial Relations Defined.


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