Key classes
FeatureDao
The primary access object for a feature table. Obtained from
geoPackage.getFeatureDao(tableName). Use it to query, insert, update, and delete rows.FeatureRow
Represents a single feature returned by a query. Provides typed accessors for geometry and attribute columns.
FeatureTable
Describes the schema of the feature table: its columns, geometry column name, and geometry type constraint.
FeatureColumn
Describes a single column — its name, data type, and whether it is the geometry column.
Geometry types
GeoPackage features use the geometry types defined by the OGC Simple Features standard, implemented in@ngageoint/simple-features-js:
Point/MultiPointLineString/MultiLineStringPolygon/MultiPolygonGeometryCollectionCircularString,CompoundCurve,CurvePolygon,PolyhedralSurface,TIN,Triangle(extended types)
FeatureRow is stored as GeoPackageGeometryData, a wrapper that holds the raw geometry bytes along with an optional envelope and SRS id. Call .getGeometry() to retrieve the GeoPackageGeometryData, then .getGeometryValue() for the typed Geometry object.
Getting a FeatureDao
Iterating features
Query all rows withqueryForAll(), which returns a FeatureResultSet. Always close the result set after use.
Reading geometry from a FeatureRow
GeoJSON output
The library can convert feature query results directly to GeoJSON. UsegeoPackage.queryForGeoJSONFeatures() to get a result set that yields GeoJSON Feature objects.
Spatial reference system
FeatureDao resolves the SRS from the GeometryColumns metadata on construction and exposes it as a Projection. Use featureDao.getBoundingBox() to get the extent in the native projection, or featureDao.getBoundingBoxWithProjection(projection) to reproject it.