Add vector rendering support for bathymetry
Details
Diff Detail
- Repository
- R34 Marble
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Here they are :)
Also, bathymetries start appearing at level 7 onwards( I have set the minimum level as 7 for them) and hence for taking the above screenshots I had to change their min level to 1. Should I change it to a lower level so that they start appearing at earlier levels ?
I eventually made the min zoom level for bathymetries to be 1 instead of 7, since the globe appeared better that way.
Looks great - but makes me realize some potential for improvement:
- Maybe we could use the Bathymetry -200m as a temporary approximation of the usual ocean (using the normal NaturalWater color)
- And maybe we should use a different bathymetry level like 3000 or 4000 instead of 1000 which is more distant from the normal water area.
For the above diff (Diff 5340), I introduced 2 GeoDataFeatures - Bathymetry200 and Bathymetry4000 instead of a single feature. It is because level 4000 bathymetry must always be rendered above the level 200 one.
@nienhueser Is there any way of doing this via a single GeoDataFeature type and StyleBuilder class ?
tools/shp2osm/polyshp2osm.py | ||
---|---|---|
277 | We could use a generic bathymetry tag here and an ele one with the depth value. See http://wiki.openstreetmap.org/wiki/Key:ele Then in Marble map that to one bathymetry visual category and a height value of the polygon, and finally have StyleBuilder adjust the style color based on the height. |
This diff uses a single Bathymetry GeoDataFeature and renders different types of bathymetries(currently 200m and 4000m) using the elevation info.
Looks good :-)
src/plugins/runner/osm/OsmRelation.cpp | ||
---|---|---|
120 | That seems like a hack that might be problematic when writing the document to a file. Why not just add the ele tag to the placemark? |
Fixes
Elevation info is now stored in placemark's osmdata instead of outer ring's osm data.
Looks good, please push.
Seems I am to blame for the need of the z value hack by suggesting to have just one bathymetry category. Maybe we find an easier approach when extending StyleBuilder in the future.