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

Home » Public Forums » archive » Error with MapProjection::Forward
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: Error with MapProjection::Forward [message #86674 is a reply to message #86673] Wed, 27 November 2013 10:41 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> A vector of X and Y projected meter values associated with the image can
> be constructed like this:
>
> dims = Image_Dimensions(googleImage, XSIZE=xsize, YSIZE=ysize)
> xvec = cgScaleVector(Dindgen(xsize) + 1, xrange[0], xrange[1])
> yvec = cgScaleVector(Dindgen(ysize) + 1, yrange[0], yrange[1])
>
> If you wanted to trim 50 pixels of the left of the image and 100 pixels
> off the right of the image. You might do something like this:
>
> googleImage = googleImage[*, 50:xsize-100, *]
>
> You will have to re-define your xrange accordingly:
>
> xrange = [xvec[50],xvec[xsize-100]]

By the way, these are the details of how this is done, more or less. In
practice, I would use cgClipToMap from the Coyote Library to do this in
one go. :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Rounding errors and the New Graphics image routine
Next Topic: ENVI_OPEN_FILE not found

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

Current Time: Wed Oct 08 15:09:54 PDT 2025

Total time taken to generate the page: 0.00442 seconds