public final class

Geopackage

extends Object
java.lang.Object
   ↳ com.esri.core.geodatabase.Geopackage

Class Overview

The Geopackage class is for opening and accessing the contents of an OGC standard GeoPackage file. For more information regarding the GeoPackage standard, refer to GeoPackage standard.

The geopackage will contain a number of GeopackageFeatureTables. A GeopackageFeatureTable can be used to create a FeatureLayer which will display the features on a map.

When you are done with a Geopackage instance, such as on application exit, call its dispose() method. This will release resources used internally.

Summary

Public Constructors
Geopackage(String path)
Instantiates a Geopackage object by opening a geopackage file.
Public Methods
void dispose()
Disposes this Geopackage instance.
GeopackageFeatureTable getGeopackageFeatureTable(String tableName)
Returns an instance of GeopackageFeatureTable for a feature table name.
List<GeopackageFeatureTable> getGeopackageFeatureTables()
Gets a list of feature tables contained in the geopackage.
List<String> getGeopackageRasterLayers()
Returns a list of table names for tables containing tiled data.
long getHandle()
For internal use only
String getPath()
Returns the location of the geopackage file.
Protected Methods
void finalize()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Geopackage (String path)

Instantiates a Geopackage object by opening a geopackage file.

The dispose() method should be called on Geopackage instances when they are no longer required or before the application is closed. This will release resources used by the Geopackage.

Parameters
path String: the path to a geopackage
Throws
NullPointerException thrown when input is null.
FileNotFoundException thrown when the geopackage file does not exist at the specified path

Public Methods

public void dispose ()

Disposes this Geopackage instance. This method must be called when closing an application (or when finished with the geopackage) to release resources.

public GeopackageFeatureTable getGeopackageFeatureTable (String tableName)

Returns an instance of GeopackageFeatureTable for a feature table name. The return value can be used to initialize a FeatureLayer.

Parameters
tableName String: table name for which the feature table has to be created.
Returns
GeopackageFeatureTable the feature table corresponding to the name.

public List<GeopackageFeatureTable> getGeopackageFeatureTables ()

Gets a list of feature tables contained in the geopackage.

Returns
List<GeopackageFeatureTable> the list of tables; an empty list if there are no valid feature tables

public List<String> getGeopackageRasterLayers ()

Returns a list of table names for tables containing tiled data. To use a geopackage table containing tiled data create a ERROR(/FileRasterSource) passing the constructor a geopackage file path. Then construct a {@RasterLayer } with the ERROR(/FileRasterSource) and add it to the map.

Returns
List<String> a list of raster layer names.

public long getHandle ()

For internal use only

Returns
long

public String getPath ()

Returns the location of the geopackage file.

Returns
String String path

Protected Methods

protected void finalize ()

Throws
Throwable