[jira] [Commented] (SEDONA-307) splitLines not splitting always correctly

2023-06-20 Thread Doug Dennis (Jira)


[ 
https://issues.apache.org/jira/browse/SEDONA-307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17735532#comment-17735532
 ] 

Doug Dennis commented on SEDONA-307:


I have some work done on this by creating a more restrictive version of 
splitLinesByPoints that snaps the points to the line. However, I'm still 
investigating if there is a better way to do this using a function in JTS.

> splitLines not splitting always correctly
> -
>
> Key: SEDONA-307
> URL: https://issues.apache.org/jira/browse/SEDONA-307
> Project: Apache Sedona
>  Issue Type: Bug
>Reporter: Doug Dennis
>Priority: Major
>
> In certain situations, the splitLines method does not correctly split a line. 
> The following geometry should result in a split line, however splitLines 
> returns a single line geometry:
> target geometry = "LINESTRING (-8.961173822708158 -3.93776773106963, 
> -8.08908227533288 -3.8845245068873444)"
> blade geometry = "POLYGON ((-6.318936372442209 -6.44985859539768, 
> -8.669092633645995 -3.0659222341103956, -6.264600073171498 
> -3.075347218794894, -5.3654318906014495 -3.1019726170919877, 
> -5.488002156793005 -5.892626167859213, -6.318936372442209 -6.44985859539768))"



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (SEDONA-307) splitLines not splitting always correctly

2023-06-20 Thread Doug Dennis (Jira)
Doug Dennis created SEDONA-307:
--

 Summary: splitLines not splitting always correctly
 Key: SEDONA-307
 URL: https://issues.apache.org/jira/browse/SEDONA-307
 Project: Apache Sedona
  Issue Type: Bug
Reporter: Doug Dennis


In certain situations, the splitLines method does not correctly split a line. 
The following geometry should result in a split line, however splitLines 
returns a single line geometry:

target geometry = "LINESTRING (-8.961173822708158 -3.93776773106963, 
-8.08908227533288 -3.8845245068873444)"

blade geometry = "POLYGON ((-6.318936372442209 -6.44985859539768, 
-8.669092633645995 -3.0659222341103956, -6.264600073171498 -3.075347218794894, 
-5.3654318906014495 -3.1019726170919877, -5.488002156793005 -5.892626167859213, 
-6.318936372442209 -6.44985859539768))"



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [sedona] jiayuasu merged pull request #865: [DOCS] Remove the DISCLAIMER step from the checklist for votes

2023-06-20 Thread via GitHub


jiayuasu merged PR #865:
URL: https://github.com/apache/sedona/pull/865


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sedona.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [sedona] Kontinuation opened a new pull request, #865: [DOCS] Remove the DISCLAIMER step from the checklist for votes

2023-06-20 Thread via GitHub


Kontinuation opened a new pull request, #865:
URL: https://github.com/apache/sedona/pull/865

   ## Did you read the Contributor Guide?
   
   - Yes, I have read [Contributor 
Rules](https://sedona.apache.org/latest-snapshot/community/rule/) and 
[Contributor Development 
Guide](https://sedona.apache.org/latest-snapshot/community/develop/)
   
   ## Is this PR related to a JIRA ticket?
   
   - No, this is a documentation update. The PR name follows the format `[DOCS] 
my subject`.
   
   ## What changes were proposed in this PR?
   
   Remove the DISCLAIMER step from the checklist for votes.
   
   ## How was this patch tested?
   
   N/A
   
   ## Did this PR include necessary documentation updates?
   
   - Yes, I have updated the documentation update.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sedona.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[VOTE] Release Apache Sedona 1.4.1-rc1

2023-06-20 Thread Kristin Cowalcijk
Hi all,

This is a call for vote on Apache Sedona 1.4.1-rc1.

Release notes:
https://github.com/apache/sedona/blob/sedona-1.4.1-rc1/docs/setup/release-notes.md

Build instructions:
https://github.com/apache/sedona/blob/sedona-1.4.1-rc1/docs/setup/compile.md

GitHub tag:
https://github.com/apache/sedona/releases/tag/sedona-1.4.1-rc1

GPG public key to verify the Release:
https://downloads.apache.org/sedona/KEYS

Source code and binaries:
https://dist.apache.org/repos/dist/dev/sedona/1.4.1-rc1/

The vote will be open for at least 72 hours or until at least 3 "+1"
PMC votes are cast

Instruction for checking items on the checklist:
https://sedona.apache.org/community/vote/

We recommend you use this Jupyter notebook on MyBinder to perform this
task: 
https://mybinder.org/v2/gh/jiayuasu/sedona-tools/HEAD?labpath=binder%2Fverify-release.ipynb

**Please vote accordingly and you must provide your checklist for your vote**.


[ ] +1 approve

[ ] +0 no opinion

[ ] -1 disapprove with the reason

Checklist:

[ ] Download links are valid.

[ ] Checksums and PGP signatures are valid.

[ ] DISCLAIMER is included.

[ ] Source code artifacts have correct names matching the current release.

For a detailed checklist  please refer to:
https://cwiki.apache.org/confluence/display/INCUBATOR/Incubator+Release+Checklist

Thanks,
Kristin


[GitHub] [sedona] Kontinuation commented on a diff in pull request #864: [SEDONA-306] Prepare release 1.4.1

2023-06-20 Thread via GitHub


Kontinuation commented on code in PR #864:
URL: https://github.com/apache/sedona/pull/864#discussion_r1236024585


##
docs/setup/release-notes.md:
##
@@ -4,6 +4,117 @@
 !!!danger
Sedona Python currently only works with Shapely 1.x. If you use 
GeoPandas, please use <= GeoPandas `0.11.1`. GeoPandas > 0.11.1 will 
automatically install Shapely 2.0. If you use Shapely, please use <= `1.8.4`.
 
+## Sedona 1.4.1
+
+Sedona 1.4.1 is compiled against, Spark 3.3 / Spark 3.4 / Flink 1.12, Java 8.
+
+### Highlights
+
+* [X] **Sedona Spark** More raster functions and bridge RasterUDT and Map 
Algebra operators. See [Raster based 
operators](../../api/sql/Raster-operators/#raster-based-operators) and [Raster 
to Map Algebra 
operators](../../api/sql/Raster-operators/#raster-to-map-algebra-operators).
+* [X] **Sedona Spark & Flink** Added geodesic / geography functions:
+* ST_DistanceSphere
+* ST_DistanceSpheroid
+* ST_AreaSpheroid
+* ST_LengthSpheroid
+* [X] **Sedona Spark & Flink** Introduced `SedonaContext` to unify Sedona 
entry points.
+* [X] **Sedona Spark** Support Spark 3.4.
+* [X] **Sedona Spark** Added a number of new ST functions.
+* [X] **Zeppelin** Zeppelin helium plugin supports ploting geometries like 
linestring, polygon.
+
+### API change
+
+* **Sedona Spark & Flink** Introduced a new entry point called SedonaContext 
to unify all Sedona entry points in different compute engines and deprecate old 
Sedona register entry points. Users no longer have to register Sedona kryo 
serializer and import many tedious Python classes.
+* **Sedona Spark**:
+* Scala:
+```scala
+import org.apache.sedona.spark.SedonaContext
+val sedona = 
SedonaContext.create(SedonaContext.builder().master("local[*]").getOrCreate())
+sedona.sql("SELECT ST_GeomFromWKT(XXX) FROM")
+```
+* Python:
+```python
+from sedona.spark import *
+
+config = SedonaContext.builder().\
+   config('spark.jars.packages',
+   'org.apache.sedona:sedona-spark-shaded-3.0_2.12:1.4.1,'
+   'org.datasyslab:geotools-wrapper:1.4.0-28.2'). \
+   getOrCreate()
+sedona = SedonaContext.create(config)
+sedona.sql("SELECT ST_GeomFromWKT(XXX) FROM")
+```
+* **Sedona Flink**:
+```java
+import org.apache.sedona.flink.SedonaContext
+StreamTableEnvironment sedona = SedonaContext.create(env, tableEnv);
+sedona.sqlQuery("SELECT ST_GeomFromWKT(XXX) FROM")
+```
+
+### Bug
+
+
+[SEDONA-266] -   
  RS_Values throws UnsupportedOperationException for shuffled point arrays
+
+[SEDONA-267] -   
  Cannot pip install apache-sedona 1.4.0 from source distribution
+
+[SEDONA-273] -   
  Set a upper bound for Shapely, Pandas and GeoPandas
+
+[SEDONA-277] -   
  Sedona spark artifacts for scala 2.13 do not have proper POMs
+
+[SEDONA-283] -   
  Artifacts were deployed twice when running mvn clean deploy
+
+[SEDONA-284] -   
  Property values in dependency deduced POMs for shaded modules were not 
substituted
+
+
+
+### New Feature
+
+
+[SEDONA-196] -   
  Add ST_Force3D to Sedona
+
+[SEDONA-239] -   
  Implement ST_NumPoints
+

Review Comment:
   Addressed in 
https://github.com/apache/sedona/commit/b2db51abe7699f77ddf9cfbb5ca1fea7f4df6ccd



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sedona.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [sedona] iGN5117 commented on a diff in pull request #864: [SEDONA-306] Prepare release 1.4.1

2023-06-20 Thread via GitHub


iGN5117 commented on code in PR #864:
URL: https://github.com/apache/sedona/pull/864#discussion_r1235970771


##
docs/setup/release-notes.md:
##
@@ -4,6 +4,117 @@
 !!!danger
Sedona Python currently only works with Shapely 1.x. If you use 
GeoPandas, please use <= GeoPandas `0.11.1`. GeoPandas > 0.11.1 will 
automatically install Shapely 2.0. If you use Shapely, please use <= `1.8.4`.
 
+## Sedona 1.4.1
+
+Sedona 1.4.1 is compiled against, Spark 3.3 / Spark 3.4 / Flink 1.12, Java 8.
+
+### Highlights
+
+* [X] **Sedona Spark** More raster functions and bridge RasterUDT and Map 
Algebra operators. See [Raster based 
operators](../../api/sql/Raster-operators/#raster-based-operators) and [Raster 
to Map Algebra 
operators](../../api/sql/Raster-operators/#raster-to-map-algebra-operators).
+* [X] **Sedona Spark & Flink** Added geodesic / geography functions:
+* ST_DistanceSphere
+* ST_DistanceSpheroid
+* ST_AreaSpheroid
+* ST_LengthSpheroid
+* [X] **Sedona Spark & Flink** Introduced `SedonaContext` to unify Sedona 
entry points.
+* [X] **Sedona Spark** Support Spark 3.4.
+* [X] **Sedona Spark** Added a number of new ST functions.
+* [X] **Zeppelin** Zeppelin helium plugin supports ploting geometries like 
linestring, polygon.
+
+### API change
+
+* **Sedona Spark & Flink** Introduced a new entry point called SedonaContext 
to unify all Sedona entry points in different compute engines and deprecate old 
Sedona register entry points. Users no longer have to register Sedona kryo 
serializer and import many tedious Python classes.
+* **Sedona Spark**:
+* Scala:
+```scala
+import org.apache.sedona.spark.SedonaContext
+val sedona = 
SedonaContext.create(SedonaContext.builder().master("local[*]").getOrCreate())
+sedona.sql("SELECT ST_GeomFromWKT(XXX) FROM")
+```
+* Python:
+```python
+from sedona.spark import *
+
+config = SedonaContext.builder().\
+   config('spark.jars.packages',
+   'org.apache.sedona:sedona-spark-shaded-3.0_2.12:1.4.1,'
+   'org.datasyslab:geotools-wrapper:1.4.0-28.2'). \
+   getOrCreate()
+sedona = SedonaContext.create(config)
+sedona.sql("SELECT ST_GeomFromWKT(XXX) FROM")
+```
+* **Sedona Flink**:
+```java
+import org.apache.sedona.flink.SedonaContext
+StreamTableEnvironment sedona = SedonaContext.create(env, tableEnv);
+sedona.sqlQuery("SELECT ST_GeomFromWKT(XXX) FROM")
+```
+
+### Bug
+
+
+[SEDONA-266] -   
  RS_Values throws UnsupportedOperationException for shuffled point arrays
+
+[SEDONA-267] -   
  Cannot pip install apache-sedona 1.4.0 from source distribution
+
+[SEDONA-273] -   
  Set a upper bound for Shapely, Pandas and GeoPandas
+
+[SEDONA-277] -   
  Sedona spark artifacts for scala 2.13 do not have proper POMs
+
+[SEDONA-283] -   
  Artifacts were deployed twice when running mvn clean deploy
+
+[SEDONA-284] -   
  Property values in dependency deduced POMs for shaded modules were not 
substituted
+
+
+
+### New Feature
+
+
+[SEDONA-196] -   
  Add ST_Force3D to Sedona
+
+[SEDONA-239] -   
  Implement ST_NumPoints
+

Review Comment:
   @jiayuasu @Kontinuation ST_Translate implementation has also been merged to 
master, and should be included in the release notes.
   JIRA link: https://issues.apache.org/jira/browse/SEDONA-302



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sedona.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [sedona] iGN5117 commented on pull request #863: [SEDONA-213] Add ST_BoundingDiagonal

2023-06-20 Thread via GitHub


iGN5117 commented on PR #863:
URL: https://github.com/apache/sedona/pull/863#issuecomment-1599650116

   > And, as Kristin is gonna cut the 1.4.1 release today, this new API will be 
published in Sedona 1.5.0. Please update the version num in this PR 
accordingly. I will merge this PR after Kristin cuts the release.
   
--Noted, I have updated the documentation to reflect 1.5.0 availability


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sedona.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [sedona] iGN5117 commented on a diff in pull request #863: [SEDONA-213] Add ST_BoundingDiagonal

2023-06-20 Thread via GitHub


iGN5117 commented on code in PR #863:
URL: https://github.com/apache/sedona/pull/863#discussion_r1235955649


##
common/src/test/java/org/apache/sedona/common/FunctionsTest.java:
##
@@ -15,6 +15,7 @@
 
 import com.google.common.geometry.S2CellId;
 import com.google.common.math.DoubleMath;
+import com.sun.org.apache.xpath.internal.operations.Mult;

Review Comment:
   This must've been added automatically due to a mistype, removed it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sedona.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [sedona] jiayuasu commented on a diff in pull request #863: [SEDONA-213] Add ST_BoundingDiagonal

2023-06-20 Thread via GitHub


jiayuasu commented on code in PR #863:
URL: https://github.com/apache/sedona/pull/863#discussion_r1235933119


##
common/src/test/java/org/apache/sedona/common/FunctionsTest.java:
##
@@ -15,6 +15,7 @@
 
 import com.google.common.geometry.S2CellId;
 import com.google.common.math.DoubleMath;
+import com.sun.org.apache.xpath.internal.operations.Mult;

Review Comment:
   What is this `import`? I don't think this is used.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sedona.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [sedona] jiayuasu merged pull request #864: [SEDONA-306] Prepare release 1.4.1

2023-06-20 Thread via GitHub


jiayuasu merged PR #864:
URL: https://github.com/apache/sedona/pull/864


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sedona.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [sedona] iGN5117 commented on a diff in pull request #863: [SEDONA-213] Add ST_BoundingDiagonal

2023-06-20 Thread via GitHub


iGN5117 commented on code in PR #863:
URL: https://github.com/apache/sedona/pull/863#discussion_r1235731944


##
common/src/main/java/org/apache/sedona/common/Functions.java:
##
@@ -931,4 +931,34 @@ public static Geometry geometricMedian(Geometry geometry) 
throws Exception {
 return geometricMedian(geometry, DEFAULT_TOLERANCE, DEFAULT_MAX_ITER, 
false);
 }
 
+public static Geometry boundingDiagonal(Geometry geometry) {
+if (geometry.isEmpty()) {
+return GEOMETRY_FACTORY.createLineString();
+}else {
+Envelope envelope = geometry.getEnvelopeInternal();

Review Comment:
   Good point, I started out with that initially but ended up using envelope 
for simplicity. I did not take into account its internal implementation.
   Reverted to using 1 loop



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sedona.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [sedona] iGN5117 commented on a diff in pull request #863: [SEDONA-213] Add ST_BoundingDiagonal

2023-06-20 Thread via GitHub


iGN5117 commented on code in PR #863:
URL: https://github.com/apache/sedona/pull/863#discussion_r1235731069


##
sql/common/src/main/scala/org/apache/sedona/sql/UDF/Catalog.scala:
##
@@ -178,14 +179,10 @@ object Catalog {
 function[RS_Array](),
 function[RS_Normalize](),
 function[RS_Append](),
-function[RS_AddBandFromArray](),

Review Comment:
   This was an accident while merging with master.
   I have reverted this



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sedona.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Discussion thread for [SEDONA-305]

2023-06-20 Thread Nilesh Gajwani
Hello everyone,

It has come to my attention that Apache Sedona currently supports creating
geometry collections of any kind (Geometry Collection, MultiPolygon,
MultiPoint, MultiLineString) that has underlying geometries of different
dimensions.
For example, it is possible to create a MultiPolygon that has an empty
polygon, a 2D and a 3D polygon.

This can lead to bugs in ST functions that assume the geometry to be 2D/3D
depending on availability of z ordinate in the first coordinate (accessed
by geometry.getCoordinate()).
For example, consider the implementation of ST_GeometricMedian, which uses
a function `extractCoordinates()` to retrieve all coordinates of the
geometry. Here is the implementation of `extractCoordinates()`:

private static Coordinate[] extractCoordinates(Geometry geometry) {
Coordinate[] points = geometry.getCoordinates();
if(points.length == 0)
return points;

Coordinate[] coordinates = new Coordinate[points.length];
for(int i = 0; i < points.length; i++) {
boolean is3d = !Double.isNaN(points[i].z);
coordinates[i] = points[i].copy();
if(!is3d)
coordinates[i].z = 0.0;
}
return coordinates;
}



This code assumes the dimension of geometry based on its first
coordinate, and if the geometry is deemed to be 2D, it forces all z
ordinates of all coordinates to be 0.
Hence if a geometry collection with a 2D geometry at the first
position is provided, all z ordinates of any following 3D geometry is
coerced to be 0.

On the contrary, PostGIS does not allow creation of such hybrid
geometries and stops this flow in the geometry constructor itself,
which seems like something Apache Sedona should have too.
I have created a JIRA
 tracking this,
please feel free to use this email thread to discuss how this solution
should be implemented.

[image: Screenshot 2023-06-20 at 12.21.38 PM.png]
^^ P.S. This is how PostGIS behaves for such a construction.


Best,
Nilesh Gajwani


[GitHub] [sedona] Kontinuation opened a new pull request, #864: [SEDONA-306] Prepare release 1.4.1

2023-06-20 Thread via GitHub


Kontinuation opened a new pull request, #864:
URL: https://github.com/apache/sedona/pull/864

   ## Did you read the Contributor Guide?
   
   - Yes, I have read [Contributor 
Rules](https://sedona.apache.org/latest-snapshot/community/rule/) and 
[Contributor Development 
Guide](https://sedona.apache.org/latest-snapshot/community/develop/)
   
   ## Is this PR related to a JIRA ticket?
   
   - Yes, the URL of the associated JIRA ticket is 
https://issues.apache.org/jira/browse/SEDONA-306. The PR name follows the 
format `[SEDONA-XXX] my subject`.
   
   ## What changes were proposed in this PR?
   
   Due to the changes made to the project structure since Sedona 1.4.0, the 
release process of Sedona 1.4.1 changed a lot. We'll update the docs and 
address all the issues introduced to the release process. Notable changes are:
   
   1. Added an `enable-all-submodules` profile for `release:prepare` to 
substitute versions of all submodules.
   2. Don't generate and publish scala docs when building `sedona-core`, 
`sedona-viz` and `sedona-flink`. We'll publish java docs for these modules. 
This also gets rid of conflicts caused by deploying javadocs.jar twice.
   3. Don't run gpg-sign in the deploy phase. Now the signatures generated by 
gpg-sign in verify phase are all correct, and there's no need to fix signature 
issues manually.
   
   We'll also submit release notes for 1.4.1 in the same pull request, as well 
as other trivial version changes. Experienced contributors can help check if 
these changes were made correctly.
   
   ## How was this patch tested?
   
   We've setup a local nexus repository and tested the release process. The 
release process to actually publish artifacts to repository.apache.org may be a 
little bit differ.
   
   ## Did this PR include necessary documentation updates?
   
   - Yes, I have updated the documentation update.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sedona.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Created] (SEDONA-306) Prepare for releasing Sedona 1.4.1

2023-06-20 Thread Kristin Cowalcijk (Jira)
Kristin Cowalcijk created SEDONA-306:


 Summary: Prepare for releasing Sedona 1.4.1
 Key: SEDONA-306
 URL: https://issues.apache.org/jira/browse/SEDONA-306
 Project: Apache Sedona
  Issue Type: Task
Reporter: Kristin Cowalcijk


Due to the changes made to the project structure since Sedona 1.4.0, the 
release process of Sedona 1.4.1 changed a lot. We'll update the docs and 
address all the issues introduced to the release process. Notable changes are:

# Added an {{enable-all-submodules}} profile for `release:prepare` to 
substitute versions of all submodules.
# Don't generate and publish scala docs when building {{sedona-core}}, 
{{sedona-vis}} and {{sedona-flink}}. We'll publish java docs for these modules 
and this also get rid of conflicts caused by deploying javadocs.jar twice.
# Don't run gpg-sign in deploy phase. Now the signatures generated by gpg-sign 
in verify phase are all correct, and there's no need to manually fix signature 
issues.




--
This message was sent by Atlassian Jira
(v8.20.10#820010)