Class CentroidLine


  • Deprecated. 
    use Centroid instead

    public class CentroidLine
    extends java.lang.Object
    Computes the centroid of a linear geometry.

    Algorithm

    Compute the average of the midpoints of all line segments weighted by the segment length.
    • Constructor Summary

      Constructors 
      Constructor Description
      CentroidLine​()
      Deprecated. 
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void add​(Coordinate[] pts)
      Deprecated. 
      Adds the length defined by an array of coordinates.
      void add​(Geometry geom)
      Deprecated. 
      Adds the linear components of by a Geometry to the centroid total.
      Coordinate getCentroid​()
      Deprecated. 
       
      • Methods inherited from class java.lang.Object

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

      • CentroidLine

        public CentroidLine​()
        Deprecated. 
    • Method Detail

      • add

        public void add​(Geometry geom)
        Deprecated. 
        Adds the linear components of by a Geometry to the centroid total. If the geometry has no linear components it does not contribute to the centroid,
        Parameters:
        geom - the geometry to add
      • getCentroid

        public Coordinate getCentroid​()
        Deprecated. 
      • add

        public void add​(Coordinate[] pts)
        Deprecated. 
        Adds the length defined by an array of coordinates.
        Parameters:
        pts - an array of Coordinates