Opened 9 years ago

Last modified 3 years ago

#2340 assigned defect

Problem with italian datum

Reported by: jcrepetto Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SRS Version: 1.5.0
Severity: normal Keywords: ecw prime meridian
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
    
  1. Extract the files
    unzip B6B2.zip
    
  1. Convert the file to RGB :
    mv b6b2.tif b6b2.tif.orig
    pct2rgb.py b6b2.tif.orig b6b2.tif
    
  1. 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
  1. 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.

Change History (3)

comment:1 Changed 7 years ago by warmerdam

Component: defaultGDAL_Raster
Keywords: ecw added

This appears to represent a problem with the ecw_cs.dat coordinate system translation file. I'm not going to pursue it now though, I'm afraid.

comment:2 Changed 7 years ago by warmerdam

Component: GDAL_RasterOGR_SRS
Keywords: prime meridian added
Status: newassigned

In particular coordinate systems like MONTROME that should have a prime meridian other than greenwich do not. I'm going to contact Erdas to try and get more recent files and see if I can retranslate them.

comment:3 Changed 3 years ago by Jukka Rahkonen

The file trunk/gdal/data/ecw_cs.wkt (GDAL 2.0) has still this info:

MONTROME,GEOGCS["MONTE MARIO",DATUM["MONTROME",SPHEROID["INT24",6378388,297]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]
Note: See TracTickets for help on using tickets.