[gdal-dev] Help with gdal_translate and WMS/TMS
Even Rouault
even.rouault at mines-paris.org
Thu May 5 14:32:29 EDT 2011
Le mardi 03 mai 2011 22:29:38, Jeremy a écrit :
The following works for me (in dev version, but should also work with 1.8 - I
believe) :
gdal_translate frmts/wms/frmt_wms_googlemaps_tms.xml out.tif -projwin
-12712685 6656748 -12679290 6621294 -outsize 1% 1%
> Hello,
>
>
>
> 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
> output.png
>
>
>
> 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,
>
> Jeremy
More information about the gdal-dev
mailing list