[R-sig-Geo] plotting populations on a 3D map of elevation data

Maxime Pauwels Maxime.Pauwels at univ-lille1.fr
Mon Jul 26 12:00:44 CEST 2010


Dear,

I'm using spplot to plot populations on a geographic map including GIS 
elevation data (see the script below). The map is currently in two 
dimensions, using sp.layout to plot populations. I'd like to do it in 3D 
to represent differences in elevation among populations.
Does anyone know a way to do it that allow plotting additional points on 
the 3D map?

Thank a lot

Maxime

library(sp)
library(maptools)
library(maps)
srtm=read.asciigrid("srtm_38_39_isareduced.asc")
proj4string(srtm)<-CRS("+proj=longlat")
isapop<-read.table(file="coordpopisa.txt", header=TRUE)
coordinates(isapop)<-~long+lat
proj4string(isapop)<-CRS("+proj=longlat")
isapoppts<-list("sp.points", coordinates(isapop),pch=21, col="black", 
fill="black", cex=0.5)
Europe <- readShapePoly("europe")
#dispaly results
spplot(srtm, scales=list(draw=T), xlim=c(9.5, 10.5), ylim=c(45.5, 46.5), 
cuts=50, col.regions=gray(200:0/200), sp.layout=list(isapoppts, Europe))

-- 
Maxime Pauwels
Researcher ID: http://www.researcherid.com/rid/A-1745-2009

Laboratoire de Génétique et Evolution des Populations Végétales
FRE CNRS 3268
Université de Lille, USTL-Lille1
http://gepv.univ-lille1.fr 
Tel  : +33 3 20 33 62 38
Fax  : +33 3 20 43 69 79
			
«Impose ta chance, serre ton bonheur et va vers ton risque. A te regarder, ils s’habitueront.»
René Char



More information about the R-sig-Geo mailing list