Skip to main content
Solved

FME 2020: How to pass the Blocks number to their Parcels?

  • February 8, 2021
  • 10 replies
  • 40 views

jamal
Forum|alt.badge.img+5

FME 2020: How to pass the Blocks number to their Parcels?

 

In the screenshot below, there are two layers: parcels and blocks. I wanted to pass the blocks number to all parcels contained in it to end up with a new layer that has two fields: parcel number and block number

 

What might be the best practice to perform this?

 

The data is attached

 

Clip_367

Best answer by chrisatsafe

Very much appreciated chrisatsafe for the prompt answer.

 

The “AnchoredSnapper” and “AreaOnAreaOverlayer” might not lead to the expected result due to snapping distance. This needs critical tunning in order to end up with same number of parcels

 

What I wanted here is to transfer the “blocknumber” to each parcel that has its center within a block.

 

In ArcGIS, the “spatial join” tool can do this with the “one to many” and “have their center in” options. Is there an equivalent tool in FME?

 

Clip_375 

Clip_376 

Clip_377 

 

That makes sense, if you need the result to be one to many you can do that with the SpatialRelator as it will tell you which blocks it overlaps with. Additionally, if you prefer to test based on their center point, you can first extract the center points and then perform the analysis with the SpatialRelator.

 

You have a lot of options here ;)

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.

10 replies

chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • 606 replies
  • February 12, 2021

Hi @jamal​ ,

 

There are a few ways you can do this. One thing I noticed when opening up your dataset is that the blocks dataset doesn't fully line up with the parcels. With that in mind, I used an AnchoredSnapper to help correct this.

 

I would handle this by first sending the blocks and parcels into the AnchoredSnapper, from there you can either use the AreaOnAreaOverlayer or SpatialRelator to perform the overlap analysis and merge the attributes from the blocks onto the Parcels.

 

2021-02-12_11-40-20We have a great determining spatial relationships article and a Merging or Joining Spatial Data article with more tips in case you are interested!


jamal
Forum|alt.badge.img+5
  • Author
  • 342 replies
  • February 12, 2021

Thank you chrisatsafe for the help.

 

I couldn’t figure out what the snapping distance represents here. Is it the maximum distance the “blocks” can move to the “parcels”? if so, why if we set it to be 3 meters then different result is obtained while setting it to be 4 meters brings the expected results?

 

Clip_369Clip_370 

Clip_371 

 

 


chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • 606 replies
  • February 12, 2021

Thank you chrisatsafe for the help.

 

I couldn’t figure out what the snapping distance represents here. Is it the maximum distance the “blocks” can move to the “parcels”? if so, why if we set it to be 3 meters then different result is obtained while setting it to be 4 meters brings the expected results?

 

Clip_369Clip_370 

Clip_371 

 

 

Hi @jamal​ ,

The output is 12 polygons when you set it to 3 because those vertices aren't snapping. Their distances are ~3.3 and ~3.8 from the closest anchor vertex.

2021-02-12_14-23-23It all depends on the Snapping Type used in the AnchoredSnapper - for example if you set it to segment with a distance of 3 it would produce similar results to Vertex Snapping with a distance of 5 in this case.


jamal
Forum|alt.badge.img+5
  • Author
  • 342 replies
  • February 13, 2021

Very much appreciated chrisatsafe for the prompt answer.

 

The “AnchoredSnapper” and “AreaOnAreaOverlayer” might not lead to the expected result due to snapping distance. This needs critical tunning in order to end up with same number of parcels

 

What I wanted here is to transfer the “blocknumber” to each parcel that has its center within a block.

 

In ArcGIS, the “spatial join” tool can do this with the “one to many” and “have their center in” options. Is there an equivalent tool in FME?

 

Clip_375 

Clip_376 

Clip_377 

 


chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • 606 replies
  • Best Answer
  • February 16, 2021

Very much appreciated chrisatsafe for the prompt answer.

 

The “AnchoredSnapper” and “AreaOnAreaOverlayer” might not lead to the expected result due to snapping distance. This needs critical tunning in order to end up with same number of parcels

 

What I wanted here is to transfer the “blocknumber” to each parcel that has its center within a block.

 

In ArcGIS, the “spatial join” tool can do this with the “one to many” and “have their center in” options. Is there an equivalent tool in FME?

 

Clip_375 

Clip_376 

Clip_377 

 

That makes sense, if you need the result to be one to many you can do that with the SpatialRelator as it will tell you which blocks it overlaps with. Additionally, if you prefer to test based on their center point, you can first extract the center points and then perform the analysis with the SpatialRelator.

 

You have a lot of options here ;)


chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • 606 replies
  • February 16, 2021

That makes sense, if you need the result to be one to many you can do that with the SpatialRelator as it will tell you which blocks it overlaps with. Additionally, if you prefer to test based on their center point, you can first extract the center points and then perform the analysis with the SpatialRelator.

 

You have a lot of options here ;)

Here is what the workspace could look like. Let me know if that helps @jamal​ 


jamal
Forum|alt.badge.img+5
  • Author
  • 342 replies
  • February 18, 2021

Thank you very much chrisatsafe for the help and solving the issue.

 

I think that the SpatialRelator tool needs to be enhanced in two ways:

 

1)    To include more options as the ones available in the “spatial join” of the ArcGIS

2)    To be able to take the attribute fields from all layers

 

Clip_384 

Clip_385 

 

 

 


chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • 606 replies
  • February 18, 2021

Thank you very much chrisatsafe for the help and solving the issue.

 

I think that the SpatialRelator tool needs to be enhanced in two ways:

 

1)    To include more options as the ones available in the “spatial join” of the ArcGIS

2)    To be able to take the attribute fields from all layers

 

Clip_384 

Clip_385 

 

 

 

Hi @jamal​ ,

With regards to merging attributes, you can merge all attributes between the datasets using the Merge Attributes parameter in the SpatialRelator. Since you mentioned one to many relationships, I opted for generating a list in the workspace I provided (which is then exploded in the ListExploder to expose the BlockNumber as an attribute) but you could use merge attributes instead.

2021-02-18_8-32-03I can't say whether all of the other match option types have been considered for the SpatialRelator, but you can likely produce similar results with other transformers (or a combo of transformers). If you'd like to see more match spatial predicates to test on in the SpatialRelator feel free to post the ones you'd be interested in seeing in addition to your use case as a new suggestion on the ideas Page!


jamal
Forum|alt.badge.img+5
  • Author
  • 342 replies
  • February 18, 2021

Great. I checked the “merged attribute” options and found out that the bocknumber field is transferred to the parcel layer

 

Getting more spatial options means that “CenterPointReplacer” and “FeatureJoiner” will be not needed in addition to being able to apply a wide spectrum of analysis.

 

All in all, your assistance does resolve the issue

 

 

Clip_392


jamal
Forum|alt.badge.img+5
  • Author
  • 342 replies
  • January 29, 2022

Please, Vote

FME Desktop 2022: Having an equivalent tool to “spatial join” that’s available in ArcGIS,

https://community.safe.com/s/idea/0874Q000000cU3BQAU/detail