[R-sig-Geo] Plotting - holes from shapefile
Morten Sickel
Morten.Sickel at nrpa.no
Wed Jul 23 10:34:32 CEST 2008
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
More information about the R-sig-Geo
mailing list