Question

spatial relator?

  • 5 November 2013
  • 6 replies
  • 6 views

Badge +6

i have again two feature classes (lines)....feature class 1 contains one single line with an unique attribute STAU_ID......

so for example...feature class 1 contains 1 feature with STAU_ID = 1

feature class 2 contains 7 features with STAU_ID = 1

i want build areas with these two feature classes....as a result from this example i want 7 areas ...every area should have the border from feature from feature class 1 with each feature from feature class one with the same STAU_ID

i know i can do it maybe with spatial relator or something.....

but i can't see the way yet....

Thanx a lot

 

Franco

6 replies

Userlevel 4
Badge +13
Hi,

 

 

If the features have the same ID, you can try to merge them (FeatureMerger) and use the AreaBulider with the ID in the Group By setting of the transformer.

 

 

Itay
Userlevel 4
Hi,

 

 

You might not need the FeatureMerger at all. Just use the AreaBuilder and set the Group By attribute to STAU_ID.

 

 

Consider using the snapping functionality of the AreaBuilder if your lines does not line up perfectly.

 

 

David
Badge +6

both ways doesnt really bring me the right output

i explain again:

feature class 1 contains 395 features with 395 different "STAU_IDs"

feature class 2 contains 5273 features with different STAU_ID (which match on minimum 1 line in feature class 1)

the lines from feature class 2 overlaps to the base line in feature class 1

now i want build areas with one line in feature class1 and for example 7 features in feature class 2 with the same STAU_ID.....the result should be 7 different areas ...which all have the border from feature class 1....

 

after the feature merger the result is that FME duplicates the geometry from feature class 1 for each candidate from feature class 2

 

the area builder with group by STAU_ID don't cut feature class 2 at the intersection part from feature class 1 and the output is a kind of:

first area has border feature class 1 and first feature from feature class 2

second area is between border first feature from feature class 2 and second feature from feature class 2 and so on......

 

phew....that was now confusing or? ;-)

Userlevel 2
Badge +17
Hi Franco,

 

 

Maybe this workflow works. It was inspired from Itay's suggestion.

 

 

Takashi
Userlevel 4
Hi,

 

 

it is difficult to give a concrete solution without having seen the data (and I'm not quite sure I've understood your question correctly), but perhaps something like the following could work:

 

  1. On FC2, insert a GeometryExtractor to store the geometries in an attribute
  2. FeatureMerger on STAU_ID, with FC1 (feature class 1) as REQUESTOR and FC2 as SUPPLIER. Enable multiple suppliers and give a supplier list name
  3. Counter on the MATCHED port to give each matched feature a unique id
  4. Send the data to both no. 5 and no. 7 below.
  5. ListExploder, make sure that you use "List elements and original attributes" as attributes to keep
  6. GeometryReplacer to recuperate the FC2 geometries
  7. AreaBuilder with Group By on the Counter id. This will build areas based on the line from FC1 and the lines from FC2, grouped by the matching STAU_ID.
Like this:

 

 

 

Hope this helps...

 

 

David
Badge +6
Thank you guys ....both solutions worked.....thumbs high!!!

 

 

Greetz

 

Franco

Reply