Opened 14 years ago

Closed 13 years ago

#3266 closed defect (fixed)

GeoRaster - Does not support modelCoordinateLocation as CENTER

Reported by: ilucena Owned by: ilucena
Priority: high Milestone: 1.9.0
Component: GDAL_Raster Version: svn-trunk
Severity: major Keywords: georaster, oracle
Cc: warmerdam

Description

A GeoRaster loaded by the Oracle's Java command line tool GeoRasterLoader generates GeoRaster with modelCoordinateLocation as "Center". This means that all the spatial reference on the metadata refers to the center of the pixel. The GDAL driver default is "UpperLeft" and it not doing the correction to support "Center". So, datasets loaded by GDAL are OK and consistent but the ones loaded by other software could cause a half-resolution pixel shift in GDAL.

Change History (6)

comment:1 by ilucena, 14 years ago

Cc: warmerdam added
Resolution: fixed
Status: newclosed

comment:2 by Even Rouault, 14 years ago

Resolution: fixed
Status: closedreopened

Ivan, I see a strange "int eModel = MCL_CENTER;t777777777tu " at line 2199 of georaster_wrapper.cpp. Does that compile ?

comment:3 by ilucena, 14 years ago

Frank, thanks to point that out. I think that was introduced when I was trying to shutdown the laptop while driving.

comment:4 by ilucena, 14 years ago

Resolution: fixed
Status: reopenedclosed

comment:5 by ilucena, 13 years ago

Milestone: 1.7.01.9.0
Priority: normalhigh
Resolution: fixed
Severity: normalmajor
Status: closedreopened

The driver is misleading us that it is supporting modelCoordinateLocation as CENTER correctly but it is not.

When loading the images, the driver calls sdo_geor.georeference() to pass the SRID, and a flag that tells if it is CENTER or UPPERLEFT and affine coefficients.

Since the internal pixel coordinate location in GDAL is always upper-left if the driver is using modelCooordinateLocation as CENTER it should add half of the pixel resolution in X and Y to point to the center of the pixel. But it is not doing that, so the coefficients recorded on GeoRaster are still based on UPPERLEFT.

The create-option COORDLOCATION can be set to CENTER or UPPERLEFT. UPPERLEFT is and was always working fine but the default was changed to CENTER in GDAL 1.7 and that problem was never detected.

The reason for that problem stay undetected for so long is because the GDAL/GeoRaster driver's Open method return the GeoTransform based on the coefficients. So the gdalinfo report looks good, even QGIS, MapServer or any software based on GDAL will show the image extents as if it was correct.

comment:6 by ilucena, 13 years ago

Resolution: fixed
Status: reopenedclosed

Fixed revision r22379

Note: See TracTickets for help on using tickets.