[R-sig-Geo] gdalUtils::gdal_translate()

Agustin Lobo @loboli@t@@ @ending from gm@il@com
Thu Nov 8 10:04:17 CET 2018


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 <tech_dev using wildintellect.com> 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 using xmin,ext using ymax,ext using xmax,ext using 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 using xmin,ext using ymax,ext using xmax,ext using 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
> > R-sig-Geo using r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo



More information about the R-sig-Geo mailing list