Skip to content
Back to formatted view

Raw Message

Message-ID: <0CE0A03D0F390E46B12B64489D20B1D402F1A6B22C@MAILHUB.NRPA.LOCAL>
Date: 2008-07-23T08:34:32Z
From: Morten Sickel
Subject: Plotting - holes from shapefile

Hi,

Guess this is quite easy when one just knows how, but I have noe been able to dig out how...

I have a shape file with water areas with some islands. I want to plot this without the islands. In the shape file, the islands are flagged with a certain value, so I can remove them, but it doesn't seem to work. What I am doing is:

reading in the shape file:

> norvann=readOGR(mapdir,'fylk-vaf')

then I've tried to flag the holes:

> norvann$hole=norvann$FTEMA==0

or I've removed the islands

> norvann=norvann[norvann$FTEMA>0,]

Note, Ive done one of these on a new data set I've read from the file.

Then I've plotted it:

> plot(nordvann, col='blue')

In both cases both water and islands comes out colored blue...

guess I've overlooked something... but what?


Morten Sickel

--
Morten Sickel
Norwegian Radiation Protection Authority
tel (+47) 6716 2551