Skip to main content
Solved

Adding unique attribute values to more than one Feature

  • April 24, 2018
  • 6 replies
  • 96 views

Forum|alt.badge.img

Hello,

 

I hope FME community can solve my problem. I have polygons that represent parcels, polygons that represent buildings, and points that represent parcel and building numbers. I need to add unique identifier to parcels, buildings, parcel id and building id that are on the same parcel. I have attached a picture so I could explain what I need easier (1.png).

I have a parcel 2375 and I need to add to new attribute, lets say ID, value 111111 to polygon parcel with id 2375, point parcel_num with parcel_id 2375, polygons buildings 1, 2, 3, 4 and point building_num with build_num 1, 2, 3, 4. All objects in one parcel need to have same identifier in their attribute lists.

I will use attributeManager to add new attribute all Features, and Counter to add unique value but I don't know how to group all objects to parcel.

Best answer by oscard

I would give a unique identifier to every parcel using Counter (as you have mentioned).

Then, I would use a SpatialRelator to know to which parcel the buildings and the point features belong.

I guess that you will need to create polygons with holes for some of the parcels. For example, the parcel 2375 should have a hole with the shape of 2374.

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.

6 replies

oscard
Influencer
Forum|alt.badge.img+22
  • Influencer
  • 344 replies
  • Best Answer
  • April 24, 2018

I would give a unique identifier to every parcel using Counter (as you have mentioned).

Then, I would use a SpatialRelator to know to which parcel the buildings and the point features belong.

I guess that you will need to create polygons with holes for some of the parcels. For example, the parcel 2375 should have a hole with the shape of 2374.


redgeographics
Celebrity
Forum|alt.badge.img+60
  • Celebrity
  • 3703 replies
  • April 24, 2018

I would give a unique identifier to every parcel using Counter (as you have mentioned).

Then, I would use a SpatialRelator to know to which parcel the buildings and the point features belong.

I guess that you will need to create polygons with holes for some of the parcels. For example, the parcel 2375 should have a hole with the shape of 2374.

In order to create parcel polygons (assuming you don't have them yet) you can use the AreaBuilder, that'll have the option to create donuts. Then a PointOnAreaOverlayer to transfer the parcel number to the parcel polygon and the SpatialRelator that @oscard mentioned to find out which buildings are on which parcel.

 


Forum|alt.badge.img
  • Author
  • 39 replies
  • April 24, 2018

I would give a unique identifier to every parcel using Counter (as you have mentioned).

Then, I would use a SpatialRelator to know to which parcel the buildings and the point features belong.

I guess that you will need to create polygons with holes for some of the parcels. For example, the parcel 2375 should have a hole with the shape of 2374.

Once again FME community saves the day. Thank you @oscard this works perfectly. I don't need to make holes because i made my polygons from lines with LineCloser, Matcher and areabuilder so on output end holes are already there, but thanks again.

 

 


Forum|alt.badge.img
  • Author
  • 39 replies
  • April 24, 2018
In order to create parcel polygons (assuming you don't have them yet) you can use the AreaBuilder, that'll have the option to create donuts. Then a PointOnAreaOverlayer to transfer the parcel number to the parcel polygon and the SpatialRelator that @oscard mentioned to find out which buildings are on which parcel.

 

Thank you @redgeographics for your input. I used NeighborFinder with merging attributes for parcel and buildings numbers, but good to know that there are other ways to do the same thing.

 


redgeographics
Celebrity
Forum|alt.badge.img+60
  • Celebrity
  • 3703 replies
  • April 24, 2018
Thank you @redgeographics for your input. I used NeighborFinder with merging attributes for parcel and buildings numbers, but good to know that there are other ways to do the same thing.

 

I would be very weary to use the NeighborFinder, as it will look for the closest match. That may not be a problem with your data but I'm sure I can come up with scenarios where it will pick the wrong one.

 

 


Forum|alt.badge.img
  • Author
  • 39 replies
  • April 24, 2018
I would be very weary to use the NeighborFinder, as it will look for the closest match. That may not be a problem with your data but I'm sure I can come up with scenarios where it will pick the wrong one.

 

 

Yes, yes i know but in my data it can pick up only one number and the max distance is set to 0 because every number(point) is placed inside polygon during preparation of data. If something changes i will use your idea. Thank you.