[R-sig-Geo] reading kmz file in R

2010-06-07 Thread Heuvelink, Gerard
Dear All, I used 'Add polygon' in Google Earth to create a (single) closed polygon. It was saved with extension kmz. How can I open such a file in R, such that I can for instance do an overlay with raster maps (SpatialGridDataFrame)? Thanks, Gerard [[alternative HTML version delet

[R-sig-Geo] projection

2010-05-18 Thread Heuvelink, Gerard
Dear list, I hope someone can help me with the following. I have an SRTM DEM of Turkey in the "ED 1950 Lambert Conformal Conic" projection system. However, I do not know how this is referred to in R. For example, I might load the dem as: DEM = readGDAL("srtm_5km_ascii.txt") Next I will want

[R-sig-Geo] stratified random sampling

2009-02-24 Thread Heuvelink, Gerard
Dear list, The stratified random sampling problem that I submitted a few days ago has already been solved, with the help of several of you, notably Edzer Pebesma. Edzer came up with the following solution: library(sp) library(rgdal) nc1 <- readShapePoly(system.file("shapes/sids.shp",package="

[R-sig-Geo] stratified random sampling

2009-02-23 Thread Heuvelink, Gerard
Dear list, I use readShapePoly to import a shape file. The file has multiple polygons (actually, a 'polygon' may consist of multiple polygons that have the same ID). I want to sample one location at random from each of the polygons. I tried to do this with spsample but did not manage (the opti