Kontinuation commented on code in PR #1520:
URL: https://github.com/apache/sedona/pull/1520#discussion_r1681737784
##########
common/src/main/java/org/apache/sedona/common/Functions.java:
##########
@@ -1812,6 +1812,24 @@ private static Geometry[]
convertGeometryToArray(Geometry geom) {
return array;
}
+ public static Geometry generatePoints(Geometry geom, int numPoints, long
seed) {
+ RandomPointsBuilderSeed pointsBuilder = new
RandomPointsBuilderSeed(geom.getFactory(), seed);
+ pointsBuilder.setExtent(geom);
+ pointsBuilder.setNumPoints(numPoints);
+ return pointsBuilder.getGeometry();
+ }
+
+ public static Geometry generatePoints(Geometry geom, int numPoints) {
+ return generatePoints(geom, numPoints, 0);
+ }
+
+ public static Geometry generatePoints(Geometry geom, int numPoints, Random
random) {
Review Comment:
This is for using the `random` member of `ST_GeneratePoints` to generate
consistent random streams
--
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]