Skip to content
Prev 6409 / 29559 Next

Dealing with lakes and NA in Moran/SpatialPolygonsDataFrame

On Mon, 7 Sep 2009, Matthieu Stigler wrote:

            
Not that I am aware of. If you want this level of control, use the at= and 
col.regions= arguments, and assign an improbable value to the NAs, or use 
base graphics and use hatching for the NAs. I'm travelling and do not have 
Deepayan Sarkar's excellent lattice book with me, perhaps you could check 
what he says?
Please do not use the hole= or ringDir= slot as topologically checked. See 
checkPolygonsHoles() in maptools for details. In many representations, the 
entity (here Polygons object) has to have one or more external rings that 
are not holes, so your lake may be turned from hole to non-hole by 
software. If there is "nothing" there, subset it out on an attribute, for 
example a factor describing land cover:

x1 <- x0[x0$landCover != "lake",]

then subset on the NAs. Using the geometry characteristics of entities 
whose topologies have not been built or checked is not robust (may work 
with some data sets, but not with others). A lake isn't a hole, it is an 
entity that is a lake, or it is not an entity at all (subsetted out). In 
this case you need to check your visualization representations.

Confusion with Moran's I will result if your entities are confused, so 
sort them out first.

Hope this helps,

Roger