jiayuasu commented on code in PR #862:
URL: https://github.com/apache/sedona/pull/862#discussion_r1228997198
##########
common/src/main/java/org/apache/sedona/common/Functions.java:
##########
@@ -881,6 +881,38 @@ public static Integer nRings(Geometry geometry) throws
Exception {
return numRings;
}
+ public static Geometry translate(Geometry geometry, double deltaX, double
deltaY, double deltaZ) {
+ if (!geometry.isEmpty()) {
+ if (geometry instanceof GeometryCollection) {
+ GeometryCollection geometryCollection = (GeometryCollection)
geometry;
Review Comment:
On this regard, I think the approach used in ST_Force3D are actually better
since it does not need to fetch individual geometries.
In addition, I noticed that ST_Force3D does not have test cases for
GeomtryCollection/MultiPolygon and such. Would you please confirm ST_Force3D
works for these cases as well?
##########
common/src/main/java/org/apache/sedona/common/Functions.java:
##########
@@ -881,6 +881,38 @@ public static Integer nRings(Geometry geometry) throws
Exception {
return numRings;
}
+ public static Geometry translate(Geometry geometry, double deltaX, double
deltaY, double deltaZ) {
+ if (!geometry.isEmpty()) {
+ if (geometry instanceof GeometryCollection) {
+ GeometryCollection geometryCollection = (GeometryCollection)
geometry;
Review Comment:
On this regard, I think the approach used in ST_Force3D is actually better
since it does not need to fetch individual geometries.
In addition, I noticed that ST_Force3D does not have test cases for
GeomtryCollection/MultiPolygon and such. Would you please confirm ST_Force3D
works for these cases as well?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]