Hello R Users,

I am trying to create a topographical map of Argentina with data
 points showing the location of 5 species. I first created a map using 
map() with points using latitude and longitude data for all 5 species as 
follows:


library(maps)


# Latitude / longitude coordinates of the 5 species:

lat<-c(-44.000, -43.000, -26.000, -33.000, -36.000)

lon<-c(-68.000, -70.000, -67.000, -61.000, -68.000)


map(regions='AR', xlim=c(-75, -53), ylim=c(-56, -20), las=1)

map.axes()

points(lon, lat, pch=20, col="gray50", cex=1.8)



This map does not give me the topographical relief I wanted, so I tried 
using the following code, which first downloads elevation information 
from NOAA and then creates a topo map of southern South American that 
includes Argentina: 


library(geomapdata)

library(GEOmap)


data <- file(description = 
"http://www.ngdc.noaa.gov/mgg/global/relief/ETOPO5/TOPO/ETOPO5/ETOPO5.DAT";, 
open = "rb", blocking = TRUE, encoding = getOption("encoding"), raw = FALSE)


data(ETOPO5)


PLOC=list(LON=c(-80.000,-50.000),LAT=c(-56.000,-20.000), x=c(-80.000,-50.000), 
y=c(-56.000,-20.000) )

PROJ = setPROJ(type=2, LAT0=mean(PLOC$y) , LON0=mean(PLOC$x) )

COLS = settopocol()

JMAT = GEOTOPO(ETOPO5, PLOC, PROJ, COLS$calcol, nx=1000, ny=1000, nb=8, mb=8, 
hb=12, PLOT=TRUE)



I have attempted to add the 5 species points to this second 
map in a number of different ways, but I haven't been able to figure it 
out. In addition, I can not find documentation for how to do this in the
 GEOmap pdf or online. Can someone please help me add these lat / long 
points to the topo map?


Thank you in advance for your time and help.

K. Sheldon
                                          



--
View this message in context: 
http://r.789695.n4.nabble.com/Adding-points-to-a-topo-map-tp4687330.html
Sent from the R help mailing list archive at Nabble.com.
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to