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

Home » Public Forums » archive » Re: Finding pixel values of GeoTIFF image based on lat/lon (ENVI and IDL give different results).
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: Finding pixel values of GeoTIFF image based on lat/lon (ENVI and IDL give different results). [message #81958 is a reply to message #81944] Mon, 05 November 2012 17:53 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> xindex = Value_Locate(uvec, pt_x)
> IF pt_x = uvec[xindex] > (uvec[1]-uvec[0])/2 THEN xindex = xindex + 1

Whoops!

Shouldn't write code with one hand on a burrito! :-(

xindex = Value_Locate(uvec, pt_x)
IF (pt_x - uvec[xindex]) GT ((uvec[1]-uvec[0])/2.0) THEN $
xindex = xindex + 1

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: cgcolorbar problem in postscript
Next Topic: ndvi color table

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

Current Time: Wed Oct 08 20:14:58 PDT 2025

Total time taken to generate the page: 0.00402 seconds