Key classes
AttributesDao
The primary access object for an attributes table. Obtained from
geoPackage.getAttributesDao(tableName). Provides standard query, insert, update, and delete methods inherited from UserDao.AttributesRow
Represents a single row in an attributes table. Use
getValue(columnName) to read typed column values.AttributesDao does not support getBoundingBox() — calling it throws an exception because attributes tables have no spatial extent.When to use attributes tables
Use attributes tables when your data is not geometric:| Scenario | Recommended table type |
|---|---|
| Building footprints with address and floor count | Feature table (has geometry) |
| Lookup table of land-use codes and descriptions | Attributes table (no geometry) |
| Per-layer metadata records | Attributes table |
| Sensor readings linked to locations via Related Tables | Attributes table |
Example
Column access
Attributes columns are typed usingGeoPackageDataType (TEXT, INTEGER, REAL, BLOB, etc.). Column metadata is available via the AttributesTable returned by attributesDao.getTable():