Skip to content

Commit 660e77e

Browse files
committed
fix(core): fix bbox when building item
1 parent 5e27c4e commit 660e77e

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

core/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ gdal-sys = { version = "0.10", optional = true }
4444
geo = { version = "0.28", optional = true }
4545
geo-types = { version = "0.7", optional = true }
4646
geoarrow = { version = "0.3.0-beta.3", optional = true }
47-
geojson = { version = "0.24" }
48-
log = { version = "0.4" }
47+
geojson = "0.24"
48+
log = "0.4"
4949
mime = "0.3"
5050
parquet = { version = "52", default-features = false, optional = true }
5151
reqwest = { version = "0.12", optional = true, features = ["json", "blocking"] }

core/src/gdal.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,17 @@ pub fn update_item(
3131
force_statistics: bool,
3232
is_approx_statistics_ok: bool,
3333
) -> Result<()> {
34+
log::debug!(
35+
"updating item={} with force_statistics={} and is_approx_statistics_ok={}",
36+
item.id,
37+
force_statistics,
38+
is_approx_statistics_ok
39+
);
3440
gdal::config::set_error_handler(|err, code, msg| log::warn!("{:?} ({}): {}", err, code, msg));
3541
let mut has_raster = false;
3642
let mut has_projection = false;
3743
let mut projections = Vec::new();
38-
let mut bbox = Bbox::default(); // TODO support 2D
44+
let mut bbox = Bbox::new(180., 90., -180., 90.); // Intentionally invalid bbox so the first update always takes
3945
for asset in item.assets.values_mut() {
4046
update_asset(asset, force_statistics, is_approx_statistics_ok)?;
4147
if let Some(projection) = asset.extension::<Projection>()? {

0 commit comments

Comments
 (0)