Re: RANGS coastlines and area maps

From: David Kennison <kennison_at_nyahnyahspammersnyahnyah>
Date: Wed, 23 Nov 2005 12:30:25 -0700

Dear Malcolm,

I don't want to discourage you from proceeding, but the nature of the
RANGS coastline data is such that adding them to an area map, as you
can do data from our other databases, is quite difficult, if not
impossible.

The non-RANGS data exist in the form of boundary lines, each of which
includes a pair of area identifiers that tell you which two areas of
the map the boundary line separates (for example, England from
Scotland). The data are sufficiently coarse so as to allow one to use
an area map to contain all the data for a map covering a large part of
Earth.

The RANGS data, on the other hand, are intrinsically divided into
1x1-degree squares, in each of which there exist polygons that define
ocean areas, land areas, lake areas, island-in-lake areas, and
pond-in-island-in-lake areas. No information about geopolitical names
is incorporated. At the finest resolution, the data are so voluminous
as to preclude putting the data for more than a few 1x1-degree squares
into an area map at one time.

Generally, the use of area maps for the RANGS data is completely
avoided. One determines which 1x1-degree squares must be painted and
paints them one at a time. If the square includes any ocean areas, the
entire square is filled with the color assigned to be used for oceans;
otherwise, it is filled with the color assigned to be used for land.
Then, in turn, land areas, lake areas, island-in-lake areas, and so on,
are filled in the appropriate colors. Because of this, some areas may
be filled more than once. This works all right except when one wants
to use "transparent fill" for the entities at some levels (which one
does by specifying a "-1" for the color index at that level). In that
case, MDRGSX uses an area map to generate "polygons with holes in them"
and fill them. (Actually, there are some cases in which it can get by
without using an area map, but I'd have to stare at the code a little
longer to describe them.)

You may be able to do what you want using transparent fill. If, for
example, you want to show contour lines only over land areas, you could
proceed using the following steps: 1) fill the entire frame with the
color desired for land; 2) draw contour lines over the entire frame; 3)
use EZMAP calls to fill the RANGS-defined areas, but with the land
color set to "transparent", so that the contour lines will show through
over land, but be overlaid with the ocean color elsewhere. This will
work, but it may not leave the labeling of the contours and the highs
and lows as you would like it: labels crossing the land/sea boundary
may be only partially visible.

My two cents worth ...

Dave Kennison

On Nov 23, 2005, at 4:32 AM, Malcolm Haylock wrote:

> Hi All,
>
> I'd like to be able to mask my plots using the RANGS coastline data
> and therefore need to be able to add them to an existing area map. Has
> anyone done this?
>
> The RANGS functions that are provided in the NCAR library are fairly
> basic. The only relevant lower level function is mdrgsx, which creates
> it's own area maps and divides the region into 1x1 deg squares. Before
> hacking into this I'd like to check if anyone has already done this or
> if there is a better way.
>
> Thanks,
> Malcolm Haylock
> _______________________________________________
> ncarg-talk mailing list
> ncarg-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
Received on Wed Nov 23 2005 - 12:30:25 MST

This archive was generated by hypermail 2.2.0 : Wed Nov 23 2005 - 14:42:38 MST