Skip to main content
Hi,

 

 

I rather thought this was an easy use case for spatial relator, but it's not yet provding the correct output:

 

 

situation is like below:

 

2 polygons that partly overlap ( = the yellow area)

 

3 lines

 

 

Desired outcome:

 

Line ID 1 with buffer ID A information

 

Line ID 2 with buffer ID B information

 

Line ID 2 with buffer ID B information

 

 

Current outcome

 

 

only Line ID 2 that's not in the overlapping part gets the buffer information

 

The other won't get any information.

 

 

I tried using spatial relator (within) and spatial filter (contains, pass against one filter) but still no desired output

 

 

How should I proceed to get the desired output (if that is possible ofcourse)

 

 

 

Thanks
Hi,

 

 

I think the SpatialRelator (Within) or the SpatialFilter (Contains) works fine theoretically.

 

I guess that the lines are slightly sticking out from the buffer areas.

 

Firstly, try one of these to check that.

 

Enlarge the buffer areas with a Bufferer.

 

or

 

Shorten the lines using an Extender (Extension Length: <negative value>).

 

 

Takashi

 


A similar question has been asked couple of weeks ago.

 

 

It is possible of course.

 

There are solutions invovolving loops and without. Using AreaOnAreOverlayer, Clipper or SpatialRelator.

 

Clipper is the only one that performs without mistakes. (in fme 2014 that is).

 

at least when doing things like this:

 

 

 

 

The pic uses CLipper based looping. Both input layers have overlapping objects.

 

The workspace also has AoA and SpaatialRelator customs.

 

(the circular clippings are complete, wich is shown by the selected one.)

 

Objects are randomly created.

 

 

 

But your example does not require a complex solution.

 

Reason is that the buffers are are used to filter the lines on wich the buffers are based.

 

So if you use a clipper and set "merge Attributes" to yes. Then line ID2 wich is from buffer IDB, will have their data merged.

 

This will fail with intersections with more then 2 lines with teir buffers, though.

 

 

Then you need the prior suggsted solutions.

 

 

 

 

 

 

 
Hi both,

 

 

Takashi: your solution is now working as now the features go through the passed part correctly, although the output (attributes is still not as desired)

 

 

Gio: your solution provides good results in some cases but in others still not as desired + there are some small lines outputted which are very small and redundant. Also the buffers aren't based on those lines (although it looks like that)

 

 

Undesired output: red indicated line should have same attributes as green indicated line

 

 

 

Desired output (same workbench and run as from undesired picture):

 

 

 

Gio, do you know the topic which you are mentioning?

 

 

Or if wanted I can alway upload a part of the data

 

 
The clipper version of overlapping testers:

 

 

 

and the customtransformer

 

 

 

Te AreaOnArea customtransformer is almost the same, all you need to do is replace the clipper with a Aoa..

 

The SpatialRelator version needs a bit more transformers to work.

 

 

(sunchronise = synchronise..., ...basically   😉 )
How about buffering the lines with a Bufferer (End Cap Stype: None)?

 

In this image, the orange polygons are the buffer areas of the lines, which are contained only by the green polygon.

 

 

If the orange areas can be filtered by grean/blue polygons as expected, you can use a GeometryExtractor before buffering, and a GeometryReplacer after spatial filtering, to restore the original lines.

 


Hi both,

 

 

Thanks for the suggestions. I still need to look into both if they provide me required output.

 

 

Currently I'm doing the following:
  1. Use topologybuilder
  2. Use extender
  3. Use spatial relator (within)
  4. Filter out lines with more then 1 related candidate
  5. explode list
  6. Run query to join lines with more then 1 candiated with lines with only 1 candidated where the line Id is the same, the buffer id is the same and where from node = to node or to node = from node
and first tests show quite good results

 

 

Still I'll take a look at your both provided solutions when I have some more exploring time

Reply