本文整理了Java中com.vividsolutions.jts.geom.Geometry.within()
方法的一些代码示例,展示了Geometry.within()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Geometry.within()
方法的具体详情如下:
包路径:com.vividsolutions.jts.geom.Geometry
类名称:Geometry
方法名:within
[英]Tests whether this geometry is within the specified geometry.
The within
predicate has the following equivalent definitions:
[T*F**F***]
g.contains(this) = true
within
is the converse of #contains)A.within(B) = false
(As a concrete example, take A to be a LineString which lies in the boundary of a Polygon B.) For a predicate with similar behaviour but avoiding this subtle limitation, see #coveredBy.within
谓词具有以下等效定义:[T*F**F***]
g.contains(this) = true
within
是#contains的反义词)A.within(B) = false
(作为一个具体示例,将a视为位于多边形B边界上的线字符串)对于具有类似行为但避免这种微妙限制的谓词,请参见#coveredBy。代码示例来源:origin: com.vividsolutions/jts
/**
* Default implementation.
*/
public boolean within(Geometry g)
{
return baseGeom.within(g);
}
代码示例来源:origin: org.orbisgis/h2gis
/**
* @param a Surface Geometry.
* @param b Geometry instance
* @return true if the geometry A is within the geometry B
*/
public static Boolean isWithin(Geometry a,Geometry b) {
if(a==null || b==null) {
return null;
}
return a.within(b);
}
}
代码示例来源:origin: org.geotools/gt-main
static public boolean within(Geometry arg0,Geometry arg1)
{
if (arg0 == null || arg1 == null) return false;
Geometry _this = arg0;
return _this.within(arg1);
}
代码示例来源:origin: org.geotools/gt2-main
static public boolean within(Geometry arg0,Geometry arg1)
{
Geometry _this = arg0;
return _this.within(arg1);
}
代码示例来源:origin: org.orbisgis/h2gis-functions
/**
* @param a Surface Geometry.
* @param b Geometry instance
* @return true if the geometry A is within the geometry B
*/
public static Boolean isWithin(Geometry a,Geometry b) {
if(a==null || b==null) {
return null;
}
return a.within(b);
}
}
代码示例来源:origin: org.n52.epos/epos-pattern-util
/**
* @param geom first geometry
* @param g second geometry
* @return <code>true</code> if the first geometry is within the second
*/
public static boolean within(Geometry geom, Geometry g) {
if (geom == null || g == null) return false;
return geom.within(g);
}
代码示例来源:origin: com.vividsolutions/jts-core
/**
* Default implementation.
*/
public boolean within(Geometry g)
{
return baseGeom.within(g);
}
代码示例来源:origin: org.orbisgis/h2spatial
/**
* @param a Surface Geometry.
* @param b Geometry instance
* @return true if the geometry A is within the geometry B
*/
public static Boolean isWithin(Geometry a,Geometry b) {
if(a==null || b==null) {
return null;
}
return a.within(b);
}
}
代码示例来源:origin: ryantxu/spatial-solr-sandbox
@Override
public boolean matches(Geometry geo) {
return geo.within(queryGeo);
}
}
代码示例来源:origin: org.geotools/gt-render
public boolean within(Geometry g) {
return geometry.within(g);
}
代码示例来源:origin: deegree/deegree3
@Override
public boolean isWithin( Geometry geometry ) {
JTSGeometryPair jtsGeoms = JTSGeometryPair.createCompatiblePair( this, geometry );
return jtsGeoms.first.within( jtsGeoms.second );
}
代码示例来源:origin: org.n52.series-api/dwd-dao
private boolean checkForBboxFilter(Polygon envelop, WarnCell warnCell) {
if (envelop != null) {
return warnCell.getGeometry().within(envelop);
}
return true;
}
代码示例来源: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 within(GeometryType geom1, GeometryType geom2) throws FunctionExecutionException {
Geometry g1 = getGeometry(geom1);
Geometry g2 = getGeometry(geom2);
return g1.within(g2);
}
代码示例来源:origin: org.teiid/teiid-engine
public static Boolean within(GeometryType geom1, GeometryType geom2) throws FunctionExecutionException {
Geometry g1 = getGeometry(geom1);
Geometry g2 = getGeometry(geom2);
return g1.within(g2);
}
代码示例来源:origin: NationalSecurityAgency/datawave
public static boolean within(Object fieldValue, String geoString) {
Geometry otherGeom = GeometryNormalizer.parseGeometry(geoString);
Geometry thisGeom = getGeometryFromFieldValue(fieldValue);
return thisGeom.within(otherGeom);
}
代码示例来源:origin: teiid/teiid
public static Boolean within(GeometryType geom1, GeometryType geom2) throws FunctionExecutionException {
Geometry g1 = getGeometry(geom1);
Geometry g2 = getGeometry(geom2);
return g1.within(g2);
}
代码示例来源:origin: BaseXdb/basex
@Override
public Item item(final QueryContext qc, final InputInfo ii) throws QueryException {
return Bln.get(checkGeo(0, qc).within(checkGeo(1, qc)));
}
}
代码示例来源:origin: org.geotools/gt-main
@Override
protected boolean basicEvaluate(Geometry left, Geometry right) {
Envelope envLeft = left.getEnvelopeInternal();
Envelope envRight = right.getEnvelopeInternal();
if(envRight.contains(envLeft))
return left.within(right);
else
return false;
}
代码示例来源:origin: org.geotools/gt2-main
public boolean evaluate(Object feature) {
if (feature instanceof Feature && !validate((Feature)feature))
return false;
Geometry left = getLeftGeometry(feature);
Geometry right = getRightGeometry(feature);
Envelope envLeft = left.getEnvelopeInternal();
Envelope envRight = right.getEnvelopeInternal();
if(envRight.contains(envLeft))
return left.within(right);
else
return false;
}
内容来源于网络,如有侵权,请联系作者删除!