Skip to main content
Question

Lines Crossing

  • August 26, 2019
  • 4 replies
  • 292 views

pratap
Contributor
Forum|alt.badge.img+12

Hi,

Can any one help me how to use crossing in spatial relations like spatial realtor or spatial filter or any similar.

I have seen in Link

Pratap

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

erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • August 26, 2019

Hi Pratap,

If you are looking for the points where lines cross (intersect) I usually use the Intersector.

The Nodes output port will give you the intersections.

If you store the line information in a list you can tell what lines are intersecting (crossing) at that point.

Hope this helps.


jdh
Contributor
Forum|alt.badge.img+37
  • Contributor
  • 2002 replies
  • August 26, 2019

Crossing is a subset of intersecting.

 

 

Two lines that intersect in an X are crossing.

 

Two lines that intersect in a T are intersecting, but not crossing.

 

 

A line entering but not exiting a polygon is not crossing

 

A line both entering and exiting a polygon is crossing.

pratap
Contributor
Forum|alt.badge.img+12
  • Author
  • Contributor
  • 605 replies
  • August 26, 2019

Hi,

Thank you @jdh @erik_jan

Apologies, I have not mentioned geometries.

I'm looking for Line Vs Line and looking for X and T in @jdh terminology. Either in X or T, nodes are not present at intersection. In the Link which I provided in question, it has crossing options explained and but it didn't explained on how to use in spatialfilter/spatialrelator transformers.

Pratap


jdh
Contributor
Forum|alt.badge.img+37
  • Contributor
  • 2002 replies
  • August 26, 2019

The SpatialRelator generally works on two different datasets. The Requestors are the features that will be output, The Suppliers are the features that will be compared to the Requestors, and if they pass the test (Spatial Predicate) the information will be added to a list attribute (_relationships{}) on the Requestor feature.

 

 

If you only have one dataset and you went every feature to be compared to each other, you can send the data to both the Requestor and Supplier ports, and set the parameter 'Attribute(s) that must Differ' to an attribute that is unique for every feature. If you don't already have a UniqueID of some sort, you can use a Counter to create one.

 

 

In the Predicates parameter you would select either Requestor Crosses Supplier or Requestor Intersects Supplier or both. Note that the crosses option is only available if the Support Mode is changed from Support Aggregates to Support All Predicates.