Opened 16 years ago

Closed 16 years ago

#813 closed defect (fixed)

Upsidedown (and rotated?) Rasters Not Supported

Reported by: warmerdam Owned by: warmerdam
Priority: major: does not work as expected Milestone: Branch - Raster Transparency
Component: Rasters Version: Trunk
Keywords: Cc:
Must Fix for Release: No Platform: Debian
Platform Version: Awaiting user input: no

Description

Upside rasters (that is the top is further south than the bottom) do not appear to be supported by the qgsrasterlayer code. If one is opened (as the only object) an empty extent is established for the map. I'm guessing this is because the min/max values in the layer extent are backwards.

Driver: ISIS3/USGS Astrogeology ISIS cube (Version 3)
Files: r0200357_10m_Jul20_o_i3_detatched.lbl
       r0200357_10m_Jul20_o_i3_detatched.cub
Size is 317, 559
Coordinate System is:
PROJCS["Equirectangular Mars",
    GEOGCS["GCS_Mars",
        DATUM["D_Mars",
            SPHEROID["Mars_localRadius",3394813857.975946,0]],
        PRIMEM["Reference_Meridian",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Equirectangular"],
    PARAMETER["latitude_of_origin",-15.14700031280518],
    PARAMETER["central_meridian",184.4129943847656],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0]]
Origin = (-4766.964843750000000,-872623.625000000000000)
Pixel Size = (10.102499961853027,10.102499961853027)
Corner Coordinates:
Upper Left  (   -4766.965, -872623.625) (175d35'13.52"W,  0d 0'53.02"S)
Lower Left  (   -4766.965, -866976.328) (175d35'13.52"W,  0d 0'52.68"S)
Upper Right (   -1564.472, -872623.625) (175d35'13.32"W,  0d 0'53.02"S)
Lower Right (   -1564.472, -866976.328) (175d35'13.32"W,  0d 0'52.68"S)
Center      (   -3165.719, -869799.976) (175d35'13.42"W,  0d 0'52.85"S)
Band 1 Block=317x1 Type=Byte, ColorInterp=Undefined
  NoData Value=0

A reduced resolution analog to the above is being attached as a tiff file.

Attachments (1)

sample.tif (47.8 KB ) - added by warmerdam 16 years ago.
upside mars image.

Download all attachments as: .zip

Change History (4)

by warmerdam, 16 years ago

Attachment: sample.tif added

upside mars image.

comment:1 by warmerdam, 16 years ago

Milestone: Branch - Raster Transparency
Status: newassigned
Type: defectenhancement

In the raster tranparency branch I have made changes (r7430) that will place rotated/sheared/upsidedown images in the right portion of the map, but without the correct orientation. Because this is a fairly serious failure still, an interactive warning is issued to the user.

This lets folks *see* these images, but the failure to orient them right means they won't overlay other layers properly - still quite a serious bug. So on that basis I'm leaving this bug open in the hopes that at some point we will rework the raster layer sufficient to display non-northup images properly. This will require substantial work.

comment:2 by warmerdam, 16 years ago

Type: enhancementdefect

Actually, as I think about it, another alternative used by some other software packages (ie. Cadcorp SIS) is to create a GDAL "warped VRT" in memory that will take care of resampling on the fly within GDAL.

comment:3 by warmerdam, 16 years ago

Milestone: Branch - Raster Transparency
Resolution: fixed
Status: assignedclosed

I have applied r7435 which rips out the changes from r7430 and replaces it with used of a "gdal warped vrt". This will render rotated, upside down and even "gcp controlled" images in the proper place. There is an outstanding issue of recognising nodata areas that may need action but that isn't the point of this particular bug report so I'm closing.

Note: See TracTickets for help on using tickets.