ArcGIS 10.3: how to create Geopackage with raster tiles

6300
14
01-14-2015 01:47 PM
Highlighted
New Contributor

Hello, everyone! 

ArcGIS now supports the 1.0 OGC GeoPackage format.  I am wondering how I can create geopackage files with raster tiles. Could you direct me to some documentation for it, please?

Thank you for your help in advance & happy mapping!

Tags (1)
Reply
0 Kudos
14 Replies
Highlighted
New Contributor

A patch to 10.3 is forthcoming (late February) that will support reading/display and writing of GeoPackage tiles.  Source code will also be released via the Esri Github site for a ready to use GP tool to load GeoPackage tiled rasters.

Reply
0 Kudos
Highlighted
New Contributor

So 10.3 is available and it seems that reading raster tiles is supported with the tool Make Raster Layer via Data Management Tools > Layers and Table Views.

I am following this documentation:

Make Raster Layer—Help | ArcGIS for Desktop

The tool gives a feedback that the layer is created, however it is not added to the Table of Contents, and also does not appear in ArcMap in any way.

Is there a place in my file system where I can find this layer file?
Thanks

Reply
0 Kudos
Highlighted
Regular Contributor

The display of raster data from a geopackage at 10.3 requires a patch. The patch is in testing and should be available this month.

Highlighted
MVP Esteemed Contributor

Now that 10.3.1 is out, is the patch you reference already incorporated?  I have ArcGIS 10.3.1 and am running into problems getting raster data from geopackages into ArcMap.

Reply
0 Kudos
Highlighted
Regular Contributor

You can pull the latest copy of the raster2gpkg tool from GitHub. We had to make additional changes to the gdal18.dll. Pull from Esri/raster2gpkg · GitHub

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

Thanks.  Unfortuantely, my problem isn't Esri Raster > GeoPackage but GeoPackage > Esri Raster.  I can't seem to get Make Raster Layer to work with raster tiles in a GeoPackage.  I even tried the ERDC Whitehorse Geopackage Download that is posted on the GeoPackage Encoding Standard web page.  If I run the Make Raster Layer tool, it completes without errors but nothing happens.  If I call the tool from Python, it generates an error:

Runtime error  Traceback (most recent call last):  File "<string>", line 1, in <module>  File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\management.py", line 7012, in MakeRasterLayer    raise e ExecuteError: ERROR 000582: Error occurred during execution.

Reply
0 Kudos
Highlighted
Regular Contributor

1) Have added the gdaal18.dll (for github) to Desktop10.3\bin)? are you using 10.3.1 or 10.3?

2) The Whitehorse Geopackage can't be displayed because it contains an invalid spatial reference.

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

I am running ArcGIS 10.3.1.4959.

I downloaded gdal18.dll from GitHub.  Both my installed copy and the GitHub copy say version 1.8.0.10300, but my installed copy is 7.87 MB and the GitHub copy is 9.48 MB.  Although the names and file versions are the same, obviously the files aren't the same.  I will move the GitHub copy over to \bin and test it shortly.

Regarding the Whitehorse GeoPackage, what table, data element, etc... are you using to determine an invalid spatial reference.  The gpkg_spatial_ref_sys table does list undefined Cartesian and Geographic coordinate reference systems, but it also lists WGS84 and Web Mercator.  The gpkg_contents and gpkg_tile_matrix_set tables state Web Mercator as the SRS ID.

UPDATE:  Tried the GitHub gdal18.dll, same error:  000582.  Something else I noticed, 150+ ~10KB SQLite files were created in my %TEMP% folder.  Does this seem right?  Are they supposed to be cleaned up at some time or will my %TEMP% folder be filled with these files?

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

Lance Shipman​, I figured out what was preventing the Whitehorse GeoPackage from loading.  When working with tiles in GeoPackages, the Make Raster Layer tool appears to need the zoom levels to start at 0 and increment from there.  The Whitehorse and other GeoPackages I am working with are sparse, i.e., they don't start with zoom level 0, so they fail to load.  If I go in and reset the zoom levels to start at 0, then I can get them to load.

The fact that Make Raster Layer seems to need the zoom level to start at 0 is in violation of the GeoPackage standard as I read it.  The standard specifically has a couple lines that state, "Tiles MAY or MAY NOT be provided for level 0 or any other particular zoom level. This means that a tile matrix set can be sparse, i.e. not contain a tile for any particular position at a certain tile zoom level."