You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sedona.apache.org by pa...@apache.org on 2026/09/01 02:32:47 UTC

(sedona-db) branch main updated: chore(deps): bump las from 0.9.10 to 0.11.1 (#1200)

This is an automated email from the ASF dual-hosted git repository.

paleolimbot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/sedona-db.git


The following commit(s) were added to refs/heads/main by this push:
     new 0979971da chore(deps): bump las from 0.9.10 to 0.11.1 (#1200)
0979971da is described below

commit 0979971da0de47802430eca30d6415983881cbd6
Author: dependabot[bot] <49...@users.noreply.github.com>
AuthorDate: Mon Aug 31 21:32:42 2026 -0500

    chore(deps): bump las from 0.9.10 to 0.11.1 (#1200)
    
    Signed-off-by: dependabot[bot] <su...@github.com>
    Co-authored-by: dependabot[bot] <49...@users.noreply.github.com>
    Co-authored-by: Dewey Dunnington <de...@wherobots.com>
---
 Cargo.lock                               | 32 +++++++++++++++++++++++---------
 rust/sedona-pointcloud/Cargo.toml        |  6 +++---
 rust/sedona-pointcloud/src/las/schema.rs | 26 ++++++++++++++++++--------
 3 files changed, 44 insertions(+), 20 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index 94d8802ef..d2134b68a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3881,7 +3881,7 @@ dependencies = [
  "portable-atomic",
  "portable-atomic-util",
  "serde_core",
- "windows-sys 0.52.0",
+ "windows-sys 0.61.2",
 ]
 
 [[package]]
@@ -3932,9 +3932,23 @@ dependencies = [
 
 [[package]]
 name = "las"
-version = "0.9.10"
+version = "0.9.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "501d35a98a0bf1e7d30cd61899741af22f853110021be78175926cc870a39dfd"
+checksum = "48c2594be0d2ec4f04c944f5cb5160625cd1a69451db14de73b990065f97fb84"
+dependencies = [
+ "byteorder",
+ "chrono",
+ "log",
+ "num-traits",
+ "thiserror 2.0.17",
+ "uuid",
+]
+
+[[package]]
+name = "las"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "987ee68552c50b61259b693e8b4f57b948990754d9ac401ea33cf392b551a018"
 dependencies = [
  "byteorder",
  "chrono",
@@ -3947,20 +3961,20 @@ dependencies = [
 
 [[package]]
 name = "las-crs"
-version = "1.0.0"
+version = "1.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b25b1e192564ebf5b563e821c4924ce97bd703f445e851117db2e656499c21c"
+checksum = "249568d517d0dcf0581d1c8241b05cd76559ec1c01e5ded1878645d158cdf594"
 dependencies = [
- "las",
+ "las 0.9.11",
  "log",
  "thiserror 2.0.17",
 ]
 
 [[package]]
 name = "laz"
-version = "0.12.0"
+version = "0.13.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7390b35d7f7e1f22bdbe5ef4e19a4b9f8ba44927cb55d267e42cafc180fca48c"
+checksum = "5a1bd8242fad6a61a7520b73d072ddf63dff1f3680e3f5c157b1dc6e8e5ab2ec"
 dependencies = [
  "byteorder",
  "num-traits",
@@ -6111,7 +6125,7 @@ dependencies = [
  "futures",
  "geoarrow-array",
  "geoarrow-schema",
- "las",
+ "las 0.11.1",
  "las-crs",
  "laz",
  "object_store",
diff --git a/rust/sedona-pointcloud/Cargo.toml b/rust/sedona-pointcloud/Cargo.toml
index b34b77b39..869a8e50e 100644
--- a/rust/sedona-pointcloud/Cargo.toml
+++ b/rust/sedona-pointcloud/Cargo.toml
@@ -48,9 +48,9 @@ datafusion-pruning = { workspace = true }
 futures = { workspace = true }
 geoarrow-array = { version = "0.7.0" }
 geoarrow-schema = { version = "0.7.0" }
-las = { version = "0.9.10", features = ["laz"] }
-las-crs = { version = "1.0.0" }
-laz = "0.12.0"
+las = { version = "0.11.1", features = ["laz"] }
+las-crs = { version = "1.1.0" }
+laz = "0.13.0"
 object_store = { workspace = true }
 rayon = "1.12.0"
 sedona-expr = { workspace = true }
diff --git a/rust/sedona-pointcloud/src/las/schema.rs b/rust/sedona-pointcloud/src/las/schema.rs
index f6e799fce..dcc01acad 100644
--- a/rust/sedona-pointcloud/src/las/schema.rs
+++ b/rust/sedona-pointcloud/src/las/schema.rs
@@ -20,7 +20,7 @@ use std::sync::Arc;
 use arrow_schema::{ArrowError, DataType, Field, Schema};
 use geoarrow_schema::{CoordType, Crs, Dimension, Metadata, PointType, WkbType};
 use las::Header;
-use las_crs::{get_epsg_from_geotiff_crs, get_epsg_from_wkt_crs_bytes};
+use las_crs::EPSG_RANGE;
 
 use crate::las::options::{GeometryEncoding, LasExtraBytes};
 
@@ -30,21 +30,21 @@ pub fn try_schema_from_header(
     geometry_encoding: GeometryEncoding,
     extra_bytes: LasExtraBytes,
 ) -> Result<Schema, ArrowError> {
-    let epsg_crs = if header.has_wkt_crs() {
+    let crs = if header.has_wkt_crs() {
         header
             .get_wkt_crs_bytes()
-            .and_then(|bytes| get_epsg_from_wkt_crs_bytes(bytes).ok())
+            .and_then(|bytes| std::str::from_utf8(bytes).ok())
+            .map(|wkt| Crs::from_wkt2_2019(wkt.trim_end_matches('\0').to_string()))
+            .unwrap_or_default()
     } else {
         header
             .get_geotiff_crs()
-            .map(|gtc| gtc.and_then(|gtc| get_epsg_from_geotiff_crs(&gtc).ok()))
+            .map(|gtc| gtc.and_then(|gtc| get_epsg_from_geotiff_crs(&gtc)))
+            .unwrap_or_default()
+            .map(|epsg_code| Crs::from_authority_code(format!("EPSG:{epsg_code}")))
             .unwrap_or_default()
     };
 
-    let crs = epsg_crs
-        .map(|epsg_crs| Crs::from_authority_code(format!("EPSG:{}", epsg_crs.get_horizontal())))
-        .unwrap_or_default();
-
     let mut fields = match geometry_encoding {
         GeometryEncoding::Plain => vec![
             Field::new("x", DataType::Float64, false),
@@ -107,6 +107,16 @@ pub fn try_schema_from_header(
     Ok(Schema::new(fields))
 }
 
+fn get_epsg_from_geotiff_crs(geotiff_crs: &las::crs::GeoTiffCrs) -> Option<u16> {
+    let epsg_code = match geotiff_crs.get_gt_model_type_geo_key_value()? {
+        1 => geotiff_crs.get_projected_crs_geo_key_value(),
+        2 | 3 => geotiff_crs.get_geodetic_crs_geo_key_value(),
+        _ => None,
+    }?;
+
+    EPSG_RANGE.contains(&epsg_code).then_some(epsg_code)
+}
+
 fn extra_bytes_fields(header: &Header) -> Result<Vec<Field>, ArrowError> {
     let mut fields = Vec::new();