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

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
mapping toolbox Naresh Pai 22 Jan, 2009 23:20:05
refmat2vec Naresh Pai 22 Jan, 2009 23:20:05
referencin vector Naresh Pai 22 Jan, 2009 23:20:05
referencing matrix Naresh Pai 22 Jan, 2009 23:20:05
rssFeed for this Thread

Contact us at files@mathworks.com