Skip to main content
Solved

how to get cross line on polygon?

  • July 13, 2022
  • 4 replies
  • 121 views

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, 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.

4 replies

geomancer
Evangelist
Forum|alt.badge.img+58
  • Evangelist
  • 932 replies
  • 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
  • 64 replies
  • 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).

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+58
  • Evangelist
  • 932 replies
  • 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+58
  • Evangelist
  • 932 replies
  • 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).

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