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 c4ad8c93 chore(rust/sedona-functions): Make ST_Transform not accept 
geography (#478)
c4ad8c93 is described below

commit c4ad8c9386b10e4b785d0ea99d36dc4ff56937e3
Author: Hiroaki Yutani <[email protected]>
AuthorDate: Mon Jan 5 11:35:02 2026 +0900

    chore(rust/sedona-functions): Make ST_Transform not accept geography (#478)
---
 c/sedona-proj/src/st_transform.rs         |  2 +-
 rust/sedona-functions/src/st_transform.rs | 11 ++++-------
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/c/sedona-proj/src/st_transform.rs 
b/c/sedona-proj/src/st_transform.rs
index b97939f6..c87fb5d5 100644
--- a/c/sedona-proj/src/st_transform.rs
+++ b/c/sedona-proj/src/st_transform.rs
@@ -159,7 +159,7 @@ impl SedonaScalarKernel for STTransform {
     ) -> Result<Option<SedonaType>> {
         let matcher = ArgMatcher::new(
             vec![
-                ArgMatcher::is_geometry_or_geography(),
+                ArgMatcher::is_geometry(),
                 ArgMatcher::or(vec![ArgMatcher::is_numeric(), 
ArgMatcher::is_string()]),
                 ArgMatcher::optional(ArgMatcher::or(vec![
                     ArgMatcher::is_numeric(),
diff --git a/rust/sedona-functions/src/st_transform.rs 
b/rust/sedona-functions/src/st_transform.rs
index d028db6e..dab708ba 100644
--- a/rust/sedona-functions/src/st_transform.rs
+++ b/rust/sedona-functions/src/st_transform.rs
@@ -18,10 +18,7 @@ use std::vec;
 
 use datafusion_expr::{scalar_doc_sections::DOC_SECTION_OTHER, Documentation, 
Volatility};
 use sedona_expr::scalar_udf::SedonaScalarUDF;
-use sedona_schema::{
-    datatypes::{Edges, SedonaType},
-    matchers::ArgMatcher,
-};
+use sedona_schema::{datatypes::WKB_GEOMETRY, matchers::ArgMatcher};
 
 /// St_Transform() UDF implementation
 ///
@@ -31,7 +28,7 @@ pub fn st_transform_udf() -> SedonaScalarUDF {
         "st_transform",
         ArgMatcher::new(
             vec![
-                ArgMatcher::is_geometry_or_geography(),
+                ArgMatcher::is_geometry(),
                 ArgMatcher::or(vec![ArgMatcher::is_string(), 
ArgMatcher::is_numeric()]),
                 ArgMatcher::optional(ArgMatcher::or(vec![
                     ArgMatcher::is_string(),
@@ -39,7 +36,7 @@ pub fn st_transform_udf() -> SedonaScalarUDF {
                 ])),
                 ArgMatcher::optional(ArgMatcher::is_boolean()),
             ],
-            SedonaType::Wkb(Edges::Planar, None),
+            WKB_GEOMETRY,
         ),
         Volatility::Immutable,
         Some(st_transform_doc()),
@@ -68,7 +65,7 @@ CRS format
 
 You can use any string accepted by PROJ to specify a CRS (e.g., PROJJSON, 
WKT1/2, authority/code in the form authority:code).
 ","ST_Transform (A: Geometry, SourceCRS: String, TargetCRS: String)")
-        .with_argument("geom", "geometry: Input geometry or geography")
+        .with_argument("geom", "geometry: Input geometry")
         .with_argument("source_crs", "string: Source CRS code or WKT")
         .with_argument("target_crs", "string: Target CRS code or WKT")
         .with_argument("lenient", "boolean: If true, assumes the geometry uses 
EPSG:4326 when source_crs is not specified. Defaults to true.")

Reply via email to