Hi Even,
Even Rouault-2 wrote > Le vendredi 23 octobre 2015 11:26:11, Helmut Kudrnovsky a écrit : >> hi, >> >> tested with >> >> OSGeo4W: gdalinfo --version >> GDAL 1.11.3, released 2015/09/16 >> >> I have several raster ecw files; gdalinfo shows for all the files the >> same >> extent/corner coordinates, although the ecw files are some kind of mosaic >> over a larger area. (Also QGIS and GRASS GIS show them in one place >> (overlayed one to another)). >> >> example: >> >> the content of the world file: 6617-04.eww >> >> 0.2 >> 0.0 >> 0.0 >> -0.2 >> 653750.1 >> 169999.9 >> >> gdalinfo says: >> >> Driver: ECW/ERDAS Compressed Wavelets (SDK 5.0) >> Files: 6617-04.ecw >> 6617-04.eww >> 6617-04.ecw.aux.xml >> Size is 6250, 5000 >> Coordinate System is: >> PROJCS["MGI_BMNM34", >> GEOGCS["GCS_MGI", >> DATUM["Militar_Geographische_Institute", >> SPHEROID["Bessel_1841",6377397.155,299.1528128]], >> PRIMEM["Greenwich",0.0], >> UNIT["Degree",0.0174532925199433]], >> PROJECTION["Transverse_Mercator"], >> PARAMETER["False_Easting",750000.0], >> PARAMETER["False_Northing",-5000000.0], >> PARAMETER["Central_Meridian",16.333333333333], >> PARAMETER["Scale_Factor",1.0], >> PARAMETER["Latitude_Of_Origin",0.0], >> UNIT["Meter",1.0]] >> Origin = (0.000000000000000,69.444444444444443) >> Pixel Size = (0.013888888888889,-0.013888888888889) >> Metadata: >> COLORSPACE=RGB >> COMPRESSION_RATE_TARGET=10 >> VERSION=2 >> Corner Coordinates: >> Upper Left ( 0.0000000, 69.4444444) ( 6d51'43.49"E, 44d44'46.05"N) >> Lower Left ( 0.0000000, 0.0000000) ( 6d51'43.85"E, 44d44'43.83"N) >> Upper Right ( 86.8055556, 69.4444444) ( 6d51'47.38"E, 44d44'46.37"N) >> Lower Right ( 86.8055556, 0.0000000) ( 6d51'47.75"E, 44d44'44.15"N) >> Center ( 43.4027778, 34.7222222) ( 6d51'45.62"E, 44d44'45.10"N) >> Band 1 Block=256x256 Type=Byte, ColorInterp=Red >> Description = Red >> Overviews: 3125x2500, 1562x1250, 781x625, 390x312, 195x156 >> Band 2 Block=256x256 Type=Byte, ColorInterp=Green >> Description = Green >> Overviews: 3125x2500, 1562x1250, 781x625, 390x312, 195x156 >> Band 3 Block=256x256 Type=Byte, ColorInterp=Blue >> Description = Blue >> Overviews: 3125x2500, 1562x1250, 781x625, 390x312, 195x156 > > Helmut, > > Looking at the ECW driver code, if the .ecw file itself has an internal > georeferencing, then the world file .eww is ignored, which looks > consistent > with the above report. This is a debatable behaviour. I think this has > been > discussed quite a few times. Maybe a config option to override the > behaviour > would be useful. > > A potential workaround is to edit 6617-04.ecw.aux.xml with the following > content derived from the .eww. > .aux.xml overrides the internal georeferencing of the .ecw. > <PAMDataset> > > <GeoTransform> > 653750,0.2,0,440720,0,-0.2 > </GeoTransform> > </PAMDataset> > > Even > _______________________________________________ > gdal-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/gdal-dev thanks for the hints! content of 6617-04.eww: 0.2 0.0 0.0 -0.2 653750.1 169999.9 following geotransform item added to 6617-04.ecw.aux.xml: <PAMDataset> <SRS>PROJCS["MGI_BMNM34",GEOGCS["GCS_MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",750000.0],PARAMETER["False_Northing",-5000000.0],PARAMETER["Central_Meridian",16.333333333333],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]</SRS> <GeoTransform>653750.1,0.2,0,169999.9,0,-0.2</GeoTransform> </PAMDataset> gdalinfo output: Driver: ECW/ERDAS Compressed Wavelets (SDK 5.0) Files: 6617-04.ecw 6617-04.eww 6617-04.ecw.aux.xml Size is 6250, 5000 Coordinate System is: PROJCS["MGI_BMNM34", GEOGCS["GCS_MGI", DATUM["Militar_Geographische_Institute", SPHEROID["Bessel_1841",6377397.155,299.1528128]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]], PROJECTION["Transverse_Mercator"], PARAMETER["False_Easting",750000.0], PARAMETER["False_Northing",-5000000.0], PARAMETER["Central_Meridian",16.333333333333], PARAMETER["Scale_Factor",1.0], PARAMETER["Latitude_Of_Origin",0.0], UNIT["Meter",1.0]] Origin = (653750.099999999980000,169999.899999999990000) Pixel Size = (0.200000000000000,-0.200000000000000) Metadata: COLORSPACE=RGB COMPRESSION_RATE_TARGET=10 VERSION=2 Corner Coordinates: Upper Left ( 653750.100, 169999.900) ( 15d 4'31.99"E, 46d39'45.94"N) Lower Left ( 653750.100, 168999.900) ( 15d 4'32.74"E, 46d39'13.56"N) Upper Right ( 655000.100, 169999.900) ( 15d 5'30.78"E, 46d39'46.59"N) Lower Right ( 655000.100, 168999.900) ( 15d 5'31.52"E, 46d39'14.21"N) Center ( 654375.100, 169499.900) ( 15d 5' 1.76"E, 46d39'30.08"N) Band 1 Block=256x256 Type=Byte, ColorInterp=Red Description = Red Overviews: 3125x2500, 1562x1250, 781x625, 390x312, 195x156 Band 2 Block=256x256 Type=Byte, ColorInterp=Green Description = Green Overviews: 3125x2500, 1562x1250, 781x625, 390x312, 195x156 Band 3 Block=256x256 Type=Byte, ColorInterp=Blue Description = Blue Overviews: 3125x2500, 1562x1250, 781x625, 390x312, 195x156 .aux.xml overriding seems to work. the raster are now correctly displayed in QGIS etc. a config option to override would be helpful. thanks. ----- best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/ecw-file-wrong-extent-corner-coordinates-tp5232129p5232256.html Sent from the GDAL - Dev mailing list archive at Nabble.com. _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
