/** Lists all the feature entries in the geopackage. */ public List<FeatureEntry> features() throws IOException { try { try (Connection cx = connPool.getConnection()) { List<FeatureEntry> entries = new ArrayList(); String sql = format( "SELECT a.*, b.column_name, b.geometry_type_name, b.z, b.m, c.organization_coordsys_id, c.definition" + " FROM %s a, %s b, %s c" + " WHERE a.table_name = b.table_name" + " AND a.srs_id = c.srs_id" + " AND a.data_type = ?", GEOPACKAGE_CONTENTS, GEOMETRY_COLUMNS, SPATIAL_REF_SYS); try (PreparedStatement ps = cx.prepareStatement(sql)) { ps.setString(1, DataType.Feature.value()); try (ResultSet rs = ps.executeQuery()) { while (rs.next()) { entries.add(createFeatureEntry(rs)); } } } return entries; } } catch (SQLException e) { throw new IOException(e); } }
return createFeatureEntry(rs);
switch (type) { case Feature: e = createFeatureEntry(rs); break; case Tile:
/** Lists all the feature entries in the geopackage. */ public List<FeatureEntry> features() throws IOException { try { try (Connection cx = connPool.getConnection()) { List<FeatureEntry> entries = new ArrayList(); String sql = format( "SELECT a.*, b.column_name, b.geometry_type_name, b.z, b.m, c.organization_coordsys_id, c.definition" + " FROM %s a, %s b, %s c" + " WHERE a.table_name = b.table_name" + " AND a.srs_id = c.srs_id" + " AND a.data_type = ?", GEOPACKAGE_CONTENTS, GEOMETRY_COLUMNS, SPATIAL_REF_SYS); try (PreparedStatement ps = cx.prepareStatement(sql)) { ps.setString(1, DataType.Feature.value()); try (ResultSet rs = ps.executeQuery()) { while (rs.next()) { entries.add(createFeatureEntry(rs)); } } } return entries; } } catch (SQLException e) { throw new IOException(e); } }
return createFeatureEntry(rs);
switch (type) { case Feature: e = createFeatureEntry(rs); break; case Tile: