Re: [R-sig-Geo] memory Usage setting

2007-09-13 Thread Tomislav Hengl
Edzer, This is also my biggest frustration with R at the moment. I can not load grids that are bigger than 2M pixels and run geostatistics on them (if I run the same analysis in a GIS software such as SAGA GIS, then I do not get this problems). I often get messages such as: Reached total

Re: [R-sig-Geo] Spdep: help needed calculating Moran's I

2007-10-29 Thread Tomislav Hengl
You can also fit a variogram to the residuals using the gstat package and then record the nugget and sill variation (see http://www.gstat.org/manual/node7.html). I do not know how to test that the nugget variation is statistically significant from the sill variation. You could split the

Re: [R-sig-Geo] regression kriging in gstat with skewed distributions

2008-01-16 Thread Tomislav Hengl
in gstat with skewed distributions I'm trying to realize e regression kriging with gstat package on my soil samples data. The response variable (ECe measuere) and covariates appear positvely skewed. As Tomislav Hengl suggests in its framework for RK [1], a logistic transformation is proposed

Re: [R-sig-Geo] kernel density estimation to google earth

2008-01-27 Thread Tomislav Hengl
# Modified by T. Hengl (http://spatial-analyst.net) # 27.01.2008 library(rgdal) library(maptools) library(splancs) # Import the points and study area: data.shp - readOGR(C:/, layer=events) str(data.shp) poly.shp - readOGR(C:/, layer=hull) str(poly.shp) poly -

Re: [R-sig-Geo] R/gstat UK with indicators

2008-02-19 Thread Tomislav Hengl
David, Thanks for you note. It is a very clear example and I have experienced this problem many times. If I can be of any assistance, here are few discussion points that might put some light on the whole thing. Gstat does not support any stat models different than linear. This is mainly

Re: [R-sig-Geo] RGB Image Plotting!

2008-02-25 Thread Tomislav Hengl
If you import the bands/images as integers [0-255], then you can visualize them using e.g.: library(colorspace) library(rgdal) vismaps = readGDAL(band_R.tif) vismaps$red = vismaps$band1 vismaps$green = readGDAL(band_G.tif)$band1 vismaps$blue = readGDAL(band_B.tif)$band1 # Display as a RGB

Re: [R-sig-Geo] Applied Spatial Data Analysis with R from Springer

2008-03-08 Thread Tomislav Hengl
Dear Roger, Edzer and Rubio, I would like to join the congratulations (hopefully we will not overload the mailing list :))) ). I have been already recommending it to many of my students (I saw the draft at Edzer's place few months ago). BTW, the book's website is not available. Is the URL

Re: [R-sig-Geo] question about regression kriging

2008-04-03 Thread Tomislav Hengl
I completely agree with Thierry. Take a look at this also: https://stat.ethz.ch/pipermail/r-sig-geo/2008-February/003176.html The instructions on how to run RK with binary variables in R you can find in sec 4.3.3 (Fig. 4.15) of my lecture notes. Hengl, T., 2007. A Practical Guide to

Re: [R-sig-Geo] question about regression kriging

2008-04-09 Thread Tomislav Hengl
The two components of the regression-kriging model are not independent, hence you are doing a wrong thing if you are just summing them. You should use instead the universal kriging variance that is derived in gstat. The complete derivation of the Universal kriging variance is available in

Re: [R-sig-Geo] question about regression kriging

2008-04-09 Thread Tomislav Hengl
(estimation error); But I guess that a method to directly back-transform the UK variance from logit scale to 0-1 scale does not exist. Tom Hengl -Original Message- From: Edzer Pebesma [mailto:[EMAIL PROTECTED] Sent: woensdag 9 april 2008 14:48 To: Tomislav Hengl Cc: r-sig-geo

Re: [R-sig-Geo] Problem with universal kriging using gstat

2008-04-14 Thread Tomislav Hengl
Auxiliary variables that are used to explain the trend-part of variation need to be available also at all new prediction locations. see ?krige: newdata - data frame or Spatial object with prediction/simulation locations; should contain attribute columns with the independent variables (if

Re: [R-sig-Geo] Problem with universal kriging using gstat

2008-04-14 Thread Tomislav Hengl
)/cellsize) yN - round((yUR-yLL)/cellsize) data.grid - expand.grid(x=seq(xLL,xUR,xN), y=seq(yLL,yUR,yN)) names(data.grid) = c(X,Y) gridded(data.grid) - ~X+Y -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tomislav Hengl Sent: maandag 14 april 2008 10:37

[R-sig-Geo] Memory limit problems in R / import of maps

2008-04-22 Thread Tomislav Hengl
Dear list, I know that much has already been said about the memory limit problems. If there is any progress about this problem, we would be interested to hear. In our project, we are importing 24 maps/bands, each consists of 1,450,000 pixels. We further would like to glue all maps into a

Re: [R-sig-Geo] Memory limit problems in R / import of maps

2008-04-22 Thread Tomislav Hengl
: dinsdag 22 april 2008 16:14 To: Tomislav Hengl Cc: r-sig-geo@stat.math.ethz.ch; 'Michalis Vardakis' Subject: Re: [R-sig-Geo] Memory limit problems in R / import of maps Hi Tom, Tomislav Hengl wrote: Should we simply give up on running spatial analysis using large grids (10 million grids) in R

Re: [R-sig-Geo] Memory limit problems in R / import of maps

2008-04-22 Thread Tomislav Hengl
Beaudette [mailto:[EMAIL PROTECTED] Sent: dinsdag 22 april 2008 17:22 To: Tomislav Hengl Cc: r-sig-geo@stat.math.ethz.ch; Michalis Vardakis Subject: Re: [R-sig-Geo] Memory limit problems in R / import of maps On Tue, Apr 22, 2008 at 6:49 AM, Tomislav Hengl [EMAIL PROTECTED] wrote: Dear list, I know

Re: [R-sig-Geo] Memory limit problems in R / import of maps

2008-04-22 Thread Tomislav Hengl
to work on the R code). Tom -Original Message- From: milton ruser [mailto:[EMAIL PROTECTED] Sent: dinsdag 22 april 2008 18:21 To: Tomislav Hengl Cc: Dylan Beaudette; r-sig-geo@stat.math.ethz.ch; Michalis Vardakis Subject: Re: [R-sig-Geo] Memory limit problems in R / import of maps Hi

[R-sig-Geo] Vacancies for 2 Scientific Programmers, Computational Geo-Ecology, Amsterdam

2008-05-09 Thread Tomislav Hengl
The Computational Geo-Ecology (CGE) research group of the University of Amsterdam is looking for two enthusiastic Scientific Programmers who will develop virtual laboratories that support data analyses and modelling. This concerns data exploration through

[R-sig-Geo] FYI: 1st call Summer school on spatio-temporal data analysis using R + SAGA + Google Earth, 25-30 August 2008, Amsterdam

2008-05-19 Thread Tomislav Hengl
*** From 25-30 August 2008 the research school ICG organizes a five-day course targeted at PhD students, academic staff and project teams working with spatio-temporal data. The course aims at providing a balanced combination of theoretical and hands-on-software

Re: [R-sig-Geo] displayDataset command

2008-05-20 Thread Tomislav Hengl
If it is of any help, you might want to take a look at this guide: Creating Maps for Publication using R Graphics http://www.nceas.ucsb.edu/scicomp/GISSeminar/UseCases/MapProdWithRGraphics/OneMapProdWithRGraphics.h tml The second example demonstrates how to visualize a remote sensing band using

Re: [R-sig-Geo] Defining a grid for interpolations ?

2008-06-04 Thread Tomislav Hengl
FYI I have just finishing preparing an R script that accompanies my paper in Computers in Geosciences on finding the grid cell size for various applications. The script and the data sets can be obtained from: http://spatial-analyst.net/pixel.php This gives a step-by-step guide to estimate

Re: [R-sig-Geo] alter the lon lat lines and coastline according to the grid coordinates

2008-06-10 Thread Tomislav Hengl
For European projects, we commonly use the official European Terrestrial Reference System (www.euref.eu). You can convert your data from the longlat system to the ETRS using: library(maptools) proj4string(pointmap) - CRS(+proj=longlat +datum=WGS84) pointmap.etrs - spTransform(pointmap,

Re: [R-sig-Geo] kriging

2008-06-18 Thread Tomislav Hengl
Dear Dave, I separate fitting of the deterministic (trend) and residual part of the universal kriging model all the time. Adding OK of residuals to the trend is fine, as long as the regression model is estimated using GLS (but many do it even if they use only OLS; the difference is often

Re: [R-sig-Geo] How to get Applied Spatial Data Analysis with Rbefore 9th of August

2008-07-10 Thread Tomislav Hengl
I forgot to mention - the book's website is already on-line: http://www.bias-project.org.uk/asdar-book/ The datasets and R scripts are still missing, but I imagine it should all soon be there? (for me personally, R scripts/datasets/examaples are equally important as the book itself) cheers,

Re: [R-sig-Geo] How to get Applied Spatial Data Analysis withRbefore 9th of August

2008-07-11 Thread Tomislav Hengl
Message- From: Gomez Rubio, Virgilio [mailto:[EMAIL PROTECTED] Sent: donderdag 10 juli 2008 16:40 To: Tomislav Hengl; [EMAIL PROTECTED] Cc: r-sig-geo@stat.math.ethz.ch Subject: RE: [R-sig-Geo] How to get Applied Spatial Data Analysis withRbefore 9th of August Hi, It is good to see that the book

Re: [R-sig-Geo] generating distance map for Large map

2008-07-28 Thread Tomislav Hengl
Yes, buffer distances can be smoothly calculated using SAGA (I do not if it will work for your HUGE image, but you can try). Here is an example: . # Import the contour data (from the 1:5k and 1:50k topo maps): library(maptools) getinfo.shape(contours.shp) contours.50 -

Re: [R-sig-Geo] Spatial Resampling

2008-07-28 Thread Tomislav Hengl
You can also try RSAGA. It is very fast and handy to up-scale large grids (it is perfect to automate processing), and you only need to define the new grid cell size and the up/down-scaling method: library(RSAGA) # Download SAGA GIS from www.saga-gis.org and unzip the binaries to:

Re: [R-sig-Geo] [Gstat-info] LOCAL universal kriging with GLOBAL reg. coeff.estimation

2008-08-21 Thread Tomislav Hengl
Dear Radim, Edzer, I was thinking about the same problem few years ago (I assume that you work with auxiliary maps and not only coordinates). I think (have a feeling) that local and global Universal kriging should be treated as two things (especially if you put a very narrow search radius).

Re: [R-sig-Geo] interp.old and write.ascii.grid

2008-10-10 Thread Tomislav Hengl
try this: *** library(akima) library(spatstat) library(maptools) ew - as.vector(c(1394180, 1398190, 1399690, 1395780, 1397820, 1395290, 1394995, 1399475, 1410825)) ns - as.vector(c(6200295, 6201020, 6200420, 6205105, 6206590, 6208305, 6210370, 6213715, 6214870)) cures -

Re: [R-sig-Geo] Points density in R

2008-10-15 Thread Tomislav Hengl
Kernel density can be derived in spatstat package, but also in adehabitat and many other packages. You need to loop your operations (output as a list). Note that I use the same file names to save space - you only need the output of course! *** library(maptools) library(rgdal)

[R-sig-Geo] Problems with obtaining a copy of your ASDAR-book

2008-10-22 Thread Tomislav Hengl
Dear Roger, Edzer and Virgilio, Somehow, I was not lucky enough to receive a copy of your ASDAR book (I only had a chance to browse it yesterday at Edzer's place). First, I followed the R course Edzer gave at GEOENV2008, and our copy did not arrive on time (the organizers made a wrong shipment

Re: [R-sig-Geo] Problems with obtaining a copy of your ASDAR-book

2008-10-22 Thread Tomislav Hengl
-analyst.net -Original Message- From: Virgilio Gomez Rubio [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 22, 2008 12:34 PM To: Tomislav Hengl Cc: r-sig-geo@stat.math.ethz.ch Subject: Re: [R-sig-Geo] Problems with obtaining a copy of your ASDAR-book Dear Tom, Many thanks for your

Re: [R-sig-Geo] export .sgrd in tif with R+SAGA

2008-10-24 Thread Tomislav Hengl
Yes, you can export sgrd to geoTIFFs via the io_grid_gdal module: library(RSAGA) rsaga.get.modules(io_grid_gdal) $io_grid_gdal code name interactive 10Import Raster via GDAL FALSE 21Export Raster via GDAL FALSE 32

Re: [R-sig-Geo] subsetting

2008-10-24 Thread Tomislav Hengl
If the problem is memory handling in R (still a big headache to do much of GIS analysis in R), you should instead consider reading pieces of grids that you need e.g.: info - GDALinfo(dem50m.asc) info gridmaps01 = readGDAL(dem50m.asc, region.dim = round(c(info[[rows]]/2,info[[columns]])))

Re: [R-sig-Geo] subsetting

2008-10-24 Thread Tomislav Hengl
to get statistics of grids over polygons, you might also consider using the Grid Statistics for Polygons method in SAGA GIS: rsaga.get.modules(shapes_grid) $shapes_grid code name interactive 1 0Add Grid Values to Points FALSE 2 1 Get

Re: [R-sig-Geo] bad position of png klm file in google earth

2008-10-24 Thread Tomislav Hengl
Dear Marta, I am not sure what is the projection system you use for the Algarve case study? If it is different from CRS(+proj=longlat +datum=WGS84), then you do need to first reproject your maps. You should really look at the examples from the book by Bivand et al.:

Re: [R-sig-Geo] problem with merge grids in R+SAGA

2008-11-13 Thread Tomislav Hengl
Alessandro, You need to separate the put the list of input grids as a character vector e.g.: GRIDS=c(DSM1.sgrd,DSM2.sgrd,DSM3.sgrd) See also: http://spatial-analyst.net/wiki/index.php?title=Software#SAGA_GIS Maybe you should also study this posting guide:

Re: [R-sig-Geo] Bug report in Merged module di R+SAGA

2008-11-17 Thread Tomislav Hengl
Hi Alessandro, Please do submit such and similar bugs to Olaf Conrad (the main developer of SAGA). For your information, the C++ code of SAGA (SAGA 2.0.2 API - Python Interface) is available from http://sourceforge.net/projects/saga-gis/ which means that you could obtain the code and fix the

Re: [R-sig-Geo] ramping four color in xy space

2008-11-18 Thread Tomislav Hengl
Dear Holger, This is a small script that uses [colorspace] library to run calculations with colors (some methods are limited to 256 colors only): http://spatial-analyst.net/scripts/whitening.R If you assign R,G,B values spatially and then interpolate them (they have to be in the 0-1 range),

Re: [R-sig-Geo] Geonames elevation help

2008-11-25 Thread Tomislav Hengl
You could also loop e.g. (this way you have a bit more control): long - c(-81.66,-82.66) lat - c(36.21,37.21) df - data.frame(lat,long) df$srtm - rep(NA, length(df$lat)) for(i in 1:length(df$srtm)){ + df$srtm[i] - GNsrtm3(df$lat[i],df$long[i])$srtm3 + } df lat long srtm 1 36.21

Re: [R-sig-Geo] Regression Kriging

2008-11-27 Thread Tomislav Hengl
Dear Pritam, Please forward us the R code, and, if possible, upload your data to some ftp server. The coordinate system string of the maps imported to R can be set using: data(meuse) coordinates(meuse) - ~x+y proj4string(meuse) - CRS(+init=epsg:28992) A list of epsg code is available via

[R-sig-Geo] FW: 1st Call for Papers: Geomorphometry 2009, 29 August - 2nd September, Zurich, Switzerland

2008-11-28 Thread Tomislav Hengl
Apologies for cross postings!   FIRST CALL FOR PAPERS Geomorphometry 2009 29 August - 2 September 2009 Zurich, Switzerland http://2009.GEOMORPHOMETRY.ORG   e-mail: [EMAIL PROTECTED]   PROGRAM CHAIRS Ross Purves   University of Zurich Stephan Gruber    University of Zurich Tomislav Hengl

Re: [R-sig-Geo] resampling grids

2008-12-11 Thread Tomislav Hengl
A quick way to rescale a set of maps is to use the grid tools of SAGA GIS (see rsaga.get.usage(grid_tools, 0)). First, download all ASCII file maps to a working directory, then obtain the list of maps in the folder, and then automate: ascmaps - list.files(getwd(), pattern=\\.asc$, full=F)

Re: [R-sig-Geo] Converting kml to shape (readOGR)

2009-01-06 Thread Tomislav Hengl
Dear Henk, My experiences is that the easiest way to read KML files and convert them to sp-type of objects is to use the XML package. Here is a small example: library(XML) meuse_lead.kml - xmlTreeParse(meuse_lead.kml) lengthp - length(meuse_lead.kml$doc[[1]][[1]][[1]])-1 lead_sp -

Re: [R-sig-Geo] combining two image files into one database

2009-01-07 Thread Tomislav Hengl
Dear Alok, Maybe you should consider converting the im data to sp class. Then, you have as many grids in a single SpatialGridDataFrame e.g.: library(maptools) library(rgdal) grids - as(bei.extra[[1]], SpatialGridDataFrame) names(grids)[1] - elev grids$grad - as(bei.extra[[2]],

Re: [R-sig-Geo] Spatial data analysis in MATLAB / Comparison of MATLAB vs R

2009-01-20 Thread Tomislav Hengl
-Original Message- From: b.rowling...@googlemail.com [mailto:b.rowling...@googlemail.com] On Behalf Of Barry Rowlingson Sent: Tuesday, January 20, 2009 10:17 AM To: Tomislav Hengl Cc: r-sig-geo@stat.math.ethz.ch Subject: Re: [R-sig-Geo] Spatial data analysis in MATLAB / Comparison

[R-sig-Geo] The geonames.org server changed / geonames package

2009-01-23 Thread Tomislav Hengl
Hi Barry, Edzer, Just to let you know that geonames.org server changed from ws.geonames.org to ws5.geonames.org See the info at: http://www.geonames.org/export/ Maybe you should add to your R package geonames an option to specify the server name manually, e.g.: setGNserver -

[R-sig-Geo] A small repository of publicly available Global maps

2009-01-26 Thread Tomislav Hengl
Hi all, I have just finished preparing a small repository of publicly available Global maps on environment. For more info see: http://spatial-analyst.net/wiki/index.php?title=Global_datasets The maps can be downloaded directly from: http://spatial-analyst.net/worldmaps/ I would be

Re: [R-sig-Geo] calculate raster values based on vector regions

2009-01-28 Thread Tomislav Hengl
Dear Herry, If I understand what you problem, one solution is to use R+SAGA. You should first convert the polygon map to the same grid, and then you can load it to R and do any type of aggregation: library(maptools) library(rgdal) library(RSAGA) # load the gridded map: rastermap -

Re: [R-sig-Geo] calculate raster values based on vector regions

2009-01-28 Thread Tomislav Hengl
...@stat.math.ethz.ch] On Behalf Of Tomislav Hengl Sent: Wednesday, January 28, 2009 9:56 AM To: r-sig-geo@stat.math.ethz.ch Cc: alexander.h...@csiro.au Subject: Re: [R-sig-Geo] calculate raster values based on vector regions Dear Herry, If I understand what you problem, one solution is to use R

Re: [R-sig-Geo] FW: Interpolcation option: IDW or OK?

2009-02-09 Thread Tomislav Hengl
Dear Yong Li, I hope you will not mind me joining this interesting discussion. If there is no evident spatial auto-correlation structure (pure nugget effect), IDW/OK are as good as randomly drawing a value from the global (normal) distribution. You can even test this using cross-validation!

Re: [R-sig-Geo] Calculating descriptive stats from many maps

2009-02-09 Thread Tomislav Hengl
Dear Rainer, This is of course possible in R, and can be done in several ways: 1) for example, you can derive the average value using the rowSums function: maps$Nsum - rowSums(m...@data, na.rm=T, dims=1) maps$avg - maps$Nsum/(length(names(meuse.g...@data))-1) You could also loop the sd,

Re: [R-sig-Geo] Wiki?

2009-02-20 Thread Tomislav Hengl
Jonathan, I think this is an excellent idea. Ideally we should have a system that automatically scans e-mails, distinguishes between a question, answer/suggestion, and R code, and then generates a wiki article (such articles could then be classified into some hierachical structure using

Re: [R-sig-Geo] Feature Extraction - object based image analysis

2009-02-27 Thread Tomislav Hengl
Hi Barry, SAGA has few simple but useful modules for extraction of features from grids. See: library(RSAGA) rsaga.get.modules(grid_discretisation) $grid_discretisation code name interactive 10 Supervised Classification FALSE 21 Cluster Analysis for

[R-sig-Geo] GEOSTAT 2009 Summer School, 3-10 May 2009 MEDILS, Split, Croatia 2nd call

2009-03-06 Thread Tomislav Hengl
Dear R-sig-geo, There are still some open places for our GEOSTAT 2009 summer school (the registration closes on 15h of March). We will finally be three lecturers: (1) Roger Bivand; (2) Olaf Conrad (the main creator of SAGA) and (3) Tomislav Hengl. The fifth day of the summer school, we

Re: [R-sig-Geo] residuals by subtracting point values from grid values

2009-03-24 Thread Tomislav Hengl
Dear Else, I've read your message twice, but I am still not sure what exactly you want to run: (1) which prediction technique, (2) for which purpose (validation only?). Using the krige.cv method, you can also run the cross validation for inverse distance interpolation (note: you only need to

[R-sig-Geo] Running analysis on DEMs using GRASS (from R?)

2009-03-25 Thread Tomislav Hengl
Dear list, I am trying to test some DEM analysis functions in GRASS GIS (under MS Windows machines). This is my first contact with GRASS scripting (I have successfully installed GRASS 6.4 for windows from http://grass.itc.it/grass63/binary/mswindows/native/). For example, with SAGA GIS, I can

Re: [R-sig-Geo] Running analysis on DEMs using GRASS (from R?)

2009-03-25 Thread Tomislav Hengl
, March 25, 2009 10:46 AM To: Tomislav Hengl Cc: r-sig-geo@stat.math.ethz.ch; carlos.grohm...@gmail.com Subject: Re: [R-sig-Geo] Running analysis on DEMs using GRASS (from R?) Tomislav, This would be part of an R script using grass: brachspread - function(itmax=1,a=-1) { #Do the next once per

Re: [R-sig-Geo] Running analysis on DEMs using GRASS (from R?)

2009-04-02 Thread Tomislav Hengl
Message- From: Roger Bivand [mailto:roger.biv...@nhh.no] Sent: Wednesday, March 25, 2009 1:27 PM To: Agustin Lobo Cc: Tomislav Hengl; carlos.grohm...@gmail.com; r-sig-geo@stat.math.ethz.ch Subject: Re: [R-sig-Geo] Running analysis on DEMs using GRASS (from R?) On Wed, 25 Mar 2009, Agustin

Re: [R-sig-Geo] Spatial Interpolation of Regularly Gridded Data

2009-04-07 Thread Tomislav Hengl
Hi Greg, Yes, there are many possibilities for downscaling grids in R, so you are at the right place. :) 1. If you only wish to downscale climatic grids (e.g. using splines), then probably the most efficient (fastest; can handle large grids) way is to use the downscaling method in SAGA:

Re: [R-sig-Geo] problem to module MERGE GRID in RSAGA

2009-04-07 Thread Tomislav Hengl
-Original Message- From: r-sig-geo-boun...@stat.math.ethz.ch [mailto:r-sig-geo-boun...@stat.math.ethz.ch] On Behalf Of gianni lavaredo Sent: Tuesday, April 07, 2009 4:44 PM To: r-sig-geo@stat.math.ethz.ch Subject: [R-sig-Geo] problem to module MERGE GRID in RSAGA Dear R Users

[R-sig-Geo] Converting downloaded PNG images using RgoogleMaps to SpatialGridDataFrame class (proj4string?)

2009-05-26 Thread Tomislav Hengl
Hi all, Thanks to Markus Loecher and colleagues we can now easily obtain background maps from Google Earth and use it for plotting/interpretation of spatial data. This runs pretty smoothly (e.g. a map of the Netherlands): library(RgoogleMaps) # obtain the API key and save into the home

[R-sig-Geo] Info: SAGA vs GRASS workshop, University of Zurich 29 August 30 August 2009

2009-05-26 Thread Tomislav Hengl
Title: Automated analysis of elevation data in R+SAGA/GRASS Venue: University of Zurich, Irchel Campus, 29 August 30 August 2009 Workshop moderators: Tomislav Hengl / Carlos H. Grohmann Registration fees: 150 CHF (PhD students) For more info: http://2009.geomorphometry.org/ Summary

[R-sig-Geo] From the GEOSTAT 2009 Summer School for PhD students (report)

2009-06-05 Thread Tomislav Hengl
FYI: The official report from the GEOSTAT 2009 Summer School for PhD students: http://spatial-accuracy.org/FromGEOSTAT2009 TITLE: Spatio-temporal data analysis with R+SAGA+Google Earth LOCATION: Mediterranean Institute for Life Sciences, Split, Croatia PERIOD: 3-10 May 2009 LECTURERS: R.

Re: [R-sig-Geo] Problems with loading the mgcv package

2009-06-11 Thread Tomislav Hengl
] Sent: Thursday, June 11, 2009 11:02 AM To: Tomislav Hengl Cc: r-sig-geo@stat.math.ethz.ch Subject: Re: [R-sig-Geo] Problems with loading the mgcv package In general, before you post questions of this kind to the list, it makes sense to see if the packages load on your platform in a clean

Re: [R-sig-Geo] Slope and Aspect calculations in R

2009-07-10 Thread Tomislav Hengl
Tom Hengl http://spatial-analyst.net -Original Message- From: Thomas Adams [mailto:thomas.ad...@noaa.gov] Sent: Friday, July 10, 2009 4:20 PM To: Tomislav Hengl Cc: r-sig-geo@stat.math.ethz.ch Subject: Re: [R-sig-Geo] Slope and Aspect calculations in R Tom, Thanks! I have seen

Re: [R-sig-Geo] more doubts with spTransform()

2009-07-14 Thread Tomislav Hengl
Hi Agustin, You should really work with some referent point for which you know both local and geographic (WGS84) coordinates. Here is an illustration: http://spatial-analyst.net/wiki/index.php?title=MGI_/_Balkans_coordinate_systems#Validation_of_CRS_p arameters Note that I use Google Earth

Re: [R-sig-Geo] getting subfolders in a directory on FTP (MODIS)

2009-07-14 Thread Tomislav Hengl
: Tuesday, July 14, 2009 4:53 PM To: Tomislav Hengl Cc: alexandre villers; r-sig-geo@stat.math.ethz.ch Subject: Re: [R-sig-Geo] getting subfolders in a directory on FTP (MODIS) On Tue, Jul 14, 2009 at 2:12 PM, Tomislav Henglhe...@spatial-analyst.net wrote: To tell you honestly, I could

Re: [R-sig-Geo] still struggling with FTP download on MODIS

2009-07-15 Thread Tomislav Hengl
-Original Message- From: r-sig-geo-boun...@stat.math.ethz.ch [mailto:r-sig-geo-boun...@stat.math.ethz.ch] On Behalf Of Alexandre VILLERS Sent: Wednesday, July 15, 2009 10:03 AM To: Aide R SIG GEO Subject: [R-sig-Geo] still struggling with FTP download on MODIS Dear all, I'm

Re: [R-sig-Geo] Problem with size of dataset

2009-07-16 Thread Tomislav Hengl
Dear Emmanuel, I have the same problem. I either can not run processing with large data set in R or I can not even load such data to R. Then, if I want to do any geostatistics, it takes forever. R (gstat/geoR) is simply not that efficient with large spatial data as e.g. GIS software. What you

Re: [R-sig-Geo] krige.bayes and data export

2009-07-24 Thread Tomislav Hengl
Hi Laura, Sorry for a bit delay in reply. I hope you did not give up on geoR. The truth is: transforming result of prediction using geoR to e.g. sp classes is not trivial (it looks like as creators of geoR did not really consider this option). Once you get it into sp class, then it is easy to

Re: [R-sig-Geo] Polygon to raster?

2009-08-03 Thread Tomislav Hengl
SAGA has a module to convert from shapes to grids (GRASS can do the same). See: library(RSAGA) rsaga.get.usage(lib=grid_gridding, module=0) SAGA CMD 2.0.3 library path: C:/Progra~1/saga_vc/modules library name: grid_gridding module name : Shapes to Grid Usage: 0 [-GRID str] -INPUT str

[R-sig-Geo] A working draft of lecture notes A Practical Guide to Geostatistical Mapping

2009-08-16 Thread Tomislav Hengl
Dear R-sig-geo, I have just finished with updating the second edition of my lecture notes that I have used over years for the GEOSTAT summer schools for PhD students. A copy of the working draft can be obtained here: http://spatial-analyst.net/book/ I would like to invite you to read

Re: [R-sig-Geo] Overlay bubble chart on map

2009-08-16 Thread Tomislav Hengl
Here is another example with overlay from the Reimann et al. (2008) book (this uses a raster map as background - this if often more impressive): http://www.statistik.tuwien.ac.at/StatDA/R-scripts/page151.html The code is rather long, but it will give you good ideas what you have to do. HTH T.

Re: [R-sig-Geo] Producing ENFA derived suitability maps with adehabitat

2009-09-09 Thread Tomislav Hengl
Dear Alexandre, I think that this should be doable. Once you run the ENFA to estimate the habitat model, copy the values of new rasters (future habitat) and replace the original values in the object. Then simply re-run the predict.enfa method e.g.: # prepare the dataset for ENFA: beidata -

Re: [R-sig-Geo] Producing ENFA derived suitability maps with adehabitat

2009-09-14 Thread Tomislav Hengl
this helps, Mathieu. Tomislav Hengl a écrit : Dear Alexandre, I think that this should be doable. Once you run the ENFA to estimate the habitat model, copy the values of new rasters (future habitat) and replace the original values in the object. Then simply re-run the predict.enfa method e.g

Re: [R-sig-Geo] DEMs

2009-09-14 Thread Tomislav Hengl
Hi Abe, Did you try using the ETOPO1? This (0.1 degree) DEM can be well loaded to R: URL - http://spatial-analyst.net/worldmaps/; # list of maps: map.list - c(globedem, chlo08, dcoast) # download the zipped maps one by one: for(i in 1:length(map.list)) { download.file(paste(URL,

Re: [R-sig-Geo] DEMs

2009-09-15 Thread Tomislav Hengl
-Original Message- From: Aben Woha [mailto:abenw...@gmail.com] Sent: Tuesday, September 15, 2009 7:52 AM To: Tomislav Hengl Cc: r-sig-geo@stat.math.ethz.ch Subject: Re: [R-sig-Geo] DEMs Hi Tomislav, Thanks for the detailed response. I tried to use the globedem.zip from your

Re: [R-sig-Geo] Importing ESRI Shapefile into RSAGA

2009-10-02 Thread Tomislav Hengl
Jonas, SAGA (GUI) can read and write shape files. This is the native vector format it uses. Maybe this is confusing, but RSAGA is NOT a GIS package under R, but only a link to send things from R to SAGA and back. Here are some examples:

Re: [R-sig-Geo] Determining a coordinate given another coordinate, a great circle distance, and an angle

2009-10-07 Thread Tomislav Hengl
Hi Harry, The key issue is that you need to select the (Euclidean) coordinate system. For example, to represent the whole world, there are many possiblities (http://www.radicalcartography.net/?projectionref). If you are working with the great circle distance, make sure that the geographic

Re: [R-sig-Geo] Including SAGA grid as GDAL-supported format

2009-10-17 Thread Tomislav Hengl
-Original Message- From: Roger Bivand [mailto:roger.biv...@nhh.no] Sent: Friday, October 16, 2009 11:06 AM To: Tomislav Hengl Cc: r-sig-geo@stat.math.ethz.ch Subject: Re: [R-sig-Geo] Including SAGA grid as GDAL-supported format On Fri, 16 Oct 2009, Tomislav Hengl wrote

Re: [R-sig-Geo] inquiry on suitable packages

2009-10-26 Thread Tomislav Hengl
Hakim, There are plenty of (SDM) algorithms that generate species distribution maps given occurrence (or density) records and environmental maps. For a systematic review, see e.g. Tsoar et al. 2007 [http://dx.doi.org/10./j.1472-4642.2007.00346.x]. In R, you can try using the

Re: [R-sig-Geo] Spatial analysis question

2009-11-03 Thread Tomislav Hengl
Marcelo, Surprisingly, I could not find any function in the spatstat package (or splancs package) that specifically derives cross-correlations between multiple point processes: data(lansing) plot(split(lansing)) # distribution of occurrence records for five+1 species;

Re: [R-sig-Geo] Multiple predictors for external drift kriging

2009-11-10 Thread Tomislav Hengl
Roger Bivand wrote: On Tue, 10 Nov 2009, ageel bushara wrote: Dear list members, I'm doing spatial interpolation of soil moisture using kriging with external drift following the example given by Tom Hengl (http://spatial-analyst.net/wiki/index.php?title=Regression-kriging_guide). When I

[R-sig-Geo] optimizeNetwork function in intamapInteractive package (how to use auxiliary predictors)

2009-11-16 Thread Tomislav Hengl
Dear Edzer, Jon, Stephanie, Olivier et al., First, let me congratulate you on your new package intamap / intamapInteractive that I feel will significantly advance practice of geostatistical mapping. Really a great contribution (I knew about SSA already in 2000, but was always lacking an

Re: [R-sig-Geo] Unconditional simulation

2009-11-17 Thread Tomislav Hengl
Hi Nick, Very interesting problem. At first thought, I imagined that you just want to simulate noise ;) In the geoR package (http://leg.ufpr.br/geoR/) there is a function to simulate Gaussian Random Fields (uses actually RandomFields package) using various models e.g.: library(geoR)

Re: [R-sig-Geo] 'LDLfactor' error in 'krige' function

2009-11-17 Thread Tomislav Hengl
Hi Paul, Edzer, I understand why the singular matrix problem happens and I know that there is not really a mathematical solution around it: x - matrix(runif(100), nrow=10) x.i - solve(x) str(x.i) num [1:10, 1:10] 0.8191 -1.0293 0.0826 1.068 -0.2106 ... # add a 'singular' column x[,1:10] -

Re: [R-sig-Geo] Spatial interpolation of river network observations

2009-11-17 Thread Tomislav Hengl
Hi Ultrich, Facundo Muñoz apparently made a GRASS function to derive distances along streams: https://stat.ethz.ch/pipermail/r-sig-geo/2009-November/006851.html 17 observations only? That is really tight for any geostatistical analysis (on top, you want to do 3 dimensions!). I would instead

Re: [R-sig-Geo] 'LDLfactor' error in 'krige' function

2009-11-17 Thread Tomislav Hengl
To: Tomislav Hengl Cc: 'r-sig-geo' Subject: Re: [R-sig-Geo] 'LDLfactor' error in 'krige' function Tom, you can already do this: library(gstat) data(meuse) coordinates(meuse)=~x+y data(meuse.grid) gridded(meuse.grid)=~x+y meuse=meuse[c(1,1:155),] # replicate first observation pr1 = predict(zinc

Re: [R-sig-Geo] Filling in holes in DTM

2009-11-19 Thread Tomislav Hengl
Hi Cara, There is a very efficient function in SAGA called Close Gaps that does exactly that. What makes it especially efficient is that it allows you to set a mask map. See: rsaga.get.usage(grid_tools, 7) SAGA CMD 2.0.3 library path: C:/Progra~1/saga_vc/modules library name: grid_tools

Re: [R-sig-Geo] A new ASTER Global DEM data set

2009-11-20 Thread Tomislav Hengl
Hi all, FYI: I've run a small comparison between ASTER DEM and LIDAR DEMs (say 'true' topography): http://geomorphometry.org/content/gdem-quick-assessment The 4 case studies can be downloaded from here: http://geomorphometry.org/system/files/GDEM_assessment.zip I'm not too happy with what

Re: [R-sig-Geo] Indicator Kriging R/gstat

2009-11-30 Thread Tomislav Hengl
Dear Pete, Edzer, If this is of any help, few years ago we have played with using auxiliary maps to interpolate categorical variables (multi-indicators?). The results are reported in: Hengl T., Toomanian N., Reuter H.I., Malakouti M.J. 2007. Methods to interpolate soil categorical variables

Re: [R-sig-Geo] Spatial R Courses

2009-12-09 Thread Tomislav Hengl
David Rossiter runs this excellent distance education course: http://www.itc.nl/Pub/Study/Courses/C10-AES-DE-02 *Next one starts in 6 weeks! We will run a 5-day trainig course in June (which is more affordable, but shorter): 27 June - 4 July 2010, GEOSTAT 2010 Summer School for PhD

[R-sig-Geo] Making web-repository of gridded maps: NetCDF or WKT Raster?

2009-12-13 Thread Tomislav Hengl
/experiences are welcome (before we start installing and testing the functionality). Thanx! Tomislav Hengl and Lourens Veen ___ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: [R-sig-Geo] Making web-repository of gridded maps: NetCDF or WKT Raster?

2009-12-16 Thread Tomislav Hengl
Angera - Italy email: stef...@casalegno.net web: http://www.casalegno.net/stefano On Dec 13, 2009, at 6:29 PM, Tomislav Hengl wrote: Dear R-sig-geo, As a part of our project (EcoGRID.nl) we have prepared some 60 thematic grids that we use

[R-sig-Geo] GEOSTAT 2010 Summer School, 27 June - 4 July 2010; University of Plasencia, Spain

2009-12-28 Thread Tomislav Hengl
(uni-muenster.de), Gerard Heuvelink (wur.nl), Olaf Conrad (geowiss.uni-hamburg.de), Tomislav Hengl (uva.nl) and Victor Olaya Ferrero (unex.es) - DEADLINE TO REGISTER: 15th February 2010; online at: http://geostat2010.info

Re: [R-sig-Geo] Kriging concept question

2010-01-06 Thread Tomislav Hengl
Tobin Cara wrote: Hello, I have recently read an interesting article about integrating Limited Area Models (LAMs) into kriging with external drift for temperature (Libert� et al. link below). www.wmo.int/pages/prog/www/IMOP/.../IOM.../P2(05)_Perini_Italy.doc This URL is incomplete. Please

Re: [R-sig-Geo] raster / polygon overlay

2010-01-08 Thread Tomislav Hengl
Dear Laure, If this is still actual, here are few tips on how to aggregate continuous information (rasters) given some polygon maps. - # obtain a polygon map e.g. World countries: load(url(http://spatial-analyst.net/DATA/WorldPolyCountries.Rdata;))

Re: [R-sig-Geo] GEOSTAT 2010 Summer School, 27 June - 4 July 2010; University of Plasencia, Spain

2010-01-11 Thread Tomislav Hengl
/ -Original Message- From: r-sig-geo-boun...@stat.math.ethz.ch [mailto:r-sig-geo- boun...@stat.math.ethz.ch] On Behalf Of Tomislav Hengl Sent: Monday, December 28, 2009 9:50 AM To: r-sig-geo Cc: Victor Olaya; Olaf Conrad Subject: [R-sig-Geo] GEOSTAT 2010 Summer School, 27 June - 4 July

Re: [R-sig-Geo] Raster Sample Data

2010-01-25 Thread Tomislav Hengl
Here are several data sets that I try to maintain and improve always: DEMs for testing geomorphometry algorithms: http://geomorphometry.org/content/data-sets The Baranja hill data set includes many rasters of different type: http://geomorphometry.org/content/baranja-hill We used in in our

Re: [R-sig-Geo] NDVI time-series filter

2010-01-30 Thread Tomislav Hengl
Dear Jonathan, Interesting topic. Please send us also your code example and if possible part of your dataset (I assume it is a SpatialGridDataFrame?). Operations on lists can be speed up by using lapply and by implementing your own functions, consider also running Rprof to check which

  1   2   >