Constructor
name
path
database
true if writable
Protected
Readonly
writableWritable GeoPackage flag
Add a GeoJSON feature to an existing GeoPackage feature table.
Adds a GeoJSON feature to an existing feature table
Adds a list of features to a FeatureTable, inserting them in batches and providing progress updates after each batch completes.
number of features inserted
GeoJSON features to add
name of the table that will store the feature
updates the FeatureTableIndex extension if it exists
how many features are inserted in a single transaction, progress is published after each batch is inserted. 1000 is recommended, 100 is about 25% slower, but provides more updates and keeps the thread open.
Optional
progress: GeoPackageProgressoptional progress function that is called after a batch of features has been processed. The number of features added is sent as an argument to that function.
Adds a tile to the GeoPackage
Byte array or Buffer containing the tile bytes
Table name to add the tile to
zoom level of this tile
row of this tile
column of this tile
Protected
copyProtected
copyProtected
copyCopy the table
table name
new table name
transfer content flag
extensions copy flag
Protected
copyProtected
copyCopy the user table
copied contents
table name
new table name
transfer user table content flag
true to validate
Create a new attributes table WARNING: only creates the attributes table, call #createAttributesTable(AttributesTableMetadata)) instead to create both the table and required GeoPackage metadata
attributes table
Create a new attributes table with GeoPackage metadata including: user attributes table and contents row.
attributes table
attributes table metadata
Create a new feature table WARNING: only creates the feature table, call #createFeatureTableWithMetadata) instead to create both the table and required GeoPackage metadata
feature table
Creates a FeatureTable with FeatureTableMetadata
feature table
Creates a FeatureTable with properties provided
feature table
Create a media table
Create a media table with media table metadata
Create a media table with a media table
Create a simple attributes table
Create a simple attributes table with a simple attributes table
Create a simple attributes table with media table metadata
Adds a spatial reference system to the gpkg_spatial_ref_sys table to be used by feature and tile tables.
Create the tables and rows necessary to store tiles in a TileMatrixSet.
This will create a [tile matrix row]TileMatrix
for every integral zoom level in the range [minZoom..maxZoom]
.
this
GeoPackage
Optional
tileSize: number = TileUtils.TILE_PIXELS_DEFAULToptional tile size in pixels
Create the tables and rows
necessary to store tiles according to the ubiquitous XYZ web/slippy-map tiles scheme.
The extent for the [contents table]Contents row,
contentsBoundingBox
, is informational only,
and need not match the [tile matrix set]TileMatrixSet
extent, tileMatrixSetBoundingBox
, which should be the precise bounding box
used to calculate the tile row and column coordinates of all tiles in the
tile set. The two SRS ID parameters, contentsSrsId
and tileMatrixSetSrsId
,
must match, however. See TileMatrixSet for
more information about how GeoPackage consumers use the bounding boxes for a
tile set.
the created TileMatrixSet object, or rejects with an Error
the name of the table that will store the tiles
the bounds stored in the [gpkg_contents
]Contents table row for the tile matrix set
the ID of a [spatial reference system]SpatialReferenceSystem; must match tileMatrixSetSrsId
the bounds stored in the [gpkg_tile_matrix_set
]TileMatrixSet table row
the ID of a [spatial reference system]SpatialReferenceSystem
for the tile matrix set table; must match contentsSrsId
the zoom level of the lowest resolution [tile matrix]TileMatrix in the tile matrix set
the zoom level of the highest resolution [tile matrix]TileMatrix in the tile matrix set
the width and height in pixels of the tile images; defaults to 256
Create the tables and rows necessary to store tiles in a TileMatrixSet.
This will create a [tile matrix row]TileMatrix
for every integral zoom level in the range [minZoom..maxZoom]
.
Create the tables and rows necessary to store tiles in a TileMatrixSet. This will create a [tile matrix row]TileMatrix for every item in the set zoomLevels.
Create the tables and rows
necessary to store tiles according to the ubiquitous XYZ web/slippy-map tiles scheme.
The extent for the [contents table]Contents row,
contentsBoundingBox
, is informational only,
and need not match the [tile matrix set]TileMatrixSet
extent, tileMatrixSetBoundingBox
, which should be the precise bounding box
used to calculate the tile row and column coordinates of all tiles in the
tile set. The two SRS ID parameters, contentsSrsId
and tileMatrixSetSrsId
,
must match, however. See TileMatrixSet for
more information about how GeoPackage consumers use the bounding boxes for a
tile set.
the created TileMatrixSet object, or rejects with an Error
make tileMatrixSetSrsId
optional because it always has to be the same anyway
the name of the table that will store the tiles
the bounds stored in the [gpkg_contents
]Contents table row for the tile matrix set
the ID of a [spatial reference system]SpatialReferenceSystem; must match tileMatrixSetSrsId
the bounds stored in the [gpkg_tile_matrix_set
]TileMatrixSet table row
the ID of a [spatial reference system]SpatialReferenceSystem
for the tile matrix set table; must match contentsSrsId
the zoom level of the lowest resolution [tile matrix]TileMatrix in the tile matrix set
the zoom level of the highest resolution [tile matrix]TileMatrix in the tile matrix set
the width and height in pixels of the tile images; defaults to 256
Adds row to tileMatrixDao
GeoPackage
Optional
tileSize: number = TileUtils.TILE_PIXELS_DEFAULTCreate a new tile table WARNING: only creates the tile table, call #createTileTableWithMetadata) instead to create both the table and required GeoPackage metadata
tile table
Create a new tile table with GeoPackage metadata including: tile matrix set table and row, tile matrix table, user tile table, and contents row.
tile table
tile table metadata
tile table name
bounding box of the contents table
srs id of the contents table
bounding box of the matrix set
srs id of the matrix set
Create a new user table
user table
Adds row to tileMatrixDao
GeoPackage
Optional
tileSize: number = TileUtils.TILE_PIXELS_DEFAULTGet the attributes dao
Get the attributes dao
Get the attributes dao
Get the bounding box from the contents for the table in the provided projection
bounding box
query flag, true to determine missing bounds manually
Gets the connection
Get the bounding box for all table contents in the provided projection
bounding box
desired bounding box projection
Get the bounding box from the contents for the table in the provided projection
bounding box
Get the Contents Dao
Get the contents id dao
Get the data columns dao
Get the data columns dao
Get the SQLite database
connection
Get the extended relations dao
Gets the extension manager
Returns the ExtensionsDao
Queries the table for a specific feature id
Get the feature table bounding box
Get the feature dao
Get the feature dao
Get the feature dao
Get the feature index manager for the provided feature table name or feature dao
Returns a feature tile
Gets the features in the EPSG:4326 bounding box
name of the feature table
EPSG:4326 western boundary
EPSG:4326 eastern boundary
EPSG:4326 southern boundary
EPSG:4326 northern boundary
Gets the features in the EPSG:3857 tile
name of the feature table
x tile number
y tile number
z tile number
Get the GeometryColumnsDao
Get the Geometry Index Dao
Get table info using TileDao or FeatureDao
Get Attributes associated with a particular row.
Get Features associated with a particular row.
Get Simple Attributes associated with a particular row.
Get the metadata reference dao
Get the metadata reference dao
Get related rows
Optional
typeFilter: RelationType[]Gets the related table extension
Get the Simple Attributes DAO
Get the SpatialReferenceSystemDao
Get the bounding box for all tables in the provided projection, using only table metadata
bounding box
desired bounding box projection
query flag, true to determine missing bounds manually
Get the Table Creator
tableCreator
Get the contents data type of the user table
table type or null if not an enumerated type
table name
Returns the TableIndexDao
Get the tables for the contents data type
tables
Optional
type: ContentsDataTypeGet the tables for the contents data types
tables
Get the tile dao with the provided TileMatrixSet
Gets a tile from the specified table
tile row
name of the table to get the tile from
zoom level of the tile
row of the tile
column of the tile
Get a Tile Matrix DAO
Tile Matrix DAO
Get a Tile Matrix Set DAO
Tile Matrix Set DAO
Returns the TileScalingDao
Get the tile scaling extension for a given table
Gets the tiles in the EPSG:4326 bounding box
name of the tile table
Zoom of the tiles to query for
EPSG:4326 western boundary
EPSG:4326 eastern boundary
EPSG:4326 southern boundary
EPSG:4326 northern boundary
Optional
east?: stringOptional
north?: stringOptional
south?: stringOptional
west?: stringOptional
zoom?: numberGets the tiles in the EPSG:4326 bounding box
name of the tile table
Zoom of the tiles to query for
EPSG:4326 western boundary
EPSG:4326 eastern boundary
EPSG:4326 southern boundary
EPSG:4326 northern boundary
Optional
east?: stringOptional
north?: stringOptional
south?: stringOptional
west?: stringOptional
zoom?: numberGet the contents for the data type
contents
Get the contents for the data types
contents
Get the UserCustomDao
Get the UserCustomDao
Index all feature tables
Optional
force: booleanOptional
progress: GeoPackageProgressIndex feature table
Optional
force: booleanOptional
progress: GeoPackageProgressCheck if the table is the provided type
result
Check if the table is one of the provided types
result
Links related rows together
relation type
Optional
mappingTable: string | UserMappingTablemapping table
Optional
mappingColumnValues: Record<string, any>column values
Draws a tile projected into the specified projection, bounded by the EPSG:4326 bounds into the canvas or the image is returned if no canvas is passed in.
name of the table containing the tiles
minimum latitude bounds of tile
minimum longitude bounds of tile
maximum latitude bounds of tile
maximum longitude bounds of tile
zoom level of the tile
project from tile's projection to this one.
width of the resulting tile
height of the resulting tile
Create the tables and rows
necessary to store tiles according to the ubiquitous XYZ web/slippy-map tiles scheme.
The extent for the [contents table]Contents row,
contentsBoundingBox
, is informational only,
and need not match the [tile matrix set]TileMatrixSet
extent, tileMatrixSetBoundingBox
, which should be the precise bounding box
used to calculate the tile row and column coordinates of all tiles in the
tile set.
a Promise
that resolves with the created TileMatrixSet object, or rejects with an Error
the name of the table that will store the tiles
the bounds stored in the [gpkg_contents
]Contents table row for the tile matrix set. MUST BE EPSG:3857
the bounds stored in the [gpkg_tile_matrix_set
]TileMatrixSet table row. MUST BE EPSG:3857
create tile of all resolutions in the set.
the width and height in pixels of the tile images; defaults to 256
Queries for features in a feature table
Feature Index Results
Table name to query
Optional
boundingBox: BoundingBoxBoundingBox to query
Query feature table and convert results to GeoJSON Features Note - unsupported geometry types will be omitted from the results.
Optional
boundingBox: BoundingBoxmust be in same projection as the feature table
Validate the GeoPackage
Get the standard 3857 XYZ tile from the GeoPackage.
name of the table containing the tiles
x index of the tile
y index of the tile
zoom level of the tile
width of the resulting tile
height of the resulting tile
Get the standard 3857 XYZ tile from the GeoPackage.
name of the table containing the tiles
x index of the tile
y index of the tile
zoom level of the tile
width of the resulting tile
height of the resulting tile
Optional
zoomIn: 2Optional
zoomOut: 2Static
enableChange the foreign keys state
previous foreign keys value
3.3.0
connection
true to turn on, false to turn off
Static
foreignPerform a foreign key check
empty list if valid or violation errors, 4 column values for each violation. see SQLite PRAGMA foreign_key_check
3.3.0
connection
Optional
tableName: stringtable name
Static
foreignStatic
foreignQuery for the foreign keys value
true if enabled, false if disabled
3.3.0
connection
Static
foreignStatic
integrityStatic
parseOptional
dataColumnsMap: Map<string, string>Static
quickGenerated using TypeDoc
A single GeoPackage database connection implementation