ngageoint / hootenanny

Hootenanny conflates multiple maps into a single seamless map.
GNU General Public License v3.0
354 stars 74 forks source link

Untyped way relation members are poorly merged #4149

Closed bwitham closed 3 years ago

bwitham commented 4 years ago

While working on 4137, which opened up conflation to ways without a type, noticed that when Line.js matches two untyped ways belonging to a collection relation LinearSnapMerger merges them in such a way that membership to the relation is dropped. Previously these ways weren't even being matched, since LinearCriterion required a type in order to match.

See unifying/multiple/way-join-missing-parent-1 and unifying/multiple/highway-3906-1.

Note code that needs to be removed from exports.isMatchCandidate in Line.js and possibly also LinearCriterion.

bwitham commented 4 years ago

see #4151

bwitham commented 4 years ago

hoot conflate --trace -C test-files/cases/reference/unifying/Config.conf -D debug.maps.write=true -D debug.maps.filename=test-files/cases/reference/unifying/multiple/highway-3906/debug.osm -D uuid.helper.repeatable=true -D writer.include.debug.tags=true -D log.class.filter="HighwaySnapMergerJs;HighwaySnapMerger;Line.js;Polygon.js;CollectionRelation.js" test-files/cases/reference/unifying/multiple/highway-3906/Input1.osm test-files/cases/reference/unifying/multiple/highway-3906/Input2.osm test-files/cases/reference/unifying/multiple/highway-3906/Output.osm > test-files/cases/reference/unifying/multiple/highway-3906/out

bwitham commented 4 years ago

Not sure yet how HighwaySnapMerger is messing this up. It looks like it only merges half of the way, even though they look like they have nearly identical geometries. May need a custom merge routine.

bwitham commented 4 years ago

hoot conflate --trace -C test-files/cases/reference/unifying/Config.conf -D debug.maps.write=true -D debug.maps.filename=test-files/cases/reference/unifying/multiple/way-join-missing-parent-1/debug.osm -D uuid.helper.repeatable=true -D writer.include.debug.tags=true -D log.class.filter="HighwaySnapMergerJs;HighwaySnapMerger;Line.js;Polygon.js;CollectionRelation.js" test-files/cases/reference/unifying/multiple/way-join-missing-parent-1/Input1.osm test-files/cases/reference/unifying/multiple/way-join-missing-parent-1/Input2.osm test-files/cases/reference/unifying/multiple/way-join-missing-parent-1/Output.osm > test-files/cases/reference/unifying/multiple/way-join-missing-parent-1/out

bwitham commented 4 years ago

Switching from the 3906 test to the other one...a little easier to debug. The matching and merging actually looks good, except relation membership gets dropped, so need to figure out why.

bwitham commented 4 years ago

Relation membership fixed in merging. Next step after running tests is to see if we can get a review on the section of admin boundary that didn't match for the missing parent test and see why the whole section of the water ways didn't match in 3906.

bwitham commented 4 years ago

The fix is causing problems with the relation merging.

bwitham commented 3 years ago

This appears to have already been fixed by #4796.

bwitham commented 3 years ago

Nope. Still a problem, just not as bad as it originally was.

bwitham commented 3 years ago

Fix ended up being a lot simpler than I thought. Adding membership for the scrap ways split by LinearSnapMerger to the same relations the split way is in fixes this issue.