[R-sig-Geo] Store sf as 'line-by-line' GeoJSON

2021-11-23 Thread Thierry Onkelinx via R-sig-Geo
)) This writes every feature on a single line. However, it doesn't store them as a FeatureCollection. Suggestions are welcome. Best regards, ir. Thierry Onkelinx Statisticus / Statistician Vlaamse Overheid / Government of Flanders INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NA

Re: [R-sig-Geo] GRTS sampling - 2-level design

2021-10-11 Thread Thierry Onkelinx via R-sig-Geo
is a reimplementation of my GRTS package (https://github.com/ThierryO/grts). That package has a vignette describing GRTS via the Reversed Randomized Quadrant-Recursive Raster strategy ( https://doi.org/10.1007/s00267-005-0199-x). Best regards, ir. Thierry Onkelinx Statisticus / Statistician

Re: [R-sig-Geo] GRTS sampling - 2-level design

2021-10-08 Thread Thierry Onkelinx via R-sig-Geo
his allows for repeated measures for stable locations while taking into account the changes in population. Best regards, Thierry ir. Thierry Onkelinx Statisticus / Statistician Vlaamse Overheid / Government of Flanders INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND FOREST Team

Re: [R-sig-Geo] Impute missing values along a spatial network

2021-03-25 Thread Thierry Onkelinx via R-sig-Geo
that problem. Best regards, ir. Thierry Onkelinx Statisticus / Statistician Vlaamse Overheid / Government of Flanders INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND FOREST Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance thierry.onkel...

[R-sig-Geo] Importing layers from Google My Maps

2021-02-12 Thread Thierry Onkelinx via R-sig-Geo
Dear all, Can I import the layers from a Google My Maps based on it's link? I know I can go to the link, export the layers as KML and import that in R using rgdal. But that is tedious when you have a lot of links. Any suggestions? Best regards, ir. Thierry Onkelinx Statisticus / Statistician

Re: [R-sig-Geo] Worked out example of spatiotemporal interpolation of daily precipitation?

2018-04-17 Thread Thierry Onkelinx
Dear Tomislav, Blangiardo and Cameletti (2015) Spatial and Spatio-temporal Bayesian Models with R - INLA models the Parana state rainfall data (chapter 8). See https://sites.google.com/a/r-inla.org/stbook/ Not kriging but maybe useful for you. Best regards, ir. Thierry Onkelinx Statisticus

Re: [R-sig-Geo] How to fit Spatial logistic regression models to DHS data

2018-02-20 Thread Thierry Onkelinx
Have a look at Zuur et al (2017) Beginner's Guide to Spatial, Temporal and Spatial-Temporal Ecological Data Analysis with R-INLA Best regards, ir. Thierry Onkelinx Statisticus / Statistician Vlaamse Overheid / Government of Flanders INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE

Re: [R-sig-Geo] testing nlme models for spatial correlation

2017-08-02 Thread Thierry Onkelinx
for the SPDE approach in INLA. I would recommend that you consult a (local) statistician. Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance Kliniekstraat

Re: [R-sig-Geo] testing nlme models for spatial correlation

2017-08-01 Thread Thierry Onkelinx
Dear Javier, Your problem is hard to understand without a reproducible example. You only gives the code, not the data nor the error message. Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteits

Re: [R-sig-Geo] testing nlme models for spatial correlation

2017-08-01 Thread Thierry Onkelinx
with R-INLA. Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance Kliniekstraat 25 1070 Anderlecht Belgium To call in the statistician after the ex

Re: [R-sig-Geo] Problem with Proj when loading 'rgdal' on Super Computer Facility

2017-06-19 Thread Thierry Onkelinx
Dear Ryan, You **first** need to install the dependencies of rgdal. sudo apt-get update && sudo apt-get install libgdal-dev libproj-dev Then you should be able to install rgdal. For more details google "rgdal install linux" Best regards, ir. Thierry Onkelinx Institu

Re: [R-sig-Geo] Problems With Cartography - Help

2017-05-10 Thread Thierry Onkelinx
Dear Andres, You'll need spTransform() to reproject the layer into WGS84 carto2012x <- unionSpatialPolygons(carto2012, IDs=carto2012$DPA_CANTON) spTransform(carto2012x, CRS("+proj=longlat")) Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Resea

Re: [R-sig-Geo] How to fit a spatial hurdle model with the INLA package ?

2017-02-17 Thread Thierry Onkelinx
I wonder whether it would be possible to do something with zero-inflated models of type 0: see http://www.math.ntnu.no/inla/r-inla.org/doc/likelihood/zeroinflated.pdf, first equation on page 1. All the best Renaud Le 17/02/2017 à 15:29, Thierry Onkelinx a écrit : > Dear Renaud, > > IMHO you c

Re: [R-sig-Geo] How to fit a spatial hurdle model with the INLA package ?

2017-02-17 Thread Thierry Onkelinx
Dear Renaud, IMHO you can't. INLA currently only fits zero-inflated distributions (with a single zero-inflation parameter). A hurdle model would require to fit a zero-truncated distribution. Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute

Re: [R-sig-Geo] Plotting simple features sf with ggplot2

2016-12-08 Thread Thierry Onkelinx
regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance Kliniekstraat 25 1070 Anderlecht Belgium To call in the statistician after the experiment is done may be no m

Re: [R-sig-Geo] Converting csv files to SpatialPolygonsDataFrame

2016-09-29 Thread Thierry Onkelinx
Dear Ahmed, A SpatialPolygons object is more complex than just a set of coordinates. I suggest that you read the helpfile of SpatialPolygonsDataFrame. The example in the helpfile for the SpatialPolygonsDataFrame class should be clear enough. Best regards, ir. Thierry Onkelinx Instituut voor

Re: [R-sig-Geo] Installing packages of R 3.2.3 in Linux cluster computers

2016-06-20 Thread Thierry Onkelinx
Dear John, You'll need to install raster from source. Binaries are only available for the previous, current and development versions of R. Another option is that you are missing dependencies. We need to full error message to see what's wrong. Best regards, ir. Thierry Onkelinx Instituut voor

Re: [R-sig-Geo] Questions about spatio-temporal modelling

2016-04-18 Thread Thierry Onkelinx
Dear Luca, Have a look at Blangiarde & Cameletti (2015) Spatial and Spatio-temporal Bayesian Models with R - INLA ISBN: 978-1-118-32655-8 They describe how you can tackle this problem with mixed models with correlated random effects. Best regards, ir. Thierry Onkelinx Instituut voor natuur

Re: [R-sig-Geo] geocoding street addresses within R, not using any web-based services

2016-01-22 Thread Thierry Onkelinx
Dear Christopher, Have a look at the rgeos and spgrass6 packages. rgeos provides several GIS operations. spgrass6 allows to move data from R to GRASS GIS (and vice versa). You can run GRASS operations from within R. Best regards, Thierry ir. Thierry Onkelinx Instituut voor natuur- en

Re: [R-sig-Geo] help with 2d- Density plots (ggplot2)

2016-01-16 Thread Thierry Onkelinx
Dear Amao, It's not clear how the "hundreds of species" come into the play. Do you want a map for each species? Or rather a single map that combines the species info. ggplot2() has AFAIK no options to restrict the output of stat_bin2d() to a polygon. Best regards, ir. Thierr

Re: [R-sig-Geo] is this a clash between wrong version of rgdal and sp?

2015-10-20 Thread Thierry Onkelinx
Dear Frede, Why not installing INLA on a recent R version? I'm running INLA on R 3.2.2. Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance Klinieks

Re: [R-sig-Geo] Rasterize SpatialPolygons in R is ignoring small values

2015-09-18 Thread Thierry Onkelinx
Please don't post in HTML and don't cross post (http://stackoverflow.com/questions/32652814/rasterize-spatialpolygons-in-r-is-ignoring-small-values). ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg /

Re: [R-sig-Geo] polygon neighbor matrix

2015-08-31 Thread Thierry Onkelinx
Maybe gTouches() from the rgeos package. ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance Kliniekstraat 25 1070 Anderlecht Belgium To call in the statistici

Re: [R-sig-Geo] Modeling areal data with lots of holes, islands

2015-08-10 Thread Thierry Onkelinx
- C - D - E. The correlation between two neighbours in rho. If C has no data, then INLA will estimate it's effect so that the correlation between B-C and C-D is rho. As a result, the correlation between B-D will be rho ^ 2. Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek

Re: [R-sig-Geo] Problem in geoR

2015-07-04 Thread Thierry Onkelinx
It would be easier for us to help you if the example is reproducible. ​ ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie Kwaliteitszorg / team Biometrics Quality Assurance Kliniekstraat 25 1070 Anderlecht Belgium To call

Re: [R-sig-Geo] variogram problem

2015-06-24 Thread Thierry Onkelinx
You'll need to provide a reproducible example. Your code is not reproducible without the data. ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie Kwaliteitszorg / team Biometrics Quality Assurance Kliniekstraat 25 1070

Re: [R-sig-Geo] Calculate shortest distance between points belonging to different polygons

2015-02-17 Thread Thierry Onkelinx
(x)[apply(x, 1, which.min)] ) }) Best regards, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie Kwaliteitszorg / team Biometrics Quality Assurance Kliniekstraat 25 1070 Anderlecht Belgium To call in the statistician

Re: [R-sig-Geo] Calculate shortest distance between points belonging to different polygons

2015-02-17 Thread Thierry Onkelinx
Can you provide a reproducible example? The output of as.data.frame(nndist(randp.ppp, by = randp.ppp$Polygon_ID)) should be a data.frame with one row per point and one column per polygon. Best regards, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute