- Common ways to obtain Geometry

private void myMethod () {Geometry g =

- GeometryCollection gc;gc.getGeometryN(n)
- SimpleFeature feature;(Geometry) feature.getDefaultGeometry()
- String wellKnownText;new WKTReader().read(wellKnownText)
- Smart code suggestions by Tabnine
}

/** * Default implementation. */ public boolean coveredBy(Geometry g) { return baseGeom.coveredBy(g); }

/** * Default implementation. */ public boolean coveredBy(Geometry g) { return baseGeom.coveredBy(g); }

public static boolean covered_by(Object fieldValue, String geoString) { Geometry otherGeom = GeometryNormalizer.parseGeometry(geoString); Geometry thisGeom = getGeometryFromFieldValue(fieldValue); return thisGeom.coveredBy(otherGeom); }

## Javadoc

Tests whether this geometry is covered by the
argument geometry.

The `coveredBy`

predicate has the following equivalent definitions:

- Every point of this geometry is a point of the other geometry.
- The DE-9IM Intersection Matrix for the two geometries matches
at least one of the following patterns:
`[T*F**F***]`

`[*TF**F***]`

`[**FT*F***]`

`[**F*TF***]`

`g.covers(this) = true`

(`coveredBy`

is the converse of #covers)

`false`

.
This predicate is similar to
#within,
but is more inclusive (i.e. returns `true`

for more cases).

## Popular methods of Geometry

- getEnvelopeInternalGets an Envelope containing the minimum and maximum x and y values in this Geometry. If the geometr
- getCoordinatesReturns an array containing the values of all the vertices for this geometry. If the geometry is a c
- isEmptyTests whether the set of points covered by this Geometry is empty.
- getCentroidComputes the centroid of this Geometry. The centroid is equal to the centroid of the set of componen
- getGeometryNReturns an element Geometry from a GeometryCollection(or this, if the geometry is not a collection).
- toTextReturns the Well-known Text representation of this Geometry. For a definition of the Well-known Text
- getNumGeometriesReturns the number of Geometrys in a GeometryCollection(or 1, if the geometry is not a collection).
- getFactoryGets the factory which contains the context in which this geometry was created.
- getGeometryTypeReturns the name of this Geometry's actual class.
- getSRIDReturns the ID of the Spatial Reference System used by the Geometry. JTS supports Spatial Reference
- getCoordinateReturns a vertex of this Geometry (usually, but not necessarily, the first one). The returned coordi
- intersectionComputes a Geometry representing the point-set which is common to both this Geometry and the other

## Popular in Java

- Finding current android device location
- scheduleAtFixedRate (ScheduledExecutorService)
- getContentResolver (Context)
- notifyDataSetChanged (ArrayAdapter)
- BufferedImage (java.awt.image)The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
- MessageFormat (java.text)Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
- Set (java.util)A Set is a data structure which does not allow duplicate elements.
- JOptionPane (javax.swing)
- Loader (org.hibernate.loader)Abstract superclass of object loading (and querying) strategies. This class implements useful common
- Runner (org.openjdk.jmh.runner)
- Top 12 Jupyter Notebook Extensions