Class CentroidCurve


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

      • CentroidCurve

        public CentroidCurve()
        Constructor
      • CentroidCurve

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

      • add

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

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