Class CreateRandomShapeFunctions

java.lang.Object
org.locationtech.jtstest.function.CreateRandomShapeFunctions

public class CreateRandomShapeFunctions extends Object
  • Constructor Details

    • CreateRandomShapeFunctions

      public CreateRandomShapeFunctions()
  • Method Details

    • randomPointsInGrid

      public static Geometry randomPointsInGrid(Geometry g, int nPts)
    • randomPointsInGridCircles

      public static Geometry randomPointsInGridCircles(Geometry g, int nPts)
    • randomPointsInGridWithGutter

      public static Geometry randomPointsInGridWithGutter(Geometry g, int nPts, double gutterFraction)
    • randomPoints

      public static Geometry randomPoints(Geometry g, int nPts)
    • randomPointsInPolygon

      public static Geometry randomPointsInPolygon(Geometry g, int nPts)
    • randomPointsInTriangle

      public static Geometry randomPointsInTriangle(Geometry g, int nPts)
    • randomRadialPoints

      public static Geometry randomRadialPoints(Geometry g, int nPts)
    • haltonPoints

      public static Geometry haltonPoints(Geometry g, int nPts)
    • haltonPoints57

      public static Geometry haltonPoints57(Geometry g, int nPts)
    • haltonPointsWithBases

      public static Geometry haltonPointsWithBases(Geometry g, int nPts, int basei, int basej)
    • robertsPoints

      public static Geometry robertsPoints(Geometry geom, int nPts)
      Creates a set of quasi-random 2D points using the Roberts recurrences. Roberts recurrences are based on the generalized Golden Ratio (for the 2D case, Phi2). They have excellent low-discrepancy characteristics. This mean they are non-periodic and have less clustering than random points or Halton points.
      Parameters:
      geom -
      nPts -
      Returns:
    • randomSegments

      public static Geometry randomSegments(Geometry g, int nPts)
    • randomSegmentsInGrid

      public static Geometry randomSegmentsInGrid(Geometry g, int nPts)
    • randomSegmentsRectilinear

      public static Geometry randomSegmentsRectilinear(Geometry g, int nPts)
    • randomLineString

      public static Geometry randomLineString(Geometry g, int nPts)
    • randomRectilinearWalk

      public static Geometry randomRectilinearWalk(Geometry g, int nPts)