Skip to main content
Question

Merge/combine attributes of the biggest geometry within target dataset feature only

  • February 13, 2017
  • 4 replies
  • 56 views

jeroen
Contributor
Forum|alt.badge.img+15

I'm adding data from two different data sets into one and i'm struggling to get the final merge ready.

I have two data sets with roads, DS1 (data set 1) has more detailed information but the geometry is not correct and the other DS2 (data set 2) is the other way around and has the leading geomtry. Luckily the geometry does not differ that much in shape, the problem is that DS1 has a bit more pieces.

So i need a check on how many features of DS2 are within DS1 and than merge the information from the largest (in area) features from DS1 puts/merges his information into that feature of DS2.

I tried a tester and AreaOnAreaOverlayer but then the data explodes into a huge dataset. I tried to narrow the results down but in the end i still need a final merge that says the largest feature gives the information to the correct geometry.

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.

4 replies

david_r
Celebrity
  • February 13, 2017

Is there no unique identifier on the roads so that you could use e.g. a FeatureMerger rather than a geometric operation?


jeroen
Contributor
Forum|alt.badge.img+15
  • Author
  • Contributor
  • February 13, 2017

Is there no unique identifier on the roads so that you could use e.g. a FeatureMerger rather than a geometric operation?

I tried to do an area on areaoverlasy than give the features a unique ID based on a few attributes. After that; Listbuilder -> counter -> list exploser -> feature merger -> aggregator but it does not give the needed results. Somehow i end up with not controleable data of DS1 in the geomtry of DS2. The end results is a highway has the information of a speed bump.

 

 

I tried a manual test sample (click an check by hand) and found out that the largest feature(in m2) was always the right data for the merge into DS2.

erik_jan
Contributor
Forum|alt.badge.img+26
  • Contributor
  • February 13, 2017

Have you tried the NeighborFinder (set maximum distance to 0)?


Forum|alt.badge.img+2
  • February 20, 2017

If you could post a small sample of the data then I'm sure someone in the community could come up with a possible solution. But some speculative thoughts are:

- preserve the geometry of DS2 (GeometryExtractor) then use NeighbourFinder as @erik_jan suggests

OR

- buffer one of the datasets (DS1) and use spatialrelator to find a spatial match