Skip to main content
Question

SpatialRelator touches along edge


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor

Is it possible to set up the spatialRelator, or other transformer, to identify a relationship where the features touch along an edge rather than at a point.

 

I know I can set the spatialRelator to Calculate the Cardinality of Intersections, and then filter the _relationships{} list to remove any elements where _relationships{}.card_line = 0, but that is non-trivial (ie python), and then recalculate the _related_suppliers attribute, but I'm hoping there is a less involved option.

4 replies

nampreetatsafe
Safer
Forum|alt.badge.img+12

jdh
Contributor
Forum|alt.badge.img+28
  • Author
  • Contributor
  • August 24, 2021

Not really.

My use case is that I have to identify clusters of adjoining polygons, but they are not considered adjoining if they only touch at a point.

In the below image the red and green clusters are separate even though they intersect at a point.

clustering


JennaKAtSafe
Safer
Forum|alt.badge.img+6
jdh wrote:

Not really.

My use case is that I have to identify clusters of adjoining polygons, but they are not considered adjoining if they only touch at a point.

In the below image the red and green clusters are separate even though they intersect at a point.

clustering

You might want to consider using the SpatialFilter to set specific relations to filter out specific polygons and later aggregate them. This documentation on Spatial Relations might also help. I've attached a workspace as an example of what this might look like. Hope this works for your use case!


jdh
Contributor
Forum|alt.badge.img+28
  • Author
  • Contributor
  • August 26, 2021
JennaAtSafe wrote:

You might want to consider using the SpatialFilter to set specific relations to filter out specific polygons and later aggregate them. This documentation on Spatial Relations might also help. I've attached a workspace as an example of what this might look like. Hope this works for your use case!

Hi Jenna,

Unfortunately the won't help for two reasons. One, I don't have a set of filter polygons to use*, two, the "Filter OGC-Intersects Candidate" doesn't distinguish between touches at a point vs touches along edge.

 

If I had a filter polygon that covered the red features, the filter would still pick up the green triangle touching it at a point.

 

*While I could theoretically dissolve everything together I have almost 14million features to process, which would be prohibitively slow to process. And if I were to do that I would just store the geometry as an attribute, add a counter to get a unique id per cluster and then explode the list and restore the original geometry.

 


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