Skip to content

merge maps from shapefile to lattice

2 messages · Toni Viúdez, Roger Bivand

#
Hi everybody:
Could anybody help how I solve the next problem?.
I'm doing interpolation maps of tropospheric ozone of my region, and after 
create it using IDW, and kriging methods, I want from shapefiles (*.shx, 
*.shp, *.dbf, *.sbx & *.sbn ) create contour over the interpolation maps.
Could anybody tell me how do it?.
Thanks in advance.

######################################
Antonio Viudez Mora
Departamento de Din??mica
 de Contaminantes
Fundaci??n CEAM
Paterna (Valencia)
tel: 961318190. ext: 216
e-mail:toni at ceam.es
######################################
#
On Mon, 26 Sep 2005, Toni Vi??dez wrote:

            
In replies off-list, I've suggested that using base graphics is simpler 
because you can build things up bit by bit with add=TRUE. However, using 
the maptools and sp packages, you can look at the example in ?meuse.riv:

     spplot(meuse.grid, col.regions=bpy.colors(), main = "meuse.grid",
       sp.layout=list(
             list("sp.polygons", meuse.sr),
             list("sp.points", meuse, pch="+", col="black")
       )
     )

which plots a grid of data (your interpolations would need to be converted
to this format) over polygons but under points, where "meuse.sr"  is a
SpatialPolygons object. You would then do:

my_polys <- readShapePoly("my_polys.shp")
spplot(meuse.grid, sp.layout=list("sp.polygons", my_polys))

to get something similar. Note that the polygons seem to be plotted under 
the image in the example.