Class CentroidSurface


  • public class CentroidSurface
    extends Object
    Calculate the centroid from surface based geometries. Implementation based on the JTS (Java Topology Suite) CentroidArea.
    Since:
    1.0.3
    Author:
    osbornb
    • Constructor Detail

      • CentroidSurface

        public CentroidSurface()
        Constructor
      • CentroidSurface

        public CentroidSurface​(Geometry geometry)
        Constructor
        Parameters:
        geometry - geometry to add
    • Method Detail

      • add

        public void add​(Geometry geometry)
        Add a surface based dimension 2 geometry to the centroid total. Ignores dimension 0 and 1 geometries.
        Parameters:
        geometry - geometry
      • getCentroid

        public Point getCentroid()
        Get the centroid point
        Returns:
        centroid point