[GitHub] [incubator-sedona] jiayuasu commented on pull request #610: [SEDONA 95] Add ST_Disjoint predicate
jiayuasu commented on PR #610: URL: https://github.com/apache/incubator-sedona/pull/610#issuecomment-1100825593 @onkarpandit Please fix other issues mentioned by me -- 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] onkarpandit commented on pull request #610: [SEDONA 95] Add ST_Disjoint predicate
onkarpandit commented on PR #610: URL: https://github.com/apache/incubator-sedona/pull/610#issuecomment-1100826512 @jiayuasu Sorry I missed some comments. I have resolved them now. Please let me know if anything else is required. -- 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 a diff in pull request #608: Sedona 106 add st line from text
jiayuasu commented on code in PR #608: URL: https://github.com/apache/incubator-sedona/pull/608#discussion_r851718619 ## docs/api/sql/Constructor.md: ## @@ -172,6 +172,24 @@ FROM linestringtable SELECT ST_LineStringFromText('-74.0428197,40.6867969,-74.0421975,40.6921336,-74.0508020,40.6912794', ',') AS linestringshape ``` +## ST_LineFromText + +Introduction: Construct a Line from Text, delimited by Delimiter + +Format: `ST_LineFromText (Text:string, Delimiter:char)` + +Since: `v1.0.0` Review Comment: v1.2.1 ## sql/src/main/scala/org/apache/spark/sql/sedona_sql/expressions/Constructors.scala: ## @@ -94,6 +94,37 @@ case class ST_PolygonFromText(inputExpressions: Seq[Expression]) } } +/** + * Return a line from a string. The string must be plain string and each coordinate must be separated by a delimiter. + * + * @param inputExpressions + */ +case class ST_LineFromText(inputExpressions: Seq[Expression]) Review Comment: This implementation is not consistent with PostGIS: https://postgis.net/docs/ST_LineFromText.html The input string must be WKT. The logic should simply re-use the ST_GeomFromWKT ## sql/src/test/scala/org/apache/sedona/sql/predicateTestScala.scala: ## @@ -140,6 +140,37 @@ class predicateTestScala extends TestBaseScala { assert(equaldf.count() == 0, s"Expected 0 value but got ${equaldf.count()}") } + +it("Passed ST_Equals for ST_LineFromText and ST_Polygon") { Review Comment: Please create a simple test case. Not sure why this has anything to do with polygons. ## docs/archive/api/sql/GeoSparkSQL-Constructor.md: ## @@ -155,6 +155,24 @@ FROM polygontable SELECT ST_PolygonFromText('-74.0428197,40.6867969,-74.0421975,40.6921336,-74.0508020,40.6912794,-74.0428197,40.6867969', ',') AS polygonshape ``` +## ST_LineFromText Review Comment: This doc is put in wrong place -- 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 a diff in pull request #610: [SEDONA 95] Add ST_Disjoint predicate
jiayuasu commented on code in PR #610: URL: https://github.com/apache/incubator-sedona/pull/610#discussion_r851720081 ## sql/src/main/scala/org/apache/spark/sql/sedona_sql/strategy/join/JoinQueryDetector.scala: ## @@ -69,6 +69,8 @@ class JoinQueryDetector(sparkSession: SparkSession) extends Strategy { Some(JoinQueryDetection(left, right, leftShape, rightShape, false, extraCondition)) case ST_Crosses(Seq(leftShape, rightShape)) => Some(JoinQueryDetection(right, left, rightShape, leftShape, false, extraCondition)) +case ST_Disjoint(Seq(leftShape, rightShape)) => + Some(JoinQueryDetection(left, right, leftShape, rightShape, false, extraCondition)) case _ => None Review Comment: Please do NOT make any change to this file because ST_Disjoint-based join in Spark cannot be optimized bySedona. ## flink/src/main/java/org/apache/sedona/flink/expressions/Predicates.java: ## @@ -104,4 +104,28 @@ public Boolean eval(@DataTypeHint("INT") Integer key, @DataTypeHint(value = "RAW return JudgementHelper.match(geom1, geom2, halfOpenRectangle, false); } } + +public static class ST_Disjoint extends ScalarFunction { +private List grids; + +/** + * Constructor for duplicate removal + */ +public ST_Disjoint(PartitioningUtils partitioner) { +grids = partitioner.fetchLeafZones(); +} + +/** + * Constructor for relation checking without duplicate removal + */ +public ST_Disjoint() { +} + +@DataTypeHint("Boolean") +public Boolean eval(@DataTypeHint(value = "RAW", bridgedTo = org.locationtech.jts.geom.Geometry.class) Object o1, @DataTypeHint(value = "RAW", bridgedTo = org.locationtech.jts.geom.Geometry.class) Object o2) { +Geometry geom1 = (Geometry) o1; Review Comment: Please also add a test to Flink. Thanks! -- 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] onkarpandit commented on a diff in pull request #610: [SEDONA 95] Add ST_Disjoint predicate
onkarpandit commented on code in PR #610: URL: https://github.com/apache/incubator-sedona/pull/610#discussion_r851776284 ## flink/src/main/java/org/apache/sedona/flink/expressions/Predicates.java: ## @@ -104,4 +104,28 @@ public Boolean eval(@DataTypeHint("INT") Integer key, @DataTypeHint(value = "RAW return JudgementHelper.match(geom1, geom2, halfOpenRectangle, false); } } + +public static class ST_Disjoint extends ScalarFunction { +private List grids; + +/** + * Constructor for duplicate removal + */ +public ST_Disjoint(PartitioningUtils partitioner) { +grids = partitioner.fetchLeafZones(); +} + +/** + * Constructor for relation checking without duplicate removal + */ +public ST_Disjoint() { +} + +@DataTypeHint("Boolean") +public Boolean eval(@DataTypeHint(value = "RAW", bridgedTo = org.locationtech.jts.geom.Geometry.class) Object o1, @DataTypeHint(value = "RAW", bridgedTo = org.locationtech.jts.geom.Geometry.class) Object o2) { +Geometry geom1 = (Geometry) o1; Review Comment: @jiayuasu is there a command to only run flink tests? -- 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-109) Add ST_OrderingEquals to Apache Sedona
Lokeswari Vejju created SEDONA-109: -- Summary: Add ST_OrderingEquals to Apache Sedona Key: SEDONA-109 URL: https://issues.apache.org/jira/browse/SEDONA-109 Project: Apache Sedona Issue Type: Improvement Reporter: Lokeswari Vejju -- This message was sent by Atlassian Jira (v8.20.1#820001)
[GitHub] [incubator-sedona] ngaur9 commented on a diff in pull request #608: [SEDONA-106] add st line from text
ngaur9 commented on code in PR #608: URL: https://github.com/apache/incubator-sedona/pull/608#discussion_r851817126 ## docs/archive/api/sql/GeoSparkSQL-Constructor.md: ## @@ -155,6 +155,24 @@ FROM polygontable SELECT ST_PolygonFromText('-74.0428197,40.6867969,-74.0421975,40.6921336,-74.0508020,40.6912794,-74.0428197,40.6867969', ',') AS polygonshape ``` +## ST_LineFromText Review Comment: I have moved below ST_GeomFromWKT. Let me know if it has to be moved to some other place or file. -- 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] ngaur9 commented on a diff in pull request #608: [SEDONA-106] add st line from text
ngaur9 commented on code in PR #608: URL: https://github.com/apache/incubator-sedona/pull/608#discussion_r851817082 ## docs/api/sql/Constructor.md: ## @@ -172,6 +172,24 @@ FROM linestringtable SELECT ST_LineStringFromText('-74.0428197,40.6867969,-74.0421975,40.6921336,-74.0508020,40.6912794', ',') AS linestringshape ``` +## ST_LineFromText + +Introduction: Construct a Line from Text, delimited by Delimiter + +Format: `ST_LineFromText (Text:string, Delimiter:char)` + +Since: `v1.0.0` Review Comment: Done. -- 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] ngaur9 commented on a diff in pull request #608: [SEDONA-106] add st line from text
ngaur9 commented on code in PR #608: URL: https://github.com/apache/incubator-sedona/pull/608#discussion_r851817126 ## docs/archive/api/sql/GeoSparkSQL-Constructor.md: ## @@ -155,6 +155,24 @@ FROM polygontable SELECT ST_PolygonFromText('-74.0428197,40.6867969,-74.0421975,40.6921336,-74.0508020,40.6912794,-74.0428197,40.6867969', ',') AS polygonshape ``` +## ST_LineFromText Review Comment: I have moved it below ST_GeomFromWKT. Let me know if it has to be moved to some other place or file. ## sql/src/main/scala/org/apache/spark/sql/sedona_sql/expressions/Constructors.scala: ## @@ -94,6 +94,37 @@ case class ST_PolygonFromText(inputExpressions: Seq[Expression]) } } +/** + * Return a line from a string. The string must be plain string and each coordinate must be separated by a delimiter. + * + * @param inputExpressions + */ +case class ST_LineFromText(inputExpressions: Seq[Expression]) Review Comment: I referred ST_GeomFromWKT function call and added a LINE filter. Let me know if it needs modification or refactoring. -- 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] ngaur9 commented on a diff in pull request #608: [SEDONA-106] add st line from text
ngaur9 commented on code in PR #608: URL: https://github.com/apache/incubator-sedona/pull/608#discussion_r851817148 ## sql/src/test/scala/org/apache/sedona/sql/predicateTestScala.scala: ## @@ -140,6 +140,37 @@ class predicateTestScala extends TestBaseScala { assert(equaldf.count() == 0, s"Expected 0 value but got ${equaldf.count()}") } + +it("Passed ST_Equals for ST_LineFromText and ST_Polygon") { Review Comment: Removed this test case and added a simple test case in constructorTestScala.scala file. -- 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, #611: Jira Issue SEDONA-108 (Writing GeoTiff) Implemented
kanchanchy opened a new pull request, #611: URL: https://github.com/apache/incubator-sedona/pull/611 ## Is this PR related to a proposed Issue? Yes, [SEDONA-108](https://issues.apache.org/jira/browse/SEDONA-108) ## What changes were proposed in this PR? Added write support for GeoTiff DataFrame ## How was this patch tested? Yes, unit tests were added for various combination of test cases. ## Did this PR include necessary documentation updates? Yes, documentation has been 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