Re: [R-sig-Geo] Accurate spatial database for country administrative boundaries

2020-12-01 Thread Ahmadou Dicko
You can also try rgeoboundaries. It's a work in progress but I use it regularly and I'm just waiting for the new release of version 4 of the geoBoundaries database to push it to CRAN and fix some eventual errors. https://github.com/wmgeolab/rgeoboundaries Happy to help/support if you have any que

Re: [R-sig-Geo] AVHRR NDVI3g time series tool?

2017-03-27 Thread Ahmadou Dicko
You can also use the gimms R package and the downloadGimms function. https://cran.r-project.org/package=gimms Best On Mon, Mar 27, 2017 at 10:00 PM, Andy Bunn wrote: > Huh. That is very cool. It doesn't look like the NDVI data are in ERDDAP. > They are all here in a really easy form: https://e

Re: [R-sig-Geo] Get importance variables in dismo package

2016-10-10 Thread Ahmadou Dicko
Hi Fabrice, If you want to access variable contribution from a MaxEnt model, you can use still use the plot method. var_imp <- plot(me) var_imp Or build you own function based on the code of the plot method var_contrib <- function(m, df = TRUE, ...) { stopifnot(inherits(m, "MaxEnt")) res <

Re: [R-sig-Geo] count points greater than in a raster

2016-10-05 Thread Ahmadou Dicko
Hi, I don't see any need to create a custom function for that, you can just manipulate the final raster as requested. pop <- read.table("allGeo.tsv", header=TRUE, stringsAsFactors=FALSE) head(pop) r2 = raster (ncol=500,nrow=1000) pr<-raster::rasterize(pop, r2, fun='count', cex=0.6) cropbox2 <-c(-

Re: [R-sig-Geo] WKT coordinate system string (PRJ) to PROJ.4

2016-01-05 Thread Ahmadou Dicko
You can also use gdalsrsinfo through gdalUtils. prj_1 <- 'PROJCS["Transverse_Mercator", GEOGCS["GCS_OSGB 1936", DATUM["D_OSGB_1936", SPHEROID["Airy_1830",6377563.396,299.3249646]], PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]], PROJECTION["Transverse_Mercator"],

Re: [R-sig-Geo] Package MODIS error in function runMrt( ) object 'ftpdirs' not found

2015-07-14 Thread Ahmadou Dicko
I had similar issue too. I modified the runMrt to make it work, you will find attached a working script that you can source to replace MODIS::runMrt before the authors fix this bug (source('runMrt.R'). Hope it helps. On Wed, Jul 15, 2015 at 12:12 AM, Roberto Horn wrote: > Hello > > Im having

Re: [R-sig-Geo] query on geoR

2015-01-28 Thread Ahmadou Dicko
You can have a look at the geoRglm package. The vignette is a good starting point: http://cran.r-project.org/web/packages/geoRglm/vignettes/geoRglmintro.pdf Cheers, On Wed, Jan 28, 2015 at 1:40 PM, wrote: > Hello everybody!! > I just have a question and i hope anyone can help me, if I have a >

Re: [R-sig-Geo] Converting .hdf file to raster layer

2014-08-21 Thread Ahmadou Dicko
VH.hdf' not recognised as > a supported file format. > > > Best regards, > > Arnold > > > > > On Friday, August 15, 2014 2:33 AM, Ahmadou Dicko < > dicko.ahma...@gmail.com> wrote: > > > You can use the gdalUtils package to get information on

Re: [R-sig-Geo] Converting .hdf file to raster layer

2014-08-14 Thread Ahmadou Dicko
You can use the gdalUtils package to get information on datasets inside your hdf file and then stack them using the raster package library(raster) library(rgdal) ## built with HDF4 support library(gdalUtils) fsrc <- " ftp://ftp.star.nesdis.noaa.gov/pub/corp/scsb/wguo/data/VHP_16km/VH/VHP.G16.C07

Re: [R-sig-Geo] space time error message

2014-08-08 Thread Ahmadou Dicko
I agree with everyone, you need to provide a reproducible example if you want people to help you. I don't know where you found the meteo2STFDF function, but you can use the spacetime package to build a STFDF library(spacetime) library(rgdal) load("dprec84.rda") load("stations1.rda") coordinates(

Re: [R-sig-Geo] Best raster of raster stack

2014-03-08 Thread Ahmadou Dicko
You can use the calc function too, based on the same example Roman gave library(raster) set.seed(1) r1 <- raster(matrix(runif(9), ncol = 3)) r2 <- raster(matrix(runif(9), ncol = 3)) r3 <- raster(matrix(runif(9), ncol = 3)) r <- stack(r1, r2, r3) res1 <- calc(r, fun = max) ## maximum value of all

Re: [R-sig-Geo] call a fortan prog into R

2014-02-06 Thread Ahmadou Dicko
Hi, Without further detail is difficult to be more specific but you have some options : - You can call your fortran code with R : http://en.wikiversity.org/wiki/How_to_use_R/Tutorials/Connecting_Fortran_and_R - There's also a lot packages to open and manipulate netcdf using R, see : http://cran

Re: [R-sig-Geo] Error in .gd_SetProject(transient, crs(r))

2013-12-20 Thread Ahmadou Dicko
R/?group_id=294 > > > Or: install.packages("raster", repos="http://R-Forge.R-project.org";) > > > Robert > > > > > > On Tue, Dec 17, 2013 at 12:15 AM, Ahmadou Dicko < > dicko.ahma...@gmail.com> > > wrote: > > >> I use

Re: [R-sig-Geo] how to create maps from topojson files and csv data?

2013-12-17 Thread Ahmadou Dicko
> > I suppose if I pushed it to github all of you could help out... Sure, I can give a try. Just let me know when you push it On Tue, Dec 17, 2013 at 6:10 PM, Barry Rowlingson < b.rowling...@lancaster.ac.uk> wrote: > On Mon, Dec 16, 2013 at 7:03 PM, Rowlingson, Barry > wrote: > > > I might

Re: [R-sig-Geo] Error in .gd_SetProject(transient, crs(r))

2013-12-17 Thread Ahmadou Dicko
ded GDAL runtime: GDAL 1.10.0, released 2013/04/24 > > Which gdal version are you using? > Agus > > On Thu, Dec 12, 2013 at 2:35 PM, Ahmadou Dicko > wrote: > > Using rgdal_0.8-14 and raster_2.1-71 it doesn't work for me. > > Try to update your packages and try again. &

Re: [R-sig-Geo] how to create maps from topojson files and csv data?

2013-12-16 Thread Ahmadou Dicko
I didn't try a topojson but you can read geojson file using OGR through rgdal require(rgdal) any(grepl("GeoJSON", ogrDrivers()$name)) ### TRUE url <- " https://raw.github.com/johan/world.geo.json/master/countries.geo.json"; world <- readOGR(dsn = url, layer = "OGRGeoJSON") plot(world) sessionIn

Re: [R-sig-Geo] Error in .gd_SetProject(transient, crs(r))

2013-12-12 Thread Ahmadou Dicko
Using rgdal_0.8-14 and raster_2.1-71 it doesn't work for me. Try to update your packages and try again. sessionInfo() R version 3.0.2 Patched (2013-12-05 r64394) Platform: x86_64-unknown-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8LC_CO

Re: [R-sig-Geo] Error in .gd_SetProject(transient, crs(r))

2013-12-11 Thread Ahmadou Dicko
Until we find a solution to this problem, you can use writeGDAL writeGDAL(as(raster(matrix(1, 1, 1)), "SpatialGridDataFrame"), fname = "test.tif") ## it works On Tue, Dec 10, 2013 at 7:24 PM, Etienne B. Racine wrote: > I have the same problem: saving an unprojected raster as a .tif raises an >

Re: [R-sig-Geo] Error in writeRaster as IDRISI(rst) file

2013-12-08 Thread Ahmadou Dicko
180, -90, 90 (xmin, xmax, ymin, ymax) ## coord. ref. : NA ## data source : /home/ahmadou/idri.rdc ## names : layer.1 ## values : -6.261, 9.5628 (min, max) packageVersion("raster") ## [1] ‘2.1.71’ On Sun, Dec 8, 2013 at 7:46 PM, Ahmadou Dicko wrote: > > I don&

Re: [R-sig-Geo] Error in writeRaster as IDRISI(rst) file

2013-12-08 Thread Ahmadou Dicko
I don't understand why this is not working. Meanwhile you can use rgdal::writeGDAL library(raster) library(rgdal) r <- raster(nrow=10, ncol=10) s <- stack( sapply(1:2, function(i) setValues(r, rnorm(ncell(r), i, 3) )) ) s[1:6] <- NA single <- s$layer.1 writeGDAL(as(single, "SpatialGridDataFrame"),

Re: [R-sig-Geo] address to lat/long

2011-10-11 Thread ahmadou dicko
Hi Hodgess, Take a look at the r package geoname. http://geonames.r-forge.r-project.org/ Ahmadou 2011/10/11 Hodgess, Erin > Dear R Sig Geo People: > > Is there a function in the various geo packages that will take an address > and produce lat/long values, please? > > thanks, > Erin > > > Eri

Re: [R-sig-Geo] RSAGA not runing all functions under Linux Ubuntu Natty

2011-10-06 Thread ahmadou dicko
Hi Try to upgrade your SAGA version, because you are an ubuntu user, my advice will be to use the ppa repository of Johan Van de Wauv sudo apt-add-repository *ppa:johanvdw/sagacv* I can't tell you more because i only use GRASS through spgrass6 and it's have been a long since the last time i tri

Re: [R-sig-Geo] Problem to run a loop

2011-08-09 Thread ahmadou dicko
Hi Komine As usual in R, another approach is to avoid loop mypath <- "path_to_image_folder/Image_Band_LST_2010" myfiles <- list.files(path = path, pattern = glob2rx("LST_*")) require(raster) myrasters <- lapply(paste(path, myfiles, sep ="/"), raster) myrasters <- stack(myrasters) and then us

[R-sig-Geo] Fwd: Problem with writing Raster into grass using gdal

2011-08-05 Thread ahmadou dicko
I send this message yesterday, from NABBLE but i guess the server was down... -- Forwarded message -- From: Date: 2011/8/4 Subject: Re: Problem with writing Raster into grass using gdal To: dicko.ahma...@gmail.com You are not allowed to post to this mailing list, and your messag