Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
incorrect referencing matrix while reading a tif file

Subject: incorrect referencing matrix while reading a tif file

From: Naresh Pai

Date: 23 Jan, 2009 04:16:02

Message: 1 of 1

Hi,
 I am reading a aerial tif file (which I exported from ArcGIS) using the geotiffread function as follows:

[RGB, R, bbox] = geotiffread('sampleImage.tif');

The referencing matrix R that I get along with this is as follows:
R =
1.0e+006 *
         0 -0.0000
    0.0000 0
    0.6855 3.8861

In the next step, I have set of coordinates (sampling locations) for which I would like to extract pixel values in the RGB variable. For this I am trying to use the ltln2val function which needs "reference vector" as one of its arguments. I tried using refmat2vec function as follows,

refvec = refmat2vec(R, size(RGB(:,:,3))));

This gives me the following error:
??? Error using ==> refmat2vec at 44
Row subscript must increase with latitude.

It seems that referencing matrix (especially R(1,2) value) is read incorrectly during the tiff read function. Would anybody suggest how I can read this tiff file (and the referencing matrix) correctly?

Thanks,
Naresh

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us