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

Home » Public Forums » archive » map_proj_* help
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_proj_* help [message #66805] Sun, 07 June 2009 09:55 Go to previous message
mankoff is currently offline  mankoff
Messages: 131
Registered: March 2004
Senior Member
Dear Mapping Experts,

I began converting from using map_set to map_proj_* about a year ago.
I've used it successfully in a few situations, but still frequently
find myself wrestling with it and not getting small details to line
up. Not that small details always line up with MAP_SET... I'm writing
today about two specific problems.

============================================================ ========

1) I have 3 vectors (lat, lon, data) that I would like to map.
Specifically, I'd like to export a PNG of the data for Google Earth,
which means it needs to be in /CYLINDRICAL projection, and as far as I
know /ISO is not required. For Google Maps I'd need to use /MERCATOR
but for now I'm just starting with Google Earth.

I thought I could do this easily with MAP_SET like so:

limit=[min(lat),min(lon),max(lat),max(lon)]
map_set, mean(limit[[0,2]]), mean(limit[[1,3]]), $
limit=limit, /CYL, position=[0,0,1,1], /noborder
plots, lon, lat, data
img =tvrd()
write_png, 'bathy_for_ge.png', img

My logic being that since this is /CYL, ROT=0, and the center of the
map is the center of the limit area, the gridlines should be evenly N/
S and E/W. I can then grab the entire window, save to PNG, and use it
in Google Earth with the same limits. However, my grid lines are not
vertical or horizontal on the screen. Almost, but not quite.

So I think maybe map_proj_* can help, but I'm having trouble getting
them to work. My first attempt so far is this:

proj = map_proj_init( 'Equirectangular', $
limit=limit, $
;; sphere_radius =
;; center_longitude=mean(limit[[1,3]]), $
;;true_scale_latitude, false_easting,
false_northing
;;center_latitude=mean(limit[[0,2]]), $
_EXTRA=e)
result = map_proj_forward( lon, lat, map_structure=proj )

But "result" doesn't make sense to me, I'm not sure what to do with
it.


============================================================ ========

2) I have MODIS images with the following attributes:

Projection: Polar Stereographic
Datum: WGS84
Standard Parallel: -70.0
Corner Coordinates:
UL: 71.998860S 113.594373W
LL: 75.491196S 117.004071W
UR: 72.492200S 98.868027W
LR: 76.115095S 98.568614W
Number of Rows (MODIS): 1600
Number of Columns (MODIS): 2000
Number of Rows (AVHRR): 800
Number of Columns (AVHRR): 1000
Meters per Pixel (MODIS): 250
Meters per Pixel (AVHRR): 500

Google Earth 5.x now supports defining the corners of an image
overlay, not just the edges. Still, it does not line up, presumably
because this is Polar Stereographic and Google Earth expects
Equirectangular. My attempts to warp this using map_proj_* got
nowhere. I've successfully warped a similar image when the 4 middle-of-
edge points were defined, along with a scale of 250 m/pixel.

I can post the code I've used to try to get this working, but it is so
clearly incorrect it might waste your time to read it. I'm sure MODIS
is popular on this group. Any help you can provide will be much
appreciated.

Thanks,

-k.
[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
Previous Topic: idl encoder/decoder of json
Next Topic: Re: file_search: need work around for filenames with square brackets [ ]

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

Current Time: Fri Oct 10 03:45:24 PDT 2025

Total time taken to generate the page: 1.91884 seconds