[SoC] SoC GDAL2Tiles: First Google Maps Overlay,
Tile Quality Discussion
Klokan Petr Přidal
klokan at klokan.cz
Fri Jul 18 12:12:36 EDT 2008
Hello everybody,
I was working on the Google Maps API based browser template. There are
first tiles overlaying Google Maps...
Have a look at:
http://www.klokan.cz/projects/gdal2tiles/overlay/googlemaps.html
BTW Source raster is the freely available NOAA BSB marine map of the
Vancouver area and Victoria town, where was the last FOSS4G conference
;-)
Similar web map browser is going be generated by the new version of
GDAL2Tiles for any raster data with georeference just by one command -
same way like you now generate the non-overlaying viewer with the
stable version of this GDAL utility
(http://www.gdal.org/gdal2tiles.html).
The template for overlay is not yet ready. I am missing changeable
transparency control (it seems I will need to make my own). I would
like to place the label layer from Satellite on top of custom overlay,
but somehow the zPriority is not running as it should (anybody has
experience with that?).
Later on I should definitely prettify the JavaScript code, so be
patient, please.
Google Earth embedded in the webbrowser is there as well (plugin is
now available only under Windows) - it will display the same tiles as
map overlay.
The implementation of similar changes on the OpenLayers based template
for TMS viewer is still waiting for me.
I was testing several ways how to generate high quality tiles by GDAL
python interface:
- It seems I will always use ReadRaster() for query the original
raster (this is using nearest neighbour algorithm) to get the window
of size 1024x1024 pixels.
This window will be scaled down (billinear or cubic?) by
ReprojectImage() to the size 256x256 pixels in memory (GDAL 'MEM'
driver).
Before the scaling the conversion to RGB has to be done as well as the
conversion to Byte band type, in case source raster does not have that
parameters.
If I use a query window smaller then 4 x width (1024 for 256 pixel
result) the quality of the result was quite poor.
- Alternative way how to generate high quality tiles for the upper
levels of the tile pyramid is by reading of already generated tiles
from the lower levels of the pyramid. This approach is used by
gdal_retile.py utility (there is a simple cache mechanism), the source
code of which I was examining during the last week.
Maybe the second approach will be more efficient for generation of
tiles from warped VRT datasets.
Any idea what approach for generating tiles for the upper levels of
the pyramid should be used to receive high quality tiles in reasonable
time?
All the best for coming weekend...
Klokan
More information about the Soc
mailing list