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 #29309 is a reply to message #29173] Mon, 11 February 2002 05:20 Go to previous messageGo to previous message
Robert Stockwell is currently offline  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
[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: Fri Oct 10 03:38:21 PDT 2025

Total time taken to generate the page: 0.00613 seconds