Opened 13 years ago

Last modified 13 years ago

#654 assigned defect

GDAL FDO does not handle rotate images

Reported by: andrewd Owned by: warmerdam
Priority: major Milestone: 3.6.0
Component: GDAL Provider Version: 3.4.0
Severity: 3 Keywords:
Cc: External ID:


I'm using Mapguide and the GDAL FDO (been dealing with this problem since MGOS v1.2). If an georeferenced image needs rotation (*any* amount of rotation at all), the image is displayed incorrectly (ie, without the rotation). If the GDAL provider can now handle reprojection, then there's absolutely no reason why it still can't handle rotation. It's a serious problem, when you've got air photo flight lines that don't run exactly west to east. Is there a workaround or a fix out there that I don't know about?

Change History (3)

comment:1 by warmerdam, 13 years ago

Status: newassigned


I'm not aware of the GDAL FDO provider doing reprojection. I am guessing this facility is provided higher up in MapGuide.

Skimming the code, I see that you are correct. I can think of two ways to fix this. One is to made the FDO GDAL provider actually understand the rotational coefficients of the underlying image and to have an alterate _getTile() implementation in the FdoRfpStreamReaderGdalByTile class that would read the region in, and then resampled to "derotate" it.

The alternative would be to recognise rotated images at the point they are opened with GDALOpen(), and to create a virtual warped raster wrapping the image which would be a virtual view on the image if it had been rotated to north up. This mechanism is used in apps like SIS and QGIS for handling rotated images.

I don't know if/when I will be in a position to implement one of these.

comment:2 by andrewd, 13 years ago

Reprojection could be MapGuide, but they've always blamed the GDAL....the GDAL wiki here says that it does do it, though:

I'll keep my fingers crossed that this happens sooner rather than later! If you need any info from me, let me know...

comment:3 by warmerdam, 13 years ago

Warping is available in GDAL using the warp api referenced above, but this is not exposed via the FDO GDAL provider. I would be using that warp api in a very simplified case to do the rotation.

Note: See TracTickets for help on using tickets.