GeopackageDb class

A geopackage database.

@author Andrea Antonello (www.hydrologis.com)

Constructors

GeopackageDb(String? _dbPath)
GeopackageDb.memory()

Properties

doRtreeTestCheck bool
getter/setter pair
forceRasterMobileCompatibility bool
getter/setter pair
forceVectorMobileCompatibility bool
If true, this forces vector or raster mobile compatibility, which means that:
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportsSpatialIndex bool
no setter
version String?
no setter

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.
getGeometryColumnNameAndSridForTable(TableName tableName) Future<List?>
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}) → FeatureCollection
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 nonexistent 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 Methods

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