GeoscienceAustralia / ga-worldwind-suite

A collection of tools created by the Geoscience Australia (GA) Movies and 3D Visualisation (M3DV) team. The tools are built around the NASA World Wind Java SDK, an open-source virtual globe toolkit.
40 stars 24 forks source link

Non existant mask tiles should default to transparent #83

Open ncaldwell opened 12 years ago

ncaldwell commented 12 years ago

Currently if a mask is lacking a tile for an area, then it is ignored, which basically ensures that whatever it is masking is visible. This requires storing blank tiles at all levels for the often large nodata sections surrounding the tiles. If we switch it to default to transparent alpha, then empty tiles do not have to be kept.

mdehoog commented 12 years ago

The issue with assuming that tiles with non-existant masks should be transparent is that, when a tileset doesn't have a mask tileset at all, or when the tileset contains an alpha channel already, it would be treated as transparent because the image tile doesn't have an associated mask tile.

Generally the image tileset will be generated at the same time as the mask tileset, in which case the number of image tiles should exactly match the number of mask tiles. If both the image and mask tilesets are generated with the Tiler's "Ignore blank tiles" option enabled, blank tiles will be ignored for both tilesets.

Probably a better option would be to write a script that deletes any tiles which don't have an associated mask file (this script already exists in our internal SVN: see Software/Java/WorldWind/Misc/DataPrepScripts/src/main/java/au/gov/ga/worldwind/dataprep/NoMaskDeleter.java).