Re: [R] How to draw holes generated by gpclib using plot function

About this list Date view Thread view Subject view Author view Attachment view

From: Ross Ihaka (
Date: Thu 13 May 2004 - 06:13:32 EST

Message-id: <>

Roger Bivand wrote:

> Is an unpleasing fix to accept the overfilling, and to order (and mark if
> known) the contained polygons - some GIS use ring direction to suggest
> which are lakes and which islands? This may mean that some polygons get
> painted several times, but I don't know if this is avoidable at present.
> For Hisaji's problem this would mean overpainting the later hole with a
> background colour (not "transparent" or NA), setting this as the col=
> argument in polygon(). For many polygons finding which are inside which,
> to set the painting order, could be messy by brute force, but would just
> need to output an index vector to re-order the polygons and the painting
> col= argument. Before several packages try to solve/find working though
> admittedly ugly fixes to this separately, should we share ideas?

This is a partial fix for the GIS case, but it would be nice to have
a general fix. You might, for example, want to see things through
the holes in the polygons.

I have a collection of material on this and other useful geometric
problems, but no time at the moment to pursue it. I'd be happy
collaborate. Give me a prod in about four weeks (when my teaching
finishes) and I'll try to assemble what I have into a coherent form.

Ross Ihaka                         Email:
Department of Statistics           Phone:  (64-9) 373-7599 x 85054
University of Auckland             Fax:    (64-9) 373-7018
Private Bag 92019, Auckland
New Zealand

______________________________________________ mailing list PLEASE do read the posting guide!

About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:09 EST