You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sedona.apache.org by "yyy1000 (via GitHub)" <gi...@apache.org> on 2023/08/08 01:18:32 UTC
[GitHub] [sedona] yyy1000 opened a new pull request, #950: [SEDONA-348] Implement ST_MakePoint
yyy1000 opened a new pull request, #950:
URL: https://github.com/apache/sedona/pull/950
## 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 will be https://issues.apache.org/jira/browse/SEDONA-348. The PR name follows the format `[SEDONA-XXX] my subject`.
## What changes were proposed in this PR?
Add ST_MakePoint to [sedona-common](https://issues.apache.org/jira/browse/SEDONA-common), [sedona-sql](https://issues.apache.org/jira/browse/SEDONA-sql), [sedona-flink](https://issues.apache.org/jira/browse/SEDONA-flink), and the dataframe/python API.
## How was this patch tested?
1. Comprehensive unit tests in [sedona-common](https://issues.apache.org/jira/browse/SEDONA-common)
2. Integration unit tests in [sedona-sql](https://issues.apache.org/jira/browse/SEDONA-sql), [sedona-flink](https://issues.apache.org/jira/browse/SEDONA-flink), and python.
## 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-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sedona] yyy1000 commented on pull request #950: [SEDONA-348] Implement ST_MakePoint
Posted by "yyy1000 (via GitHub)" <gi...@apache.org>.
yyy1000 commented on PR #950:
URL: https://github.com/apache/sedona/pull/950#issuecomment-1674449325
> @yyy1000 Are you planning to implement ST_MakePointM?
I can implement it next week. :)
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sedona] jiayuasu commented on pull request #950: [SEDONA-348] Implement ST_MakePoint
Posted by "jiayuasu (via GitHub)" <gi...@apache.org>.
jiayuasu commented on PR #950:
URL: https://github.com/apache/sedona/pull/950#issuecomment-1674294137
@yyy1000 Are you planning to implement ST_MakePointM?
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sedona] jiayuasu commented on pull request #950: [SEDONA-348] Implement ST_MakePoint
Posted by "jiayuasu (via GitHub)" <gi...@apache.org>.
jiayuasu commented on PR #950:
URL: https://github.com/apache/sedona/pull/950#issuecomment-1670542209
@yyy1000 Please fix this PR using the solution provided by https://github.com/apache/sedona/pull/952
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sedona] yyy1000 commented on pull request #950: [SEDONA-348] Implement ST_MakePoint
Posted by "yyy1000 (via GitHub)" <gi...@apache.org>.
yyy1000 commented on PR #950:
URL: https://github.com/apache/sedona/pull/950#issuecomment-1670620690
> @yyy1000 Please fix this PR using the solution provided by #952
Got it. Fixed it already.
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sedona] jiayuasu commented on a diff in pull request #950: [SEDONA-348] Implement ST_MakePoint
Posted by "jiayuasu (via GitHub)" <gi...@apache.org>.
jiayuasu commented on code in PR #950:
URL: https://github.com/apache/sedona/pull/950#discussion_r1288079030
##########
python/sedona/sql/st_constructors.py:
##########
@@ -217,6 +218,28 @@ def ST_PointFromText(coords: ColumnOrName, delimiter: ColumnOrName) -> Column:
"""
return _call_constructor_function("ST_PointFromText", (coords, delimiter))
+@validate_argument_types
+def ST_MakePoint(x: ColumnOrNameOrNumber, y: ColumnOrNameOrNumber, z: Optional[ColumnOrNameOrNumber] = None, m: Optional[ColumnOrNameOrNumber] = None) -> Column:
+ """Generate a 2D, 3D Z or 4D ZM Point geometry.
+
+ :param x: Either a number or numeric column representing the X coordinate of a point.
+ :type x: ColumnOrNameOrNumber
+ :param y: Either a number or numeric column representing the Y coordinate of a point.
+ :type y: ColumnOrNameOrNumber
+ :param z: Either a number or numeric column representing the Z coordinate of a point, if None then a 2D point is generated, defaults to None
+ :type z: ColumnOrNameOrNumber
+ :param z: Either a number or numeric column representing the measure of a point, if None then a 3D point is generated without measure, defaults to None
+ :type z: ColumnOrNameOrNumber
+ :return: Point geometry column generated from the coordinate values.
Review Comment:
Do you need to include param m?
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sedona] jiayuasu merged pull request #950: [SEDONA-348] Implement ST_MakePoint
Posted by "jiayuasu (via GitHub)" <gi...@apache.org>.
jiayuasu merged PR #950:
URL: https://github.com/apache/sedona/pull/950
--
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-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org