[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coordinates on land

Klaus Scipal <kscipal@ipf.tuwien.ac.at> 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 10N and 20E is situated on land (in Africa) the
> point 10N  40W 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.

Mark Hadfield
m.hadfield@niwa.cri.nz  http://katipo.niwa.cri.nz/~hadfield/
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand