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

Home » Public Forums » archive » Re: Display and Navigate Image in IDL 8.2
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: Display and Navigate Image in IDL 8.2 [message #81328 is a reply to message #81318] Thu, 06 September 2012 11:36 Go to previous messageGo to previous message
DavidF[1] is currently offline  DavidF[1]
Messages: 94
Registered: April 2012
Member
Here is where the projected meter numbers come from:

limit = [-84.7500, -180.000, 84.7500, 180.000]
mapStruct = Map_Proj_Init('mercator', /gctp, ellipsoid='wgs 84', limit=limit)
cm = map_proj_forward(-105.100, 40.600, map=mapStruct)
xcenter = cm[0,0]
ycenter = cm[1,0]
Print, 'XCenter: ', xcenter
Print, 'YCenter: ', ycenter
metersPixel = cgGoogle_MetersPerPixel(12)
Print, 'meters per pixels: ', metersPixel
xrange = [xcenter - (300*metersPixel), xcenter+(300*meterspixel)]
yrange = [ycenter - (300*metersPixel), ycenter+(300*meterspixel)]
Print, 'X Range: ', xrange
print, 'Y Range: ', yrange

So, I have tried passing X and Y vectors like this:

s = Size(googleImage, /DIMENSIONS)
xscale = Abs(xrange[1] - xrange[0]) / s[1]
yscale = Abs(yrange[1] - yrange[0]) / s[2]
Print, 'X Scale: ', xscale
Print, 'Y Scale: ', yscale
x = (Findgen(s[1])*xscale) + xrange[0] + (xscale/2)
y = (Findgen(s[2])*yscale) + yrange[0] + (yscale/2)
obj = Image(googleImage, x, y, MAP_PROJECTION=projection, $
ELLIPSOID=ellipsoid, GRID_UNITS=1, $
CENTER_LONGITUDE=-105.1, CENTER_LATITUDE=40.60, $
LIMIT=limit, DIMENSIONS=[700,700], LOCATION=[50,50], /BOX_AXES)

This produces a map display, but no image.

Or, I have tried passing the X and Y ranges like this:

obj = Image(googleImage, MAP_PROJECTION=projection, $
ELLIPSOID=ellipsoid, GRID_UNITS=1, $
CENTER_LONGITUDE=-105.1, CENTER_LATITUDE=40.60, $
XRANGE=xrange, YRANGE=yrange, $
LIMIT=limit, DIMENSIONS=[700,700], LOCATION=[50,50], /BOX_AXES)

This produces a blank window with nothing in it.

I have even tried using the IMAGE_DIMENSIONS keyword like this:

xdim = Abs(xrange[1] - xrange[0])
ydim = Abs(yrange[1] - yrange[0])
Print, xdim, ydim
obj = Image(googleImage, MAP_PROJECTION=projection, $
ELLIPSOID=ellipsoid, GRID_UNITS=1, $
CENTER_LONGITUDE=-105.1, CENTER_LATITUDE=40.60, $
XRANGE=xrange, YRANGE=yrange, $
LIMIT=limit, DIMENSIONS=[700,700], LOCATION=[50,50], $
IMAGE_DIMENSIONS=[xdim, ydim], /BOX_AXES)

That also results in a blank window.

And, I've tried numerous variations besides these, too. I'm
really at a complete loss.

Cheers,

David
[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
Read Message
Read Message
Previous Topic: Re: Parrallel Matrix Inversion in IDL?
Next Topic: Reading non-standard variable sizes

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

Current Time: Sat Oct 11 09:24:29 PDT 2025

Total time taken to generate the page: 0.24119 seconds