comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Retrieve pixel values from GeoTIFF
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Retrieve pixel values from GeoTIFF [message #73787 is a reply to message #73786] Sat, 27 November 2010 12:45 Go to previous messageGo to previous message
mankoff is currently offline  mankoff
Messages: 131
Registered: March 2004
Senior Member
On Nov 27, 12:06 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Nov 27, 4:53 pm, mankoff <mank...@gmail.com> wrote:
>
>> I'm trying to get the pixel values (color) from a GeoTIFF file when I
>> have lat,lon arrays. I have the projection set up using MAP_PROJ_INIT,
>> and using MAP_PROJ_FORWARD I can convert from my latitude and
>> longitude to map coordinates, but the map coordinates appear to be in
>> units meter from some reference location. What is the best routine to
>> convert from lat,lon (or u,v) to x,y indices?
>
> It seems that map_proj_forward() can do what you want, you are just
> not giving it the right projection parameters. What is in the geotiff
> structure?

Working through a simpler well-documented example (thanks to David)
here:
http://www.dfanning.com/map_tips/iceshelf.html

The "xy" returned from MAP_PROJ_FORWARD contains negative values, so
this cannot be indices into the image. Should I be using CONVERT_COORD
to go from DATA to DEVICE with the xy array?

David: I've also tried using your GeoCoord object, and can display the
graphic and coastlines just fine, but again, am stuck at the step of
"convert (lon,lat)=(-100,-75) to (x,y) for indexing into the original
TIF".

-k.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Retrieve pixel values from GeoTIFF
Next Topic: IDL syntax coloring in BBEdit

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Nov 30 20:41:47 PST 2025

Total time taken to generate the page: 0.72111 seconds