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

Home » Public Forums » archive » Map projection of IMAGE() is behaving strangely...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Map projection of IMAGE() is behaving strangely... [message #86512] Fri, 15 November 2013 05:37 Go to previous message
andeh is currently offline  andeh
Messages: 23
Registered: April 2011
Junior Member
Hello,

First time poster, long time reader.


Using IDL 8.2 on linux, I have recently been experimenting with the new IDL IMAGE() function and discovered strange behaviour when projecting an image using the MAP_PROJECTION property (given in the final plot):



;; Set up variables
z = BINDGEN(3,5,6) * 21b
lon = FINDGEN(5)*20-60
lat = FINDGEN(6)*20-60


;; Just plot the image.
im0 = IMAGE( z, $
AXIS_STYLE=2, $
TITLE='Basic image', $
LAYOUT=[2,2,1] )

;; Now add coordinates for bottom left point in each pixel.
im1 = IMAGE( z, lon, lat, $
AXIS_STYLE=2, $
TITLE='Add x/y coordinates', $
LAYOUT=[2,2,2], /CURRENT )

;; Let IMAGE() know that we are using lat-lon coordinates.
im2 = IMAGE( z, lon, lat, $
AXIS_STYLE=2, $
GRID_UNITS=2, $
TITLE='+ GRID_UNITS=2', $
LAYOUT=[2,2,3], /CURRENT )

;; And add a map projection (Sinusoidal in this case, but the same
;; result is seen for Geographic, Orthographic, Interrupted Goode
;; and any other projection I've tried).
im3 = IMAGE( z, lon, lat, $
AXIS_STYLE=2, $
GRID_UNITS=2, $
MAP_PROJECTION='Sinusoidal', $
TITLE='+ MAP_PROJECTION = Sinusoidal', $
LAYOUT=[2,2,4], /CURRENT )




The longitude (x) coordinate appears to be mis-aligned so that the image pixels are stretched in that direction and the image area is filled by z[*,1:-1,*] instead of the full image z[*,*,*]. This doesn't happen in the latitude direction.

Am I missing something fundamental about the MAP_PROJECTION property?


Cheers,

Andy
[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
Previous Topic: graphic functions - CopyWindow()
Next Topic: How to make a cloud mask from a daily MOD09 image?

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

Current Time: Wed Oct 08 07:14:10 PDT 2025

Total time taken to generate the page: 0.00430 seconds