[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-sig-geo
Subject:    [R-sig-Geo] Plotting - holes from shapefile
From:       Morten Sickel <Morten.Sickel () nrpa ! no>
Date:       2008-07-23 8:34:32
Message-ID: 0CE0A03D0F390E46B12B64489D20B1D402F1A6B22C () MAILHUB ! NRPA ! LOCAL
[Download RAW message or body]

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

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic