Subscribe to R-sig-geo feed
This is an archive for R-sig-geo, not a forum. It is not possible to post through Nabble - you may not start a new thread nor follow up an existing thread. If you wish to post, but are not subscribed to the list through the list homepage, subscribe first (through the list homepage, not via Nabble) and post from your subscribed email address. Until 2015-06-20, subscribers could post through Nabble, but policy has been changed as too many non-subscribers misunderstood the interface.
Updated: 2 hours 8 min ago

Re: How to mask the area around a raster map with a buffer?

Thu, 01/31/2019 - 16:25
Hi Sohrab,
without data it's difficult to give a definitive answer. However, a bit of
GIS and/or spatial analysis with raster package (e.g. mask function) may
work for you.
Cheers
Hugo

Sohrab Abbasnejad via R-sig-Geo <[hidden email]> escreveu no dia
quinta, 31/01/2019 à(s) 15:35:

> Dear all,
>
> I have a dataframe with around 90k observations over an area including a
> continent (a raster object), and a variable of interest whose values I want
> to visualize on a map. I have used levelplot function from lattice package
> to visualize the data, and added a map of the continent to the plot as a
> layer (using a shapefile). So far, so good.
>
> My area of interest is the continent itself, but my data covers a larger
> area (including the oceans around the continent). I would like to keep the
> whole map but mask the ocean around the continent (with a buffer of 100km)
> and keep the values only for the continent.
>
> I would appreciate it if someone could help me achieve this.
>
> Thank you in advance,
> Sohrab
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

How to mask the area around a raster map with a buffer?

Thu, 01/31/2019 - 09:35
Dear all,

I have a dataframe with around 90k observations over an area including a continent (a raster object), and a variable of interest whose values I want to visualize on a map. I have used levelplot function from lattice package to visualize the data, and added a map of the continent to the plot as a layer (using a shapefile). So far, so good.

My area of interest is the continent itself, but my data covers a larger area (including the oceans around the continent). I would like to keep the whole map but mask the ocean around the continent (with a buffer of 100km) and keep the values only for the continent.

I would appreciate it if someone could help me achieve this.

Thank you in advance,
Sohrab

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Problem with Sequential Gaussian Simulation

Mon, 01/28/2019 - 16:19
I've run into a problem trying to produce a number of SGS realizations
using gstat::krige. (this was definitely working two weeks ago, and now
I'm getting a seg fault, and I can't figure out why. Any help would be
appreciated.


Here are the details:


My input "locations":

-------------------------

 > str(gauges_spdf)

Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots
   ..@ data       :'data.frame':    24 obs. of  1 variable:
   .. ..$ precip: num [1:24] 13.21 2.66 12.67 8.97 18.69 ...
   ..@ coords.nrs : num(0)
   ..@ coords     : num [1:24, 1:2] -37.5 11.5 -9.5 20.5 -27.5 -3.5
-12.5 33.5 -4.5 34.5 ...
   .. ..- attr(*, "dimnames")=List of 2
   .. .. ..$ : NULL
   .. .. ..$ : chr [1:2] "x" "y"
   ..@ bbox       : num [1:2, 1:2] -45.5 -49.5 46.5 49.5
   .. ..- attr(*, "dimnames")=List of 2
   .. .. ..$ : chr [1:2] "x" "y"
   .. .. ..$ : chr [1:2] "min" "max"
   ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slot
   .. .. ..@ projargs: chr NA


My target "newdata" grid

-------------------------

 > str(grd)
Formal class 'SpatialPixels' [package "sp"] with 5 slots
   ..@ grid       :Formal class 'GridTopology' [package "sp"] with 3 slots
   .. .. ..@ cellcentre.offset: Named num [1:2] -49.5 -49.5
   .. .. .. ..- attr(*, "names")= chr [1:2] "x" "y"
   .. .. ..@ cellsize         : Named num [1:2] 1 1
   .. .. .. ..- attr(*, "names")= chr [1:2] "x" "y"
   .. .. ..@ cells.dim        : Named int [1:2] 100 100
   .. .. .. ..- attr(*, "names")= chr [1:2] "x" "y"
   ..@ grid.index : int [1:10000] 1 2 3 4 5 6 7 8 9 10 ...
   ..@ coords     : num [1:10000, 1:2] -49.5 -48.5 -47.5 -46.5 -45.5
-44.5 -43.5 -42.5 -41.5 -40.5 ...
   .. ..- attr(*, "dimnames")=List of 2
   .. .. ..$ : chr [1:10000] "1" "2" "3" "4" ...
   .. .. ..$ : chr [1:2] "x" "y"
   ..@ bbox       : num [1:2, 1:2] -50 -50 50 50
   .. ..- attr(*, "dimnames")=List of 2
   .. .. ..$ : chr [1:2] "x" "y"
   .. .. ..$ : chr [1:2] "min" "max"
   ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slot
   .. .. ..@ projargs: chr NA


My variogram

-------------------------

 > precip_fit
   model      psill    range
1   Nug  0.6391787  0.00000
2   Exp 12.0158808 17.39194



The command that I am running

(any value of nsim causes the crash below. But oridinary kriging
*without* the nsim param works fine)

-------------------------

precip_SGS = krige(formula = precip~1,

                      locations = gauges_spdf,
                      newdata = grd,
                      model = precip_fit,
                      nsim = num_sims,
                      nmax = 4)



The error output:
-------------------------

drawing 10 GLS realisations of beta...

[using conditional Gaussian simulation]

  *** caught segfault ***
address (nil), cause 'memory not mapped'

Traceback:
  1: predict.gstat(g, newdata = newdata, block = block, nsim = nsim,    
indicators = indicators, na.action = na.action, debug.level = debug.level)
  2: predict(g, newdata = newdata, block = block, nsim = nsim,
indicators = indicators,     na.action = na.action, debug.level =
debug.level)
  3: .local(formula, locations, ...)
  4: krige(formula = precip ~ 1, locations = gauges_spdf, newdata =
grd,     model = precip_fit, nsim = num_sims, nmax = 4)
  5: krige(formula = precip ~ 1, locations = gauges_spdf, newdata =
grd,     model = precip_fit, nsim = num_sims, nmax = 4)
  6: CreateRainRealizations(gauges_spdf, num_sims)
  7: eval(ei, envir)
  8: eval(ei, envir)
  9: withVisible(eval(ei, envir))
10: source("~/Studies/Research/synthetic/code/run_synthetic.R")


My seesion Info:
-------------------------

 > sessionInfo()

R version 3.5.2 (2018-12-20)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux buster/sid

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/atlas/libblas.so.3.10.3
LAPACK: /usr/lib/x86_64-linux-gnu/atlas/liblapack.so.3.10.3

locale:
  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
  [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets methods   base

loaded via a namespace (and not attached):
[1] compiler_3.5.2


Many thanks,

Micha

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

pcfinhom and Kcross.inhom unexpected behavior, heterogeneity or not?

Fri, 01/25/2019 - 05:28
Dear members,

I am currently analyzing the spatial patterns of a tree species using the "spatstat" package.
I struggle with some concepts and function output (strange graphs).I posted the data and the questions here:https://stackoverflow.com/questions/54364272/pcfinhom-and-kcross-inhom-unexpected-behavior-heterogeneity-or-not 

I would be very grateful to receive some advice.
Thank you in advance!Best regards,Mirela
        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: Can we fit SAR/CAR model for geostatistical data

Tue, 01/22/2019 - 03:49
I don't think this is a productive avenue, as geostatistics is mostly
about prediction, but SAR/CAR are mostly about mitigating
mis-specification problems in inference from covariates. This means that
prediction say from SAR/CAR fitted models is less well understood, for SAR
see for example Michel Goulard, Thibault Laurent & Christine Thomas-Agnan,
2017 \emph{About predictions in spatial autoregressive models: optimal and
almost optimal strategies},  Spatial Economic Analysis Volume 12, Issue
2--3, 304--325 https://doi.org/10.1080/17421772.2017.1300679.

However, INLA (and others) use GMRF in building prediction models, so the
lattice (mesh) may play a role. See for example:

https://becarioprecario.bitbucket.io/spde-gitbook/
http://www.r-inla.org/spde-book

Hope this helps,

Roger

On Mon, 21 Jan 2019, Bedilu Ejigu wrote:

> Could it be reasonable to analyze a geostatistical data  using spatial
> autoregreesive models (i.e. SAR and CAR) by treating the geostatistical
> data as it was observed on a discrete indexing set instead of continuous
> indexing set?
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: [hidden email]
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway

Can we fit SAR/CAR model for geostatistical data

Mon, 01/21/2019 - 05:49
 Could it be reasonable to analyze a geostatistical data  using spatial
autoregreesive models (i.e. SAR and CAR) by treating the geostatistical
data as it was observed on a discrete indexing set instead of continuous
indexing set?

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: LandGIS Open Land data service - global stack of environmental layers

Fri, 01/18/2019 - 03:40

Just added an example with multipoint query to the LandGISmaps rep:

https://github.com/Envirometrix/LandGISmaps/tree/master/tutorial

REST now works for up to 50 points. The impressive speed is mainly
thanks to using SSD and cloud GeoTIFF settings
(https://github.com/Envirometrix/LandGISmaps#cloud-optimized-geotiff).

library(rjson)
library(rgdal)
library(fossil)
library(plotKML)

## REST multipoint query ----
path <- geopath(lon1=4.9, lon2=4.9, lat1=52.3, lat2=35.1)
writeOGR(as(path, "SpatialPointsDataFrame"), "test_points.geojson",
layer="test_points", driver="GeoJSON")
## overlay points and grids:
browseURL('https://landgis.opengeohub.org/#/?base=Stamen%20(OpenStreetMap)&center=49.6466,9.1126&zoom=7&opacity=80&layer=veg_fapar_proba.v.*_d&time=July')
system('curl -X POST --form "points=@test_points.geojson" --form
"layer=pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif"
https://landgisapi.opengeohub.org/query/points -o results.json')
df <- data.frame(matrix(unlist(rjson::fromJSON(file="results.json")),
ncol = 3, byrow = TRUE))
str(df)
plot(df[,2], df[,3], type="l")
## 255 is the missing value

Let me know if you experience any problems.

Tom Hengl
https://opengeohub.org/people/tom-hengl

On 1/15/19 10:55 PM, Tomislav Hengl wrote:
>
> We have recently released a webmapping system to serve global consistent
> environmental and Earth science layers at spatial resolutions from 10 km
> to 250 m (hopefully also soon at 100 m). This is an Open Data system as
> majority of layers are distributed under the Open Data Commons Open
> Database License (ODbL) and/or Creative Commons Attribution-ShareAlike
> 4.0 International license (CC BY-SA). Read more about LandGIS in:
> http://opengeohub.org/about-landgis.
>
> You can access the web app at:
>
> https://landgis.opengeohub.org
>
> The system currently (Jan 2019) serves about 300+ layers from relief and
> geology, to vegetation indices, climatic images, soil properties and
> classes and potential and actual vegetation. Complete overview of
> available layers is available at:
>
> https://github.com/Envirometrix/LandGISmaps
>
> In addition to the web-mapping app, data can be accessed using the:
>
> - Geonode installation at https://maps.opengeohub.org,
> - LandGIS REST API services at https://landgisapi.opengeohub.org,
> - LandGIS WCS at https://geoserver.opengeohub.org/landgisgeoserver/web/,
>
> A copy of all layers is also available via Zenodo.org i.e. via an unique
> URL.
>
> To access data at point locations best use the REST API. For example, to
> access monthly precipitations at a location X, Y you can use:
>
> https://landgisapi.opengeohub.org/query/point?lat=7.58033&lon=35.6561&coll=layers1km&regex=clm_precipitation_imerge.(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)_m_1km_s0..0cm_.*_v0.1.tif
>
>
> which returns a GeoJSON (table) with precipitation values in mm.
>
> To access values of LandGIS layers at multiple points you can use:
>
> curl -X POST --form "points=@test_points.geojson" --form
> "layer=pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif"
> https://landgisapi.opengeohub.org/query/points -o results.json
>
> where test_points.geojson is the input GeoJSON file containing
> coordinates of points. The multi-point access is currently limited to
> max 20 points, but we hope to increase this number gradually. More
> examples of how to construct spatial queries are available at:
> https://landgisapi.opengeohub.org
>
> In addition to the REST access, you can also access the LandGIS data
> using the Web Coverage Service (WCS) functionality of the Geoserver e.g.
> to subset layers using a bounding box. For example, to download surface
> temperature for July for an area of about 300 by 300 km you can use:
>
> https://geoserver.opengeohub.org/landgisgeoserver/ows?service=WCS&version=2.0.1& 
>
> request=GetCoverage&
> coverageId=layers1km:clm_lst_mod11a2.jul.day_m_1km_s0..0cm_2000..2017_v1.0&
> subset=Lat(41,45)&subset=Long(32,35)
>
> The read limit for WCS is 4GB and response size limit is 200MB. This
> means that WCS might fail if you try to fetch too large bounding boxes.
> If this happens we recommend instead downloading whole GeoTIFFs from
> Zenodo.
>
> We are currently preparing R functionality to allow users fetching data
> from LandGIS in a more systematic way (import, overlay, subset,
> plot...). If you would like to contribute to this initiative, especially
> to testing the R functions, please send me an email. Also we would
> appreciate if you would report any bug or inconsistency you discover
> via: https://github.com/Envirometrix/LandGISmaps/issues
>
> If you are currently producing any similar types of data (e.g.
> environmental layers at resolutions from 100 m to 1 km for a global land
> mask) and if you would like to publish this data on LandGIS, please
> forward a proposal for publishing your global layers:
> https://opengeohub.org/submitting-global-layers-inclusion-landgis and we
> will get on it asap.
>
> thank you,
>
> Tom Hengl
> https://opengeohub.org/people/tom-hengl
_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: Simple choropleth using ggplot2

Thu, 01/17/2019 - 02:23
Dear Richard,
although I have problem with your mmr.zip (R cannott unzip it), and
could not try your code, I  suggest to migrate from sp to sf. ggplot can
easily use Simple Features data.
Use function sf::st_as_sf() to convert your Spatial* data to Simple
Features.
HTH,
Ákos Bede-Fazekas
Hungarian Academy of Sciences

2019.01.17. 3:19 keltezéssel, Richard Sherman írta:
> Hello all,
>
> I am trying to plot a simple choropleth, something I’ve done a while ago using rworldmap and also (if I recall correctly) ggplot2, but I am failing to draw the map at all and failing (I think) to merge my data properly with the shapefile. Thank you for help with a basic question. I’d like to know what is wrong with what I’m doing here.
>
> My R script is
>
> library(ggplot2)
> library(rgdal)
> library(plyr)
>
> # get shapefile for world map
> download.file("https://opendata.arcgis.com/datasets/252471276c9941729543be8789e06e12_0.zip", destfile = "countries.zip”)
>
> # get world bank maternal mortality data
> download.file("http://api.worldbank.org/v2/en/indicator/SH.STA.MMRT?downloadformat=csv", destfile = "mmr.zip”)
>
> # get csv file with concordance between ISO-2-alpha and ISO-3-alpha country codes
> download.file("https://raw.githubusercontent.com/rsspdx/mmr/master/iso_2_iso_3.csv", destfile = "iso_2_iso_3.csv”)
>
> # unzip the zipped files
> mmr.files <- unzip("mmr.zip")
> unzip("countries.zip”)
>
> # read in maternal mortality data and fix it up
> mmr.data <- read.csv(mmr.files[2], skip = 3, stringsAsFactors = FALSE)
> mmr.data.name <- mmr.data$Country.Name
> mmr.data.code <- mmr.data$Country.Code
> mmr.data.mmr <- mmr.data$X2015
> mmr.data.df <- as.data.frame(cbind(mmr.data.name, mmr.data.code, mmr.data.mmr))
> names(mmr.data.df) <- c("Country.Name", "Country.Code", "mmr”)
>
> # read in the shapefile
> world.map <- readOGR(dsn=".", layer = "UIA_World_Countries_Boundaries")
>
> # --------- possibly I should be doing this ------------
> #
> # world.map@data$id <- rownames(world.map@data)
> # world.map.df <- fortify(world.map)
> #
> # -------------------------------------------------------
>
> #------or perhaps I need to merge the data into a data slot of the shapefile
> #------but I can’t recall (or never knew?) how to do that
>
> # get ISO2 country codes
> iso_2_iso_3 <- read.csv("iso_2_iso_3.csv”)
>
> # ISO2 in this file is called ISO in the shapefile, create ISO variable
> # then merge into mmr.data
> iso_2_iso_3$ISO <- iso_2_iso_3$ISO2
> mmr.data.df <- merge(iso_2_iso_3, mmr.data.df, by.x="ISO3", by.y="Country.Code”)
>
> # merge maternal mortality data into shapefile
> mmr <- merge(world.map, mmr.data.df, by = "ISO")
> mmr <- fortify(mmr)
> str(mmr)
>
> # ---------create a map, not working
> map <- ggplot(data = mmr, aes(x = long, y = lat, group = group))
>
> # ---------look at the map, obviously not working
> map + geom_polygon(fill = mmr$mmr)
>
>
> ---
> Richard Sherman
> [hidden email]
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Simple choropleth using ggplot2

Wed, 01/16/2019 - 20:19
Hello all,

I am trying to plot a simple choropleth, something I’ve done a while ago using rworldmap and also (if I recall correctly) ggplot2, but I am failing to draw the map at all and failing (I think) to merge my data properly with the shapefile. Thank you for help with a basic question. I’d like to know what is wrong with what I’m doing here.

My R script is

library(ggplot2)
library(rgdal)
library(plyr)

# get shapefile for world map
download.file("https://opendata.arcgis.com/datasets/252471276c9941729543be8789e06e12_0.zip", destfile = "countries.zip”)

# get world bank maternal mortality data
download.file("http://api.worldbank.org/v2/en/indicator/SH.STA.MMRT?downloadformat=csv", destfile = "mmr.zip”)

# get csv file with concordance between ISO-2-alpha and ISO-3-alpha country codes
download.file("https://raw.githubusercontent.com/rsspdx/mmr/master/iso_2_iso_3.csv", destfile = "iso_2_iso_3.csv”)

# unzip the zipped files
mmr.files <- unzip("mmr.zip")
unzip("countries.zip”)

# read in maternal mortality data and fix it up
mmr.data <- read.csv(mmr.files[2], skip = 3, stringsAsFactors = FALSE)
mmr.data.name <- mmr.data$Country.Name
mmr.data.code <- mmr.data$Country.Code
mmr.data.mmr <- mmr.data$X2015
mmr.data.df <- as.data.frame(cbind(mmr.data.name, mmr.data.code, mmr.data.mmr))
names(mmr.data.df) <- c("Country.Name", "Country.Code", "mmr”)

# read in the shapefile
world.map <- readOGR(dsn=".", layer = "UIA_World_Countries_Boundaries")

# --------- possibly I should be doing this ------------
#
# world.map@data$id <- rownames(world.map@data)
# world.map.df <- fortify(world.map)
#
# -------------------------------------------------------

#------or perhaps I need to merge the data into a data slot of the shapefile
#------but I can’t recall (or never knew?) how to do that

# get ISO2 country codes
iso_2_iso_3 <- read.csv("iso_2_iso_3.csv”)

# ISO2 in this file is called ISO in the shapefile, create ISO variable
# then merge into mmr.data
iso_2_iso_3$ISO <- iso_2_iso_3$ISO2
mmr.data.df <- merge(iso_2_iso_3, mmr.data.df, by.x="ISO3", by.y="Country.Code”)

# merge maternal mortality data into shapefile
mmr <- merge(world.map, mmr.data.df, by = "ISO")
mmr <- fortify(mmr)
str(mmr)

# ---------create a map, not working
map <- ggplot(data = mmr, aes(x = long, y = lat, group = group))

# ---------look at the map, obviously not working
map + geom_polygon(fill = mmr$mmr)


---
Richard Sherman
[hidden email]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

LandGIS Open Land data service - global stack of environmental layers

Tue, 01/15/2019 - 15:55

We have recently released a webmapping system to serve global consistent
environmental and Earth science layers at spatial resolutions from 10 km
to 250 m (hopefully also soon at 100 m). This is an Open Data system as
majority of layers are distributed under the Open Data Commons Open
Database License (ODbL) and/or Creative Commons Attribution-ShareAlike
4.0 International license (CC BY-SA). Read more about LandGIS in:
http://opengeohub.org/about-landgis.

You can access the web app at:

https://landgis.opengeohub.org

The system currently (Jan 2019) serves about 300+ layers from relief and
geology, to vegetation indices, climatic images, soil properties and
classes and potential and actual vegetation. Complete overview of
available layers is available at:

https://github.com/Envirometrix/LandGISmaps

In addition to the web-mapping app, data can be accessed using the:

- Geonode installation at https://maps.opengeohub.org,
- LandGIS REST API services at https://landgisapi.opengeohub.org,
- LandGIS WCS at https://geoserver.opengeohub.org/landgisgeoserver/web/,

A copy of all layers is also available via Zenodo.org i.e. via an unique
URL.

To access data at point locations best use the REST API. For example, to
access monthly precipitations at a location X, Y you can use:

https://landgisapi.opengeohub.org/query/point?lat=7.58033&lon=35.6561&coll=layers1km&regex=clm_precipitation_imerge.(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)_m_1km_s0..0cm_.*_v0.1.tif

which returns a GeoJSON (table) with precipitation values in mm.

To access values of LandGIS layers at multiple points you can use:

curl -X POST --form "points=@test_points.geojson" --form
"layer=pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif"
https://landgisapi.opengeohub.org/query/points -o results.json

where test_points.geojson is the input GeoJSON file containing
coordinates of points. The multi-point access is currently limited to
max 20 points, but we hope to increase this number gradually. More
examples of how to construct spatial queries are available at:
https://landgisapi.opengeohub.org

In addition to the REST access, you can also access the LandGIS data
using the Web Coverage Service (WCS) functionality of the Geoserver e.g.
to subset layers using a bounding box. For example, to download surface
temperature for July for an area of about 300 by 300 km you can use:

https://geoserver.opengeohub.org/landgisgeoserver/ows?service=WCS&version=2.0.1&
request=GetCoverage&
coverageId=layers1km:clm_lst_mod11a2.jul.day_m_1km_s0..0cm_2000..2017_v1.0&
subset=Lat(41,45)&subset=Long(32,35)

The read limit for WCS is 4GB and response size limit is 200MB. This
means that WCS might fail if you try to fetch too large bounding boxes.
If this happens we recommend instead downloading whole GeoTIFFs from Zenodo.

We are currently preparing R functionality to allow users fetching data
from LandGIS in a more systematic way (import, overlay, subset,
plot...). If you would like to contribute to this initiative, especially
to testing the R functions, please send me an email. Also we would
appreciate if you would report any bug or inconsistency you discover
via: https://github.com/Envirometrix/LandGISmaps/issues

If you are currently producing any similar types of data (e.g.
environmental layers at resolutions from 100 m to 1 km for a global land
mask) and if you would like to publish this data on LandGIS, please
forward a proposal for publishing your global layers:
https://opengeohub.org/submitting-global-layers-inclusion-landgis and we
will get on it asap.

thank you,

Tom Hengl
https://opengeohub.org/people/tom-hengl

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: Parallelization of LMZ.F3GWR.test in spgwr package

Mon, 01/14/2019 - 13:22
Thanks, I'll check it out.  Awesome!

Sincerely,
Erin


On Mon, Jan 14, 2019 at 12:21 PM Roger Bivand <[hidden email]> wrote:

> On Mon, 14 Jan 2019, Erin Hodgess wrote:
>
> > Would there actually be any interest in making GWR parallel, please?  I
> > enjoy messing with parallel stuff, but don’t want to spend time if it is
> > not productive.
>
> spgwr::gwr() takes a cl= argument to pass a parallel object into the
> function, but this only saves time if the fit.points are given as an
> argument, and where # fit points is >> # data points.
>
> Not checked for many years, used in: http://hdl.handle.net/11250/163254
> with no obvious easy advantage. Maybe worth revisiting?
>
> Roger
>
>
> >
> > Thanks for listening!
> > Sincerely,
> > Erin
> >
> > On Sat, Jan 12, 2019 at 1:56 PM Rolf Turner <[hidden email]>
> wrote:
> >
> >>
> >>
> >> On 1/13/19 1:06 AM, Roger Bivand wrote:
> >>
> >>> ... GWR is very demanding for computation. It should only ever be used
> >>> for exploring model mis-specification, never for inference or
> prediction.
> >>> So making a bad test on a bad method run faster should not be a
> priority.
> >>
> >> Fortune nomination!
> >>
> >> cheers,
> >>
> >> Rolf
> >>
> >> --
> >> Honorary Research Fellow
> >> Department of Statistics
> >> University of Auckland
> >> Phone: +64-9-373-7599 ext. 88276
> >>
> >> _______________________________________________
> >> R-sig-Geo mailing list
> >> [hidden email]
> >> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >>
> >
>
> --
> Roger Bivand
> Department of Economics, Norwegian School of Economics,
> Helleveien 30, N-5045 Bergen, Norway.
> voice: +47 55 95 93 55; e-mail: [hidden email]
> https://orcid.org/0000-0003-2392-6140
> https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
--
Erin Hodgess, PhD
mailto: [hidden email]

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: Parallelization of LMZ.F3GWR.test in spgwr package

Mon, 01/14/2019 - 13:21
On Mon, 14 Jan 2019, Erin Hodgess wrote:

> Would there actually be any interest in making GWR parallel, please?  I
> enjoy messing with parallel stuff, but don’t want to spend time if it is
> not productive.

spgwr::gwr() takes a cl= argument to pass a parallel object into the
function, but this only saves time if the fit.points are given as an
argument, and where # fit points is >> # data points.

Not checked for many years, used in: http://hdl.handle.net/11250/163254 
with no obvious easy advantage. Maybe worth revisiting?

Roger


>
> Thanks for listening!
> Sincerely,
> Erin
>
> On Sat, Jan 12, 2019 at 1:56 PM Rolf Turner <[hidden email]> wrote:
>
>>
>>
>> On 1/13/19 1:06 AM, Roger Bivand wrote:
>>
>>> ... GWR is very demanding for computation. It should only ever be used
>>> for exploring model mis-specification, never for inference or prediction.
>>> So making a bad test on a bad method run faster should not be a priority.
>>
>> Fortune nomination!
>>
>> cheers,
>>
>> Rolf
>>
>> --
>> Honorary Research Fellow
>> Department of Statistics
>> University of Auckland
>> Phone: +64-9-373-7599 ext. 88276
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> [hidden email]
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
> --
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: [hidden email]
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway

Re: Parallelization of LMZ.F3GWR.test in spgwr package

Mon, 01/14/2019 - 13:05
Would there actually be any interest in making GWR parallel, please?  I
enjoy messing with parallel stuff, but don’t want to spend time if it is
not productive.

Thanks for listening!
Sincerely,
Erin

On Sat, Jan 12, 2019 at 1:56 PM Rolf Turner <[hidden email]> wrote:

>
>
> On 1/13/19 1:06 AM, Roger Bivand wrote:
>
> > ... GWR is very demanding for computation. It should only ever be used
> > for exploring model mis-specification, never for inference or prediction.
> > So making a bad test on a bad method run faster should not be a priority.
>
> Fortune nomination!
>
> cheers,
>
> Rolf
>
> --
> Honorary Research Fellow
> Department of Statistics
> University of Auckland
> Phone: +64-9-373-7599 ext. 88276
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> --
Erin Hodgess, PhD
mailto: [hidden email]

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Comparing spatio-temporal variations across multiple years

Sun, 01/13/2019 - 03:46
Hello,
I am new to spatial statistics. I am working on a project analyzing the
spatio-temporal neonatal mortality.

I have data for six year from 2012 to 2017 specified at district level in a
shape file. The shape file consist the number of neonatal deaths and number
of live births per year for the 6 year period together with the district
names and unique district codes.

How can I compare the spatial variation of neonatal mortality rate across
the 6 years.

I have computed the neonatal mortality rate for the period and a Global
Moran's for each year.

I would want to be able to compare the spatial structure over the period to
identify any statistically significant changes in the neonatal mortality
rate.

Any assistance would be greatly appreciated. Thanks!

Sincerely,
Salami

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: Parallelization of LMZ.F3GWR.test in spgwr package

Sat, 01/12/2019 - 14:55


On 1/13/19 1:06 AM, Roger Bivand wrote:

> ... GWR is very demanding for computation. It should only ever be used
> for exploring model mis-specification, never for inference or prediction.
> So making a bad test on a bad method run faster should not be a priority.

Fortune nomination!

cheers,

Rolf

--
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: Parallelization of LMZ.F3GWR.test in spgwr package

Sat, 01/12/2019 - 06:06
On Thu, 10 Jan 2019, Diana Gutiérrez wrote:

> Dear all,
>
> I was wondering if it would be possible to run the F3 variability test by
> Leung et al. (2000) (as included in the spgwr package) using parallel, so
> processing times could be reduced when you have a large number of
> observations and parameters. I would appreciate any insights and/or code
> examples if you happen to know of any that can be shared.

Yes, GWR is very demanding for computation. It should only ever be used
for exploring model mis-specification, never for inference or prediction.
So making a bad test on a bad method run faster should not be a priority.

Roger

>
> Thanks in advance,
>
> Diana.
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> --
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: [hidden email]
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway

Re: Harmonized Surface Reflectance Product

Thu, 01/10/2019 - 09:10
Resolved!

Il giorno mar 14 nov 2017 alle ore 15:34 Salvatore Falanga Bolognesi <
[hidden email]> ha scritto:

> I Have HLS products (for example go to see
> https://hls.gsfc.nasa.gov/data/v1.3/sites/BE/S30/2017/31UDS/
>
> HLS data are stored in Hierarchical Data Format (HDF)-4 compressed format.
> Each HDF data file is
> associated with an ENVI header file containing georeference information.
> (
> https://hls.gsfc.nasa.gov/wp-content/uploads/2017/08/HLS.v1.3.UserGuide_v2.pdf
> )
> I want to convert this data in to GeoTiff format.
> Is it possible to do that in R?
> Sincerely.
> Salvatore
>
>
        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Parallelization of LMZ.F3GWR.test in spgwr package

Thu, 01/10/2019 - 08:10
Dear all,

I was wondering if it would be possible to run the F3 variability test by
Leung et al. (2000) (as included in the spgwr package) using parallel, so
processing times could be reduced when you have a large number of
observations and parameters. I would appreciate any insights and/or code
examples if you happen to know of any that can be shared.

Thanks in advance,

Diana.

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: Impacts code after gstslshet

Sat, 01/05/2019 - 15:06
Hi Roger,

Thank you very much for your quick response and help. It did work.

Best,
Germán

On 1/5/19, 7:48 AM, "Roger Bivand" <[hidden email]> wrote:

    Run install.packages("sphet", repos="http://R-Forge.R-project.org") for
    Linux/OSX source install or Windows binary install of the development
    version of sphet, and please report back if this resolves the problem.
   
    Roger
   
    On Sat, 5 Jan 2019, Roger Bivand wrote:
   
    > On Fri, 4 Jan 2019, Veron M. Izon via R-sig-Geo wrote:
    >
    >>  Hi,
    >>
    >>  My name is Germán Izón. I am currently working on a project in which I am
    >>  estimating a SARAR specification using the gstslshet function. After
    >>  estimating this model I tried estimating the marginal effects using the
    >>  impacts function but I get the following error: “Error in
    >>  spdep::intImpacts(rho = rho, beta = beta, P = P, n = n, mu = mu, :
    >>  argument "evalues" is missing, with no default”. I get the same message
    >>  using the columbus data. I do not get this error after estimating a
    >>  spatial lag model (e.g., lagsarlm). I would truly appreciate any help with
    >>  this. Thank you!
    >
    > Had you provided the output of sessionInfo(), it would be easier to say. My
    > guess is that you are using sphet 1.7, and spdep 0.8-1. The use of
    > eigenvalues in impacts measures was presented by Gianfranco Piras at the
    > Spatial Econometrics meeting in June 2018, and implemented in spdep and
    > sphet, but sphet has not been released since then. I just bumped the version
    > number of sphet on R-Forge to 1.7-2, and hope that it will let you run
    > install.packages("sphet", repos="http://R-Forge.R-project.org"), which is not
    > possible at the moment (see https://r-forge.r-project.org/R/?group_id=477).
    > If you can install the development version of sphet from source, check it out
    > by:
    >
    > svn checkout svn://svn.r-forge.r-project.org/svnroot/sphet/
    >
    > and run R CMD build sphet, then R CMD INSTALL that .tar.gz file.
    >
    > Roger
    >
    >>
    >>  Germán
    >>
    >>  _______________________________________________
    >>  R-sig-Geo mailing list
    >>  [hidden email]
    >>  https://stat.ethz.ch/mailman/listinfo/r-sig-geo
    >>
    >
    >
   
    --
    Roger Bivand
    Department of Economics, Norwegian School of Economics,
    Helleveien 30, N-5045 Bergen, Norway.
    voice: +47 55 95 93 55; e-mail: [hidden email]
    https://orcid.org/0000-0003-2392-6140
    https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: Impacts code after gstslshet

Sat, 01/05/2019 - 09:48
Run install.packages("sphet", repos="http://R-Forge.R-project.org") for
Linux/OSX source install or Windows binary install of the development
version of sphet, and please report back if this resolves the problem.

Roger

On Sat, 5 Jan 2019, Roger Bivand wrote:

> On Fri, 4 Jan 2019, Veron M. Izon via R-sig-Geo wrote:
>
>>  Hi,
>>
>>  My name is Germán Izón. I am currently working on a project in which I am
>>  estimating a SARAR specification using the gstslshet function. After
>>  estimating this model I tried estimating the marginal effects using the
>>  impacts function but I get the following error: “Error in
>>  spdep::intImpacts(rho = rho, beta = beta, P = P, n = n, mu = mu, :
>>  argument "evalues" is missing, with no default”. I get the same message
>>  using the columbus data. I do not get this error after estimating a
>>  spatial lag model (e.g., lagsarlm). I would truly appreciate any help with
>>  this. Thank you!
>
> Had you provided the output of sessionInfo(), it would be easier to say. My
> guess is that you are using sphet 1.7, and spdep 0.8-1. The use of
> eigenvalues in impacts measures was presented by Gianfranco Piras at the
> Spatial Econometrics meeting in June 2018, and implemented in spdep and
> sphet, but sphet has not been released since then. I just bumped the version
> number of sphet on R-Forge to 1.7-2, and hope that it will let you run
> install.packages("sphet", repos="http://R-Forge.R-project.org"), which is not
> possible at the moment (see https://r-forge.r-project.org/R/?group_id=477).
> If you can install the development version of sphet from source, check it out
> by:
>
> svn checkout svn://svn.r-forge.r-project.org/svnroot/sphet/
>
> and run R CMD build sphet, then R CMD INSTALL that .tar.gz file.
>
> Roger
>
>>
>>  Germán
>>
>>  _______________________________________________
>>  R-sig-Geo mailing list
>>  [hidden email]
>>  https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
> --
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: [hidden email]
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway

Pages