[gdal-dev] Help with gdal_translate and WMS/TMS

Jeremy stonebuster at morallan.com
Tue May 3 16:29:38 EDT 2011



I would like to be able to load a specific area of , for example, Google
Maps using the WMS/TMS driver in GDAL 1.8.  I am able to create a PNG file
of the full world map at the maximum tile level using gdal_translate and the
sample xml file at http://www.gdal.org/frmt_wms_googlemaps_tms.xml:


gdal_translate -of PNG -outsize 512 512 frmt_wms_googlemaps_tms.xml


However, I'm having problems loading a specific area.  I've tried all sorts
of combinations of -projwin and -srcwin flags in gdal_translate without
success, .  The sites that have -projwin examples in the GDAL WMS examples
are no longer available (OnEarth and  NYSDOP 2004).  I've also tried
changing the xml fields to reflect my desired area, again without success.


Would it be too much trouble to walk me through the steps of creating a PNG
file of Google Maps for Calgary, Canada with the following bounds?

Decimal degrees: upper-left: [-114.2, 51.2], lower-right: [-113.9, 51.0]

Mercator (I think!): upper-left: [-12712685, 6656748], lower-right:
[-12679290, 6621294]


Any advice/tips would be appreciated!


Thanks in advance,



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110503/4ff5431c/attachment.html

More information about the gdal-dev mailing list