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: 8 sec ago

Re: citing the spatio-temporal kriging vignette

Wed, 11/14/2018 - 02:13
On Wed, 14 Nov 2018, Erin Hodgess wrote:

> Hello!
>
> What is the correct way to cite the (very fine) vignette on spatio-temporal
> kriging, please?

Unless it has changed a lot since publication, print(citation("gstat"),
bibtex=TRUE) gives among others:

@Article{,
     title = {Spatio-Temporal Interpolation using gstat},
     author = {Benedikt Gräler and Edzer Pebesma and Gerard Heuvelink},
     year = {2016},
     journal = {The R Journal},
     volume = {8},
     issue = {1},
     pages = {204-218},
     url = {https://journal.r-project.org/archive/2016-1/na-pebesma-heuvelink.pdf}
}

but should currently be (different URL):

@article{RJ-2016-014,
   author = {Benedikt Gräler and Edzer Pebesma and Gerard Heuvelink},
   title = {{Spatio-Temporal Interpolation using gstat}},
   year = {2016},
   journal = {{The R Journal}},
   url = {https://journal.r-project.org/archive/2016/RJ-2016-014/index.html},
   pages = {204--218},
   volume = {8},
   number = {1}
}

Roger

>
> Thanks,
> Erin
>
> 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
> --
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]
http://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

citing the spatio-temporal kriging vignette

Wed, 11/14/2018 - 00:13
Hello!

What is the correct way to cite the (very fine) vignette on spatio-temporal
kriging, please?

Thanks,
Erin

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: stars::RasterIO using extent info?

Tue, 11/13/2018 - 10:26


On 11/13/18 4:10 PM, Howard, Tim G (DEC) via R-sig-Geo wrote:
> Dear list,
>
> I am exploring the different options for reading parts of large imagery object in stars, as discussed here:
>
> https://r-spatial.github.io/stars/articles/proxy.html
>
> My ultimate goal is to read into RAM only a clipped portion of a large raster (well, actually a raster stack, but taking baby steps here).  
>
> My immediate question: the `RasterIO` option of read_stars defines cell offsets and cell counts (*Size). Is there a straightforward way to calculate these values given extent information?
>
> Reproducible example (mostly taken from here: https://www.r-spatial.org/r/2018/03/22/stars2.html):
>
> library(stars)
> tif <- system.file("tif/L7_ETMs.tif", package = "stars")
> x <- read_stars(tif) # read entire tif into ram
> x <- x[,,,1] #get just one layer for now
> # calculate a circular polygon at the center of the raster
> pol <- x %>% st_bbox() %>% st_as_sfc() %>% st_centroid() %>% st_buffer(500)
> plot(x)
> # interestingly, I don't think the circle is in the right place when plotted
> plot(st_geometry(pol), add = TRUE, border = "red")
> # this is what I'd like to be able to restrict to what is read in memory:
> plot(x[pol])
>
> ## read only portion of tif using proxy object
> x <- read_stars(tif, proxy = TRUE)
> x <- x[,,,1]
> y <- st_as_stars(x[pol])
> plot(y) # this is cropped to the extent (but not the circle - let's not worry about that right now)
>
> Question: can I do the equivalent with the RasterIO options in stars?  Said another way, instead of setting up the proxy, can I map my extent object (or bounding box) directly to the cell count values needed for RasterIO? stars can do the math, and so can you; it is explained here:

https://r-spatial.github.io/stars/articles/data_model.html

stars uses some functions directly from GDAL which it doesn't expose to
the user, but there is no magic going on here.

>
>
> Thanks in advance for any tips.
> Tim
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> --
Edzer Pebesma
Institute for Geoinformatics
Heisenbergstrasse 2, 48151 Muenster, Germany
Phone: +49 251 8333081

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

pEpkey.asc (2K) Download Attachment

stars::RasterIO using extent info?

Tue, 11/13/2018 - 09:10
Dear list,

I am exploring the different options for reading parts of large imagery object in stars, as discussed here:

https://r-spatial.github.io/stars/articles/proxy.html

My ultimate goal is to read into RAM only a clipped portion of a large raster (well, actually a raster stack, but taking baby steps here).  

My immediate question: the `RasterIO` option of read_stars defines cell offsets and cell counts (*Size). Is there a straightforward way to calculate these values given extent information?

Reproducible example (mostly taken from here: https://www.r-spatial.org/r/2018/03/22/stars2.html):

library(stars)
tif <- system.file("tif/L7_ETMs.tif", package = "stars")
x <- read_stars(tif) # read entire tif into ram
x <- x[,,,1] #get just one layer for now
# calculate a circular polygon at the center of the raster
pol <- x %>% st_bbox() %>% st_as_sfc() %>% st_centroid() %>% st_buffer(500)
plot(x)
# interestingly, I don't think the circle is in the right place when plotted
plot(st_geometry(pol), add = TRUE, border = "red")
# this is what I'd like to be able to restrict to what is read in memory:
plot(x[pol])

## read only portion of tif using proxy object
x <- read_stars(tif, proxy = TRUE)
x <- x[,,,1]
y <- st_as_stars(x[pol])
plot(y) # this is cropped to the extent (but not the circle - let's not worry about that right now)

Question: can I do the equivalent with the RasterIO options in stars?  Said another way, instead of setting up the proxy, can I map my extent object (or bounding box) directly to the cell count values needed for RasterIO?


Thanks in advance for any tips.
Tim

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

How to extract values in an sf Points object

Sun, 11/11/2018 - 22:14
I have a a **tibble** containing objects of class **sfc_POINT** such as

    # A tibble: 1 x 1
              geometry
    *          <POINT [°]>
    1 (-86.82857 32.78871)

where, of course, the two dbl represent longitude and latitude that I wish
to combine to another data frame for plotting as the centroids of
geographic units that can be (1) adjusted manually for position (it's a
more or less permanent basemap, so I only have to do this once) and (2)
optionally located on a thematic map, in my case, the US. (I apologize for
our current political situation.)

Although I can do this by subsetting

    str(foo[[1]][2])
    num 32.8

to get the latitude of a point (which, blessedly is only displayed, not
truncated to one decimal) and by making the second subindex [[1]] for
latitude, what I want is to do this at a pass for a tibble column of 50.

This is possible, of course, with some fancy footwork and, if I had to do
it 50 times, I would. Before that, however, I'd like to be sure I haven't
missed a recipe.

My plan is to use this with the **usmap** package to create a standardized,
projected base map on which to create thematic maps. The package returns a
*ggplot* friendly object of a converted shapefile of US states and
optionally counties and subsets of states. **And** it insets Alaska and
Hawaii and discards  the farflung territories. Since the boundaries (for
now) of the states are stable, once created, it can be saved as an Rda
object along with its centroid data and dyplr::inner_joint on the state
fips.

Again, the object is to decompose a POINT object -- (-86.82857 32.78871)
into a list c(-86.82857, 32.78871) or some other structure amenable to
tidyverse treatment.

Thanks in advance.

Richard Careaga
Unaffiliated (so much more a gracious term than permanently unemployable)
@technocrat
https://technocrat.rbind.io

        [[alternative HTML version deleted]]

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

Re: R code for inverse distance to a power

Thu, 11/08/2018 - 17:42
On 11/8/18 05:50, sudheesh pai wrote:
> Hi,
>
> I am looking for an R code to replace the inverse distance to a power
> algorithm in QGIS, which has the input as point shape file. the parameters
> of algorithm are radius 1 (R1), radius 2 (R2) and the z parameter.
> Also, my CRS is 3006 which means that i have to specify R1 and R2 in
> meters.
>
> If some one has an example, kindly let me know.
>
> Thank you
>
Sounds like you are talking about Inverse Distance Weighted functions
(IDW). Yes the gstat package has a function for that.

Example:
https://mgimond.github.io/Spatial/interpolation-in-r.html

Enjoy,
Alex

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

R code for inverse distance to a power

Thu, 11/08/2018 - 07:50
Hi,

I am looking for an R code to replace the inverse distance to a power
algorithm in QGIS, which has the input as point shape file. the parameters
of algorithm are radius 1 (R1), radius 2 (R2) and the z parameter.
Also, my CRS is 3006 which means that i have to specify R1 and R2 in
meters.

If some one has an example, kindly let me know.

Thank you

--
SUDHEESH.P.G
[hidden email]

        [[alternative HTML version deleted]]

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

Re: Problem installing rgdal

Thu, 11/08/2018 - 03:11
Thanks Alex for the help!

I managed to solve the problem:

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I did:
• ubuntu-gis repository wasn't added correctly, but was added 5 times. I
removed everything ubuntu-gis related from `sources.list.d`
• I removed and purged `r-base`, `r-core`, `gdal-bin`, `libgdal-dev`, and
did autoremove aufterwards.
• rebooted
• added ubuntu-gis correctly (the way their webpage suggested), installed
`gdal-bin`, `libgdal-dev`, `R` + packages. No errors whatsoever.


On Wed, Nov 7, 2018 at 6:33 PM Alex M <[hidden email]> wrote:

> Jeremy,
>
> Please keep the thread on list so every-one can see the
> discussion/solution (reply-all).
>
> I don't have a 18.10 box to test on quickly. But can you review what
> steps you did, ie: what system packages did you install before
> attempting to install rgdal? Usually you need libgdal-dev libproj-dev
> and perhaps libsqlite3-dev libgeos-dev (all of these are supposed to be
> dependencies of libgdal-dev).
>
> Also it might be good to jump this over to the R-sig-debian list where
> many people are familiar with the OS
> https://stat.ethz.ch/mailman/listinfo/r-sig-debian (also covers ubuntu &
> mint, all debian derivatives). One option is usually the marutter ppa
> which has system packages for cran libraries, however it doesn't appear
> to support 18.10 yet
> http://sites.psu.edu/theubunturblog/installing-r-in-ubuntu/
>
> Thanks,
> Alex
>
>
> On 11/7/18 01:51, Jeremy Kraft wrote:
> > I'm on linux, ubuntu 18.10. I've been trying to reinstall  libgdal-dev
> but
> > that did not solve the problem.
> >
> > Thanks,
> >
> > On Tue, Nov 6, 2018 at 7:12 PM Alex M <[hidden email]>
> wrote:
> >
> >> On 11/6/18 09:31, Jeremy Kraft wrote:
> >>> Hello,
> >>>
> >>> I'm trying to reinstall rgdal, but I have a problem with the sqlite
> >>> dependency.
> >>> Below is the R output.
> >>>
> >>> Does someone knows how to solve the problem?
> >>>
> >>> Thanks,
> >>>
> >>> Jeremy
> >>>
> >>>
> >>
> -------------------------------------------------------------------------------------------------------------------------------
> >>> jeremy@yuri-HP-ProBook-640-G1:/$ R
> >>>
> >>> R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
> >>> Copyright (C) 2018 The R Foundation for Statistical Computing
> >>> Platform: x86_64-pc-linux-gnu (64-bit)
> >>>
> >>> 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.
> >>>
> >>>   Natural language support but running in an English locale
> >>>
> >>> 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.
> >>>
> >>>> install.packages('rgdal')
> >>> Installing package into
> ‘/home/jeremy/R/x86_64-pc-linux-gnu-library/3.4’
> >>> (as ‘lib’ is unspecified)
> >>> trying URL 'https://cloud.r-project.org/src/contrib/rgdal_1.3-6.tar.gz
> '
> >>> Content type 'application/x-gzip' length 1666975 bytes (1.6 MB)
> >>> ==================================================
> >>> downloaded 1.6 MB
> >>>
> >>> * installing *source* package ‘rgdal’ ...
> >>> ** package ‘rgdal’ successfully unpacked and MD5 sums checked
> >>> configure: R_HOME: /usr/lib/R
> >>> configure: CC: gcc -std=gnu99
> >>> configure: CXX: g++
> >>> configure: C++11 support available
> >>> configure: rgdal: 1.3-6
> >>> checking for /usr/bin/svnversion... no
> >>> configure: svn revision: 773
> >>> checking for gdal-config... /usr/bin/gdal-config
> >>> checking gdal-config usability... yes
> >>> configure: GDAL: 2.2.3
> >>> checking GDAL version >= 1.11.4... yes
> >>> checking gdal: linking with --libs only... no
> >>> checking gdal: linking with --libs and --dep-libs... no
> >>> /usr/bin/ld: /usr/lib/libgdal.a(genbindataset.o): relocation
> R_X86_64_32
> >>> against `.rodata.str1.8' can not be used when making a PIE object;
> >>> recompile with -fPIC
> >>> /usr/bin/ld: /usr/lib/libgdal.a(geotiff.o): relocation R_X86_64_32
> >> against
> >>> `.rodata.str1.1' can not be used when making a PIE object; recompile
> with
> >>> -fPIC
> >>> /usr/bin/ld: /usr/lib/libgdal.a(gff_dataset.o): relocation R_X86_64_32S
> >>> against hidden symbol `_ZTV10GFFDataset' can not be used when making a
> >> PIE
> >>> object
> >>>
> >>> *
> >>> * Long list
> >>> *
> >>> /usr/bin/ld: /usr/lib/libgdal.a(gmlhandler.o): relocation R_X86_64_32
> >>> against `.rodata.str1.1' can not be used when making a PIE object;
> >>> recompile with -fPIC
> >>> /usr/bin/ld: /usr/lib/libgdal.a(ili2handler.o): relocation R_X86_64_32S
> >>> against hidden symbol `_ZTV11ILI2Handler' can not be used when making a
> >> PIE
> >>> object
> >>> /usr/bin/ld: /usr/lib/libgdal.a(nashandler.o): relocation R_X86_64_32
> >>> against `.rodata.str1.8' can not be used when making a PIE object;
> >>> recompile with -fPIC
> >>> /usr/bin/ld: /usr/lib/libgdal.a(ntf_codelist.o): relocation R_X86_64_32
> >>> against `.rodata.str1.1' can not be used when making a PIE object;
> >>> recompile with -fPIC
> >>> /usr/bin/ld: /usr/lib/libgdal.a(ntf_estlayers.o): relocation
> R_X86_64_32S
> >>> against hidden symbol `_ZN11OGRNTFLayer12GetLayerDefnEv' can not be
> used
> >>> when making a PIE object
> >>> /usr/bin/ld: /usr/lib/libgdal.a(ntf_raster.o): relocation R_X86_64_32S
> >>> against hidden symbol `_ZTV17OGRNTFRasterLayer' can not be used when
> >> making
> >>> a PIE object
> >>> /usr/bin/ld: /usr/lib/libgdal.a(ogrmssqlgeometryparser.o): relocation
> >>> R_X86_64_32S against `.rodata' can not be used when making a PIE
> object;
> >>> recompile with -fPIC
> >>> /usr/bin/ld: final link failed: Nonrepresentable section on output
> >>> collect2: error: ld returned 1 exit status
> >>> /usr/bin/ld: /usr/lib/libgdal.a(ogrsqliteapiroutines.o): undefined
> >>> reference to symbol 'sqlite3_prepare'
> >>> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0: error adding symbols: DSO
> >>> missing from command line
> >>> collect2: error: ld returned 1 exit status
> >>> configure: Install failure: compilation and/or linkage problems.
> >>> configure: error: GDALAllRegister not found in libgdal.
> >>> ERROR: configuration failed for package ‘rgdal’
> >>> * removing ‘/home/jeremy/R/x86_64-pc-linux-gnu-library/3.4/rgdal’
> >>>
> >>> The downloaded source packages are in
> >>>     ‘/tmp/RtmpKSJ85K/downloaded_packages’
> >>> Warning message:
> >>> In install.packages("rgdal") :
> >>>   installation of package ‘rgdal’ had non-zero exit status
> >>>
> >>>
> >>
> >> Looks like an issue with your system libgdal-dev package, perhaps
> >> reinstall the system dependencies. Which OS are you installing on?
> >>
> >> Thanks,
> >> Alex
> >>
> >>
> >
>
>
--
Jeremy Kraft
Data Scientist

Parkbob GmbH
[hidden email] <[hidden email]>
www.parkbob.com
FN 430551 p FB-Gericht: Handelsgericht Wien

The contents of this e-mail message and any attachments are confidential
and are intended solely for the addressee. This transmission is sent in
trust, for the sole purpose of delivery to the intended recipient. If you
have received this transmission in error, any use, reproduction or
dissemination of this transmission is strictly prohibited. If you are not
the intended recipient, please immediately *notify* the sender by reply
e-mail or phone and *delete* this message and its attachments, if any.

        [[alternative HTML version deleted]]

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

Re: gdalUtils::gdal_translate()

Thu, 11/08/2018 - 03:04
Alex,
It was not a problem with the gdal installation, I had already checked:
> gdal_setInstallation()
> getOption("gdalUtils_gdalPath")[[1]]$path
[1] "/usr/bin/"
> getOption("gdalUtils_gdalPath")[[1]]$version
version
"2.3.2"
> getOption("gdalUtils_gdalPath")[[1]]$date
        date
"2018-09-21"

Also note that the rest of gdalUtilities do work.

But thanks to your spotting of the missing c(), the error message
vanishes out. So it was a problem of my mistake with the missing c()
+ a wrong error message that was totally misleading me.

Many thanks!

Agus

On Wed, Nov 7, 2018 at 7:18 PM Alex M <[hidden email]> wrote:
>
> gdal_translate does work fine for me on R 3.4
>
> That error sounds like your install is having issues picking what gdal
> installation to use.
> ?gdal_chooseInstallation
>
> perhaps your install was not found correctly amd you need to run
> gdal_setInstallation?
>
> But I also see something in your call that looks off to me.
>
> Based on the docs projwin takes a numeric vector. Which to me should
> look like projwin=c(ext@xmin,ext@ymax,ext@xmax,ext@ymin)
>
> Thanks,
> Alex
>
> On 11/7/18 01:02, Agustin Lobo wrote:
> > I find the following problem when trying gdal_translate():
> >>  gdal_translate(src_dataset=file.path(dirMAJAIma,"imain20.vrt"),
> > +             dst_dataset="test.tif",
> > +             ot="Int16",projwin=ext@xmin,ext@ymax,ext@xmax,ext@ymin)
> > Error in gdal_chooseInstallation(hasDrivers = of) :
> >   No installations match.
> >
> > Other functions in gdalUtils do work and gdal_translate works on the
> > Debian terminal.
> > Does igdal_translate() work for other people?
> > Thanks
> > Agus
> >
> > sessionInfo()
> > R version 3.5.0 (2018-04-23)
> > 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/blas/libblas.so.3.8.0
> > LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.8.0
> >
> > locale:
> >  [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C
> > LC_TIME=en_GB.UTF-8
> >  [4] LC_COLLATE=en_GB.UTF-8     LC_MONETARY=en_GB.UTF-8
> > LC_MESSAGES=en_GB.UTF-8
> >  [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C
> > LC_ADDRESS=C
> > [10] LC_TELEPHONE=C             LC_MEASUREMENT=en_GB.UTF-8
> > LC_IDENTIFICATION=C
> >
> > attached base packages:
> > [1] stats     graphics  grDevices utils     datasets  methods   base
> >
> > other attached packages:
> > [1] gdalUtils_2.0.1.14 rgdal_1.3-6        R.utils_2.7.0
> > R.oo_1.22.0        R.methodsS3_1.7.1
> > [6] raster_2.7-15      sp_1.3-1
> >
> > loaded via a namespace (and not attached):
> >  [1] compiler_3.5.0   tools_3.5.0      yaml_2.2.0       Rcpp_0.12.19
> >   codetools_0.2-15 grid_3.5.0
> >  [7] iterators_1.0.10 foreach_1.4.4    knitr_1.20       lattice_0.20-35
> >
> > _______________________________________________
> > 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
_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: Varying measurement error in Kriging predictions

Thu, 11/08/2018 - 01:47
Please read p 74, "Kriging data with known measurement errors", of
http://gstat.org/gstat.pdf . It refers to a method published by Delhomme
(1978). The software was written long before the Christensen paper you
mention, to which I don't have access.


On 11/6/18 3:55 PM, Antonis Alexiadis wrote:
> Hello, my question is how can I implement known varying measurement error
> in my
> Kriging predictions?
>
> I have two separate datasets: the first one is a 2-D dataset that includes
> the observations and
> the second is the a 2-D dataset that includes the measurement error in each
> specific location.
> The measurement error dataset follows a structure, it's not random (which
> can be characterized via the use of the experimental variogram).
>
> I have searched a lot online on how to incorporate the measurement
> uncertainty in
> Kriging predictions but it seems to still be an open question in the forums
> (a paper solving this issue has been developed by William F. Christensen
> titled as: Filtered Kriging for Spatial Data with Heterogeneous Measurement
> Error Variances). I have tried to use gstat and incorporate the variances
> using the weights functionality but after I do the kriging and visualize
> the predicted variance field, even though it qualitatively resembles the
> defined one, the values of the variances are magnitudes lower than the ones
> proposed.
>
> Does anyone have an idea on how to solve it, or aware of some
> software-package that
> has already implemented this functionality? (It's quite tough to understand
> the stated paper already, rather having to program
> its contents) .
>
>
> Thank you.
>
> Regards,
> Antonios.
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> --
Edzer Pebesma
Institute for Geoinformatics
Heisenbergstrasse 2, 48151 Muenster, Germany
Phone: +49 251 8333081

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

pEpkey.asc (2K) Download Attachment

Re: gdalUtils::gdal_translate()

Wed, 11/07/2018 - 12:17
gdal_translate does work fine for me on R 3.4

That error sounds like your install is having issues picking what gdal
installation to use.
?gdal_chooseInstallation

perhaps your install was not found correctly amd you need to run
gdal_setInstallation?

But I also see something in your call that looks off to me.

Based on the docs projwin takes a numeric vector. Which to me should
look like projwin=c(ext@xmin,ext@ymax,ext@xmax,ext@ymin)

Thanks,
Alex

On 11/7/18 01:02, Agustin Lobo wrote:
> I find the following problem when trying gdal_translate():
>>  gdal_translate(src_dataset=file.path(dirMAJAIma,"imain20.vrt"),
> +             dst_dataset="test.tif",
> +             ot="Int16",projwin=ext@xmin,ext@ymax,ext@xmax,ext@ymin)
> Error in gdal_chooseInstallation(hasDrivers = of) :
>   No installations match.
>
> Other functions in gdalUtils do work and gdal_translate works on the
> Debian terminal.
> Does igdal_translate() work for other people?
> Thanks
> Agus
>
> sessionInfo()
> R version 3.5.0 (2018-04-23)
> 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/blas/libblas.so.3.8.0
> LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.8.0
>
> locale:
>  [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C
> LC_TIME=en_GB.UTF-8
>  [4] LC_COLLATE=en_GB.UTF-8     LC_MONETARY=en_GB.UTF-8
> LC_MESSAGES=en_GB.UTF-8
>  [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C
> LC_ADDRESS=C
> [10] LC_TELEPHONE=C             LC_MEASUREMENT=en_GB.UTF-8
> LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] gdalUtils_2.0.1.14 rgdal_1.3-6        R.utils_2.7.0
> R.oo_1.22.0        R.methodsS3_1.7.1
> [6] raster_2.7-15      sp_1.3-1
>
> loaded via a namespace (and not attached):
>  [1] compiler_3.5.0   tools_3.5.0      yaml_2.2.0       Rcpp_0.12.19
>   codetools_0.2-15 grid_3.5.0
>  [7] iterators_1.0.10 foreach_1.4.4    knitr_1.20       lattice_0.20-35
>
> _______________________________________________
> 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

Re: Problem installing rgdal

Wed, 11/07/2018 - 11:33
Jeremy,

Please keep the thread on list so every-one can see the
discussion/solution (reply-all).

I don't have a 18.10 box to test on quickly. But can you review what
steps you did, ie: what system packages did you install before
attempting to install rgdal? Usually you need libgdal-dev libproj-dev
and perhaps libsqlite3-dev libgeos-dev (all of these are supposed to be
dependencies of libgdal-dev).

Also it might be good to jump this over to the R-sig-debian list where
many people are familiar with the OS
https://stat.ethz.ch/mailman/listinfo/r-sig-debian (also covers ubuntu &
mint, all debian derivatives). One option is usually the marutter ppa
which has system packages for cran libraries, however it doesn't appear
to support 18.10 yet
http://sites.psu.edu/theubunturblog/installing-r-in-ubuntu/

Thanks,
Alex


On 11/7/18 01:51, Jeremy Kraft wrote:
> I'm on linux, ubuntu 18.10. I've been trying to reinstall  libgdal-dev but
> that did not solve the problem.
>
> Thanks,
>
> On Tue, Nov 6, 2018 at 7:12 PM Alex M <[hidden email]> wrote:
>
>> On 11/6/18 09:31, Jeremy Kraft wrote:
>>> Hello,
>>>
>>> I'm trying to reinstall rgdal, but I have a problem with the sqlite
>>> dependency.
>>> Below is the R output.
>>>
>>> Does someone knows how to solve the problem?
>>>
>>> Thanks,
>>>
>>> Jeremy
>>>
>>>
>> -------------------------------------------------------------------------------------------------------------------------------
>>> jeremy@yuri-HP-ProBook-640-G1:/$ R
>>>
>>> R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
>>> Copyright (C) 2018 The R Foundation for Statistical Computing
>>> Platform: x86_64-pc-linux-gnu (64-bit)
>>>
>>> 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.
>>>
>>>   Natural language support but running in an English locale
>>>
>>> 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.
>>>
>>>> install.packages('rgdal')
>>> Installing package into ‘/home/jeremy/R/x86_64-pc-linux-gnu-library/3.4’
>>> (as ‘lib’ is unspecified)
>>> trying URL 'https://cloud.r-project.org/src/contrib/rgdal_1.3-6.tar.gz'
>>> Content type 'application/x-gzip' length 1666975 bytes (1.6 MB)
>>> ==================================================
>>> downloaded 1.6 MB
>>>
>>> * installing *source* package ‘rgdal’ ...
>>> ** package ‘rgdal’ successfully unpacked and MD5 sums checked
>>> configure: R_HOME: /usr/lib/R
>>> configure: CC: gcc -std=gnu99
>>> configure: CXX: g++
>>> configure: C++11 support available
>>> configure: rgdal: 1.3-6
>>> checking for /usr/bin/svnversion... no
>>> configure: svn revision: 773
>>> checking for gdal-config... /usr/bin/gdal-config
>>> checking gdal-config usability... yes
>>> configure: GDAL: 2.2.3
>>> checking GDAL version >= 1.11.4... yes
>>> checking gdal: linking with --libs only... no
>>> checking gdal: linking with --libs and --dep-libs... no
>>> /usr/bin/ld: /usr/lib/libgdal.a(genbindataset.o): relocation R_X86_64_32
>>> against `.rodata.str1.8' can not be used when making a PIE object;
>>> recompile with -fPIC
>>> /usr/bin/ld: /usr/lib/libgdal.a(geotiff.o): relocation R_X86_64_32
>> against
>>> `.rodata.str1.1' can not be used when making a PIE object; recompile with
>>> -fPIC
>>> /usr/bin/ld: /usr/lib/libgdal.a(gff_dataset.o): relocation R_X86_64_32S
>>> against hidden symbol `_ZTV10GFFDataset' can not be used when making a
>> PIE
>>> object
>>>
>>> *
>>> * Long list
>>> *
>>> /usr/bin/ld: /usr/lib/libgdal.a(gmlhandler.o): relocation R_X86_64_32
>>> against `.rodata.str1.1' can not be used when making a PIE object;
>>> recompile with -fPIC
>>> /usr/bin/ld: /usr/lib/libgdal.a(ili2handler.o): relocation R_X86_64_32S
>>> against hidden symbol `_ZTV11ILI2Handler' can not be used when making a
>> PIE
>>> object
>>> /usr/bin/ld: /usr/lib/libgdal.a(nashandler.o): relocation R_X86_64_32
>>> against `.rodata.str1.8' can not be used when making a PIE object;
>>> recompile with -fPIC
>>> /usr/bin/ld: /usr/lib/libgdal.a(ntf_codelist.o): relocation R_X86_64_32
>>> against `.rodata.str1.1' can not be used when making a PIE object;
>>> recompile with -fPIC
>>> /usr/bin/ld: /usr/lib/libgdal.a(ntf_estlayers.o): relocation R_X86_64_32S
>>> against hidden symbol `_ZN11OGRNTFLayer12GetLayerDefnEv' can not be used
>>> when making a PIE object
>>> /usr/bin/ld: /usr/lib/libgdal.a(ntf_raster.o): relocation R_X86_64_32S
>>> against hidden symbol `_ZTV17OGRNTFRasterLayer' can not be used when
>> making
>>> a PIE object
>>> /usr/bin/ld: /usr/lib/libgdal.a(ogrmssqlgeometryparser.o): relocation
>>> R_X86_64_32S against `.rodata' can not be used when making a PIE object;
>>> recompile with -fPIC
>>> /usr/bin/ld: final link failed: Nonrepresentable section on output
>>> collect2: error: ld returned 1 exit status
>>> /usr/bin/ld: /usr/lib/libgdal.a(ogrsqliteapiroutines.o): undefined
>>> reference to symbol 'sqlite3_prepare'
>>> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0: error adding symbols: DSO
>>> missing from command line
>>> collect2: error: ld returned 1 exit status
>>> configure: Install failure: compilation and/or linkage problems.
>>> configure: error: GDALAllRegister not found in libgdal.
>>> ERROR: configuration failed for package ‘rgdal’
>>> * removing ‘/home/jeremy/R/x86_64-pc-linux-gnu-library/3.4/rgdal’
>>>
>>> The downloaded source packages are in
>>>     ‘/tmp/RtmpKSJ85K/downloaded_packages’
>>> Warning message:
>>> In install.packages("rgdal") :
>>>   installation of package ‘rgdal’ had non-zero exit status
>>>
>>>
>>
>> Looks like an issue with your system libgdal-dev package, perhaps
>> reinstall the system dependencies. Which OS are you installing on?
>>
>> Thanks,
>> Alex
>>
>>
>
_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: Random forest script - problems with training areas polygon?

Wed, 11/07/2018 - 08:07
Silvia,
you say that the areas of the shapefile are smaller. Do they intersect
pixels centroids? The help of function 'extract' says the following (which
might be relevant for your case?):

If y represents polygons, the extract method returns the values of the
cells of a Raster* object that are covered by a polygon. A cell is covered
if its center is inside the polygon (but see the weights  option for
considering partly covered cells; and argument small for getting values for
small polygons anyway).

Cheers
Hugo

Roman Luštrik <[hidden email]> escreveu no dia quarta, 7/11/2018
à(s) 15:03:

> Can you make a reproducible example (data, scripts)? Have you tried
> debugging your code?
>
> Cheers,
> Roman
>
> On Wed, Nov 7, 2018 at 2:36 PM Silvia Flaherty <[hidden email]>
> wrote:
>
> > Hi all,
> >
> >
> >
> > I have been working with the random forest R script and have had no
> > problems at all up to now.
> >
> > I recently modified the training areas shapefile. It´s actually an edited
> > version of the original shapefile (which worked just fine). Same
> > projection, etc, only the areas are smaller and more specific. That's the
> > only input I changes. The script reads the shapefile but it doesn't do
> the
> > classification.
> >
> >
> >
> > The error  I get is:
> >
> >  Error in `[.data.frame`(satValues, , 2) : undefined columns selected
> >
> >
> >
> > Checking line by line, he problem seems to be (line 139 of the loop):
> >
> > satValues <- extract(satImage, class_data[i,], cellnumbers=TRUE, df=TRUE)
> >
> >
> >
> >
> >
> > I´m not very skilled at using R but I´m quite OK with GIS. I have tried
> > editing the shapefile again, saving it as another file, etc. Same result.
> >
> >
> >
> > Any ideas what could be going wrong?
> >
> > Thanks!
> >
> >
> >
> > Silvia
> >
> >
> > <
> >
> https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
> > >
> > Libre
> > de virus. www.avast.com
> > <
> >
> https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
> > >
> > <#m_542342069031620777_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> >
> >         [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-Geo mailing list
> > [hidden email]
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >
>
>
> --
> In God we trust, all others bring data.
>
>         [[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

Re: Random forest script - problems with training areas polygon?

Wed, 11/07/2018 - 08:03
Can you make a reproducible example (data, scripts)? Have you tried
debugging your code?

Cheers,
Roman

On Wed, Nov 7, 2018 at 2:36 PM Silvia Flaherty <[hidden email]>
wrote:

> Hi all,
>
>
>
> I have been working with the random forest R script and have had no
> problems at all up to now.
>
> I recently modified the training areas shapefile. It´s actually an edited
> version of the original shapefile (which worked just fine). Same
> projection, etc, only the areas are smaller and more specific. That's the
> only input I changes. The script reads the shapefile but it doesn't do the
> classification.
>
>
>
> The error  I get is:
>
>  Error in `[.data.frame`(satValues, , 2) : undefined columns selected
>
>
>
> Checking line by line, he problem seems to be (line 139 of the loop):
>
> satValues <- extract(satImage, class_data[i,], cellnumbers=TRUE, df=TRUE)
>
>
>
>
>
> I´m not very skilled at using R but I´m quite OK with GIS. I have tried
> editing the shapefile again, saving it as another file, etc. Same result.
>
>
>
> Any ideas what could be going wrong?
>
> Thanks!
>
>
>
> Silvia
>
>
> <
> https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
> >
> Libre
> de virus. www.avast.com
> <
> https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
> >
> <#m_542342069031620777_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

--
In God we trust, all others bring data.

        [[alternative HTML version deleted]]

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

Random forest script - problems with training areas polygon?

Wed, 11/07/2018 - 07:35
Hi all,



I have been working with the random forest R script and have had no
problems at all up to now.

I recently modified the training areas shapefile. It´s actually an edited
version of the original shapefile (which worked just fine). Same
projection, etc, only the areas are smaller and more specific. That's the
only input I changes. The script reads the shapefile but it doesn't do the
classification.



The error  I get is:

 Error in `[.data.frame`(satValues, , 2) : undefined columns selected



Checking line by line, he problem seems to be (line 139 of the loop):

satValues <- extract(satImage, class_data[i,], cellnumbers=TRUE, df=TRUE)





I´m not very skilled at using R but I´m quite OK with GIS. I have tried
editing the shapefile again, saving it as another file, etc. Same result.



Any ideas what could be going wrong?

Thanks!



Silvia


<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Libre
de virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#m_542342069031620777_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

        [[alternative HTML version deleted]]

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

gdalUtils::gdal_translate()

Wed, 11/07/2018 - 03:02
I find the following problem when trying gdal_translate():
>  gdal_translate(src_dataset=file.path(dirMAJAIma,"imain20.vrt"),
+             dst_dataset="test.tif",
+             ot="Int16",projwin=ext@xmin,ext@ymax,ext@xmax,ext@ymin)
Error in gdal_chooseInstallation(hasDrivers = of) :
  No installations match.

Other functions in gdalUtils do work and gdal_translate works on the
Debian terminal.
Does igdal_translate() work for other people?
Thanks
Agus

sessionInfo()
R version 3.5.0 (2018-04-23)
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/blas/libblas.so.3.8.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.8.0

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C
LC_TIME=en_GB.UTF-8
 [4] LC_COLLATE=en_GB.UTF-8     LC_MONETARY=en_GB.UTF-8
LC_MESSAGES=en_GB.UTF-8
 [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C
LC_ADDRESS=C
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_GB.UTF-8
LC_IDENTIFICATION=C

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

other attached packages:
[1] gdalUtils_2.0.1.14 rgdal_1.3-6        R.utils_2.7.0
R.oo_1.22.0        R.methodsS3_1.7.1
[6] raster_2.7-15      sp_1.3-1

loaded via a namespace (and not attached):
 [1] compiler_3.5.0   tools_3.5.0      yaml_2.2.0       Rcpp_0.12.19
  codetools_0.2-15 grid_3.5.0
 [7] iterators_1.0.10 foreach_1.4.4    knitr_1.20       lattice_0.20-35

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

Re: Problem installing rgdal

Tue, 11/06/2018 - 12:12
On 11/6/18 09:31, Jeremy Kraft wrote:
> Hello,
>
> I'm trying to reinstall rgdal, but I have a problem with the sqlite
> dependency.
> Below is the R output.
>
> Does someone knows how to solve the problem?
>
> Thanks,
>
> Jeremy
>
> -------------------------------------------------------------------------------------------------------------------------------
> jeremy@yuri-HP-ProBook-640-G1:/$ R
>
> R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
> Copyright (C) 2018 The R Foundation for Statistical Computing
> Platform: x86_64-pc-linux-gnu (64-bit)
>
> 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.
>
>   Natural language support but running in an English locale
>
> 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.
>
>> install.packages('rgdal')
> Installing package into ‘/home/jeremy/R/x86_64-pc-linux-gnu-library/3.4’
> (as ‘lib’ is unspecified)
> trying URL 'https://cloud.r-project.org/src/contrib/rgdal_1.3-6.tar.gz'
> Content type 'application/x-gzip' length 1666975 bytes (1.6 MB)
> ==================================================
> downloaded 1.6 MB
>
> * installing *source* package ‘rgdal’ ...
> ** package ‘rgdal’ successfully unpacked and MD5 sums checked
> configure: R_HOME: /usr/lib/R
> configure: CC: gcc -std=gnu99
> configure: CXX: g++
> configure: C++11 support available
> configure: rgdal: 1.3-6
> checking for /usr/bin/svnversion... no
> configure: svn revision: 773
> checking for gdal-config... /usr/bin/gdal-config
> checking gdal-config usability... yes
> configure: GDAL: 2.2.3
> checking GDAL version >= 1.11.4... yes
> checking gdal: linking with --libs only... no
> checking gdal: linking with --libs and --dep-libs... no
> /usr/bin/ld: /usr/lib/libgdal.a(genbindataset.o): relocation R_X86_64_32
> against `.rodata.str1.8' can not be used when making a PIE object;
> recompile with -fPIC
> /usr/bin/ld: /usr/lib/libgdal.a(geotiff.o): relocation R_X86_64_32 against
> `.rodata.str1.1' can not be used when making a PIE object; recompile with
> -fPIC
> /usr/bin/ld: /usr/lib/libgdal.a(gff_dataset.o): relocation R_X86_64_32S
> against hidden symbol `_ZTV10GFFDataset' can not be used when making a PIE
> object
>
> *
> * Long list
> *
> /usr/bin/ld: /usr/lib/libgdal.a(gmlhandler.o): relocation R_X86_64_32
> against `.rodata.str1.1' can not be used when making a PIE object;
> recompile with -fPIC
> /usr/bin/ld: /usr/lib/libgdal.a(ili2handler.o): relocation R_X86_64_32S
> against hidden symbol `_ZTV11ILI2Handler' can not be used when making a PIE
> object
> /usr/bin/ld: /usr/lib/libgdal.a(nashandler.o): relocation R_X86_64_32
> against `.rodata.str1.8' can not be used when making a PIE object;
> recompile with -fPIC
> /usr/bin/ld: /usr/lib/libgdal.a(ntf_codelist.o): relocation R_X86_64_32
> against `.rodata.str1.1' can not be used when making a PIE object;
> recompile with -fPIC
> /usr/bin/ld: /usr/lib/libgdal.a(ntf_estlayers.o): relocation R_X86_64_32S
> against hidden symbol `_ZN11OGRNTFLayer12GetLayerDefnEv' can not be used
> when making a PIE object
> /usr/bin/ld: /usr/lib/libgdal.a(ntf_raster.o): relocation R_X86_64_32S
> against hidden symbol `_ZTV17OGRNTFRasterLayer' can not be used when making
> a PIE object
> /usr/bin/ld: /usr/lib/libgdal.a(ogrmssqlgeometryparser.o): relocation
> R_X86_64_32S against `.rodata' can not be used when making a PIE object;
> recompile with -fPIC
> /usr/bin/ld: final link failed: Nonrepresentable section on output
> collect2: error: ld returned 1 exit status
> /usr/bin/ld: /usr/lib/libgdal.a(ogrsqliteapiroutines.o): undefined
> reference to symbol 'sqlite3_prepare'
> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0: error adding symbols: DSO
> missing from command line
> collect2: error: ld returned 1 exit status
> configure: Install failure: compilation and/or linkage problems.
> configure: error: GDALAllRegister not found in libgdal.
> ERROR: configuration failed for package ‘rgdal’
> * removing ‘/home/jeremy/R/x86_64-pc-linux-gnu-library/3.4/rgdal’
>
> The downloaded source packages are in
>     ‘/tmp/RtmpKSJ85K/downloaded_packages’
> Warning message:
> In install.packages("rgdal") :
>   installation of package ‘rgdal’ had non-zero exit status
>
>
Looks like an issue with your system libgdal-dev package, perhaps
reinstall the system dependencies. Which OS are you installing on?

Thanks,
Alex

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

Problem installing rgdal

Tue, 11/06/2018 - 11:31
Hello,

I'm trying to reinstall rgdal, but I have a problem with the sqlite
dependency.
Below is the R output.

Does someone knows how to solve the problem?

Thanks,

Jeremy

-------------------------------------------------------------------------------------------------------------------------------
jeremy@yuri-HP-ProBook-640-G1:/$ R

R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

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.

  Natural language support but running in an English locale

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.

> install.packages('rgdal')
Installing package into ‘/home/jeremy/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/rgdal_1.3-6.tar.gz'
Content type 'application/x-gzip' length 1666975 bytes (1.6 MB)
==================================================
downloaded 1.6 MB

* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
configure: R_HOME: /usr/lib/R
configure: CC: gcc -std=gnu99
configure: CXX: g++
configure: C++11 support available
configure: rgdal: 1.3-6
checking for /usr/bin/svnversion... no
configure: svn revision: 773
checking for gdal-config... /usr/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 2.2.3
checking GDAL version >= 1.11.4... yes
checking gdal: linking with --libs only... no
checking gdal: linking with --libs and --dep-libs... no
/usr/bin/ld: /usr/lib/libgdal.a(genbindataset.o): relocation R_X86_64_32
against `.rodata.str1.8' can not be used when making a PIE object;
recompile with -fPIC
/usr/bin/ld: /usr/lib/libgdal.a(geotiff.o): relocation R_X86_64_32 against
`.rodata.str1.1' can not be used when making a PIE object; recompile with
-fPIC
/usr/bin/ld: /usr/lib/libgdal.a(gff_dataset.o): relocation R_X86_64_32S
against hidden symbol `_ZTV10GFFDataset' can not be used when making a PIE
object

*
* Long list
*
/usr/bin/ld: /usr/lib/libgdal.a(gmlhandler.o): relocation R_X86_64_32
against `.rodata.str1.1' can not be used when making a PIE object;
recompile with -fPIC
/usr/bin/ld: /usr/lib/libgdal.a(ili2handler.o): relocation R_X86_64_32S
against hidden symbol `_ZTV11ILI2Handler' can not be used when making a PIE
object
/usr/bin/ld: /usr/lib/libgdal.a(nashandler.o): relocation R_X86_64_32
against `.rodata.str1.8' can not be used when making a PIE object;
recompile with -fPIC
/usr/bin/ld: /usr/lib/libgdal.a(ntf_codelist.o): relocation R_X86_64_32
against `.rodata.str1.1' can not be used when making a PIE object;
recompile with -fPIC
/usr/bin/ld: /usr/lib/libgdal.a(ntf_estlayers.o): relocation R_X86_64_32S
against hidden symbol `_ZN11OGRNTFLayer12GetLayerDefnEv' can not be used
when making a PIE object
/usr/bin/ld: /usr/lib/libgdal.a(ntf_raster.o): relocation R_X86_64_32S
against hidden symbol `_ZTV17OGRNTFRasterLayer' can not be used when making
a PIE object
/usr/bin/ld: /usr/lib/libgdal.a(ogrmssqlgeometryparser.o): relocation
R_X86_64_32S against `.rodata' can not be used when making a PIE object;
recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
/usr/bin/ld: /usr/lib/libgdal.a(ogrsqliteapiroutines.o): undefined
reference to symbol 'sqlite3_prepare'
/usr/lib/x86_64-linux-gnu/libsqlite3.so.0: error adding symbols: DSO
missing from command line
collect2: error: ld returned 1 exit status
configure: Install failure: compilation and/or linkage problems.
configure: error: GDALAllRegister not found in libgdal.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/home/jeremy/R/x86_64-pc-linux-gnu-library/3.4/rgdal’

The downloaded source packages are in
    ‘/tmp/RtmpKSJ85K/downloaded_packages’
Warning message:
In install.packages("rgdal") :
  installation of package ‘rgdal’ had non-zero exit status

        [[alternative HTML version deleted]]

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

Varying measurement error in Kriging predictions

Tue, 11/06/2018 - 08:55
Hello, my question is how can I implement known varying measurement error
in my
Kriging predictions?

I have two separate datasets: the first one is a 2-D dataset that includes
the observations and
the second is the a 2-D dataset that includes the measurement error in each
specific location.
The measurement error dataset follows a structure, it's not random (which
can be characterized via the use of the experimental variogram).

I have searched a lot online on how to incorporate the measurement
uncertainty in
Kriging predictions but it seems to still be an open question in the forums
(a paper solving this issue has been developed by William F. Christensen
titled as: Filtered Kriging for Spatial Data with Heterogeneous Measurement
Error Variances). I have tried to use gstat and incorporate the variances
using the weights functionality but after I do the kriging and visualize
the predicted variance field, even though it qualitatively resembles the
defined one, the values of the variances are magnitudes lower than the ones
proposed.

Does anyone have an idea on how to solve it, or aware of some
software-package that
has already implemented this functionality? (It's quite tough to understand
the stated paper already, rather having to program
its contents) .


Thank you.

Regards,
Antonios.

        [[alternative HTML version deleted]]

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

Re: R-sig-Geo Digest, Vol 182, Issue 13

Tue, 11/06/2018 - 07:22
I am doing NDVI time series analysis using MODIS data.I have produced my
map for NDVI trends.I produced five classes of the trends.
1.How do I calculate percentage areas for each category and the areas
represented by each category?
2.How do I determine area represented by my study area?

On Tue, Oct 30, 2018 at 1:02 PM <[hidden email]> wrote:

> Send R-sig-Geo mailing list submissions to
>         [hidden email]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> or, via email, send a message with subject or body 'help' to
>         [hidden email]
>
> You can reach the person managing the list at
>         [hidden email]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of R-sig-Geo digest..."
>
>
> Today's Topics:
>
>    1. Cost distance in spatial weight matrix (Roozbeh Valavi)
>    2. Re: Cost distance in spatial weight matrix
>       (=?UTF-8?Q?Facundo_Mu=c3=b1oz?=)
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 29 Oct 2018 23:42:06 +1100
> From: Roozbeh Valavi <[hidden email]>
> To: [hidden email]
> Subject: [R-sig-Geo] Cost distance in spatial weight matrix
> Message-ID:
>         <
> [hidden email]>
> Content-Type: text/plain; charset="utf-8"
>
> Dear list,
>
> I wonder if it is possible to add some kind of cost/weighting when creating
> a spatial weight matrix to be used in a spatial lag model? I want to
> consider the effect of elevation as a cost for calculating distance to the
> neighbours.
> I am using spdep for creating the W and splm for the model.
>
> Thank you in advance,
> Roozbeh
> --
> *Roozbeh Valavi*
> PhD Candidate
> The Quantitative & Applied Ecology Group <http://qaeco.com/>
> School of BioSciences | Faculty of Science
> The University of Melbourne, VIC 3010, Australia
> Mobile: +61 423 283 238
>
>         [[alternative HTML version deleted]]
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Mon, 29 Oct 2018 14:48:43 +0100
> From: =?UTF-8?Q?Facundo_Mu=c3=b1oz?= <[hidden email]>
> To: [hidden email]
> Subject: Re: [R-sig-Geo] Cost distance in spatial weight matrix
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset="utf-8"
>
> Dear Roozbeh,
>
> package geoRcb [1]* provides function distmatGen() [2], which computes a
> cost-based distance matrix between any two sets of locations, given a
> raster cost surface (such as elevation). The function uses package
> gdistance to actually perform the computations, and it does not depend
> on anything else in the package, so you can simply copy it to your code
> base.
>
> Is that what you were looking for?
>
> ƒacu.-
>
>
>
> [1] https://github.com/famuvie/geoRcb/
>
> [2] https://github.com/famuvie/geoRcb/blob/master/R/distmatGen.R
>
> * Disclaimer: I'm the author.
>
>
> On 10/29/18 1:42 PM, Roozbeh Valavi wrote:
> > Dear list,
> >
> > I wonder if it is possible to add some kind of cost/weighting when
> creating
> > a spatial weight matrix to be used in a spatial lag model? I want to
> > consider the effect of elevation as a cost for calculating distance to
> the
> > neighbours.
> > I am using spdep for creating the W and splm for the model.
> >
> > Thank you in advance,
> > Roozbeh
>
>         [[alternative HTML version deleted]]
>
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>
> ------------------------------
>
> End of R-sig-Geo Digest, Vol 182, Issue 13
> ******************************************
        [[alternative HTML version deleted]]

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

Pages