Ticket #2340 (new defect)

Opened 2 months ago

Problem with italian datum

Reported by: jcrepetto Assigned to: warmerdam
Priority: normal Milestone:
Component: default Version: 1.5.0
Severity: normal Keywords:
Cc:

Description

I have a problem with some datum and projections using the Rome prime Meridian with GDAL 1.5.0 .

Steps to reproduce the problem :

1. Download this sample map of Milan:

wget http://www.cartografia.lispa.it/download/B6B2.zip

2. Extract the files

unzip B6B2.zip

3. Convert the file to RGB :

mv b6b2.tif b6b2.tif.orig
pct2rgb.py b6b2.tif.orig b6b2.tif

4. Then convert the file to ECW.
There are two datum/projection pairs used by ErMapper? :
- MONTEMAR/TMBOAGA1, based on the Greenwich prime meridian
- MONTROME/TMBOAG1R, based on the Rome prime meridian

gdal_translate -of ECW -co "TARGET=99" -co "DATUM=MONTROME"  -co "PROJ=TMBOAG1R"  -co "LARGE_OK=YES" b6b2.tif B6B2R.ecw 
gdal_translate -of ECW -co "TARGET=99" -co "DATUM=MONTEMAR"  -co "PROJ=TMBOAGA1"  -co "LARGE_OK=YES" b6b2.tif B6B2.ecw

5. Use gdalinfo to check the maps coordinates :

gdalinfo B6B2.ecw
Driver: ECW/ERMapper Compressed Wavelets
Files: B6B2.ecw
Size is 9449, 5906
Coordinate System is:
PROJCS["TMBOAGA1",
    GEOGCS["MONTE MARIO",
        DATUM["MONTEMAR",
            SPHEROID["INT24",6378388,297]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",9.000000000000002],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",1500000],
    PARAMETER["false_northing",0],
    UNIT["Meter",1]]
Origin = (1508000.000000000000000,5040000.413333333097398)
Pixel Size = (0.846666666666670,-0.846666666666670)
Corner Coordinates:
Upper Left  ( 1508000.000, 5040000.413) (  9d 6'8.70"E, 45d30'45.50"N)
Lower Left  ( 1508000.000, 5035000.000) (  9d 6'8.40"E, 45d28'3.47"N)
Upper Right ( 1516000.153, 5040000.413) (  9d12'17.40"E, 45d30'45.01"N)
Lower Right ( 1516000.153, 5035000.000) (  9d12'16.81"E, 45d28'2.98"N)
Center      ( 1512000.077, 5037500.207) (  9d 9'12.83"E, 45d29'24.28"N)
Band 1 Block=9449x1 Type=Byte, ColorInterp=Red
  Overviews: arbitrary
Band 2 Block=9449x1 Type=Byte, ColorInterp=Green
  Overviews: arbitrary
Band 3 Block=9449x1 Type=Byte, ColorInterp=Blue
  Overviews: arbitrary
gdalinfo B6B2R.ecw
Driver: ECW/ERMapper Compressed Wavelets
Files: B6B2R.ecw
Size is 9449, 5906
Coordinate System is:
PROJCS["TMBOAG1R",
    GEOGCS["MONTE MARIO",
        DATUM["MONTROME",
            SPHEROID["INT24",6378388,297]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-3.452333299999991],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",1500000],
    PARAMETER["false_northing",0],
    UNIT["Meter",1]]
Origin = (1508000.000000000000000,5040000.413333333097398)
Pixel Size = (0.846666666666670,-0.846666666666670)
Corner Coordinates:
Upper Left  ( 1508000.000, 5040000.413) (  3d20'59.70"W, 45d30'45.50"N)
Lower Left  ( 1508000.000, 5035000.000) (  3d21'0.00"W, 45d28'3.47"N)
Upper Right ( 1516000.153, 5040000.413) (  3d14'51.00"W, 45d30'45.01"N)
Lower Right ( 1516000.153, 5035000.000) (  3d14'51.59"W, 45d28'2.98"N)
Center      ( 1512000.077, 5037500.207) (  3d17'55.57"W, 45d29'24.28"N)
Band 1 Block=9449x1 Type=Byte, ColorInterp=Red
  Overviews: arbitrary
Band 2 Block=9449x1 Type=Byte, ColorInterp=Green
  Overviews: arbitrary
Band 3 Block=9449x1 Type=Byte, ColorInterp=Blue
  Overviews: arbitrary

You can see that the longitudes of the second file are wrong.