[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: coordinates on land
- Subject: Re: coordinates on land
- From: "Mark Hadfield" <m.hadfield(at)niwa.cri.nz>
- Date: Wed, 15 Dec 1999 10:17:10 +1300
- Cache-Post-Path: firstname.lastname@example.org
- Newsgroups: comp.lang.idl-pvwave
- Organization: NIWA
- References: <email@example.com>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:17724
Klaus Scipal <firstname.lastname@example.org> wrote in message
> I am looking for an IDL procedure that tells me if a point (given in
> longitude and latitude) is situated on land or on water.
> for example the point 10°N and 20°E is situated on land (in Africa) the
> point 10°N 40°W is situated on water (the Atlantic)
I'm not aware of any ready-to-run solution to this problem. The problem can
be divided into two parts:
1.) Describe land areas as closed polygons.
2.) Establish if the point in question is inside any of the polygons.
There was some discussion about part 2 on this newsgroup a few weeks ago. I
posted some code based on summing angles around the point in question to the
polygon vertices; several other people posted code or made suggestions.
Re part 1, AFAIK the coastline datasets that come with IDL are not suitable
because they contain duplicate points or intersecting edges. There is a
coastline dataset designed specifically for this purpose, called "GSHHS - A
Global Self-consistent, Hierarchical, High-resolution Shoreline Database",
The GSHHS data come in a straightforward binary format. I intend to write
IDL routines to read the GSHHS data REAL SOON NOW.
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand