On Wed, May 6, 2009 at 6:44 PM, Torsten Mohr <[email protected]> wrote: > Hello Jukka, > > no, thanks for your help, any hint and discussion is really appreciated. >> >> 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: > > I solved the issue now in a different way. Based on information on wikipedia > about mercaator projection i did the reprojection of the blue marble myself. > It took quite a while to execute, but the reprojection itself worked quite > fine. > > Now the borders (shoreline_300) are exactly on the borders of the continents > and islands on the "blue marble". > > The relevant part of the script i use is attached below, if anybody is > interested please write me an email (i use an own library to handle the > images themselves, that part needs to be adapted to e.g. PyImage). > > Thank you all for providing me help, i hope the script below is of value to > anybody.
As a point of comparison, I did the following last weekend (coincidently whilst you were battling with the same issues). 1) Download GeoTiff images from http://www.unearthedoutdoors.net/global_data/true_marble/download 2) Remember from bitter experience that mapnik doesn't do on-the-fly reprojection 3) Gdalwarp them into spherical mercator. 4) Remember from bitter experience that gdalwarp messes up the geotiff coordinates (i.e. they come out as non-spherical mercator and then confuse the gdal plugin for mapnik) 5) Calculate the extents of the image using gdalinfo on the orginals (using mapnik prj.Forward code in a simple python script) 6) use mapniks' raster plugin with lox/loy/hix/hiy set using the output from 5 7) ... fiddle around a bit with layers and coastlines ... 8) Admire imagery and OSM combined at http://www.opencyclemap.org/?zoom=4&lat=42.32525&lon=3.33555&layers=B000 :-) Cheers, Andy _______________________________________________ talk mailing list [email protected] http://lists.openstreetmap.org/listinfo/talk

