try { ps.setString(1, name); ps.setString(2, DataType.Tile.value());
ps.setString(1, DataType.Tile.value());
try { ps.setString(1, name); ps.setString(2, DataType.Tile.value());
ps.setString(2, DataType.Feature.value());
/** 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); } }
ps.setString(2, DataType.Feature.value());
ps.setString(1, DataType.Tile.value());
/** 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); } }