[OSM-talk] gdalwarp question

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Sun May 3 16:32:41 BST 2009


Torsten Mohr <tmohr <at> s.netic.de> writes:

> 
> Hello Jukka,
> 
> thanks for your hint, but to my understanding this contradicts
> the description of RasterImage in Mapnik and the web page
> that converts "blue marble" using gdalwarp.
> 
> In the documentation for RasterImage it says that Mapnik
> can't (yet) reproject reaster image data, they have to match
> the target projection.  I got that answer to another question:
> 
> http://www.mail-archive.com/mapnik-users <at> lists.berlios.de/msg01213.html

Hi Torsten,

Sorry, I misunderstood a bit what you were going to do.  It may well be that for
Mapnik you'll need to reproject raster image first. I do not much about Mapnik
and while a have been using gdal utilities very much I don't believe I have ever
needed to create output in Google projection.
By first look what you have done does make sense. You can make a couple of
further tests:

1) run: gdalinfo str_4.tif and have a look at the listing
2) run gdalwarp with options:
gdalwarp -of GTiff -co tfw=yes 
-s_srs EPSG:4326 
-t_srs '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 
+y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over'
str_4.tif cstr_4.tif 
3) run gdalinfo cstr_4.tif

Look at the place of image origo and unit size in both images and think if they
look reasonable.

-Jukka-







More information about the talk mailing list