Package mil.nga.geopackage
Class GeoPackageCreator
java.lang.Object
mil.nga.geopackage.GeoPackageCreator
GeoPackage Creator
- Since:
- 5.1.0
-
Constructor Summary
ConstructorDescriptionConstructorGeoPackageCreator
(boolean openHeaderValidation, boolean openIntegrityValidation, boolean sqliteWriteAheadLogging) ConstructorGeoPackageCreator
(Context context) ConstructorGeoPackageCreator
(Context context, boolean openHeaderValidation, boolean openIntegrityValidation, boolean sqliteWriteAheadLogging) Constructor -
Method Summary
Modifier and TypeMethodDescriptioncreateGeoPackage
(String database, String path, boolean writable, GeoPackageCursorFactory cursorFactory, SQLiteDatabase sqlite) Create a GeoPackage for the connectionGet the contextboolean
Is open database header validation enabled.boolean
Is open database integrity validation enabled.boolean
Is the SQLite write ahead logging setting enabled for connections.openExternal
(String path, String database, boolean writable) Open an external GeoPackagevoid
setContext
(Context context) Set the contextvoid
setOpenHeaderValidation
(boolean enabled) Set the open database header validation setting.void
setOpenIntegrityValidation
(boolean enabled) Set the open database integrity validation setting.void
setSqliteWriteAheadLogging
(boolean enabled) Set the SQLite write ahead logging setting for connections.
-
Constructor Details
-
GeoPackageCreator
public GeoPackageCreator()Constructor -
GeoPackageCreator
Constructor- Parameters:
context
- context
-
GeoPackageCreator
public GeoPackageCreator(boolean openHeaderValidation, boolean openIntegrityValidation, boolean sqliteWriteAheadLogging) Constructor- Parameters:
openHeaderValidation
- validate the database header when opening a databaseopenIntegrityValidation
- validate the database integrity when opening a databasesqliteWriteAheadLogging
- write ahead logging state for SQLite connections
-
GeoPackageCreator
public GeoPackageCreator(Context context, boolean openHeaderValidation, boolean openIntegrityValidation, boolean sqliteWriteAheadLogging) Constructor- Parameters:
context
- contextopenHeaderValidation
- validate the database header when opening a databaseopenIntegrityValidation
- validate the database integrity when opening a databasesqliteWriteAheadLogging
- write ahead logging state for SQLite connections
-
-
Method Details
-
getContext
Get the context- Returns:
- context
-
setContext
Set the context- Parameters:
context
- context
-
isOpenHeaderValidation
public boolean isOpenHeaderValidation()Is open database header validation enabled. This causes a small time increase when opening a database to check the header bytes. Off by default.- Returns:
- true if enabled
-
setOpenHeaderValidation
public void setOpenHeaderValidation(boolean enabled) Set the open database header validation setting. This causes a small time increase when opening a database to check the header bytes. Off by default.- Parameters:
enabled
- true to enable, false to disable
-
isOpenIntegrityValidation
public boolean isOpenIntegrityValidation()Is open database integrity validation enabled. This causes a noticeable time increase when opening a database to check the database integrity. Off by default.- Returns:
- true if enabled
-
setOpenIntegrityValidation
public void setOpenIntegrityValidation(boolean enabled) Set the open database integrity validation setting. This causes a noticeable time increase when opening a database to check the database integrity. Off by default.- Parameters:
enabled
- true to enable, false to disable
-
isSqliteWriteAheadLogging
public boolean isSqliteWriteAheadLogging()Is the SQLite write ahead logging setting enabled for connections. Off by default.- Returns:
- write ahead logging state
-
setSqliteWriteAheadLogging
public void setSqliteWriteAheadLogging(boolean enabled) Set the SQLite write ahead logging setting for connections. Off by default.- Parameters:
enabled
- true to enable, false to disable
-
openExternal
Open an external GeoPackage- Parameters:
path
- full file pathdatabase
- database namewritable
- true to open as writable, false as read only- Returns:
- GeoPackage
-
createGeoPackage
public GeoPackage createGeoPackage(String database, String path, boolean writable, GeoPackageCursorFactory cursorFactory, SQLiteDatabase sqlite) Create a GeoPackage for the connection- Parameters:
database
- database namepath
- full file pathwritable
- true to open as writable, false as read onlycursorFactory
- GeoPackage cursor factorysqlite
- SQLite database- Returns:
- GeoPackage
-