Skip to main content

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.

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


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.

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


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


Reply