ngageoint / hootenanny

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

Export relation with missing members mangling polygon geometry #2505

Closed brianhatchl closed 5 years ago

brianhatchl commented 6 years ago

Related to https://github.com/ngageoint/hootenanny/issues/1856

But this export includes relation member ways from both side of the middle of a lake, so apparently the effort that went into cleaning up the partial geometry is not as successful in this case.

clipboard - july 12 2018 2_41 pm

Should look more like:

image

Not sure what can be done here. There are osm api methods for fetching full ways and relations with all members. This is an occasion where using the postgis render db would provide a better result.

cc: @bmarchant @mattjdnv @giblet22

giblet22 commented 6 years ago

Top image is when exported as a File Geodatabase. The coastlines are considered an area. Just to play with things I exported just the OSM XML and they came out as lines.

jhicksva commented 6 years ago

This could cause some heartburn for the customer who produces these sheets downrange via CWS or even folks that want to export the data into another software package. Is there a way that these features could be queried and have the shorelines combined in such a way that doesnt exceed the node limit? Just talking out loud here.

mattjdnv commented 6 years ago

I think the problem is:

A potential fix is to use the boundary of the export area to create the missing parts of the polygons. The possibly hard part is figuring out what side of a line is "inside" the polygon. E.g. on my crude photoshop below.

edited

brianhatchl commented 6 years ago

I think solving this might require fully hydrating any relation in the bbox. But I don't think there is a single http request to do that. Instead it's bbox request, check if any relations, then a full request: https://wiki.openstreetmap.org/wiki/API_v0.6#Full:_GET_.2Fapi.2F0.6.2F.5Bway.7Crelation.5D.2F.23id.2Ffull

brianhatchl commented 5 years ago

@jhicksva The proposed fixes have all been merged and are available in the v0.2.42 release which is now deployed.

brianhatchl commented 5 years ago

I updated the equivalent sheet in CWS and it looks much better.

image