Land Mask data set available? (in lat and lon) [message #29173] |
Thu, 07 February 2002 13:38  |
Robert Stockwell
Messages: 74 Registered: October 2001
|
Member |
|
|
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
|
|
|
Re: Land Mask data set available? (in lat and lon) [message #29237 is a reply to message #29173] |
Fri, 08 February 2002 11:24   |
Kelly Dean
Messages: 92 Registered: March 1997
|
Member |
|
|
Try the 1km Global Land Cover Characteristics Database from USGS
(usgs2_0g.img.gz). Water bodies (including lakes) have the byte value
of 16, but this should be easy to convert to the desired 1's and 0's.
http://edcdaac.usgs.gov/glcc/globdoc2_0.html
It is easy to compute the navigation --
lin = ( 89.99583333333334 - lat ) / 0.00833333333333
ele = ( -179.99583333333334 - lon ) / 0.00833333333333
GTOPO30 is a good source for land/sea mask, but remember, these are 33
separate tiles. With 6 tiles covering your region of interest. However,
I do recall there is one separate tile covering Antarctic in a different
projection. The Global Land Cover Database is one big binary file.
Kelly Dean
CSU/CIRA
Robert Stockwell wrote:
> 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
|
|
|
|
Re: Land Mask data set available? (in lat and lon) [message #29294 is a reply to message #29173] |
Mon, 11 February 2002 11:54  |
Mark Hadfield
Messages: 783 Registered: May 1995
|
Senior Member |
|
|
"Robert Stockwell" <rgs1967@hotmail.com> wrote in message
news:3C67C23A.2070609@hotmail.com...
>>> Mark Hadfield wrote:
>> It appears that there are other datasets more suitable for your
>> purposes, but for the record my GSHHS routines are written
>> entirely in IDL.
>
> Cool! Are these files available on your webpage? What are their
> names? Thanks a lot.
They are not available on my WWW page because they are specific to my system
& file layout. ( I keep my data files on a volume that migrates its files to
tape so I have to jump through some hoops to get them back.) However it
should be very easy to isolate the system-specific stuff. If you or anyone
else wants me to I can do this. Just say the word.
---
Mark Hadfield
m.hadfield@niwa.co.nz http://katipo.niwa.co.nz/~hadfield
National Institute for Water and Atmospheric Research
|
|
|
Re: Land Mask data set available? (in lat and lon) [message #29309 is a reply to message #29173] |
Mon, 11 February 2002 05:20  |
Robert Stockwell
Messages: 74 Registered: October 2001
|
Member |
|
|
Klaus Scipal wrote:
> 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
>
Thanks Klaus! Very nice solution.
It seems that it would do a pretty good job.
Perhaps adding the use of /coasts in the map_continents would
be useful to get the offshore islands (especially important
for the west coast of the southern tip of south america).
(There do seem to be a couple of errant lines around antartica
however when one uses /coasts.)
Thanks again!
Cheers,
bob
|
|
|
Re: Land Mask data set available? (in lat and lon) [message #29310 is a reply to message #29173] |
Mon, 11 February 2002 05:08  |
Robert Stockwell
Messages: 74 Registered: October 2001
|
Member |
|
|
Mark Hadfield wrote:
> "Robert Stockwell" <rgs1967@hotmail.com> wrote in message
> news:3C63E83E.8000700@hotmail.com...
>
>> Mark Hadfield wrote:
>>
>>
>>> I don't have a land-mask data set, but I do have a routine that
>>> calculates a land mask (in fact a land fraction) for a specified
>>> grid using vector shoreline data from the GSHHS data set:
>>>
>>> http://www.ngdc.noaa.gov/mgg/shorelines/gshhs.html
>>>
>>
>> Thanks for the info Mark. I took a look at the webpage, and it looks
>> promising. Is your routine in entirely in IDL, partly in IDL, or C.
>> (do you use the C code to read the data that they provide?)
>>
>
> It appears that there are other datasets more suitable for your
> purposes, but for the record my GSHHS routines are written entirely in
> IDL.
Cool! Are these files available on your webpage? What are their names?
Thanks a lot.
Cheers,
bob
> --
> ---
> Mark Hadfield
> m.hadfield@niwa.co.nz http://katipo.niwa.co.nz/~hadfield
> National Institute for Water and Atmospheric Research
>
>
>
>
|
|
|
Re: Land Mask data set available? (in lat and lon) [message #29316 is a reply to message #29173] |
Mon, 11 February 2002 00:22  |
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
>
>
>
|
|
|