features method

List<FeatureEntry> features()

Lists all the feature entries in the geopackage. */

Implementation

List<FeatureEntry> features() {
  String compat =
      forceVectorMobileCompatibility ? "and c.srs_id = $WGS84LL_SRID" : "";
  String sql = """
      SELECT a.*, b.column_name, b.geometry_type_name, b.z, b.m, c.organization_coordsys_id, c.definition
      FROM $TABLE_GEOPACKAGE_CONTENTS a, $TABLE_GEOMETRY_COLUMNS b, $TABLE_SPATIAL_REF_SYS c WHERE a.table_name = b.table_name
      AND a.srs_id = c.srs_id AND a.data_type = ? $compat
      """
      .trim();
  var res = _sqliteDb.select(sql, [DataType.Feature.value]);

  List<FeatureEntry> contents = [];
  res.forEach((QueryResultRow row) {
    contents.add(createFeatureEntry(row));
  });

  return contents;
}