Opened 16 years ago

Closed 7 years ago

# Problem with italian datum

Reported by: Owned by: jcrepetto warmerdam normal OGR_SRS 1.5.0 normal ecw prime meridian

## 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 :

```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.

### comment:1 by warmerdam, 15 years ago

Component: default → GDAL_Raster 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 by warmerdam, 14 years ago

Component: GDAL_Raster → OGR_SRS prime meridian added new → assigned

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 by Jukka Rahkonen, 10 years ago

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]]
```

### comment:4 by Jukka Rahkonen, 7 years ago

Still the same definition used in the ecw_cs.wkt file in 2017-11-22.

### comment:5 by Even Rouault, 7 years ago

Resolution: → fixed assigned → closed

In 41721:

data/ecw_cs.wkt: fix PRIMEM of MONTROME (fixes #2340)

### comment:6 by Even Rouault, 7 years ago

In 41722:

Revert unrelated changes accidentally committed with r41721 (refs #2340)

Note: See TracTickets for help on using tickets.