Package-level declarations

Types

Link copied to clipboard
actual typealias CoverageData<TImage> = mil.nga.geopackage.extension.coverage.CoverageData<TImage>
typealias CoverageData<TImage> = mil.nga.geopackage.extension.coverage.CoverageData<TImage>
expect abstract class CoverageData<TImage : CoverageDataImage> : CoverageDataCore<TImage>
actual typealias CoverageData<> = mil.nga.geopackage.extension.coverage.CoverageData<TImage>
typealias CoverageData<> = mil.nga.geopackage.extension.coverage.CoverageData<TImage>
Link copied to clipboard
actual typealias FeatureStyle = mil.nga.geopackage.extension.nga.style.FeatureStyle
typealias FeatureStyle = mil.nga.geopackage.extension.nga.style.FeatureStyle
expect class FeatureStyle
actual typealias FeatureStyle = mil.nga.geopackage.extension.nga.style.FeatureStyle
typealias FeatureStyle = mil.nga.geopackage.extension.nga.style.FeatureStyle
Link copied to clipboard
open class GeoPackage(val pathName: String, val isReadOnly: Boolean = true)
Link copied to clipboard

ORMLite row for one entry in a 3D Tiles GeoPackage extension blob table. Column shape follows the OGC 3D Tiles GeoPackage Extension community proposal:

Link copied to clipboard

Per-tile implementation of the ElevationSource.ElevationDataFactory contract. Lives for a single (z, x, y) read.

Link copied to clipboard
class GpkgCachedElevationSourceFactory(geoPackage: GeoPackage, content: GpkgContent, networkSource: TileSource?, outputFormat: String, isFloat: Boolean, tileMatrixSet: TileMatrixSet, elevationDecoder: ElevationDecoder = ElevationDecoder(), staleAfter: ERROR CLASS: Symbol not found for Duration = Duration.INFINITE, revalidationScope: ERROR CLASS: Symbol not found for CoroutineScope = GlobalScope) : ElevationSourceFactory, OfflineToggleable, CachedSourceInfoProvider, BulkRetrievableElevationSourceFactory, CacheReadableElevationSourceFactory, RevalidatingSource

Elevation source factory that pairs a GeoPackage cache with an optional upstream TileSource. Owns the source-format → storage-format transcoding end-to-end.

Link copied to clipboard
typealias GpkgContent = Contents
Link copied to clipboard
class GpkgContentManager(val pathName: String, val isReadOnly: Boolean = false) : ContentManager

GeoPackage-backed ContentManager. One instance binds to one .gpkg file. Stores stay narrow — they read/write the cache; the manager is the orchestration layer that opens stores, registers web-service metadata, and enumerates what's cached.

Link copied to clipboard

Worldwind-private side table tracking the feature cache state for one features table, kept separate from the features themselves so the features table can be a clean, standard GeoPackage features layer that any GIS (ArcGIS / QGIS / GDAL) reads natively.

Link copied to clipboard
data class GpkgFeatureRow(val geometry: Geometry?, val properties: String?, val uid: String? = null)

One row in a features cache table. Null geometry is the sentinel that marks a tile as "fetched but empty"; properties is whatever JSON the caller chose to store.

Link copied to clipboard

Worldwind-private side table that holds per-tile cache freshness metadata: the HTTP ETag and Last-Modified validators (so cache refreshes can issue conditional If-None-Match / If-Modified-Since requests and the server can answer 304 to skip the body), plus validatedAt — epoch-millis the tile was last confirmed fresh against the server.

Link copied to clipboard

CREATE TABLE sample_tile_pyramid ( id INTEGER PRIMARY KEY AUTOINCREMENT, zoom_level INTEGER NOT NULL, tile_column INTEGER NOT NULL, tile_row INTEGER NOT NULL, tile_data BLOB NOT NULL, UNIQUE (zoom_level, tile_column, tile_row) );

Link copied to clipboard

Worldwind-private table holding, per cached content table, how to reconnect its layer to the network source (service type, address, layer name, output format). Declared in gpkg_extensions as worldwind_web_service; the ww_ name stays off the spec-reserved gpkg_ prefix. A legacy gpkg_web_service table is renamed in place on the first writable open (see GeoPackage.migrateLegacyWebServiceTable); read-only caches keep the old name and open offline.

Link copied to clipboard
actual typealias IconRow = mil.nga.geopackage.extension.nga.style.IconRow
typealias IconRow = mil.nga.geopackage.extension.nga.style.IconRow
expect class IconRow
actual typealias IconRow = mil.nga.geopackage.extension.nga.style.IconRow
typealias IconRow = mil.nga.geopackage.extension.nga.style.IconRow
Link copied to clipboard
actual typealias StyleRow = mil.nga.geopackage.extension.nga.style.StyleRow
typealias StyleRow = mil.nga.geopackage.extension.nga.style.StyleRow
expect class StyleRow
actual typealias StyleRow = mil.nga.geopackage.extension.nga.style.StyleRow
typealias StyleRow = mil.nga.geopackage.extension.nga.style.StyleRow

Functions

Link copied to clipboard
actual fun buildImageSource(iconRow: IconRow): ImageSource
expect fun buildImageSource(iconRow: IconRow): ImageSource
actual fun buildImageSource(iconRow: IconRow): ImageSource
Link copied to clipboard
actual fun createCoverageData(geoPackage: GeoPackageCore, tableName: String, identifier: String?, contentsBoundingBox: BoundingBox?, contentsSrsId: Long, tileBoundingBox: BoundingBox?, tileSrsId: Long, isFloat: Boolean): CoverageData<*>
expect fun createCoverageData(geoPackage: GeoPackageCore, tableName: String, identifier: String?, contentsBoundingBox: BoundingBox?, contentsSrsId: Long, tileBoundingBox: BoundingBox?, tileSrsId: Long, isFloat: Boolean): CoverageData<*>
actual fun createCoverageData(geoPackage: GeoPackageCore, tableName: String, identifier: String?, contentsBoundingBox: BoundingBox?, contentsSrsId: Long, tileBoundingBox: BoundingBox?, tileSrsId: Long, isFloat: Boolean): CoverageData<*>
Link copied to clipboard
actual fun createFeatureSpatialIndex(geoPackage: GeoPackageCore, tableName: String)

Create the standard GeoPackage RTree spatial index (gpkg_rtree_index extension) on tableName's geometry column, so the features table is spatially queryable — by any external GIS and by WorldWind's bounding-box reads. NGA wires the virtual table + sync triggers + the gpkg_extensions registration. Idempotent. Implemented per platform (NGA's RTree extension).

expect fun createFeatureSpatialIndex(geoPackage: GeoPackageCore, tableName: String)

Create the standard GeoPackage RTree spatial index (gpkg_rtree_index extension) on tableName's geometry column, so the features table is spatially queryable — by any external GIS and by WorldWind's bounding-box reads. NGA wires the virtual table + sync triggers + the gpkg_extensions registration. Idempotent. Implemented per platform (NGA's RTree extension).

actual fun createFeatureSpatialIndex(geoPackage: GeoPackageCore, tableName: String)

Create the standard GeoPackage RTree spatial index (gpkg_rtree_index extension) on tableName's geometry column, so the features table is spatially queryable — by any external GIS and by WorldWind's bounding-box reads. NGA wires the virtual table + sync triggers + the gpkg_extensions registration. Idempotent. Implemented per platform (NGA's RTree extension).

Link copied to clipboard
actual fun deleteFeatureTable(geoPackage: GeoPackageCore, tableName: String)

Fully delete a features tableName: the user table together with its gpkg_geometry_columns row, gpkg_extensions rows and the NGA geometry-index tables (nga_geometry_index / nga_table_index). Delegates to NGA's GeoPackage.deleteTable — the tile-oriented GeoPackage.deleteEntry metadata cleanup does not cover feature content, so it must not be used to drop a features table.

expect fun deleteFeatureTable(geoPackage: GeoPackageCore, tableName: String)

Fully delete a features tableName: the user table together with its gpkg_geometry_columns row, gpkg_extensions rows and the NGA geometry-index tables (nga_geometry_index / nga_table_index). Delegates to NGA's GeoPackage.deleteTable — the tile-oriented GeoPackage.deleteEntry metadata cleanup does not cover feature content, so it must not be used to drop a features table.

actual fun deleteFeatureTable(geoPackage: GeoPackageCore, tableName: String)

Fully delete a features tableName: the user table together with its gpkg_geometry_columns row, gpkg_extensions rows and the NGA geometry-index tables (nga_geometry_index / nga_table_index). Delegates to NGA's GeoPackage.deleteTable — the tile-oriented GeoPackage.deleteEntry metadata cleanup does not cover feature content, so it must not be used to drop a features table.

Link copied to clipboard
actual fun deleteVanishedOwnedFeatures(geoPackage: GeoPackageCore, tableName: String, minX: Double, minY: Double, maxX: Double, maxY: Double, keepUids: Set<String>)

On a uid-keyed re-fetch, delete features the tile bbox [minX,minY,maxX,maxY] OWNS (geometry envelope-center inside the tile) whose uid is not in keepUids — i.e. genuinely vanished upstream. Queries through the platform spatial index (OGC RTree on JVM, NGA Geometry Index Extension on Android — Android's SQLite can't host the RTree) and deletes via the DAO so the index stays in sync. No-op when keepUids is empty.

expect fun deleteVanishedOwnedFeatures(geoPackage: GeoPackageCore, tableName: String, minX: Double, minY: Double, maxX: Double, maxY: Double, keepUids: Set<String>)

On a uid-keyed re-fetch, delete features the tile bbox [minX,minY,maxX,maxY] OWNS (geometry envelope-center inside the tile) whose uid is not in keepUids — i.e. genuinely vanished upstream. Queries through the platform spatial index (OGC RTree on JVM, NGA Geometry Index Extension on Android — Android's SQLite can't host the RTree) and deletes via the DAO so the index stays in sync. No-op when keepUids is empty.

actual fun deleteVanishedOwnedFeatures(geoPackage: GeoPackageCore, tableName: String, minX: Double, minY: Double, maxX: Double, maxY: Double, keepUids: Set<String>)

On a uid-keyed re-fetch, delete features the tile bbox [minX,minY,maxX,maxY] OWNS (geometry envelope-center inside the tile) whose uid is not in keepUids — i.e. genuinely vanished upstream. Queries through the platform spatial index (OGC RTree on JVM, NGA Geometry Index Extension on Android — Android's SQLite can't host the RTree) and deletes via the DAO so the index stays in sync. No-op when keepUids is empty.

Link copied to clipboard
actual fun featureIdsInBoundingBox(geoPackage: GeoPackageCore, tableName: String, minX: Double, minY: Double, maxX: Double, maxY: Double): List<Long>

Feature-row ids whose geometry intersects the bounding box, via the platform spatial index. Used by tile writes (bbox-replace) and overlap-safe eviction.

expect fun featureIdsInBoundingBox(geoPackage: GeoPackageCore, tableName: String, minX: Double, minY: Double, maxX: Double, maxY: Double): List<Long>

Feature-row ids whose geometry intersects the bounding box, via the platform spatial index. Used by tile writes (bbox-replace) and overlap-safe eviction.

actual fun featureIdsInBoundingBox(geoPackage: GeoPackageCore, tableName: String, minX: Double, minY: Double, maxX: Double, maxY: Double): List<Long>

Feature-row ids whose geometry intersects the bounding box, via the platform spatial index. Used by tile writes (bbox-replace) and overlap-safe eviction.

Link copied to clipboard

Serialize a foreign (non-WorldWind) features row's attribute columns into the flat JSON object that earth.worldwind.layer.source.CachedFeatureRow.properties carries, so external GeoPackage features (ArcGIS / QGIS exports) read into WorldWind with their attributes intact. WorldWind's own caches keep a single feature_properties JSON column and bypass this. Returns null for an attribute-less row (treated as an empty property map downstream).

Link copied to clipboard
actual fun insertCachedFeatures(geoPackage: GeoPackageCore, tableName: String, rows: List<Pair<Geometry, String?>>)
expect fun insertCachedFeatures(geoPackage: GeoPackageCore, tableName: String, rows: List<ERROR CLASS: Symbol not found for Pair<mil/nga/sf/Geometry, kotlin/String?>>)

Insert pre-built (geometry, propertiesJson) pairs into the WFS cache features table. Caller must hold an open transaction or accept per-row commits.

actual fun insertCachedFeatures(geoPackage: GeoPackageCore, tableName: String, rows: List<Pair<Geometry, String?>>)
Link copied to clipboard
actual fun openOrCreateGeoPackage(pathName: String, isReadOnly: Boolean): GeoPackageCore
expect fun openOrCreateGeoPackage(pathName: String, isReadOnly: Boolean): GeoPackageCore
actual fun openOrCreateGeoPackage(pathName: String, isReadOnly: Boolean): GeoPackageCore
Link copied to clipboard
actual fun readCachedFeaturesWithProperties(geoPackage: GeoPackageCore, tableName: String): List<ERROR CLASS: Symbol not found for Pair<mil/nga/sf/Geometry, kotlin/String?>>

Read cached features written by the WFS cache pipeline — each row carries a geometry plus a JSON string of the feature's original properties so callers can re-apply their styling logic on replay. Wraps the per-platform cursor-vs-iterable difference.

expect fun readCachedFeaturesWithProperties(geoPackage: GeoPackageCore, tableName: String): List<ERROR CLASS: Symbol not found for Pair<mil/nga/sf/Geometry, kotlin/String?>>

Read cached features written by the WFS cache pipeline — each row carries a geometry plus a JSON string of the feature's original properties so callers can re-apply their styling logic on replay. Wraps the per-platform cursor-vs-iterable difference.

actual fun readCachedFeaturesWithProperties(geoPackage: GeoPackageCore, tableName: String): List<ERROR CLASS: Symbol not found for Pair<mil/nga/sf/Geometry, kotlin/String?>>

Read cached features written by the WFS cache pipeline — each row carries a geometry plus a JSON string of the feature's original properties so callers can re-apply their styling logic on replay. Wraps the per-platform cursor-vs-iterable difference.

Link copied to clipboard
actual fun readFeaturesInBoundingBox(geoPackage: GeoPackageCore, tableName: String, minX: Double, minY: Double, maxX: Double, maxY: Double): List<ERROR CLASS: Symbol not found for Pair<mil/nga/sf/Geometry, kotlin/String?>>

Read every feature whose geometry intersects the bounding box (min/max lon/lat in the geometry column's SRS) via the RTree spatial index — the flat-store query that replaces tile_z/x/y filtering. Same (geometry, propertiesJson) shape and generic property handling as readCachedFeaturesWithProperties, so it serves WorldWind caches and foreign tables alike.

expect fun readFeaturesInBoundingBox(geoPackage: GeoPackageCore, tableName: String, minX: Double, minY: Double, maxX: Double, maxY: Double): List<ERROR CLASS: Symbol not found for Pair<mil/nga/sf/Geometry, kotlin/String?>>

Read every feature whose geometry intersects the bounding box (min/max lon/lat in the geometry column's SRS) via the RTree spatial index — the flat-store query that replaces tile_z/x/y filtering. Same (geometry, propertiesJson) shape and generic property handling as readCachedFeaturesWithProperties, so it serves WorldWind caches and foreign tables alike.

actual fun readFeaturesInBoundingBox(geoPackage: GeoPackageCore, tableName: String, minX: Double, minY: Double, maxX: Double, maxY: Double): List<ERROR CLASS: Symbol not found for Pair<mil/nga/sf/Geometry, kotlin/String?>>

Read every feature whose geometry intersects the bounding box (min/max lon/lat in the geometry column's SRS) via the RTree spatial index — the flat-store query that replaces tile_z/x/y filtering. Same (geometry, propertiesJson) shape and generic property handling as readCachedFeaturesWithProperties, so it serves WorldWind caches and foreign tables alike.

Link copied to clipboard
actual fun releaseFeatureReadResources(geoPackage: GeoPackageCore)

Drop all pooled read indices for a handle being closed (else the static pool pins the closed GeoPackage + its DAOs across open/close cycles). Called from GeoPackage.shutdown.

expect fun releaseFeatureReadResources(geoPackage: GeoPackageCore)

Release any per-handle feature-read resources cached by the platform read path (e.g. the Android per-table FeatureTableIndex cache) so a closed handle isn't pinned. Called from GeoPackage.shutdown.

actual fun releaseFeatureReadResources(geoPackage: GeoPackageCore)

No-op on JVM: the read path uses the OGC RTree extension per query and caches nothing per handle.

Link copied to clipboard
actual fun truncateFeatureTable(geoPackage: GeoPackageCore, tableName: String)

Wipe the WFS cache features table (delete all rows, keep schema). Implemented per platform because Android uses a different DAO truncation path.

expect fun truncateFeatureTable(geoPackage: GeoPackageCore, tableName: String)

Wipe the WFS cache features table (delete all rows, keep schema). Implemented per platform because Android uses a different DAO truncation path.

actual fun truncateFeatureTable(geoPackage: GeoPackageCore, tableName: String)

Wipe the WFS cache features table (delete all rows, keep schema). Implemented per platform because Android uses a different DAO truncation path.

Link copied to clipboard
actual fun writeFeatureTileFlat(geoPackage: GeoPackageCore, tableName: String, minX: Double, minY: Double, maxX: Double, maxY: Double, rows: List<GpkgFeatureRow>, upsertByUid: Boolean)

Write tile features into the flat store, within the geographic bounds (min/max lon-lat) that delimit the tile's region. When upsertByUid each row's GpkgFeatureRow.uid replaces any row with the same uid (DELETE-by-uid then INSERT); otherwise every feature intersecting the bbox is deleted first (bbox-replace). An empty rows just clears the bbox (negative-cache region). No tile_z/x/y or last_modified — those left with the flat schema.

expect fun writeFeatureTileFlat(geoPackage: GeoPackageCore, tableName: String, minX: Double, minY: Double, maxX: Double, maxY: Double, rows: List<GpkgFeatureRow>, upsertByUid: Boolean)

Write tile features into the flat store, within the geographic bounds (min/max lon-lat) that delimit the tile's region. When upsertByUid each row's GpkgFeatureRow.uid replaces any row with the same uid (DELETE-by-uid then INSERT); otherwise every feature intersecting the bbox is deleted first (bbox-replace). An empty rows just clears the bbox (negative-cache region). No tile_z/x/y or last_modified — those left with the flat schema.

actual fun writeFeatureTileFlat(geoPackage: GeoPackageCore, tableName: String, minX: Double, minY: Double, maxX: Double, maxY: Double, rows: List<GpkgFeatureRow>, upsertByUid: Boolean)

Write tile features into the flat store, within the geographic bounds (min/max lon-lat) that delimit the tile's region. When upsertByUid each row's GpkgFeatureRow.uid replaces any row with the same uid (DELETE-by-uid then INSERT); otherwise every feature intersecting the bbox is deleted first (bbox-replace). An empty rows just clears the bbox (negative-cache region). No tile_z/x/y or last_modified — those left with the flat schema.