Class Centroid

java.lang.Object
com.kheops.jmap.spatial.Centroid

public class Centroid extends Object
  • Constructor Details

    • Centroid

      public Centroid(Geometry geom)
      Creates a new instance for computing the centroid of a geometry
  • Method Details

    • getCentroid

      public static Point getCentroid(Geometry geom)
      Computes the centroid point of a geometry.
      Parameters:
      geom - the geometry to use
      Returns:
      the centroid point, or null if the geometry is empty
    • getCentroid

      public Point getCentroid()
      Gets the computed centroid.
      Returns:
      the computed centroid, or null if the input is empty