Codota Logo
Geometry.convexHull
Code IndexAdd Codota to your IDE (free)

How to use
convexHull
method
in
com.vividsolutions.jts.geom.Geometry

Best Java code snippets using com.vividsolutions.jts.geom.Geometry.convexHull (Showing top 20 results out of 315)

  • Common ways to obtain Geometry
private void myMethod () {
Geometry g =
  • Codota IconGeometryCollection gc;gc.getGeometryN(n)
  • Codota IconSimpleFeature feature;(Geometry) feature.getDefaultGeometry()
  • Codota IconString wellKnownText;new WKTReader().read(wellKnownText)
  • Smart code suggestions by Codota
}
origin: com.vividsolutions/jts

Geometry convexHull = input.convexHull();
origin: org.geotools/gt-main

static public Geometry convexHull(Geometry arg0)
{
   if (arg0 == null) return null;
   Geometry _this = arg0;
   return _this.convexHull();
}
origin: org.orbisgis/h2spatial

  /**
   * @param geometry
   * @return smallest convex Polygon that contains all the points in the Geometry
   */
  public static Geometry convexHull(Geometry geometry) {
    if(geometry==null) {
      return null;
    }
    return geometry.convexHull();
  }
}
origin: org.orbisgis/h2gis-functions

  /**
   * @param geometry
   * @return smallest convex Polygon that contains all the points in the Geometry
   */
  public static Geometry convexHull(Geometry geometry) {
    if(geometry==null) {
      return null;
    }
    return geometry.convexHull();
  }
}
origin: org.geotools/gt2-main

static public Geometry convexHull(Geometry arg0)
{
   Geometry _this = arg0;
   return _this.convexHull();
}
origin: us.ihmc/ihmc-jmonkey-engine-toolkit

/** Converts it into a convexHull shape.*/
public static Geometry convertToConvexHull(Geometry g)
{
 return g.convexHull();
}
origin: us.ihmc/IHMCJMonkeyEngineToolkit

/** Converts it into a convexHull shape.*/
public static Geometry convertToConvexHull(Geometry g)
{
 return g.convexHull();
}
origin: org.orbisgis/h2gis

  /**
   * @param geometry
   * @return smallest convex Polygon that contains all the points in the Geometry
   */
  public static Geometry convexHull(Geometry geometry) {
    if(geometry==null) {
      return null;
    }
    return geometry.convexHull();
  }
}
origin: org.n52.wps/52n-wps-algorithm-impl

  @Execute
  public void runAlgorithm() {
    result = data.convexHull();
  }
}
origin: Stratio/cassandra-lucene-index

/**
 * Returns the convex hull of the specified {@link JtsGeometry}.
 *
 * @param shape the JTS shape to be transformed
 * @return the convex hull
 */
@Override
public JtsGeometry apply(JtsGeometry shape) {
  Geometry centroid = shape.getGeom().convexHull();
  return CONTEXT.makeShape(centroid);
}
origin: BaseXdb/basex

 @Override
 public Item item(final QueryContext qc, final InputInfo ii) throws QueryException {
  return toElement(checkGeo(0, qc).convexHull(), qc);
 }
}
origin: deegree/deegree3

@Override
public Geometry getConvexHull() {
  com.vividsolutions.jts.geom.Geometry jtsGeom = getJTSGeometry().convexHull();
  return createFromJTS( jtsGeom, crs );
}
origin: org.jboss.teiid/teiid-engine

public static GeometryType convexHull(GeometryType geom) throws FunctionExecutionException {
  Geometry g = getGeometry(geom);
  return getGeometryType(g.convexHull());
}
origin: Stratio/cassandra-lucene-index

/**
 * Returns the convex hull of the specified {@link JtsGeometry}.
 *
 * @return the convex hull
 */
@Override
public JtsGeometry apply() {
  Geometry centroid = shape.apply().getGeom().convexHull();
  return CONTEXT.makeShape(centroid);
}
origin: org.orbisgis/h2gis-functions

/**
 * Compute the max distance
 */
private void computeMaxDistance() {
  HashSet<Coordinate> coordinatesA = new HashSet<Coordinate>();
  coordinatesA.addAll(Arrays.asList(geomA.convexHull().getCoordinates()));
  Geometry fullHull = geomA.getFactory().createGeometryCollection(new Geometry[]{geomA, geomB}).convexHull();
  maxDistanceFilter = new MaxDistanceFilter(coordinatesA);
  fullHull.apply(maxDistanceFilter);
}
origin: teiid/teiid

public static GeometryType convexHull(GeometryType geom) throws FunctionExecutionException {
  Geometry g = getGeometry(geom);
  return getGeometryType(g.convexHull(), geom.getSrid());
}
origin: org.geotools/gt2-jts-wrapper

/**
 * Returns the geometric convex hull of this geometry.
 */
public final Geometry getConvexHull() {
  com.vividsolutions.jts.geom.Geometry jtsGeom = getJTSGeometry();
  com.vividsolutions.jts.geom.Geometry jtsHull = jtsGeom.convexHull();
  return JTSUtils.jtsToGo1(jtsHull, getCoordinateReferenceSystem());
}
origin: org.teiid/teiid-engine

public static GeometryType convexHull(GeometryType geom) throws FunctionExecutionException {
  Geometry g = getGeometry(geom);
  return getGeometryType(g.convexHull(), geom.getSrid());
}
origin: org.geotools/gt-jts-wrapper

/**
 * Returns the geometric convex hull of this geometry.
 */
public final Geometry getConvexHull() {
  com.vividsolutions.jts.geom.Geometry jtsGeom = getJTSGeometry();
  com.vividsolutions.jts.geom.Geometry jtsHull = jtsGeom.convexHull();
  return JTSUtils.jtsToGo1(jtsHull, getCoordinateReferenceSystem());
}
origin: org.orbisgis/h2gis

/**
 * Compute the max distance
 */
private void computeMaxDistance() {
  HashSet<Coordinate> coordinatesA = new HashSet<Coordinate>();
  coordinatesA.addAll(Arrays.asList(geomA.convexHull().getCoordinates()));
  Geometry fullHull = geomA.getFactory().createGeometryCollection(new Geometry[]{geomA, geomB}).convexHull();
  maxDistanceFilter = new MaxDistanceFilter(coordinatesA);
  fullHull.apply(maxDistanceFilter);
}
com.vividsolutions.jts.geomGeometryconvexHull

Javadoc

Computes the smallest convex Polygon that contains all the points in the Geometry. This obviously applies only to Geometry s which contain 3 or more points; the results for degenerate cases are specified as follows:
Number of Points in argument Geometry Geometry class of result
0 empty GeometryCollection
1 Point
2 LineString
3 or more Polygon

Popular methods of Geometry

  • getEnvelopeInternal
    Gets an Envelope containing the minimum and maximum x and y values in this Geometry. If the geometr
  • getCoordinates
    Returns an array containing the values of all the vertices for this geometry. If the geometry is a c
  • isEmpty
    Tests whether the set of points covered by this Geometry is empty.
  • getCentroid
    Computes the centroid of this Geometry. The centroid is equal to the centroid of the set of componen
  • getGeometryN
    Returns an element Geometry from a GeometryCollection(or this, if the geometry is not a collection).
  • toText
    Returns the Well-known Text representation of this Geometry. For a definition of the Well-known Text
  • getNumGeometries
    Returns the number of Geometrys in a GeometryCollection(or 1, if the geometry is not a collection).
  • getFactory
    Gets the factory which contains the context in which this geometry was created.
  • getGeometryType
    Returns the name of this Geometry's actual class.
  • getSRID
    Returns the ID of the Spatial Reference System used by the Geometry. JTS supports Spatial Reference
  • getCoordinate
    Returns a vertex of this Geometry (usually, but not necessarily, the first one). The returned coordi
  • intersection
    Computes a Geometry representing the point-set which is common to both this Geometry and the other
  • getCoordinate,
  • intersection,
  • buffer,
  • contains,
  • getArea,
  • getEnvelope,
  • intersects,
  • union,
  • apply,
  • getLength

Popular in Java

  • Reading from database using SQL prepared statement
  • setContentView (Activity)
  • putExtra (Intent)
  • findViewById (Activity)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now