code: public static Coordinate getCentroid(Geometry geometry) {
  		if (Geometry.POINT.equals(geometry.getGeometryType())) {
  			return getCentroidPoint(geometry);
  		} else if (Geometry.LINE_STRING.equals(geometry.getGeometryType())) {
  			return getCentroidLineString(geometry);
  		} else if (Geometry.LINEAR_RING.equals(geometry.getGeometryType())) {
  			return getCentroidLinearRing(geometry);
  		} else if (Geometry.POLYGON.equals(geometry.getGeometryType())) {
  			return getCentroidPolygon(geometry);
  		} else if (Geometry.MULTI_POINT.equals(geometry.getGeometryType())) {
  			return getCentroidMultiPoint(geometry);
  		} else if (Geometry.MULTI_LINE_STRING.equals(geometry.getGeometryType())) {
  			return getCentroidMultiLineString(geometry);
  		} else if (Geometry.MULTI_POLYGON.equals(geometry.getGeometryType())) {
  			return getCentroidMultiPolygon(geometry);
  		}
  		return null;
  	}
docs: The centroid is also known as the "center of gravity" or the "center of mass".
  
  @param geometry The other geometry to calculate the centroid for.
  
  @return Return the center point.