Class GeoPackageCreator

java.lang.Object
mil.nga.geopackage.GeoPackageCreator

public class GeoPackageCreator extends Object
GeoPackage Creator
Since:
5.1.0
  • Constructor Details

    • GeoPackageCreator

      public GeoPackageCreator()
      Constructor
    • GeoPackageCreator

      public GeoPackageCreator(Context context)
      Constructor
      Parameters:
      context - context
    • GeoPackageCreator

      public GeoPackageCreator(boolean openHeaderValidation, boolean openIntegrityValidation, boolean sqliteWriteAheadLogging)
      Constructor
      Parameters:
      openHeaderValidation - validate the database header when opening a database
      openIntegrityValidation - validate the database integrity when opening a database
      sqliteWriteAheadLogging - write ahead logging state for SQLite connections
    • GeoPackageCreator

      public GeoPackageCreator(Context context, boolean openHeaderValidation, boolean openIntegrityValidation, boolean sqliteWriteAheadLogging)
      Constructor
      Parameters:
      context - context
      openHeaderValidation - validate the database header when opening a database
      openIntegrityValidation - validate the database integrity when opening a database
      sqliteWriteAheadLogging - write ahead logging state for SQLite connections
  • Method Details

    • getContext

      public Context getContext()
      Get the context
      Returns:
      context
    • setContext

      public void setContext(Context context)
      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

      public GeoPackage openExternal(String path, String database, boolean writable)
      Open an external GeoPackage
      Parameters:
      path - full file path
      database - database name
      writable - 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 name
      path - full file path
      writable - true to open as writable, false as read only
      cursorFactory - GeoPackage cursor factory
      sqlite - SQLite database
      Returns:
      GeoPackage