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

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

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

  • 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: org.geotools/gt-main

static public Geometry envelope(Geometry arg0)
{
   if (arg0 == null) return null;
   Geometry _this = arg0;
   return _this.getEnvelope();
}
origin: org.geotools/gt-process-feature

public ClippingFeatureIterator(SimpleFeatureIterator delegate, Geometry clip,
    SimpleFeatureType schema) {
  this.delegate = delegate;
  
  // can we use the fast clipper?
  if(clip.getEnvelope().equals(clip)) {
    this.clipper = new GeometryClipper(clip.getEnvelopeInternal());
  } else {
    this.clip = clip;
  }
    
  fb = new SimpleFeatureBuilder(schema);
}
origin: org.orbisgis/h2gis-functions

  /**
   * @param geometry Geometry instance
   * @return Geometry envelope
   */
  public static Geometry getEnvelope(Geometry geometry) {
    if(geometry==null) {
      return null;
    }
    return geometry.getEnvelope();
  }
}
origin: org.orbisgis/h2spatial

  /**
   * @param geometry Geometry instance
   * @return Geometry envelope
   */
  public static Geometry getEnvelope(Geometry geometry) {
    if(geometry==null) {
      return null;
    }
    return geometry.getEnvelope();
  }
}
origin: org.orbisgis/h2gis

  /**
   * @param geometry Geometry instance
   * @return Geometry envelope
   */
  public static Geometry getEnvelope(Geometry geometry) {
    if(geometry==null) {
      return null;
    }
    return geometry.getEnvelope();
  }
}
origin: org.geotools/gt2-main

static public Geometry envelope(Geometry arg0)
{
   Geometry _this = arg0;
   return _this.getEnvelope();
}
origin: eu.agrosense.client/io-shape

@Override
public Geometry getBoundingBox() {
  return (this.geometry != null) ? geometry.getEnvelope() : null;
}
origin: org.datasyslab/geospark

  private void addGeometry(Geometry geometry, List<Polygon> result)
  {
    if (geometry instanceof MultiPolygon) {
      addMultiGeometry((MultiPolygon) geometry, result);
    }
    else {
      result.add((Polygon) (geometry.getEnvelope()));
    }
  }
}
origin: ryantxu/spatial-solr-sandbox

 @Override
 public boolean matches(Geometry geo) {
  return geo.getEnvelope().intersects(queryGeo);
 }
}
origin: ryantxu/spatial-solr-sandbox

 @Override
 public boolean matches(Geometry geo) {
  return geo.getEnvelope().within(queryGeo);
 }
}
origin: org.jboss.teiid/teiid-engine

public static boolean boundingBoxIntersects(
    GeometryType geom1, GeometryType geom2) throws FunctionExecutionException {
  Geometry g1 = getGeometry(geom1);
  Geometry g2 = getGeometry(geom2);
  return g1.getEnvelope().intersects(g2.getEnvelope());
}
origin: org.teiid/teiid-engine

public static boolean boundingBoxIntersects(
    GeometryType geom1, GeometryType geom2) throws FunctionExecutionException {
  Geometry g1 = getGeometry(geom1);
  Geometry g2 = getGeometry(geom2);
  return g1.getEnvelope().intersects(g2.getEnvelope());
}
origin: teiid/teiid

public static boolean boundingBoxIntersects(
    GeometryType geom1, GeometryType geom2) throws FunctionExecutionException {
  Geometry g1 = getGeometry(geom1);
  Geometry g2 = getGeometry(geom2);
  return g1.getEnvelope().intersects(g2.getEnvelope());
}
origin: BaseXdb/basex

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

protected static List<Geometry> getAllEnvelopeGeometries(Geometry geom) {
  List<Geometry> geometries = new ArrayList<>();
  if (geom.getNumGeometries() > 1)
    for (int geoIdx = 0; geoIdx < geom.getNumGeometries(); geoIdx++)
      geometries.addAll(getAllEnvelopeGeometries(geom.getGeometryN(geoIdx)));
  else
    geometries.add(geom.getEnvelope());
  return geometries;
}

origin: org.geotools/gt2-jts-wrapper

/**
 * Returns a Geometry that represents the minimum bounding region of this
 * geometry.
 */
public final Geometry getMbRegion() {
  com.vividsolutions.jts.geom.Geometry jtsGeom = getJTSGeometry();
  return JTSUtils.jtsToGo1(jtsGeom.getEnvelope(), getCoordinateReferenceSystem());
}
origin: org.geotools/gt-jts-wrapper

/**
 * Returns a Geometry that represents the minimum bounding region of this
 * geometry.
 */
public final Geometry getMbRegion() {
  com.vividsolutions.jts.geom.Geometry jtsGeom = getJTSGeometry();
  return JTSUtils.jtsToGo1(jtsGeom.getEnvelope(), getCoordinateReferenceSystem());
}
origin: aseldawy/pigeon

@Override
public DataByteArray exec(Tuple input) throws IOException {
 Geometry geom = null;
 try {
  Object v = input.get(0);
  geom = GEOMETRY_PARSER.parseGeom(v);
  Geometry envelope = geom.getEnvelope();
  return new DataByteArray(WKB_WRITER.write(envelope));
 } catch (ExecException ee) {
  throw new GeoException(geom, ee);
 }
}
origin: org.n52.sensorweb.sos/coding-sensorML-v101

private Geometry getGeometry4BBOX(EnvelopeDocument xbBbox) throws OwsExceptionReport {
  EnvelopeType xbEnvelope = xbBbox.getEnvelope();
  // parse srid; if not set, throw exception!
  int srid = SosHelper.parseSrsName(xbEnvelope.getSrsName());
  String lower = xbEnvelope.getLowerCorner().getStringValue();
  String upper = xbEnvelope.getUpperCorner().getStringValue();
  String geomWKT = String.format("MULTIPOINT(%s, %s)", lower, upper);
  return JTSHelper.createGeometryFromWKT(geomWKT, srid).getEnvelope();
}
origin: org.n52.svalbard/svalbard-xmlbeans

private Geometry getGeometry4BBOX(EnvelopeDocument xbBbox) throws DecodingException {
  EnvelopeType xbEnvelope = xbBbox.getEnvelope();
  // parse srid; if not set, throw exception!
  int srid = CRSHelper.parseSrsName(xbEnvelope.getSrsName());
  String lower = xbEnvelope.getLowerCorner().getStringValue();
  String upper = xbEnvelope.getUpperCorner().getStringValue();
  String geomWKT = String.format("MULTIPOINT(%s, %s)", lower, upper);
  try {
    return JTSHelper.createGeometryFromWKT(geomWKT, srid).getEnvelope();
  } catch (ParseException ex) {
    throw new DecodingException(ex);
  }
}
com.vividsolutions.jts.geomGeometrygetEnvelope

Javadoc

Gets a Geometry representing the envelope (bounding box) of this Geometry.

If this Geometry is:

  • empty, returns an empty Point.
  • a point, returns a Point.
  • a line parallel to an axis, a two-vertex LineString
  • otherwise, returns a Polygon whose vertices are (minx miny, maxx miny, maxx maxy, minx maxy, minx miny).

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,
  • intersects,
  • union,
  • apply,
  • getLength

Popular in Java

  • Updating database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • onRequestPermissionsResult (Fragment)
  • onCreateOptionsMenu (Activity)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Socket (java.net)
    Provides a client-side TCP socket.
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
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