apache / sedona

A cluster computing framework for processing large-scale geospatial data

Home Page:https://sedona.apache.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ST_SubDivide (Snowflake) fails even on documentation example

andreypanchenko opened this issue · comments

Expected behavior

SELECT ST_SubDivide(ST_GeomFromText('POLYGON((35 10, 45 45, 15 40, 10 20, 35 10), (20 30, 35 35, 30 20, 20 30))'), 5)

==============================================================================================
MULTILINESTRING ((0 0, 5 5), (5 5, 10 10), (10 10, 21 21), (21 21, 60 60), (60 60, 85 85), (85 85, 100 100), (100 100, 120 120))

doc_example

Actual behavior

image

Steps to reproduce the problem

https://sedona.apache.org/1.5.1/setup/snowflake/install/
sedona-snowflake-1.5.1.jar: Sedona's Maven Central repository
geotools-wrapper-1.5.1-28.2.jar: GeoTools-wrapper's Maven Central repository

java -jar sedona-snowflake-1.5.1.jar --geotools-version 1.5.1-28.2 > sedona-snowflake.sql

Settings

Sedona version = 1.5.1

Environment = Snowflake
SEDONA-519

@andreypanchenko Thanks for reporting this. Do you have other Java-based UDF or jars used in the same warehouse?

@jiayuasu
Hi. This exactly from sedona schema as mentioned in guide. Any other java UDfs at all.

@jiayuasu
I really keen to use this feature. What additional info I can provide to u?

@jiayuasu btw the same issue when I tried to call this function from snowflake store application snowsedona

This is caused by dependency changes of geotools-wrapper-1.5.1-28.2.jar, Apache commons-lang3 was removed from the geotools-wrapper jar, and it is required by ST_SubDivide function, thus caused this problem. I am already working on a fix for this (see #1290 and wherobots#20).

You can also try replacing geotools-wrapper-1.5.1-28.2.jar with geotools-wrapper-1.5.0-28.2.jar to workaround this issue.

@andreypanchenko You can download the geotools-wrapper-1.5.0-28.2.jar here and replace the current geotools-wrapper jar in your Snowflake stage.

@andreypanchenko The SedonaSnow app on Snowflake marketplace is now pending approval. Once that is done, we will release it to your account automatically. Will keep you posted.

@andreypanchenko You can download the geotools-wrapper-1.5.0-28.2.jar here and replace the current geotools-wrapper jar in your Snowflake stage.

@jiayuasu
It's working, thank you!