bugGNU Octave - Bugs: bug #55502, [octave forge] (mapping) Reading...

 
 

bug #55502: [octave forge] (mapping) Reading error with function 'rasterread'

Submitter:  None
Submitted:  Thu 17 Jan 2019 07:15:04 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Works For Me Assigned to:  philipnienhuis
Originator Name:  Anthony Jewell Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * other
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 19 Jan 2019 07:47:29 PM UTC, comment #5: 

In the mapping pkg there's also rasterdraw.m.
One its last commands is:
set (gca, "YDir", "normal")
which flips the map the right way.

Pictures usually have the Y-axis pointing downwards while maps usually have it upwards, so imshow just by itself doesn't do the right thing.

All in all there's nothing wrong here, closing with "works for me".

Yet while doing some cursory checking I noted a bug elsewhere (bug #55514) that might hit you with rasterdraw.

Philip Nienhuis <philipnienhuis>
Group Member
Sat 19 Jan 2019 04:36:13 PM UTC, comment #4: 

Image from rasterread was drawn by imshow(img)

Tony Jewell <anthonyjewell>
Thu 17 Jan 2019 11:20:11 PM UTC, comment #3: 

How did you draw rasterread's output in Octave?

Philip Nienhuis <philipnienhuis>
Group Member
Thu 17 Jan 2019 10:48:40 PM UTC, comment #2: 

Just found the answer. The rows of the image are in the reverse order. image = flipud( image ) puts it right!

Anonymous
Thu 17 Jan 2019 09:38:27 PM UTC, comment #1: 

Changing category to Octave Forge Package as function rasterread is part of mapping package.

Rik <rik5>
Group administrator
Thu 17 Jan 2019 07:15:04 PM UTC, original submission:  

The sample lidar data file was exported for QGIS from a larger
Lidar layer. It is 300x300px 'single' float32.

The file reads back into QGIS correctly and also displays correctly in a Python script and IrfanView . A reduced precision uint8 .png version displays correctly in Octave an any other imaging app. See thumbnail 'actualImage.png' attached

When input into Octave via raster read the displayed image is rotated counter clockwise from the correct OS map orientation by 20 to 30 degrees and also appears to be clipped although it is 300x300px and the metadata appears to be correct. See 'displayedImage.png' attached.


The script rasterreadProblem.m generates the incorrect image.


I cannot attach the test data 'FernhurstDTM1mSU8828.tif' as it is 325kB. I could email it.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #45995:  rasterreadProblem.m added by None (1KiB - application/octet-stream)
file #45996:  actualImage.png added by None (10KiB - image/png)
file #45997:  imageDisplayed.png added by None (10KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by anthonyjewell (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-01-19 philipnienhuis StatusNeed Info Works For Me
        Open/ClosedOpen Closed
    2019-01-18 mtmiller SummaryReading error with function 'rasterread' [octave forge] (mapping) Reading error with function 'rasterread'
    2019-01-17 philipnienhuis StatusNone Need Info
        Assigned toNone philipnienhuis
        Release4.4.1 other
    2019-01-17 rik5 Carbon-CopyRemoved 72865 -
    2019-01-17 rik5 CategoryNone Octave Package
    2019-01-17 None Attached File- Added rasterreadProblem.m, #45995
        Attached File- Added actualImage.png, #45996
        Attached File- Added imageDisplayed.png, #45997

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code