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

Home » Public Forums » archive » Land Mask data set available? (in lat and lon)
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: Land Mask data set available? (in lat and lon) [message #29316 is a reply to message #29173] Mon, 11 February 2002 00:22 Go to previous message
Klaus Scipal is currently offline  Klaus Scipal
Messages: 45
Registered: November 1997
Member
Hi Bob

I am not quite sure if I am totally off, but why don't use following simple
code to determine if a point is on land or not (I once got it from David and
it works excellently for my purposes, however I have to admit that its
resolution is rather coarse).


determine_land, lon, lat, land

; Fill window with map continents. Water = 0, Land = 1.

Window, XSize=3600, YSize=1800, /Free, /Pixmap
Map_Set, /Cylindrical, 0, 0, Position=[0,0,1,1], /NoBorder, Color=0L

Map_Continents, /Fill, /Hires, Color=1L

image = TVRD()

; Convert location to device coordinates.
location = Convert_Coord(lon, lat, /Data, /To_Device)
land=reform(image[0. > location[0,*] < 3599., 0. > location[1,*] < 1799.])

; Delete window.
WDelete, !D.Window

END


Klaus


"Robert Stockwell" <stockwell@co-ra.com> wrote in message
news:3C62F3C6.3090502@co-ra.com...
> Greetings All,
> I was just about to assimilate the land mask info
> into IDL, but for my purposes I need the land mask
> as a function of lat and lon (so as to branch my
> algorithm on whether or not a data point falls on land),
> rather then merely an image.
>
> Thus I want to have something like
> landmask = int(nx,ny)
> lon = float(nx,ny)
> lat = float(nx,ny)
>
> that I can crunch into an array for my lat, lon sampling
> and then directly compare my data with the landmask value.
> (a simple water = 0, land = 1 mask is fine for me)
>
> I am interested in the southern hemisphere
> (frinstance 40S to 80 south), and 1/2 degree by 1/2 degree
> or better.
>
>
> Does someone have that in IDL?
> (or rather, a data format that can be easily digested
> into IDL)
>
> Cheers,
> bob stockwell
>
>
> PS
>
> I am about to use the land=sea mask data from:
> http://edcdaac.usgs.gov/1KM/land_sea_mask.html
> that i found snooping through google. It looks like
> I'll have to grab their image which appears to be in
> a km by km sampling, and calculate the inverse transform
> from their map projection into lat and lon (ugh).
>
> Or perhaps I can use the map commands i IDL and
> create an image, grab the image, convert from pixels to
> lat and lon.
>
> I am hoping there is an easier way, or at least a
> "already done" way
>
>
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Tessellate Question--fewest convex polys
Next Topic: Re: updating object graphics?

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

Current Time: Sat Oct 11 00:16:34 PDT 2025

Total time taken to generate the page: 0.71858 seconds