Question

SpatialRelator touches along edge

  • 20 August 2021
  • 4 replies
  • 6 views

Badge +22
  • Contributor
  • 1963 replies

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

Userlevel 1
Badge +10

Hi @jdh​. Wondering if this thread is related to what you're looking to do: https://community.safe.com/s/question/0D54Q000080hQFVSA2/locate-points-that-are-snapped-to-an-edge-of-a-line-but-not-a-vertex-or-end-point

Badge +22

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

Badge +6

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!

Badge +22

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.

 

Reply