<HTML dir=ltr><HEAD><TITLE>Re: [OSM-talk] gdalwarp question</TITLE>
<META content="text/html; charset=unicode" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18372"></HEAD>
<BODY>
<DIV dir=ltr id=idOWAReplyText77474>
<DIV dir=ltr><FONT color=#000000 size=3 face="Times New Roman">Please do not mislead people. gdalwarp works fine:</FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><A href="http://tinyurl.com/germany-blue-marble">http://tinyurl.com/germany-blue-marble</A></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr>Regards</DIV>
<DIV dir=ltr>Juan Lucas</DIV>
<DIV dir=ltr><FONT color=#000000 size=3 face="Times New Roman"></FONT> </DIV>
<DIV dir=ltr> </DIV></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px" dir=ltr>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px" dir=ltr>
<DIV dir=ltr id=idSignature7630><FONT size=2 face="Courier New"><FONT size=3 face="Times New Roman"></FONT></FONT> </DIV>
<DIV dir=ltr>
<DIV><BR></DIV>
<DIV>
<HR tabIndex=-1>
</DIV>
<DIV><BR> </DIV></DIV>
<DIV>
<P><FONT size=2>Hello Jukka,<BR><BR>thanks for your hint, but to my understanding this contradicts<BR>the description of RasterImage in Mapnik and the web page<BR>that converts "blue marble" using gdalwarp.<BR><BR>In the documentation for RasterImage it says that Mapnik<BR>can't (yet) reproject reaster image data, they have to match<BR>the target projection.  I got that answer to another question:<BR><BR><A href="http://www.mail-archive.com/mapnik-users@lists.berlios.de/msg01213.html">http://www.mail-archive.com/mapnik-users@lists.berlios.de/msg01213.html</A><BR><BR><BR>So if in osm.xml there is:<BR><BR>srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0<BR>+x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over"<BR><BR>Then i think this should be the target projection (if i want to mix a raster<BR>image into it).<BR><BR><BR>The "blue marble" has lat / lon directly mapped to x / y coordinates.<BR>To my understanding this is similar to WGS84, to add the scaling<BR>with a "world file" makes sense to me.<BR><BR>Looking at this page  i see a description of projections and the use of<BR>gdalwarp that describes how to get<BR><BR><A href="http://egb13.net/2009/04/bending-the-earth-gdalwarp-and-the-blue-marble/">http://egb13.net/2009/04/bending-the-earth-gdalwarp-and-the-blue-marble/</A><BR><BR><BR>But in the end, my understanding did not leave to a correctly projected<BR>image...<BR><BR><BR>Best regards,<BR>Torsten.<BR><BR><BR>Am Sonntag, 3. Mai 2009 14:11:06 schrieb Jukka Rahkonen:<BR>> Torsten Mohr <tmohr <at> s.netic.de> writes:<BR>> > Hello,<BR>> ><BR>> > thanks for that hint.<BR>> ><BR>> > Right, the chosen projection won't work around the poles, i don't expect<BR>> > that.  In the call to gdalwarp i gave the source projection (EPSG:4326 or<BR>> > WGS84) and as target projection i gave the projection used in osm.xml.<BR>><BR>> Hi,<BR>><BR>> Your target projection is the so called Google projection, or epsg:900913,<BR>> or nowadays officially epsg:3785.  It is the projection used in OSM slippy<BR>> map, but the native OSM data are in epsg:4326.  Therefore you should warp<BR>> the downloaded images _into_ epsg:4326, not from that.  Unfortunately I<BR>> cannot say what would be the correct source projection definition for your<BR>> original images.<BR>><BR>> An easy way to test your warped images is to download some OSM data in<BR>> shapefile format and in epsg:4326 projection from Geofabrik.de, open the<BR>> warped image with some GIS program like QGis or OpenJUMP together with OSM<BR>> shapefile and see if they suit well together.<BR>><BR>> Gdalwarp options are documented at <A href="http://gdal.org/gdalwarp.html">http://gdal.org/gdalwarp.html</A> but some<BR>> further reading may be necesssary to understand what all the options mean.<BR>><BR>> -Jukka Rahkonen-<BR>><BR>><BR>><BR>> _______________________________________________<BR>> talk mailing list<BR>> talk@openstreetmap.org<BR>> <A href="http://lists.openstreetmap.org/listinfo/talk">http://lists.openstreetmap.org/listinfo/talk</A><BR><BR><BR>_______________________________________________<BR>talk mailing list<BR>talk@openstreetmap.org<BR><A href="http://lists.openstreetmap.org/listinfo/talk">http://lists.openstreetmap.org/listinfo/talk</A><BR></FONT></P></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>