Fwd: Re[4]: [gdal-dev] gdalwarp: mercator to lambert azimutal equeal area

Joaquim Luis jluis at ualg.pt
Tue Feb 10 16:40:59 EST 2009


Hi,

A couple of things,

1. "Planar world" is not 44.000.000 meters wide. It follows from the meter
    definitions that it is 40 000 000 meters

2. Mercator maps cannot span to +/- 90 degrees latitude

3. The images in www.oera.net/How2/TextureMaps2.htm are not Mecator

4. "and changing something like 179.12345 to 180.0 ." You should not do that.
    Coordinates in the world file are that of the CENTER of the top left pixel

5. The whole thing was easy task with Mirone.
    I used the first image on that page and with it just do:
    Put this inside a file named EarthMap_2500x1250.jgw

0.1440000000
0.0
0.0
-0.1440000000
-179.9280000000
89.9280000000

and now

gdalwarp EarthMap_2500x1250.jpg -s_srs +proj=latlong -t_srs +proj=laea EarthMap_2500x1250.jpg  dest.jpg

Which will show ... another manifestation of the gdalwarp bug (http://trac.osgeo.org/gdal/ticket/2305)
when dealing with global files

Joaquim Luis


> I tried georeferencing one of these images ( http://www.oera.net/How2/TextureMaps2.htm ) using MapWindow GIS; the pogram generated a .jgw file, which then I fixed by replacing "," by "." and changing something like 179.12345 to 180.0 .
> Then I tried again this command:
>> gdalwarp -s_srs  "+proj=merc" -t_srs "+proj=laea" world.jpg  dest.jpg
> 
> Ok, program now does not complain for any error... but what I get as output is EXACTLY the SAME image!!!
> 
> What's wrong now?
> And how do I specify the center of the Lambert projection to be on north pole?
> 
> 
> *********** BEGIN FORWARDED MESSAGE  ***********
> 
> On 09/02/2009 at 13.47 jumpjack <jumpjack at libero.it> wrote:
> 
> From: jumpjack <jumpjack at libero.it>
> To: "Wendy Fay Stevenson" <stevensw at erau.edu>
> CC: gdal-dev at lists.osgeo.org
> Date: Tue, 10 Feb 2009 18:48:45 +0100 
> Subject: Re[4]: [gdal-dev] gdalwarp: mercator to lambert azimutal  equeal area
> 
> 

> 
>> Thanks, but I can't yet understand...
>> I have a map of the whole world. It is 640 pixel wide. "Planar world" is
>> 44.000.000 meters wide.... so which number should I specify as "A"??
>> The same applies for "E".
>> About C and F: which coordinates should I specify? Lat and Lon?  This
>> would be 90,-180, I guess, being the map centered on Lat,Lon=0,0 and 360°
>> wide and 180° tall.
>>
>> Thanks for your pacience.
>>
>> (Please reply on the list, others could be interested!)
>>
>> bye,
>> Jumpjack
>>
>>
>> *********** REPLY SEPARATOR  ***********
>>
>> On 09/02/2009 at 13.47 Wendy Fay Stevenson wrote:
>>
>>> As long as the world file is the same name as the input file to gdalwarp,
>>> it will work.
>>>
>>> As for specifying the world file:
>>> A: number of meters across / number of pixels across
>>> D & B: 0
>>> E: -1 * number of meters in length / number of pixels in length 
>>> C and F specify the center of the top left pixel in eastings and
>>> northings, i.e. where on the projection the first pixel corresponds to.
>>
> 
> *********** END FORWARDED MESSAGE  ***********
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
> 
> 



More information about the gdal-dev mailing list