R Under development (unstable) (2023-10-29 r85433 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(intamap) Loading required package: sp > > # observations = Something from Java... > # Until then we use the Meuse data: > data(meuse) > observations = data.frame(x = meuse$x,y = meuse$y,value = log(meuse$zinc)) > # If you send a field just with 3 columns (x,y & z), we can let R figure > # out itself which names they have, for creation of a spatial object: > obsNames = names(observations) > coordinates(observations) = as.formula(paste("~",obsNames[1], "+", obsNames[2])) > set.seed(13531) > predictionLocations = spsample(observations, 50, "regular") > proj4string(observations) <- CRS("+proj=stere +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.999908 +x_0=155000 +y_0=463000 +ellps=bessel +units=m") > proj4string(predictionLocations) <- CRS("+proj=stere +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.999908 +x_0=155000 +y_0=463000 +ellps=bessel +units=m") > > # We dont know the projection of the data at this stage, assume it is > # somehow metric > > krigingObject = createIntamapObject( + observations = observations, + predictionLocations = predictionLocations, + targetCRS = "+init=epsg:3035", + # boundCRS = "+proj=laea +lat_0=48 +lon_0=9 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m", + # boundCRS = boundCRS, + # boundaries = boundaries, + formulaString = as.formula(paste(obsNames[3],"~1")), + params = list(confProj = TRUE, thresh = quantile(observations$value,0.9)), + outputWhat = list(mean=TRUE, variance=TRUE, excprob = 5.9, cumdistr = 5.9, + quantile = .1), class = "automap" + + ) [1] "rgdal has been retired. \n As a result of this, some of the checks on projections in the \n intamap package have disappeared" > > checkSetup(krigingObject) Checking object ... OK > krigingObject = preProcess(krigingObject) > krigingObject = estimateParameters(krigingObject) > krigingObject = spatialPredict(krigingObject) > krigingObject = postProcess(krigingObject) Warning message: In CPL_crs_from_input(x) : GDAL Message 1: +init=epsg:XXXX syntax is deprecated. It might return a CRS with a non-EPSG compliant axis order. > > summary(krigingObject$outputTable) x y mean variance Min. :4021158 Min. :3102915 Min. :4.805 Min. :0.0989 1st Qu.:4021733 1st Qu.:3103766 1st Qu.:5.481 1st Qu.:0.1427 Median :4022423 Median :3104617 Median :5.651 Median :0.3373 Mean :4022423 Mean :3104617 Mean :5.973 Mean :0.3976 3rd Qu.:4023113 3rd Qu.:3105468 3rd Qu.:6.459 3rd Qu.:0.6491 Max. :4023688 Max. :3106318 Max. :7.524 Max. :0.7891 excprob5.9 cumdistr5.9 quantile0.1 Min. :0.002098 Min. :0.0000835 Min. :4.315 1st Qu.:0.137907 1st Qu.:0.2153550 1st Qu.:4.635 Median :0.380798 Median :0.6192015 Median :5.105 Mean :0.490286 Mean :0.5097141 Mean :5.211 3rd Qu.:0.784645 3rd Qu.:0.8620925 3rd Qu.:5.700 Max. :0.999917 Max. :0.9979020 Max. :6.971 > > > proc.time() user system elapsed 2.59 0.54 3.15