[GitHub] [incubator-sedona] naharon2210 opened a new pull request, #616: Added ST_YMax and ST_YMin

2022-04-21 Thread GitBox


naharon2210 opened a new pull request, #616:
URL: https://github.com/apache/incubator-sedona/pull/616

   ## Is this PR related to a proposed Issue?
   Yes [SEDONA-116]
   ## What changes were proposed in this PR?
   Added ST_YMax and ST_YMin functions
   ## How was this patch tested?
   Added unit tests
   ## Did this PR include necessary documentation updates?
   Yes added necessary docs


-- 
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] [incubator-sedona] kvpankaj1999 opened a new pull request, #615: [SEDONA 115] Add ST_XMax and ST_XMin functions

2022-04-21 Thread GitBox


kvpankaj1999 opened a new pull request, #615:
URL: https://github.com/apache/incubator-sedona/pull/615

   ## Is this PR related to a proposed Issue?
   Yes - SEDONA-115
   
   ## What changes were proposed in this PR?
   Added ST_XMax and ST_XMin functions
   
   ## How was this patch tested?
   Yes, I have added the unit tests.
   
   ## Did this PR include necessary documentation updates?
   Yes, I have added the documentation necessary.


-- 
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] [Commented] (SEDONA-113) Add ST_PointN to Apache Sedona

2022-04-21 Thread Pooja Kulkarni (Jira)


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

Pooja Kulkarni commented on SEDONA-113:
---

Added ST_PointN in Flink with unit test cases

All unit test cases passed successfully (for linestring geometry with a 
positive and negative value of n)

Started implementing ST_PointN for Spark SQL

> Add ST_PointN to Apache Sedona
> --
>
> Key: SEDONA-113
> URL: https://issues.apache.org/jira/browse/SEDONA-113
> Project: Apache Sedona
>  Issue Type: Improvement
>Reporter: Pooja Kulkarni
>Assignee: Pooja Kulkarni
>Priority: Major
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> The purpose of this task is to add the function "ST_PointN" to the Apache 
> Sedona project
> The function simply returns the nth point of the given geometry (which could 
> be a linestring or a circular line string)
> [https://postgis.net/docs/ST_PointN.html|http://example.com]



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[GitHub] [incubator-sedona] kanchanchy commented on pull request #614: [SEDONA-117] RS_AppendNormalizedDifference Implemented and Raster Notebook Updated

2022-04-21 Thread GitBox


kanchanchy commented on PR #614:
URL: https://github.com/apache/incubator-sedona/pull/614#issuecomment-1105862971

   Same image will not be distributed into multiple sub-folders. If there are 3 
images in total, there might be 3 subfolders with each subfolder having 1 image.


-- 
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] [incubator-sedona] kanchanchy commented on pull request #614: [SEDONA-117] RS_AppendNormalizedDifference Implemented and Raster Notebook Updated

2022-04-21 Thread GitBox


kanchanchy commented on PR #614:
URL: https://github.com/apache/incubator-sedona/pull/614#issuecomment-1105861544

   In the unit tests, I have shown it both with and without coalesce(1). I also 
showed both versions in the documentation.


-- 
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] [incubator-sedona] kanchanchy commented on pull request #614: [SEDONA-117] RS_AppendNormalizedDifference Implemented and Raster Notebook Updated

2022-04-21 Thread GitBox


kanchanchy commented on PR #614:
URL: https://github.com/apache/incubator-sedona/pull/614#issuecomment-1105859935

   @jiayuasu No, coalesce(1) is not mandatory. If it is not provided, writing 
will be distributed and images will be written in different subfolders in the 
given destination path.


-- 
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] [incubator-sedona] jiayuasu commented on pull request #614: [SEDONA-117] RS_AppendNormalizedDifference Implemented and Raster Notebook Updated

2022-04-21 Thread GitBox


jiayuasu commented on PR #614:
URL: https://github.com/apache/incubator-sedona/pull/614#issuecomment-1105858533

   @kanchanchy A quick question: Is df.coalesce(1) required in order to write 
GeoTiffs?
   
   If we don't use coalesce(1), what will happen? and what is the disk layout 
of this GeoTiff DataFrame?


-- 
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] [incubator-sedona] kanchanchy opened a new pull request, #614: [SEDONA-117] RS_AppendNormalizedDifference Implemented and Raster Notebook Updated

2022-04-21 Thread GitBox


kanchanchy opened a new pull request, #614:
URL: https://github.com/apache/incubator-sedona/pull/614

   ## Is this PR related to a proposed Issue?
   Yes. [SEDONA-117](https://issues.apache.org/jira/browse/SEDONA-117)
   
   ## What changes were proposed in this PR?
   1. Implements a new SQL expression for GeoTiff images. Expression name: 
RS_AppendNormalizedDifference. This transformation calculates the normalized 
difference index between two bands and appends the index as a new band in the 
array of all bands.
   2. Updates the raster notebook in the binder to include the improvements 
made for version 1.2.1.
   
   ## How was this patch tested?
   Unit tests were added for the new transformation operation.
   
   ## Did this PR include necessary documentation updates?
   Yes. Documentation was updated.


-- 
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-117) RS_AppendNormalizedDifference expression for transforming GeoTIff and updating raster notebook

2022-04-21 Thread Kanchan Chowdhury (Jira)
Kanchan Chowdhury created SEDONA-117:


 Summary: RS_AppendNormalizedDifference expression for transforming 
GeoTIff and updating raster notebook
 Key: SEDONA-117
 URL: https://issues.apache.org/jira/browse/SEDONA-117
 Project: Apache Sedona
  Issue Type: Improvement
Reporter: Kanchan Chowdhury
 Fix For: 1.2.1


1. Implements a new SQL expression for GeoTiff images. Expression name: 
RS_AppendNormalizedDifference. This transformation calculates the normalized 
difference index between two bands and appends the index as a new band in the 
array of all bands.

2. Updates the raster notebook in the binder to include the improvements made 
for version 1.2.1.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[GitHub] [incubator-sedona] jiayuasu commented on a diff in pull request #609: Feature/dbscan

2022-04-21 Thread GitBox


jiayuasu commented on code in PR #609:
URL: https://github.com/apache/incubator-sedona/pull/609#discussion_r855462337


##
core/src/main/java/org/apache/sedona/core/spatialOperator/DBScanQuery.java:
##
@@ -0,0 +1,31 @@
+package org.apache.sedona.core.spatialOperator;
+
+import org.apache.sedona.core.dbscanJudgement.DBScanJudgement;
+import org.apache.sedona.core.knnJudgement.GeometryDistanceComparator;
+import org.apache.sedona.core.knnJudgement.KnnJudgementUsingIndex;
+import org.apache.sedona.core.spatialRDD.SpatialRDD;
+import org.apache.spark.api.java.JavaRDD;
+import org.locationtech.jts.geom.Geometry;
+
+import java.io.Serializable;
+import java.util.HashSet;
+import java.util.List;
+
+public class DBScanQuery
+implements Serializable
+{
+public static  List 
SpatialDBScanQuery(SpatialRDD spatialRDD, double eps, int minPoints, boolean 
useIndex)
+{
+if (useIndex) {
+if (spatialRDD.indexedRawRDD == null) {
+throw new NullPointerException("Need to invoke buildIndex() 
first, indexedRDDNoId is null");
+}
+JavaRDD result = 
spatialRDD.getRawSpatialRDD().repartition(1).mapPartitions(new 
DBScanJudgement(eps, minPoints, new HashSet<>()), true);

Review Comment:
   If your implementation cannot work on multiple partitions, then this PR will 
NOT be accepted. We are looking for a distributed DBScan algorithm. For 
example, this one: https://github.com/irvingc/dbscan-on-spark
   
   You can incorporate this library into Sedona since this one is also under 
Apache 2.0 License



-- 
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