[Proj] problem in gdalwrap wrt prime meridians

fabrice martin fabrice_martin2 at yahoo.fr
Mon Jun 25 17:31:16 EDT 2007

Hi, I think I've narrowed the problem:

Instead of trying:

D:\>gdalwarp -s_srs "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0
+k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-
60,320,0,0,0,0 +pm=paris +units=m +no_defs" -t_srs "+init=epsg:2154" -tps -rc -tr
 0.5 0.5 -co INTERLEAVE=PIXEL test.tif test_res.tif

I tried:
D:\>gdalwarp -s_srs "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=2.33722917
+k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-
60,320,0,0,0,0  +units=m +no_defs" -t_srs "+init=epsg:2154" -tps -rc -tr
 0.5 0.5 -co INTERLEAVE=PIXEL test.tif test_res3.tif

where 2.33722917 is the prime meridian of paris.

The two formulations should be strictly equivalent, however the second one gives the right result:

D:\>gdalinfo test_res3.tif

Corner Coordinates:
Upper Left  (  876401.508, 6655580.628) (  5d19'15.01"E, 46d58'37.58"N)
Lower Left  (  876401.508, 6654573.128) (  5d19'13.61"E, 46d58'4.94"N)
Upper Right (  877409.008, 6655580.628) (  5d20'2.70"E, 46d58'36.62"N)
Lower Right (  877409.008, 6654573.128) (  5d20'1.29"E, 46d58'3.98"N)
Center      (  876905.258, 6655076.878) (  5d19'38.15"E, 46d58'20.78"N)
Band 1 Block=2015x1 Type=Byte, ColorInterp=Red
Band 2 Block=2015x1 Type=Byte, ColorInterp=Green
Band 3 Block=2015x1 Type=Byte, ColorInterp=Blue

Thus, there's definitely a problem related to the prime meridian +pm, which seems to be added twice (maybe it is added once to +lon_0 and another time it is taken into account with the +pm value ??)

Best regards,

Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

More information about the Proj mailing list