GeopackageDb class Null safety

A geopackage database.

@author Andrea Antonello (www.hydrologis.com)

Constructors

GeopackageDb(String? _dbPath)
GeopackageDb.memory()

Properties

doRtreeTestCheck bool
read / write
forceRasterMobileCompatibility bool
read / write
forceVectorMobileCompatibility bool
If true, this forces vector or raster mobile compatibility, which means that:
read / write
hashCode int
The hash code for this object.
read-onlyoverride
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
supportsSpatialIndex bool
read-only
version String?
read-only

Methods

addCRS(int srid, String srsName, String organization, int organizationCoordSysId, String definition, String description) → void
addCRSSimple(String auth, int srid, String wkt) → void
Adds a crs to the geopackage, registering it in the spatial_ref_sys table.
addDefaultSpatialReferences() → void
addGeometryColumnsEntry(TableName tableName, String geometryName, String geometryType, int srid, bool hasZ, bool hasM) → void
addGeometryXYColumnAndIndex(TableName tableName, String geomColName, String geomType, String epsg) → void
addGeoPackageContentsEntry(TableName tableName, int srid, String? description, Envelope? crsBounds) → void
checkStyleTable() → void
close() → void
createFeatureEntry(QueryResultRow rs) FeatureEntry
createFunctions() → void
createSpatialIndex(TableName tableName, String geometryName) → void
Create a spatial index
createSpatialTable(TableName tableName, int tableSrid, String geometryFieldData, List<String> fieldData, List<String>? foreignKeys, bool avoidIndex) → void
createTileEntry(QueryResultRow row) TileEntry
execute(String sql, {List? arguments, bool getLastInsertId = false}) int?
Execute a insert, update or delete using sql in normal or prepared mode using arguments.
feature(TableName name) FeatureEntry?
Looks up a feature entry by name.
features() List<FeatureEntry>
Lists all the feature entries in the geopackage. */
geometryToSql(Geometry geom) → dynamic
getBasicStyle(TableName tableName) BasicStyle
Get the basic style for a table.
getGeometriesIn(TableName tableName, {Envelope? envelope, Geometry? intersectionGeometry, List<String?>? prePostWhere, int limit = -1, String? userDataField}) List<Geometry?>
Get the geometries of a table inside a given envelope.
getGeometriesIntersecting(TableName tableName, {Geometry? geometry, List<String>? prePostWhere, int limit = -1, String? userDataField}) List<Geometry?>
Get the geometries of a tableName intersecting a given geometry.
getGeometryColumnsForTable(TableName tableName) GeometryColumn?
getPrimaryKey(TableName tableName) String?
getSld(TableName tableName) String?
Get the SLD xml for a given table.
getSpatialindexBBoxWherePiece(TableName tableName, String? alias, double x1, double y1, double x2, double y2) String?
getSpatialindexGeometryWherePiece(TableName tableName, String? alias, Geometry geometry) String?
getSpatialIndexName(FeatureEntry feature) String
getTableBounds(TableName tableName) Envelope
getTableColumns(TableName tableName) List<List>
Get the tableName columns as array of name, type, isPrimaryKey, notnull.
getTableData(TableName tableName, {Envelope? envelope, Geometry? geometry, String? where, int? limit}) GPQueryResult
getTables(bool doOrder) List<TableName>
getTablesMap(bool doOrder) Map<String, List<String>>
getTile(TableName tableName, int tx, int ty, int zoom) List<int>?
Get a Tile's image bytes from the database for a given table.
getTileDirect(TableName tableName, int tx, int ty, int zoom) List<int>?
getTileZoomLevelsWithData(TableName tableName) List<int>
Get the list of zoomlevels that contain data.
hasCrs(int srid) bool
hasSpatialIndex(TableName table) bool
Verifies if a spatial index is present
hasTable(TableName tableName) bool
isOpen() bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
openOrCreate({Function? dbCreateFunction}) → dynamic
select(String sql) QueryResult
tile(TableName name) TileEntry?
Looks up a tile entry by name.
tiles() List<TileEntry>
Lists all the tile entries in the geopackage. */
toString() String
A string representation of this object.
inherited
updateMap(TableName table, Map<String, dynamic> values, String where) int?
Update a new record using a map and a where condition.
updateSld(TableName tableName, String sldString) → void
Update the sld string in the geopackage

Operators

operator ==(Object other) bool
The equality operator.
override

Static Properties

ISO8601_TS_FORMATTER DateFormat
An ISO8601 date formatter (yyyy-MM-dd HH:mm:ss).
final

Static Methods

osmTile2TmsTile(int tx, int ty, int zoom) List<int>
Converts Osm slippy map tile coordinates to TMS Tile coordinates.

Constants

COL_TILES_TILE_COLUMN → const String
"tile_column"
COL_TILES_TILE_DATA → const String
"tile_data"
COL_TILES_TILE_ROW → const String
"tile_row"
COL_TILES_ZOOM_LEVEL → const String
"zoom_level"
DATE_FORMAT_STRING → const String
"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
HM_STYLES_TABLE → const String
"hm_styles"
MERCATOR_SRID → const int
3857
SELECTQUERY_POST → const String
" where $COL_TILES_ZOOM_LEVEL=? AND $COL_TILES_TILE_COLUMN=? AND $COL_TILES_TILE_ROW=?"
SELECTQUERY_PRE → const String
"SELECT $COL_TILES_TILE_DATA from "
WGS84LL_SRID → const int
4326