[R-sig-Geo] tpk files

Barry Rowlingson b@row||ng@on @end|ng |rom gm@||@com
Fri Apr 12 00:48:23 CEST 2019


QGIS could "read" it pretty smartly, only loading in the bits in the
current view extent, and doing the loading in a separate thread so the GUI
was still active.

Marta has told me that she only needs the surface layer points - the X Y
and Z coordinates are duplicated as attributes so I think a selection of
Z=0 (or something) might make a small enough subset to read into R
directly. This might be doable via the `query` option of `st_read`, or
failing that a "select" in SQLite3 and dumping the results to a CSV file.
There seems to be hundreds of data points at each location so taking the
surface points only could thin it out considerably. It may still take some
time but if its a one-off...

Barry


On Thu, Apr 11, 2019 at 9:57 PM Edzer Pebesma <edzer.pebesma using uni-muenster.de>
wrote:

> It's a 30 Gb 3D point file:
>
> $ ogrinfo EMU.gpkg
> INFO: Open of `EMU.gpkg'
>       using driver `GPKG' successful.
> 1: EMU_Master (3D Point)
>
> @Shaun: homebrew seems to be supported neither by apple, nor by CRAN, so
> you are a bit on your own there. Have you tried the CRAN binary packages
> using GDAL?
>
> In any case, the windows binary does (should) support gpkg, see
> https://github.com/rwinlib/gdal2
>
> Trying to read this file into R with sf::st_read will require a lot of
> RAM, or some strategy to read in parts only.
>
> On 4/11/19 5:52 PM, Shaun Walbridge wrote:
> > I think the issue is, most GDAL installations don't have the Geopackage
> raster driver [1] installed by default, which lists "Needs libsqlite3 (and
> any or all of PNG, JPEG, WEBP drivers)" for it to be available. At least on
> my Homebrew installation of GDAL, this driver wasn't built out of the box.
> If you rebuild GDAL with this additional driver, or find a prebuilt binary
> which has it, it should be able to open. A simple test is if `gdalinfo
> EMU.gpkg` returns information about the dataset outside of R.
> >
> > 1.
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.gdal.org_drv-5Fgeopackage-5Fraster.html&d=DwIGaQ&c=n6-cguzQvX_tUIrZOS_4Og&r=fCPRb7QX-vd5bnO9gIJHCiX852SVUtyYX--xtCKtpfk&m=p5ULiF5de1gKZBP-IzWbMO9Pe5LFzv9uaZ5VJYnWw1Y&s=d6xaKGlN0jpd8mBdjKXAhzst7N3Bgo43BvJlLnDSngk&e=
> >
> > On 4/11/19, 11:41 AM, "Barry Rowlingson" <b.rowlingson using gmail.com>
> wrote:
> >
> >     What did you try? The instructions at the top say:
> >
> >     "Download 3.3GB tile package and rename extension from .tpk to .zip.
> >     Extract to get EMU.gpkg"
> >
> >     If that's a valid GeoPackage then `sf` should be able to read it.
> Not sure
> >     what might be in the geopackage though, "tile package" sounds like
> rasters,
> >     but GeoPackages are generally vector...
> >
> >     I'll try in five minutes when all 3.3Gb have downloaded....
> >
> >     On Thu, Apr 11, 2019 at 3:37 PM Marta Rufino <
> marta.m.rufino using gmail.com>
> >     wrote:
> >
> >     > Hi,
> >     >
> >     > I would like to open (and use) a 'tpk' file from arcgis in r.
> >     > For example:
> >     >
> >     >
> https://esri.maps.arcgis.com/home/item.html?id=24885cd6bd9544f5a8e15d0bf40f67d6
> >     >
> >     > I tried raster and sf package, but no luck.
> >     >
> >     > Any ideia if we can do this in r?
> >     >
> >     > Thank you very much in advance,
> >     >
> >     > Best wishes,
> >     > M.
> >     >
> >     >         [[alternative HTML version deleted]]
> >     >
> >     > _______________________________________________
> >     > R-sig-Geo mailing list
> >     > R-sig-Geo using r-project.org
> >     >
> https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dsig-2Dgeo&d=DwICAg&c=n6-cguzQvX_tUIrZOS_4Og&r=YFaRLkcUCdDkLrpTbNOUV9J1CwYBCTMwgm5tdQkRSm4&m=nytIIxO936Ls0xrd3zZkBd1WNjQB3DwlOK88GErq19M&s=uahwJjXmsZFnUVQXvkICr3EfAbNjOuaXl6iwziIexTM&e=
> >     >
> >
> >       [[alternative HTML version deleted]]
> >
> >     _______________________________________________
> >     R-sig-Geo mailing list
> >     R-sig-Geo using r-project.org
> >
> https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dsig-2Dgeo&d=DwICAg&c=n6-cguzQvX_tUIrZOS_4Og&r=YFaRLkcUCdDkLrpTbNOUV9J1CwYBCTMwgm5tdQkRSm4&m=nytIIxO936Ls0xrd3zZkBd1WNjQB3DwlOK88GErq19M&s=uahwJjXmsZFnUVQXvkICr3EfAbNjOuaXl6iwziIexTM&e=
> >
> >
> >
> > _______________________________________________
> > R-sig-Geo mailing list
> > R-sig-Geo using r-project.org
> > 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
> R-sig-Geo using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list