
Dear all,



I am a botanist and I need some assistance for overlaying maps under R. I have an altimetric file for Madagascar in .gri. This file come from http://www.diva-gis.org/gdata (and the original data seem to have been edited by CGIAR STRM). I realize a plot of this file and I’m overlaying an Arview file (bioclimate 5) in .shp (polygon) but I don’t know his specific features. Finally I’m overlaying my sheet herbarium geographical localities points. My final map don’t have any problems in a global points of view (figure 1). Problems come when 1) I would a more detailed part of this final map or 2) I wish to modify the size of the final plot (figure 2). For the detailed plot : the files are not correctly superposed and numerous pixels of the .gri file are outside of the limits of the polygons of the .shp file. For the modified size of the final plot : the .gri file not change his conformation but the .shp file and the distance between my sheet herbarium geographical localities points are proportionally modified with the draw of the plot. Is it a problem with the geographical projections ? Who know how to do have a good overlaying between .gri file and .shp file for the removal of my problems ?



As an advance, thank you for your responses,



Cyrille MAS 







My code is :



# display the bioclimate 5 file

library(maptools)

SHP="E:/Bioclimate 5/bc5.shp"

bc5

plot(bc5,xlim=c(44,50),ylim=c(-26,-12),cex.axis=0.6,cex.names=0.6,axis.lty=0,xlab="Longitude",

ylab="Latitude",axes=TRUE,border="black",col="white")



# display the altimetric file 

require(raster) 

alt 

str(alt) 

plot(alt,cex.axis=0.6,cex.names=0.6,axis.lty=0,xlab="Longitude (en °E)",ylab="Latitude (en °S)",axes=TRUE) 



# overlaying the bioclimate 5 file upon the altimetric file

plot(bc5,add=TRUE)



# apply of my sheet herbarium geographical localities data

library(dismo)

data
	[[alternative HTML version deleted]]

