Skip to content

Commit

Permalink
Skip features with empty geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
pka committed Oct 28, 2023
1 parent 511c699 commit f043548
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bbox-tile-server/src/tilesource/postgis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,12 @@ impl TileRead for PgSource {
let mut cnt = 0;
let query_limit = layer.query_limit.unwrap_or(0);
while let Some(row) = rows.try_next().await? {
let wkb: wkb::Ewkb = row.try_get(layer.geometry_field.as_str())?;
let Some(wkb) =
row.try_get::<Option<wkb::Ewkb>, _>(layer.geometry_field.as_str())?
else {
// Skip NULL geometries
continue;
};
let mut feat = if layer.tile_coord_sys {
wkb.to_mvt_unscaled()?
} else {
Expand Down

0 comments on commit f043548

Please sign in to comment.