[gdal-dev] gdal2tiles strangeness

Klokan Petr Přidal klokan at klokan.cz
Wed Apr 1 08:09:56 EDT 2009


Mano,

> Thanks for the pointer. So it looks like, right now, there's a bug in
> gdal2tiles, according to  Jesse? Any news on when that might be fixed?

Just use this gdal2tiles.py:
http://maptiler.googlecode.com/svn/trunk/maptiler/gdal2tiles.py

The issue he is referring is fixed in MapTiler SVN:
http://code.google.com/p/maptiler/issues/detail?id=9
Commited in maptiler SVN in r17 on Mar 20, 2009.

I am proposing to fix all known bugs during this summer as part of
Google Summer of Code project, and also implement support for OGC WMTS
standard, publish a stable version of MapTiler
(http://www.maptiler.org/) and synchronize the code with GDAL SVN.

Klokan

>
> Mano
>
> 2009/3/31 Klokan Petr Přidal <klokan at klokan.cz>:
>> Mano,
>>
>> If you would like to have both Google Maps and Google Earth
>> presentation for a global map then you must generate two tile sets,
>> because Google Maps supports only Mercator tiles (EPSG:900913) and
>> Google Earth only geodetic (EPSG:4326).
>>
>> GDAL2Tiles has as a default tile profile 'mercator', it means that it
>> will warp your input into Spherical Mercator internally.
>> To create tiles and KML for Google Earth for your EPSG:4326 input data
>> you should use -p "raster".
>>
>> From the "gdal2tiles --help":
>>
>> -k, --force-kml     Generate KML for Google Earth - default for 'geodetic'
>>                        profile and 'raster' in EPSG:4326. For a dataset with
>>                        different projection use with caution!
>>
>> Detailed description of recommended step by step usage of gdal2tiles
>> for global maps was posted by Jesse Varner
>> from CIRES & NOAA/NGDC, who used gdal2tiles for official presentation
>> of Global magnetic anomaly map EMAG2 (for Google Maps/Earth) at:
>> http://ngdc.noaa.gov/geomag/data/Google_Maps/EMAG2/index.html
>>
>> His post is here:
>> http://groups.google.com/group/maptiler/msg/fe105e27a62711e4
>>
>> Best regards,
>>
>> Klokan
>>
>> On Tue, Mar 31, 2009 at 6:37 PM, Mano Marks <mmarks at google.com> wrote:
>>> I'm getting started with gdal2tiles, and I'm getting strange results.
>>>
>>> I downloaded a blue marble jpg from NASA:
>>> http://www.nasa.gov/vision/earth/features/blue_marble.html
>>>
>>> And I ran the following command lines:
>>>
>>> gdal_translate -of VRT -a_srs EPSG:4326 -gcp 0 0 -180 90 -gcp 21600 0
>>> 180 90 -gcp 21600 10800 180 -90 world_200401.jpg bluemarble1.vrt
>>>
>>> gdalwarp -of VRT -t_srs EPSG:4326 bluemarble1.vrt bluemarble2.vrt
>>>
>>> gdal2tiles -k bluemarble2.vrt
>>>
>>> Of course, the last step took awhile.
>>>
>>> The Google Maps and OpenLayers output was fine. However, the KML had
>>> some odd results. When loaded directly, it looked fine, but when I
>>> zoomed out, it appeared that what was the equivalent of zoom 0 and 1
>>> the images retain a Mercator projection. Is this a known issue, or did
>>> I do something wrong?
>>>
>>> --
>>> Mano Marks
>>> Geo Developer Advocate
>>> Google, Inc.
>>> mmarks at google.com
>>> http://twitter.com/ManoMarks
>>> _______________________________________________
>>> gdal-dev mailing list
>>> gdal-dev at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>>
>>
>>
>>
>> --
>> http://blog.klokan.cz/
>> http://www.maptiler.org/
>> http://www.oldmapsonline.org/
>>
>
>
>
> --
> Mano Marks
> Geo Developer Advocate
> Google, Inc.
> mmarks at google.com
> http://twitter.com/ManoMarks
>



-- 
http://blog.klokan.cz/
http://www.maptiler.org/
http://www.oldmapsonline.org/


More information about the gdal-dev mailing list