Class Functions

java.lang.Object
org.apache.sedona.common.Functions

public class Functions extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.locationtech.jts.geom.Geometry
    addMeasure(org.locationtech.jts.geom.Geometry geom, double measure_start, double measure_end)
     
    static org.locationtech.jts.geom.Geometry
    addPoint(org.locationtech.jts.geom.Geometry linestring, org.locationtech.jts.geom.Geometry point)
     
    static org.locationtech.jts.geom.Geometry
    addPoint(org.locationtech.jts.geom.Geometry linestring, org.locationtech.jts.geom.Geometry point, int position)
     
    static org.locationtech.jts.geom.Geometry
    affine(org.locationtech.jts.geom.Geometry geometry, double a, double b, double d, double e, double xOff, double yOff)
     
    static org.locationtech.jts.geom.Geometry
    affine(org.locationtech.jts.geom.Geometry geometry, double a, double b, double c, double d, double e, double f, double g, double h, double i, double xOff, double yOff, double zOff)
     
    static double
    angle(org.locationtech.jts.geom.Geometry line1, org.locationtech.jts.geom.Geometry line2)
     
    static double
    angle(org.locationtech.jts.geom.Geometry point1, org.locationtech.jts.geom.Geometry point2, org.locationtech.jts.geom.Geometry point3)
     
    static double
    angle(org.locationtech.jts.geom.Geometry point1, org.locationtech.jts.geom.Geometry point2, org.locationtech.jts.geom.Geometry point3, org.locationtech.jts.geom.Geometry point4)
     
    static org.locationtech.jts.geom.Geometry
    approximateMedialAxis(org.locationtech.jts.geom.Geometry geometry)
    Computes an approximate medial axis of an areal geometry by computing the straight skeleton and filtering to keep only interior edges.
    static org.locationtech.jts.geom.Geometry
    approximateMedialAxis(org.locationtech.jts.geom.Geometry geometry, Integer maxVertices)
    Computes an approximate medial axis of an areal geometry by computing the straight skeleton and filtering to keep only interior edges, with optional vertex simplification.
    static double
    area(org.locationtech.jts.geom.Geometry geometry)
     
    static byte[]
    asEWKB(Geography geography)
     
    static byte[]
    asEWKB(org.locationtech.jts.geom.Geometry geometry)
     
    static String
    asEWKT(Geography geography)
     
    static String
    asEWKT(org.locationtech.jts.geom.Geometry geometry)
     
    static String
    asGeoJson(org.locationtech.jts.geom.Geometry geometry)
     
    static String
    asGeoJson(org.locationtech.jts.geom.Geometry geometry, String type)
     
    static String
    asGML(org.locationtech.jts.geom.Geometry geometry)
     
    static String
    asHexEWKB(org.locationtech.jts.geom.Geometry geom)
     
    static String
    asHexEWKB(org.locationtech.jts.geom.Geometry geom, String endian)
     
    static String
    asKML(org.locationtech.jts.geom.Geometry geometry)
     
    static byte[]
    asWKB(org.locationtech.jts.geom.Geometry geometry)
     
    static String
    asWKT(org.locationtech.jts.geom.Geometry geometry)
     
    static double
    azimuth(org.locationtech.jts.geom.Geometry left, org.locationtech.jts.geom.Geometry right)
     
    static double
    baseLength(org.locationtech.jts.geom.Geometry geometry)
     
    static int
    bestSRID(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    boundary(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    boundingDiagonal(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    buffer(org.locationtech.jts.geom.Geometry geometry, double radius)
     
    static org.locationtech.jts.geom.Geometry
    buffer(org.locationtech.jts.geom.Geometry geometry, double radius, boolean useSpheroid)
     
    static org.locationtech.jts.geom.Geometry
    buffer(org.locationtech.jts.geom.Geometry geometry, double radius, boolean useSpheroid, String params)
     
    static org.locationtech.jts.geom.Geometry
    buildArea(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    closestPoint(org.locationtech.jts.geom.Geometry left, org.locationtech.jts.geom.Geometry right)
     
    static org.locationtech.jts.geom.Geometry
    collectionExtract(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    collectionExtract(org.locationtech.jts.geom.Geometry geometry, Integer geomType)
     
    static org.locationtech.jts.geom.Geometry
    concaveHull(org.locationtech.jts.geom.Geometry geometry, double pctConvex, boolean allowHoles)
     
    static org.locationtech.jts.geom.Geometry
    convexHull(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    createMultiGeometry(org.locationtech.jts.geom.Geometry[] geometries)
     
    static org.locationtech.jts.geom.Geometry
    createMultiGeometryFromOneElement(org.locationtech.jts.geom.Geometry geometry)
     
    static boolean
    crossesDateLine(org.locationtech.jts.geom.Geometry geometry)
    Checks if a geometry crosses the International Date Line.
    static double
    degrees(double angleInRadian)
     
    static org.locationtech.jts.geom.Geometry
    delaunayTriangle(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    delaunayTriangle(org.locationtech.jts.geom.Geometry geometry, double tolerance)
     
    static org.locationtech.jts.geom.Geometry
    delaunayTriangle(org.locationtech.jts.geom.Geometry geometry, double tolerance, int flag)
     
    static org.locationtech.jts.geom.Geometry
    difference(org.locationtech.jts.geom.Geometry leftGeometry, org.locationtech.jts.geom.Geometry rightGeometry)
     
    static Integer
    dimension(org.locationtech.jts.geom.Geometry geometry)
     
    static Double
    distance(org.locationtech.jts.geom.Geometry left, org.locationtech.jts.geom.Geometry right)
     
    static double
    distance3d(org.locationtech.jts.geom.Geometry left, org.locationtech.jts.geom.Geometry right)
     
    static org.locationtech.jts.geom.Geometry[]
    dump(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry[]
    dumpPoints(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    endPoint(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    envelope(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    expand(org.locationtech.jts.geom.Geometry geometry, double uniformDelta)
     
    static org.locationtech.jts.geom.Geometry
    expand(org.locationtech.jts.geom.Geometry geometry, double deltaX, double deltaY)
     
    static org.locationtech.jts.geom.Geometry
    expand(org.locationtech.jts.geom.Geometry geometry, double deltaX, double deltaY, double deltaZ)
     
    static org.locationtech.jts.geom.Geometry
    exteriorRing(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    flipCoordinates(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    force2D(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    force3D(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    force3D(org.locationtech.jts.geom.Geometry geometry, double zValue)
     
    static org.locationtech.jts.geom.Geometry
    force3DM(org.locationtech.jts.geom.Geometry geom)
     
    static org.locationtech.jts.geom.Geometry
    force3DM(org.locationtech.jts.geom.Geometry geom, double mValue)
     
    static org.locationtech.jts.geom.Geometry
    force4D(org.locationtech.jts.geom.Geometry geom)
     
    static org.locationtech.jts.geom.Geometry
    force4D(org.locationtech.jts.geom.Geometry geom, double zValue, double mValue)
     
    static org.locationtech.jts.geom.Geometry
    forceCollection(org.locationtech.jts.geom.Geometry geom)
     
    static org.locationtech.jts.geom.Geometry
    forcePolygonCCW(org.locationtech.jts.geom.Geometry geom)
    Forces a Polygon/MultiPolygon to use counter-clockwise orientation for the exterior ring and a clockwise for the interior ring(s).
    static org.locationtech.jts.geom.Geometry
    forcePolygonCW(org.locationtech.jts.geom.Geometry geom)
    Forces a Polygon/MultiPolygon to use clockwise orientation for the exterior ring and a counter-clockwise for the interior ring(s).
    static double
    frechetDistance(org.locationtech.jts.geom.Geometry g1, org.locationtech.jts.geom.Geometry g2)
     
    static org.locationtech.jts.geom.Geometry
    generatePoints(org.locationtech.jts.geom.Geometry geom, int numPoints)
     
    static org.locationtech.jts.geom.Geometry
    generatePoints(org.locationtech.jts.geom.Geometry geom, int numPoints, long seed)
     
    static org.locationtech.jts.geom.Geometry
    generatePoints(org.locationtech.jts.geom.Geometry geom, int numPoints, Random random)
     
    static String
    geohash(org.locationtech.jts.geom.Geometry geometry, int precision)
     
    static org.locationtech.jts.geom.Geometry
    geometricMedian(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    geometricMedian(org.locationtech.jts.geom.Geometry geometry, double tolerance)
     
    static org.locationtech.jts.geom.Geometry
    geometricMedian(org.locationtech.jts.geom.Geometry geometry, double tolerance, int maxIter)
     
    static org.locationtech.jts.geom.Geometry
    geometricMedian(org.locationtech.jts.geom.Geometry geometry, double tolerance, int maxIter, boolean failIfNotConverged)
     
    static org.locationtech.jts.geom.Geometry
    geometryN(org.locationtech.jts.geom.Geometry geometry, int n)
     
    static String
    geometryType(org.locationtech.jts.geom.Geometry geometry)
     
    static String
    geometryTypeWithMeasured(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    getCentroid(org.locationtech.jts.geom.Geometry geometry)
     
    static int
    getSRID(org.locationtech.jts.geom.Geometry geometry)
     
    static long
    h3CellDistance(long cell1, long cell2)
    return the distance between 2 cells, if the native h3 function doesn't work, use our approximation function for shortest path and use the size - 1 as distance
    static Long[]
    h3CellIDs(org.locationtech.jts.geom.Geometry input, int level, boolean fullCover)
    cover the geometry with H3 cells
    static Long[]
    h3KRing(long cell, int k, boolean exactDistance)
    get the neighbor cells of the input cell by h3.gridDisk function
    static org.locationtech.jts.geom.Geometry[]
    h3ToGeom(long[] cells)
    gets the polygon for each h3 index provided
    static boolean
    hasM(org.locationtech.jts.geom.Geometry geom)
     
    static boolean
    hasZ(org.locationtech.jts.geom.Geometry geom)
     
    static Double
    hausdorffDistance(org.locationtech.jts.geom.Geometry g1, org.locationtech.jts.geom.Geometry g2)
     
    static Double
    hausdorffDistance(org.locationtech.jts.geom.Geometry g1, org.locationtech.jts.geom.Geometry g2, double densityFrac)
     
    static org.locationtech.jts.geom.Geometry
    interiorRingN(org.locationtech.jts.geom.Geometry geometry, int n)
     
    static double
    interpolatePoint(org.locationtech.jts.geom.Geometry geom1, org.locationtech.jts.geom.Geometry geom2)
    This function returns the m coordinate of the closest point in a LineString to the specified Point.
    static org.locationtech.jts.geom.Geometry
    intersection(org.locationtech.jts.geom.Geometry leftGeometry, org.locationtech.jts.geom.Geometry rightGeometry)
     
    static boolean
    isClosed(org.locationtech.jts.geom.Geometry geometry)
     
    static boolean
    isCollection(org.locationtech.jts.geom.Geometry geometry)
     
    static boolean
    isEmpty(org.locationtech.jts.geom.Geometry geometry)
     
    static boolean
    isPolygonCCW(org.locationtech.jts.geom.Geometry geom)
    This function accepts Polygon and MultiPolygon, if any other type is provided then it will return false.
    static boolean
    isPolygonCW(org.locationtech.jts.geom.Geometry geom)
    This function accepts Polygon and MultiPolygon, if any other type is provided then it will return false.
    static boolean
    isRing(org.locationtech.jts.geom.Geometry geometry)
     
    static boolean
    isSimple(org.locationtech.jts.geom.Geometry geometry)
     
    static boolean
    isValid(org.locationtech.jts.geom.Geometry geometry)
     
    static boolean
    isValid(org.locationtech.jts.geom.Geometry geom, int flag)
     
    isValidDetail(org.locationtech.jts.geom.Geometry geom)
     
    isValidDetail(org.locationtech.jts.geom.Geometry geom, int flag)
     
    static String
    isValidReason(org.locationtech.jts.geom.Geometry geom)
     
    static String
    isValidReason(org.locationtech.jts.geom.Geometry geom, int flag)
     
    static boolean
    isValidTrajectory(org.locationtech.jts.geom.Geometry geom)
     
    static org.locationtech.jts.geom.Geometry
    labelPoint(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    labelPoint(org.locationtech.jts.geom.Geometry geometry, int gridResolution)
     
    static org.locationtech.jts.geom.Geometry
    labelPoint(org.locationtech.jts.geom.Geometry geometry, int gridResolution, double goodnessThreshold)
     
    static double
    length(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    lineFromMultiPoint(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    lineInterpolatePoint(org.locationtech.jts.geom.Geometry geom, double fraction)
     
    static double
    lineLocatePoint(org.locationtech.jts.geom.Geometry geom, org.locationtech.jts.geom.Geometry point)
     
    static org.locationtech.jts.geom.Geometry
    lineMerge(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry[]
    lineSegments(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry[]
    lineSegments(org.locationtech.jts.geom.Geometry geometry, boolean lenient)
     
    static org.locationtech.jts.geom.Geometry
    lineSubString(org.locationtech.jts.geom.Geometry geom, double fromFraction, double toFraction)
     
    static org.locationtech.jts.geom.Geometry
    locateAlong(org.locationtech.jts.geom.Geometry linear, double measure)
     
    static org.locationtech.jts.geom.Geometry
    locateAlong(org.locationtech.jts.geom.Geometry linear, double measure, double offset)
     
    static org.locationtech.jts.geom.Geometry
    longestLine(org.locationtech.jts.geom.Geometry geom1, org.locationtech.jts.geom.Geometry geom2)
     
    static Double
    m(org.locationtech.jts.geom.Geometry geom)
     
    static org.locationtech.jts.geom.Geometry
    makeLine(org.locationtech.jts.geom.Geometry[] geoms)
     
    static org.locationtech.jts.geom.Geometry
    makeLine(org.locationtech.jts.geom.Geometry geom1, org.locationtech.jts.geom.Geometry geom2)
     
    static org.locationtech.jts.geom.Geometry
    makePolygon(org.locationtech.jts.geom.Geometry shell, org.locationtech.jts.geom.Geometry[] holes)
     
    static org.locationtech.jts.geom.Geometry
    makePolygon(org.locationtech.jts.geom.Geometry shell, org.locationtech.jts.geom.Geometry[] holes, org.locationtech.jts.geom.GeometryFactory factory)
     
    static org.locationtech.jts.geom.Geometry
    makepolygonWithSRID(org.locationtech.jts.geom.Geometry lineString, Integer srid)
     
    static org.locationtech.jts.geom.Geometry
    makeValid(org.locationtech.jts.geom.Geometry geometry, boolean keepCollapsed)
     
    static double
    maxDistance(org.locationtech.jts.geom.Geometry geom1, org.locationtech.jts.geom.Geometry geom2)
     
    maximumInscribedCircle(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    minimumBoundingCircle(org.locationtech.jts.geom.Geometry geometry, int quadrantSegments)
     
    static org.apache.commons.lang3.tuple.Pair<org.locationtech.jts.geom.Geometry,Double>
    minimumBoundingRadius(org.locationtech.jts.geom.Geometry geometry)
     
    static double
    minimumClearance(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    minimumClearanceLine(org.locationtech.jts.geom.Geometry geometry)
     
    static Double
    mMax(org.locationtech.jts.geom.Geometry geometry)
     
    static Double
    mMin(org.locationtech.jts.geom.Geometry geometry)
     
    static int
    nDims(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    normalize(org.locationtech.jts.geom.Geometry geometry)
     
    static void
    normalizeLongitude(org.locationtech.jts.geom.Geometry geometry)
    Corrects the longitudes of a geometry to be within the -180 to 180 range.
    static int
    nPoints(org.locationtech.jts.geom.Geometry geometry)
     
    static Integer
    nRings(org.locationtech.jts.geom.Geometry geometry)
     
    static int
    numGeometries(org.locationtech.jts.geom.Geometry geometry)
     
    static Integer
    numInteriorRings(org.locationtech.jts.geom.Geometry geometry)
     
    static int
    numPoints(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    orientedEnvelope(org.locationtech.jts.geom.Geometry geometry)
     
    static double
    perimeter(org.locationtech.jts.geom.Geometry geometry)
     
    static double
    perimeter(org.locationtech.jts.geom.Geometry geometry, boolean use_spheroid)
     
    static double
    perimeter(org.locationtech.jts.geom.Geometry geometry, boolean use_spheroid, boolean lenient)
     
    static org.locationtech.jts.geom.Geometry
    pointN(org.locationtech.jts.geom.Geometry geometry, int n)
     
    static org.locationtech.jts.geom.Geometry
    pointOnSurface(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    points(org.locationtech.jts.geom.Geometry geometry)
    Creates a MultiPoint containing all coordinates of the given geometry.
    static org.locationtech.jts.geom.Geometry
    polygonize(org.locationtech.jts.geom.Geometry geometry)
    This method takes a GeometryCollection and returns another GeometryCollection containing the polygons formed by the linework of a set of geometries.
    static org.locationtech.jts.geom.Geometry
    project(org.locationtech.jts.geom.Geometry point, double distance, double azimuth)
     
    static org.locationtech.jts.geom.Geometry
    project(org.locationtech.jts.geom.Geometry point, double distance, double azimuth, boolean lenient)
     
    static org.locationtech.jts.geom.Geometry
    reducePrecision(org.locationtech.jts.geom.Geometry geometry, int precisionScale)
     
    static org.locationtech.jts.geom.Geometry
    removePoint(org.locationtech.jts.geom.Geometry linestring)
     
    static org.locationtech.jts.geom.Geometry
    removePoint(org.locationtech.jts.geom.Geometry linestring, int position)
     
    static org.locationtech.jts.geom.Geometry
    removeRepeatedPoints(org.locationtech.jts.geom.Geometry geom)
     
    static org.locationtech.jts.geom.Geometry
    removeRepeatedPoints(org.locationtech.jts.geom.Geometry geom, double tolerance)
     
    static org.locationtech.jts.geom.Geometry
    reverse(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    rotate(org.locationtech.jts.geom.Geometry geometry, double angle)
    Rotates a geometry by a given angle in radians.
    static org.locationtech.jts.geom.Geometry
    rotate(org.locationtech.jts.geom.Geometry geometry, double angle, double originX, double originY)
    Rotates a geometry by a given angle in radians around a given origin point (x, y).
    static org.locationtech.jts.geom.Geometry
    rotate(org.locationtech.jts.geom.Geometry geometry, double angle, org.locationtech.jts.geom.Geometry pointOrigin)
    Rotates a geometry by a given angle in radians around a given origin point.
    static org.locationtech.jts.geom.Geometry
    rotateX(org.locationtech.jts.geom.Geometry geometry, double angle)
     
    static org.locationtech.jts.geom.Geometry
    rotateY(org.locationtech.jts.geom.Geometry geometry, double angle)
     
    static Long[]
    s2CellIDs(org.locationtech.jts.geom.Geometry input, int level)
    get the coordinates of a geometry and transform to Google s2 cell id
    static org.locationtech.jts.geom.Geometry[]
    s2ToGeom(long[] cellIds)
     
    static org.locationtech.jts.geom.Geometry
    scale(org.locationtech.jts.geom.Geometry geometry, double scaleX, double scaleY)
     
    static org.locationtech.jts.geom.Geometry
    scaleGeom(org.locationtech.jts.geom.Geometry geometry, org.locationtech.jts.geom.Geometry factor)
     
    static org.locationtech.jts.geom.Geometry
    scaleGeom(org.locationtech.jts.geom.Geometry geometry, org.locationtech.jts.geom.Geometry factor, org.locationtech.jts.geom.Geometry origin)
     
    static org.locationtech.jts.geom.Geometry
    segmentize(org.locationtech.jts.geom.Geometry geometry, double maxSegmentLength)
     
    static org.locationtech.jts.geom.Geometry
    setPoint(org.locationtech.jts.geom.Geometry linestring, int position, org.locationtech.jts.geom.Geometry point)
     
    static org.locationtech.jts.geom.Geometry
    setSRID(org.locationtech.jts.geom.Geometry geometry, int srid)
     
    static org.locationtech.jts.geom.Geometry
    shiftLongitude(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    simplify(org.locationtech.jts.geom.Geometry geom, double distanceTolerance)
     
    static org.locationtech.jts.geom.Geometry
    simplifyPolygonHull(org.locationtech.jts.geom.Geometry geometry, double vertexFactor)
     
    static org.locationtech.jts.geom.Geometry
    simplifyPolygonHull(org.locationtech.jts.geom.Geometry geometry, double vertexFactor, boolean isOuter)
     
    static org.locationtech.jts.geom.Geometry
    simplifyPreserveTopology(org.locationtech.jts.geom.Geometry geometry, double distanceTolerance)
     
    static org.locationtech.jts.geom.Geometry
    simplifyVW(org.locationtech.jts.geom.Geometry geometry, double tolerance)
     
    static org.locationtech.jts.geom.Geometry
    snap(org.locationtech.jts.geom.Geometry input, org.locationtech.jts.geom.Geometry reference, double tolerance)
     
    static org.locationtech.jts.geom.Geometry
    split(org.locationtech.jts.geom.Geometry input, org.locationtech.jts.geom.Geometry blade)
     
    static org.locationtech.jts.geom.Geometry
    startPoint(org.locationtech.jts.geom.Geometry geometry)
     
    static org.locationtech.jts.geom.Geometry
    straightSkeleton(org.locationtech.jts.geom.Geometry geometry)
    Computes the straight skeleton of an areal geometry.
    static org.locationtech.jts.geom.Geometry
    straightSkeleton(org.locationtech.jts.geom.Geometry geometry, Integer maxVertices)
    Computes the straight skeleton of an areal geometry with optional vertex simplification.
    static org.locationtech.jts.geom.Geometry[]
    subDivide(org.locationtech.jts.geom.Geometry geometry, int maxVertices)
     
    static org.locationtech.jts.geom.Geometry
    symDifference(org.locationtech.jts.geom.Geometry leftGeom, org.locationtech.jts.geom.Geometry rightGeom)
     
    static org.locationtech.jts.geom.Geometry
    translate(org.locationtech.jts.geom.Geometry geometry, double deltaX, double deltaY)
     
    static org.locationtech.jts.geom.Geometry
    translate(org.locationtech.jts.geom.Geometry geometry, double deltaX, double deltaY, double deltaZ)
     
    static org.locationtech.jts.geom.Geometry
    triangulatePolygon(org.locationtech.jts.geom.Geometry geom)
     
    static org.locationtech.jts.geom.Geometry
    unaryUnion(org.locationtech.jts.geom.Geometry geom)
     
    static org.locationtech.jts.geom.Geometry
    union(org.locationtech.jts.geom.Geometry[] geoms)
     
    static org.locationtech.jts.geom.Geometry
    union(org.locationtech.jts.geom.Geometry leftGeom, org.locationtech.jts.geom.Geometry rightGeom)
     
    static Double
    x(org.locationtech.jts.geom.Geometry geometry)
     
    static double
    xMax(org.locationtech.jts.geom.Geometry geometry)
     
    static double
    xMin(org.locationtech.jts.geom.Geometry geometry)
     
    static Double
    y(org.locationtech.jts.geom.Geometry geometry)
     
    static double
    yMax(org.locationtech.jts.geom.Geometry geometry)
     
    static double
    yMin(org.locationtech.jts.geom.Geometry geometry)
     
    static Double
    z(org.locationtech.jts.geom.Geometry geometry)
     
    static Double
    zMax(org.locationtech.jts.geom.Geometry geometry)
     
    static int
    zmFlag(org.locationtech.jts.geom.Geometry geom)
     
    static Double
    zMin(org.locationtech.jts.geom.Geometry geometry)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Functions

      public Functions()
  • Method Details

    • area

      public static double area(org.locationtech.jts.geom.Geometry geometry)
    • labelPoint

      public static org.locationtech.jts.geom.Geometry labelPoint(org.locationtech.jts.geom.Geometry geometry)
    • labelPoint

      public static org.locationtech.jts.geom.Geometry labelPoint(org.locationtech.jts.geom.Geometry geometry, int gridResolution)
    • labelPoint

      public static org.locationtech.jts.geom.Geometry labelPoint(org.locationtech.jts.geom.Geometry geometry, int gridResolution, double goodnessThreshold)
    • azimuth

      public static double azimuth(org.locationtech.jts.geom.Geometry left, org.locationtech.jts.geom.Geometry right)
    • boundary

      public static org.locationtech.jts.geom.Geometry boundary(org.locationtech.jts.geom.Geometry geometry)
    • expand

      public static org.locationtech.jts.geom.Geometry expand(org.locationtech.jts.geom.Geometry geometry, double uniformDelta)
    • expand

      public static org.locationtech.jts.geom.Geometry expand(org.locationtech.jts.geom.Geometry geometry, double deltaX, double deltaY)
    • expand

      public static org.locationtech.jts.geom.Geometry expand(org.locationtech.jts.geom.Geometry geometry, double deltaX, double deltaY, double deltaZ)
    • buffer

      public static org.locationtech.jts.geom.Geometry buffer(org.locationtech.jts.geom.Geometry geometry, double radius)
    • buffer

      public static org.locationtech.jts.geom.Geometry buffer(org.locationtech.jts.geom.Geometry geometry, double radius, boolean useSpheroid)
    • buffer

      public static org.locationtech.jts.geom.Geometry buffer(org.locationtech.jts.geom.Geometry geometry, double radius, boolean useSpheroid, String params) throws IllegalArgumentException
      Throws:
      IllegalArgumentException
    • bestSRID

      public static int bestSRID(org.locationtech.jts.geom.Geometry geometry) throws IllegalArgumentException
      Throws:
      IllegalArgumentException
    • normalizeLongitude

      public static void normalizeLongitude(org.locationtech.jts.geom.Geometry geometry)
      Corrects the longitudes of a geometry to be within the -180 to 180 range. This method modifies the original geometry.
      Parameters:
      geometry - The geometry to be corrected.
    • crossesDateLine

      public static boolean crossesDateLine(org.locationtech.jts.geom.Geometry geometry)
      Checks if a geometry crosses the International Date Line.
      Parameters:
      geometry - The geometry to check.
      Returns:
      True if the geometry crosses the Date Line, false otherwise.
    • shiftLongitude

      public static org.locationtech.jts.geom.Geometry shiftLongitude(org.locationtech.jts.geom.Geometry geometry)
    • envelope

      public static org.locationtech.jts.geom.Geometry envelope(org.locationtech.jts.geom.Geometry geometry)
    • distance

      public static Double distance(org.locationtech.jts.geom.Geometry left, org.locationtech.jts.geom.Geometry right)
    • distance3d

      public static double distance3d(org.locationtech.jts.geom.Geometry left, org.locationtech.jts.geom.Geometry right)
    • baseLength

      public static double baseLength(org.locationtech.jts.geom.Geometry geometry)
    • length

      public static double length(org.locationtech.jts.geom.Geometry geometry)
    • normalize

      public static org.locationtech.jts.geom.Geometry normalize(org.locationtech.jts.geom.Geometry geometry)
    • x

      public static Double x(org.locationtech.jts.geom.Geometry geometry)
    • y

      public static Double y(org.locationtech.jts.geom.Geometry geometry)
    • z

      public static Double z(org.locationtech.jts.geom.Geometry geometry)
    • m

      public static Double m(org.locationtech.jts.geom.Geometry geom)
    • mMin

      public static Double mMin(org.locationtech.jts.geom.Geometry geometry)
    • mMax

      public static Double mMax(org.locationtech.jts.geom.Geometry geometry)
    • xMin

      public static double xMin(org.locationtech.jts.geom.Geometry geometry)
    • xMax

      public static double xMax(org.locationtech.jts.geom.Geometry geometry)
    • yMin

      public static double yMin(org.locationtech.jts.geom.Geometry geometry)
    • yMax

      public static double yMax(org.locationtech.jts.geom.Geometry geometry)
    • zMax

      public static Double zMax(org.locationtech.jts.geom.Geometry geometry)
    • zMin

      public static Double zMin(org.locationtech.jts.geom.Geometry geometry)
    • hasM

      public static boolean hasM(org.locationtech.jts.geom.Geometry geom)
    • hasZ

      public static boolean hasZ(org.locationtech.jts.geom.Geometry geom)
    • flipCoordinates

      public static org.locationtech.jts.geom.Geometry flipCoordinates(org.locationtech.jts.geom.Geometry geometry)
    • geohash

      public static String geohash(org.locationtech.jts.geom.Geometry geometry, int precision)
    • pointOnSurface

      public static org.locationtech.jts.geom.Geometry pointOnSurface(org.locationtech.jts.geom.Geometry geometry)
    • reverse

      public static org.locationtech.jts.geom.Geometry reverse(org.locationtech.jts.geom.Geometry geometry)
    • geometryN

      public static org.locationtech.jts.geom.Geometry geometryN(org.locationtech.jts.geom.Geometry geometry, int n)
    • interiorRingN

      public static org.locationtech.jts.geom.Geometry interiorRingN(org.locationtech.jts.geom.Geometry geometry, int n)
    • pointN

      public static org.locationtech.jts.geom.Geometry pointN(org.locationtech.jts.geom.Geometry geometry, int n)
    • exteriorRing

      public static org.locationtech.jts.geom.Geometry exteriorRing(org.locationtech.jts.geom.Geometry geometry)
    • asEWKT

      public static String asEWKT(org.locationtech.jts.geom.Geometry geometry)
    • asEWKT

      public static String asEWKT(Geography geography)
    • asWKT

      public static String asWKT(org.locationtech.jts.geom.Geometry geometry)
    • asEWKB

      public static byte[] asEWKB(org.locationtech.jts.geom.Geometry geometry)
    • asEWKB

      public static byte[] asEWKB(Geography geography)
    • asHexEWKB

      public static String asHexEWKB(org.locationtech.jts.geom.Geometry geom, String endian)
    • asHexEWKB

      public static String asHexEWKB(org.locationtech.jts.geom.Geometry geom)
    • asWKB

      public static byte[] asWKB(org.locationtech.jts.geom.Geometry geometry)
    • asGeoJson

      public static String asGeoJson(org.locationtech.jts.geom.Geometry geometry)
    • asGeoJson

      public static String asGeoJson(org.locationtech.jts.geom.Geometry geometry, String type)
    • nPoints

      public static int nPoints(org.locationtech.jts.geom.Geometry geometry)
    • nDims

      public static int nDims(org.locationtech.jts.geom.Geometry geometry)
    • numGeometries

      public static int numGeometries(org.locationtech.jts.geom.Geometry geometry)
    • numInteriorRings

      public static Integer numInteriorRings(org.locationtech.jts.geom.Geometry geometry)
    • asGML

      public static String asGML(org.locationtech.jts.geom.Geometry geometry)
    • asKML

      public static String asKML(org.locationtech.jts.geom.Geometry geometry)
    • force2D

      public static org.locationtech.jts.geom.Geometry force2D(org.locationtech.jts.geom.Geometry geometry)
    • isEmpty

      public static boolean isEmpty(org.locationtech.jts.geom.Geometry geometry)
    • buildArea

      public static org.locationtech.jts.geom.Geometry buildArea(org.locationtech.jts.geom.Geometry geometry)
    • setSRID

      public static org.locationtech.jts.geom.Geometry setSRID(org.locationtech.jts.geom.Geometry geometry, int srid)
    • getSRID

      public static int getSRID(org.locationtech.jts.geom.Geometry geometry)
    • isClosed

      public static boolean isClosed(org.locationtech.jts.geom.Geometry geometry)
    • isRing

      public static boolean isRing(org.locationtech.jts.geom.Geometry geometry)
    • isSimple

      public static boolean isSimple(org.locationtech.jts.geom.Geometry geometry)
    • isValid

      public static boolean isValid(org.locationtech.jts.geom.Geometry geometry)
    • isValid

      public static boolean isValid(org.locationtech.jts.geom.Geometry geom, int flag)
    • isValidTrajectory

      public static boolean isValidTrajectory(org.locationtech.jts.geom.Geometry geom)
    • addPoint

      public static org.locationtech.jts.geom.Geometry addPoint(org.locationtech.jts.geom.Geometry linestring, org.locationtech.jts.geom.Geometry point)
    • addPoint

      public static org.locationtech.jts.geom.Geometry addPoint(org.locationtech.jts.geom.Geometry linestring, org.locationtech.jts.geom.Geometry point, int position)
    • removePoint

      public static org.locationtech.jts.geom.Geometry removePoint(org.locationtech.jts.geom.Geometry linestring)
    • removePoint

      public static org.locationtech.jts.geom.Geometry removePoint(org.locationtech.jts.geom.Geometry linestring, int position)
    • removeRepeatedPoints

      public static org.locationtech.jts.geom.Geometry removeRepeatedPoints(org.locationtech.jts.geom.Geometry geom, double tolerance)
    • removeRepeatedPoints

      public static org.locationtech.jts.geom.Geometry removeRepeatedPoints(org.locationtech.jts.geom.Geometry geom)
    • setPoint

      public static org.locationtech.jts.geom.Geometry setPoint(org.locationtech.jts.geom.Geometry linestring, int position, org.locationtech.jts.geom.Geometry point)
    • lineFromMultiPoint

      public static org.locationtech.jts.geom.Geometry lineFromMultiPoint(org.locationtech.jts.geom.Geometry geometry)
    • closestPoint

      public static org.locationtech.jts.geom.Geometry closestPoint(org.locationtech.jts.geom.Geometry left, org.locationtech.jts.geom.Geometry right)
    • delaunayTriangle

      public static org.locationtech.jts.geom.Geometry delaunayTriangle(org.locationtech.jts.geom.Geometry geometry)
    • delaunayTriangle

      public static org.locationtech.jts.geom.Geometry delaunayTriangle(org.locationtech.jts.geom.Geometry geometry, double tolerance)
    • delaunayTriangle

      public static org.locationtech.jts.geom.Geometry delaunayTriangle(org.locationtech.jts.geom.Geometry geometry, double tolerance, int flag)
    • zmFlag

      public static int zmFlag(org.locationtech.jts.geom.Geometry geom)
    • concaveHull

      public static org.locationtech.jts.geom.Geometry concaveHull(org.locationtech.jts.geom.Geometry geometry, double pctConvex, boolean allowHoles)
    • convexHull

      public static org.locationtech.jts.geom.Geometry convexHull(org.locationtech.jts.geom.Geometry geometry)
    • getCentroid

      public static org.locationtech.jts.geom.Geometry getCentroid(org.locationtech.jts.geom.Geometry geometry)
    • intersection

      public static org.locationtech.jts.geom.Geometry intersection(org.locationtech.jts.geom.Geometry leftGeometry, org.locationtech.jts.geom.Geometry rightGeometry)
    • makeValid

      public static org.locationtech.jts.geom.Geometry makeValid(org.locationtech.jts.geom.Geometry geometry, boolean keepCollapsed)
    • reducePrecision

      public static org.locationtech.jts.geom.Geometry reducePrecision(org.locationtech.jts.geom.Geometry geometry, int precisionScale)
    • lineMerge

      public static org.locationtech.jts.geom.Geometry lineMerge(org.locationtech.jts.geom.Geometry geometry)
    • lineSegments

      public static org.locationtech.jts.geom.Geometry[] lineSegments(org.locationtech.jts.geom.Geometry geometry, boolean lenient)
    • lineSegments

      public static org.locationtech.jts.geom.Geometry[] lineSegments(org.locationtech.jts.geom.Geometry geometry)
    • minimumBoundingCircle

      public static org.locationtech.jts.geom.Geometry minimumBoundingCircle(org.locationtech.jts.geom.Geometry geometry, int quadrantSegments)
    • orientedEnvelope

      public static org.locationtech.jts.geom.Geometry orientedEnvelope(org.locationtech.jts.geom.Geometry geometry)
    • maximumInscribedCircle

      public static InscribedCircle maximumInscribedCircle(org.locationtech.jts.geom.Geometry geometry)
    • minimumBoundingRadius

      public static org.apache.commons.lang3.tuple.Pair<org.locationtech.jts.geom.Geometry,Double> minimumBoundingRadius(org.locationtech.jts.geom.Geometry geometry)
    • minimumClearance

      public static double minimumClearance(org.locationtech.jts.geom.Geometry geometry)
    • minimumClearanceLine

      public static org.locationtech.jts.geom.Geometry minimumClearanceLine(org.locationtech.jts.geom.Geometry geometry)
    • lineSubString

      public static org.locationtech.jts.geom.Geometry lineSubString(org.locationtech.jts.geom.Geometry geom, double fromFraction, double toFraction)
    • lineInterpolatePoint

      public static org.locationtech.jts.geom.Geometry lineInterpolatePoint(org.locationtech.jts.geom.Geometry geom, double fraction)
    • perimeter

      public static double perimeter(org.locationtech.jts.geom.Geometry geometry, boolean use_spheroid, boolean lenient)
    • perimeter

      public static double perimeter(org.locationtech.jts.geom.Geometry geometry, boolean use_spheroid)
    • perimeter

      public static double perimeter(org.locationtech.jts.geom.Geometry geometry)
    • forcePolygonCW

      public static org.locationtech.jts.geom.Geometry forcePolygonCW(org.locationtech.jts.geom.Geometry geom)
      Forces a Polygon/MultiPolygon to use clockwise orientation for the exterior ring and a counter-clockwise for the interior ring(s).
      Parameters:
      geom -
      Returns:
      a clockwise orientated (Multi)Polygon
    • isPolygonCW

      public static boolean isPolygonCW(org.locationtech.jts.geom.Geometry geom)
      This function accepts Polygon and MultiPolygon, if any other type is provided then it will return false. If the exterior ring is clockwise and the interior ring(s) are counter-clockwise then returns true, otherwise false.
      Parameters:
      geom - Polygon or MultiPolygon
      Returns:
    • triangulatePolygon

      public static org.locationtech.jts.geom.Geometry triangulatePolygon(org.locationtech.jts.geom.Geometry geom)
    • lineLocatePoint

      public static double lineLocatePoint(org.locationtech.jts.geom.Geometry geom, org.locationtech.jts.geom.Geometry point)
    • locateAlong

      public static org.locationtech.jts.geom.Geometry locateAlong(org.locationtech.jts.geom.Geometry linear, double measure, double offset)
    • locateAlong

      public static org.locationtech.jts.geom.Geometry locateAlong(org.locationtech.jts.geom.Geometry linear, double measure)
    • forcePolygonCCW

      public static org.locationtech.jts.geom.Geometry forcePolygonCCW(org.locationtech.jts.geom.Geometry geom)
      Forces a Polygon/MultiPolygon to use counter-clockwise orientation for the exterior ring and a clockwise for the interior ring(s).
      Parameters:
      geom -
      Returns:
      a counter-clockwise orientated (Multi)Polygon
    • isPolygonCCW

      public static boolean isPolygonCCW(org.locationtech.jts.geom.Geometry geom)
      This function accepts Polygon and MultiPolygon, if any other type is provided then it will return false. If the exterior ring is counter-clockwise and the interior ring(s) are clockwise then returns true, otherwise false.
      Parameters:
      geom - Polygon or MultiPolygon
      Returns:
    • addMeasure

      public static org.locationtech.jts.geom.Geometry addMeasure(org.locationtech.jts.geom.Geometry geom, double measure_start, double measure_end)
    • maxDistance

      public static double maxDistance(org.locationtech.jts.geom.Geometry geom1, org.locationtech.jts.geom.Geometry geom2)
    • longestLine

      public static org.locationtech.jts.geom.Geometry longestLine(org.locationtech.jts.geom.Geometry geom1, org.locationtech.jts.geom.Geometry geom2)
    • difference

      public static org.locationtech.jts.geom.Geometry difference(org.locationtech.jts.geom.Geometry leftGeometry, org.locationtech.jts.geom.Geometry rightGeometry)
    • split

      public static org.locationtech.jts.geom.Geometry split(org.locationtech.jts.geom.Geometry input, org.locationtech.jts.geom.Geometry blade)
    • dimension

      public static Integer dimension(org.locationtech.jts.geom.Geometry geometry)
    • project

      public static org.locationtech.jts.geom.Geometry project(org.locationtech.jts.geom.Geometry point, double distance, double azimuth, boolean lenient)
    • project

      public static org.locationtech.jts.geom.Geometry project(org.locationtech.jts.geom.Geometry point, double distance, double azimuth)
    • s2CellIDs

      public static Long[] s2CellIDs(org.locationtech.jts.geom.Geometry input, int level)
      get the coordinates of a geometry and transform to Google s2 cell id
      Parameters:
      input - Geometry
      level - integer, minimum level of cells covering the geometry
      Returns:
      List of coordinates
    • s2ToGeom

      public static org.locationtech.jts.geom.Geometry[] s2ToGeom(long[] cellIds)
      Parameters:
      cellIds - array of cell ids
      Returns:
      An array of polygons for the cell ids
    • h3CellIDs

      public static Long[] h3CellIDs(org.locationtech.jts.geom.Geometry input, int level, boolean fullCover)
      cover the geometry with H3 cells
      Parameters:
      input - the input geometry
      level - the resolution of h3 cells
      fullCover - whether enforce full cover or not.
      Returns:
    • h3CellDistance

      public static long h3CellDistance(long cell1, long cell2)
      return the distance between 2 cells, if the native h3 function doesn't work, use our approximation function for shortest path and use the size - 1 as distance
      Parameters:
      cell1 - source cell
      cell2 - destination cell
      Returns:
    • h3KRing

      public static Long[] h3KRing(long cell, int k, boolean exactDistance)
      get the neighbor cells of the input cell by h3.gridDisk function
      Parameters:
      cell - : original cell
      k - : the k number of rings spread from the original cell
      exactDistance - : if exactDistance is true, it will only return the cells on the exact kth ring, else will return all 0 - kth neighbors
      Returns:
    • h3ToGeom

      public static org.locationtech.jts.geom.Geometry[] h3ToGeom(long[] cells)
      gets the polygon for each h3 index provided
      Parameters:
      cells - : the set of cells
      Returns:
      An Array of Polygons reversed
    • simplify

      public static org.locationtech.jts.geom.Geometry simplify(org.locationtech.jts.geom.Geometry geom, double distanceTolerance)
    • simplifyPreserveTopology

      public static org.locationtech.jts.geom.Geometry simplifyPreserveTopology(org.locationtech.jts.geom.Geometry geometry, double distanceTolerance)
    • simplifyVW

      public static org.locationtech.jts.geom.Geometry simplifyVW(org.locationtech.jts.geom.Geometry geometry, double tolerance)
    • simplifyPolygonHull

      public static org.locationtech.jts.geom.Geometry simplifyPolygonHull(org.locationtech.jts.geom.Geometry geometry, double vertexFactor, boolean isOuter)
    • simplifyPolygonHull

      public static org.locationtech.jts.geom.Geometry simplifyPolygonHull(org.locationtech.jts.geom.Geometry geometry, double vertexFactor)
    • geometryType

      public static String geometryType(org.locationtech.jts.geom.Geometry geometry)
    • geometryTypeWithMeasured

      public static String geometryTypeWithMeasured(org.locationtech.jts.geom.Geometry geometry)
    • startPoint

      public static org.locationtech.jts.geom.Geometry startPoint(org.locationtech.jts.geom.Geometry geometry)
    • endPoint

      public static org.locationtech.jts.geom.Geometry endPoint(org.locationtech.jts.geom.Geometry geometry)
    • dump

      public static org.locationtech.jts.geom.Geometry[] dump(org.locationtech.jts.geom.Geometry geometry)
    • dumpPoints

      public static org.locationtech.jts.geom.Geometry[] dumpPoints(org.locationtech.jts.geom.Geometry geometry)
    • symDifference

      public static org.locationtech.jts.geom.Geometry symDifference(org.locationtech.jts.geom.Geometry leftGeom, org.locationtech.jts.geom.Geometry rightGeom)
    • union

      public static org.locationtech.jts.geom.Geometry union(org.locationtech.jts.geom.Geometry leftGeom, org.locationtech.jts.geom.Geometry rightGeom)
    • union

      public static org.locationtech.jts.geom.Geometry union(org.locationtech.jts.geom.Geometry[] geoms)
    • unaryUnion

      public static org.locationtech.jts.geom.Geometry unaryUnion(org.locationtech.jts.geom.Geometry geom)
    • createMultiGeometryFromOneElement

      public static org.locationtech.jts.geom.Geometry createMultiGeometryFromOneElement(org.locationtech.jts.geom.Geometry geometry)
    • subDivide

      public static org.locationtech.jts.geom.Geometry[] subDivide(org.locationtech.jts.geom.Geometry geometry, int maxVertices)
    • segmentize

      public static org.locationtech.jts.geom.Geometry segmentize(org.locationtech.jts.geom.Geometry geometry, double maxSegmentLength)
    • snap

      public static org.locationtech.jts.geom.Geometry snap(org.locationtech.jts.geom.Geometry input, org.locationtech.jts.geom.Geometry reference, double tolerance)
    • makeLine

      public static org.locationtech.jts.geom.Geometry makeLine(org.locationtech.jts.geom.Geometry geom1, org.locationtech.jts.geom.Geometry geom2)
    • makeLine

      public static org.locationtech.jts.geom.Geometry makeLine(org.locationtech.jts.geom.Geometry[] geoms)
    • makePolygon

      public static org.locationtech.jts.geom.Geometry makePolygon(org.locationtech.jts.geom.Geometry shell, org.locationtech.jts.geom.Geometry[] holes)
    • makePolygon

      public static org.locationtech.jts.geom.Geometry makePolygon(org.locationtech.jts.geom.Geometry shell, org.locationtech.jts.geom.Geometry[] holes, org.locationtech.jts.geom.GeometryFactory factory)
    • makepolygonWithSRID

      public static org.locationtech.jts.geom.Geometry makepolygonWithSRID(org.locationtech.jts.geom.Geometry lineString, Integer srid)
    • createMultiGeometry

      public static org.locationtech.jts.geom.Geometry createMultiGeometry(org.locationtech.jts.geom.Geometry[] geometries)
    • collectionExtract

      public static org.locationtech.jts.geom.Geometry collectionExtract(org.locationtech.jts.geom.Geometry geometry, Integer geomType)
    • collectionExtract

      public static org.locationtech.jts.geom.Geometry collectionExtract(org.locationtech.jts.geom.Geometry geometry)
    • numPoints

      public static int numPoints(org.locationtech.jts.geom.Geometry geometry) throws Exception
      Throws:
      Exception
    • force3DM

      public static org.locationtech.jts.geom.Geometry force3DM(org.locationtech.jts.geom.Geometry geom, double mValue)
    • force3DM

      public static org.locationtech.jts.geom.Geometry force3DM(org.locationtech.jts.geom.Geometry geom)
    • force4D

      public static org.locationtech.jts.geom.Geometry force4D(org.locationtech.jts.geom.Geometry geom, double zValue, double mValue)
    • force4D

      public static org.locationtech.jts.geom.Geometry force4D(org.locationtech.jts.geom.Geometry geom)
    • force3D

      public static org.locationtech.jts.geom.Geometry force3D(org.locationtech.jts.geom.Geometry geometry, double zValue)
    • force3D

      public static org.locationtech.jts.geom.Geometry force3D(org.locationtech.jts.geom.Geometry geometry)
    • forceCollection

      public static org.locationtech.jts.geom.Geometry forceCollection(org.locationtech.jts.geom.Geometry geom)
    • generatePoints

      public static org.locationtech.jts.geom.Geometry generatePoints(org.locationtech.jts.geom.Geometry geom, int numPoints, long seed)
    • generatePoints

      public static org.locationtech.jts.geom.Geometry generatePoints(org.locationtech.jts.geom.Geometry geom, int numPoints)
    • generatePoints

      public static org.locationtech.jts.geom.Geometry generatePoints(org.locationtech.jts.geom.Geometry geom, int numPoints, Random random)
    • nRings

      public static Integer nRings(org.locationtech.jts.geom.Geometry geometry) throws Exception
      Throws:
      Exception
    • translate

      public static org.locationtech.jts.geom.Geometry translate(org.locationtech.jts.geom.Geometry geometry, double deltaX, double deltaY, double deltaZ)
    • translate

      public static org.locationtech.jts.geom.Geometry translate(org.locationtech.jts.geom.Geometry geometry, double deltaX, double deltaY)
    • affine

      public static org.locationtech.jts.geom.Geometry affine(org.locationtech.jts.geom.Geometry geometry, double a, double b, double c, double d, double e, double f, double g, double h, double i, double xOff, double yOff, double zOff)
    • affine

      public static org.locationtech.jts.geom.Geometry affine(org.locationtech.jts.geom.Geometry geometry, double a, double b, double d, double e, double xOff, double yOff)
    • geometricMedian

      public static org.locationtech.jts.geom.Geometry geometricMedian(org.locationtech.jts.geom.Geometry geometry, double tolerance, int maxIter, boolean failIfNotConverged) throws Exception
      Throws:
      Exception
    • geometricMedian

      public static org.locationtech.jts.geom.Geometry geometricMedian(org.locationtech.jts.geom.Geometry geometry, double tolerance, int maxIter) throws Exception
      Throws:
      Exception
    • geometricMedian

      public static org.locationtech.jts.geom.Geometry geometricMedian(org.locationtech.jts.geom.Geometry geometry, double tolerance) throws Exception
      Throws:
      Exception
    • geometricMedian

      public static org.locationtech.jts.geom.Geometry geometricMedian(org.locationtech.jts.geom.Geometry geometry) throws Exception
      Throws:
      Exception
    • frechetDistance

      public static double frechetDistance(org.locationtech.jts.geom.Geometry g1, org.locationtech.jts.geom.Geometry g2)
    • isCollection

      public static boolean isCollection(org.locationtech.jts.geom.Geometry geometry)
    • boundingDiagonal

      public static org.locationtech.jts.geom.Geometry boundingDiagonal(org.locationtech.jts.geom.Geometry geometry)
    • angle

      public static double angle(org.locationtech.jts.geom.Geometry point1, org.locationtech.jts.geom.Geometry point2, org.locationtech.jts.geom.Geometry point3, org.locationtech.jts.geom.Geometry point4) throws IllegalArgumentException
      Throws:
      IllegalArgumentException
    • angle

      public static double angle(org.locationtech.jts.geom.Geometry point1, org.locationtech.jts.geom.Geometry point2, org.locationtech.jts.geom.Geometry point3) throws IllegalArgumentException
      Throws:
      IllegalArgumentException
    • angle

      public static double angle(org.locationtech.jts.geom.Geometry line1, org.locationtech.jts.geom.Geometry line2) throws IllegalArgumentException
      Throws:
      IllegalArgumentException
    • degrees

      public static double degrees(double angleInRadian)
    • hausdorffDistance

      public static Double hausdorffDistance(org.locationtech.jts.geom.Geometry g1, org.locationtech.jts.geom.Geometry g2, double densityFrac)
    • hausdorffDistance

      public static Double hausdorffDistance(org.locationtech.jts.geom.Geometry g1, org.locationtech.jts.geom.Geometry g2)
    • isValidDetail

      public static ValidDetail isValidDetail(org.locationtech.jts.geom.Geometry geom)
    • isValidDetail

      public static ValidDetail isValidDetail(org.locationtech.jts.geom.Geometry geom, int flag)
    • isValidReason

      public static String isValidReason(org.locationtech.jts.geom.Geometry geom)
    • isValidReason

      public static String isValidReason(org.locationtech.jts.geom.Geometry geom, int flag)
    • polygonize

      public static org.locationtech.jts.geom.Geometry polygonize(org.locationtech.jts.geom.Geometry geometry)
      This method takes a GeometryCollection and returns another GeometryCollection containing the polygons formed by the linework of a set of geometries.
      Parameters:
      geometry - A collection of Geometry objects that should contain only linestrings.
      Returns:
      A GeometryCollection containing the resultant polygons.
    • points

      public static org.locationtech.jts.geom.Geometry points(org.locationtech.jts.geom.Geometry geometry)
      Creates a MultiPoint containing all coordinates of the given geometry. Duplicates, M and Z coordinates are preserved.
      Parameters:
      geometry - The input geometry
      Returns:
      A MultiPoint geometry
    • scale

      public static org.locationtech.jts.geom.Geometry scale(org.locationtech.jts.geom.Geometry geometry, double scaleX, double scaleY)
    • scaleGeom

      public static org.locationtech.jts.geom.Geometry scaleGeom(org.locationtech.jts.geom.Geometry geometry, org.locationtech.jts.geom.Geometry factor)
    • scaleGeom

      public static org.locationtech.jts.geom.Geometry scaleGeom(org.locationtech.jts.geom.Geometry geometry, org.locationtech.jts.geom.Geometry factor, org.locationtech.jts.geom.Geometry origin)
    • rotateX

      public static org.locationtech.jts.geom.Geometry rotateX(org.locationtech.jts.geom.Geometry geometry, double angle)
    • rotateY

      public static org.locationtech.jts.geom.Geometry rotateY(org.locationtech.jts.geom.Geometry geometry, double angle)
    • rotate

      public static org.locationtech.jts.geom.Geometry rotate(org.locationtech.jts.geom.Geometry geometry, double angle)
      Rotates a geometry by a given angle in radians.
      Parameters:
      geometry - The input geometry to rotate.
      angle - The angle in radians to rotate the geometry.
      Returns:
      The rotated geometry.
    • rotate

      public static org.locationtech.jts.geom.Geometry rotate(org.locationtech.jts.geom.Geometry geometry, double angle, double originX, double originY)
      Rotates a geometry by a given angle in radians around a given origin point (x, y).
      Parameters:
      geometry - The input geometry to rotate.
      angle - The angle in radians to rotate the geometry.
      originX - The x coordinate of the origin point around which to rotate.
      originY - The y coordinate of the origin point around which to rotate.
      Returns:
      The rotated geometry.
    • rotate

      public static org.locationtech.jts.geom.Geometry rotate(org.locationtech.jts.geom.Geometry geometry, double angle, org.locationtech.jts.geom.Geometry pointOrigin)
      Rotates a geometry by a given angle in radians around a given origin point.
      Parameters:
      geometry - The input geometry to rotate.
      angle - The angle in radians to rotate the geometry.
      pointOrigin - The origin point around which to rotate.
      Returns:
      The rotated geometry.
      Throws:
      IllegalArgumentException - if the pointOrigin is not a Point geometry.
    • interpolatePoint

      public static double interpolatePoint(org.locationtech.jts.geom.Geometry geom1, org.locationtech.jts.geom.Geometry geom2)
      This function returns the m coordinate of the closest point in a LineString to the specified Point.
      Parameters:
      geom1 - The LineString (with or without M values) to be evaluated.
      geom2 - The Point object to find the closest point to.
      Returns:
      The interpolated M value of the closest point on the LineString.
    • straightSkeleton

      public static org.locationtech.jts.geom.Geometry straightSkeleton(org.locationtech.jts.geom.Geometry geometry)
      Computes the straight skeleton of an areal geometry. The straight skeleton is a method of representing a polygon by a topological skeleton, formed by a continuous shrinking process where each edge moves inward in parallel at a uniform speed.

      This implementation uses the campskeleton library which implements the weighted straight skeleton algorithm based on Felkel's approach. The result represents the "skeleton" or centerline of the polygon.

      Parameters:
      geometry - The areal geometry (Polygon or MultiPolygon)
      Returns:
      A MultiLineString representing the straight skeleton, or null if input is null/empty
    • straightSkeleton

      public static org.locationtech.jts.geom.Geometry straightSkeleton(org.locationtech.jts.geom.Geometry geometry, Integer maxVertices)
      Computes the straight skeleton of an areal geometry with optional vertex simplification.

      The straight skeleton is a method of representing a polygon by a topological skeleton, formed by a continuous shrinking process where each edge moves inward in parallel at a uniform speed.

      For polygons with many vertices, performance can be improved by limiting the vertex count. The algorithm will merge the shortest edges until the vertex count is reduced to the specified limit.

      Parameters:
      geometry - The areal geometry (Polygon or MultiPolygon)
      maxVertices - Maximum number of vertices per polygon (0 to disable simplification). Recommended: 100-500 for performance
      Returns:
      A MultiLineString representing the straight skeleton, or null if input is null/empty
    • approximateMedialAxis

      public static org.locationtech.jts.geom.Geometry approximateMedialAxis(org.locationtech.jts.geom.Geometry geometry)
      Computes an approximate medial axis of an areal geometry by computing the straight skeleton and filtering to keep only interior edges.

      The medial axis is approximated by first computing the straight skeleton, then filtering to keep only edges where both endpoints are interior to the polygon (not on the boundary). This produces a cleaner skeleton by removing branches that extend to the boundary.

      Parameters:
      geometry - The areal geometry (Polygon or MultiPolygon)
      Returns:
      A MultiLineString representing the approximate medial axis, or null if input is null/empty
    • approximateMedialAxis

      public static org.locationtech.jts.geom.Geometry approximateMedialAxis(org.locationtech.jts.geom.Geometry geometry, Integer maxVertices)
      Computes an approximate medial axis of an areal geometry by computing the straight skeleton and filtering to keep only interior edges, with optional vertex simplification.

      The medial axis is approximated by first computing the straight skeleton, then filtering to keep only edges where both endpoints are interior to the polygon (not on the boundary). This produces a cleaner skeleton by removing branches that extend to the boundary.

      For polygons with many vertices, performance can be improved by limiting the vertex count before computing the skeleton. The algorithm will merge the shortest edges until the vertex count is reduced to the specified limit.

      Parameters:
      geometry - The areal geometry (Polygon or MultiPolygon)
      maxVertices - Maximum number of vertices per polygon (0 to disable simplification). Recommended: 100-500 for performance
      Returns:
      A MultiLineString representing the approximate medial axis, or null if input is null/empty