本文整理汇总了Java中com.vividsolutions.jts.operation.predicate.RectangleContains类的典型用法代码示例。如果您正苦于以下问题:Java RectangleContains类的具体用法?Java RectangleContains怎么用?Java RectangleContains使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RectangleContains类属于com.vividsolutions.jts.operation.predicate包,在下文中一共展示了RectangleContains类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: contains
点赞 2
import com.vividsolutions.jts.operation.predicate.RectangleContains; //导入依赖的package包/类
@Override
public boolean contains(Geometry g) {
// short-circuit test
if (!this.envelopeCovers(g)) {
return false;
}
// optimization for rectangles
if (this.isRectangle) {
return RectangleContains.contains((Polygon) this.getGeometry(), g);
}
return PreparedPolygonContains.contains(this, g);
}
开发者ID:gegy1000,
项目名称:Earth,
代码行数:15,
代码来源:PreparedPolygon.java
示例2: contains
点赞 2
import com.vividsolutions.jts.operation.predicate.RectangleContains; //导入依赖的package包/类
public boolean contains(Geometry g) {
// short-circuit test
if (!envelopeCovers(g))
return false;
// optimization for rectangles
if (isRectangle) {
return RectangleContains.contains((Polygon) getGeometry(), g);
}
return PreparedPolygonContains.contains(this, g);
}
开发者ID:Semantive,
项目名称:jts,
代码行数:13,
代码来源:PreparedPolygon.java
示例3: contains
点赞 1
import com.vividsolutions.jts.operation.predicate.RectangleContains; //导入依赖的package包/类
/**
* Tests whether this geometry contains the
* argument geometry.
* <p>
* The <code>contains</code> predicate has the following equivalent definitions:
* <ul>
* <li>Every point of the other geometry is a point of this geometry,
* and the interiors of the two geometries have at least one point in common.
* <li>The DE-9IM Intersection Matrix for the two geometries matches
* the pattern
* <code>[T*****FF*]</code>
* <li><code>g.within(this) = true</code>
* <br>(<code>contains</code> is the converse of {@link #within} )
* </ul>
* An implication of the definition is that "Geometries do not
* contain their boundary". In other words, if a geometry A is a subset of
* the points in the boundary of a geometry B, <code>B.contains(A) = false</code>.
* (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 {@link #covers}.
*
* @param g the <code>Geometry</code> with which to compare this <code>Geometry</code>
* @return <code>true</code> if this <code>Geometry</code> contains <code>g</code>
* @see Geometry#within
* @see Geometry#covers
*/
public boolean contains(Geometry g) {
// short-circuit test
if (!this.getEnvelopeInternal().contains(g.getEnvelopeInternal())) {
return false;
}
// optimization for rectangle arguments
if (this.isRectangle()) {
return RectangleContains.contains((Polygon) this, g);
}
// general case
return this.relate(g).isContains();
}
开发者ID:gegy1000,
项目名称:Earth,
代码行数:39,
代码来源:Geometry.java
示例4: contains
点赞 1
import com.vividsolutions.jts.operation.predicate.RectangleContains; //导入依赖的package包/类
/**
* Tests whether this geometry contains the
* argument geometry.
* <p/>
* The <code>contains</code> predicate has the following equivalent definitions:
* <ul>
* <li>Every point of the other geometry is a point of this geometry,
* and the interiors of the two geometries have at least one point in common.
* <li>The DE-9IM Intersection Matrix for the two geometries matches
* the pattern
* <code>[T*****FF*]</code>
* <li><code>g.within(this) = true</code>
* <br>(<code>contains</code> is the converse of {@link #within} )
* </ul>
* An implication of the definition is that "Geometries do not
* contain their boundary". In other words, if a geometry A is a subset of
* the points in the boundary of a geometry B, <code>B.contains(A) = false</code>.
* (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 {@link #covers}.
*
* @param g the <code>Geometry</code> with which to compare this <code>Geometry</code>
* @return <code>true</code> if this <code>Geometry</code> contains <code>g</code>
* @see Geometry#within
* @see Geometry#covers
*/
public boolean contains(Geometry g) {
// short-circuit test
if (!getEnvelopeInternal().contains(g.getEnvelopeInternal()))
return false;
// optimization for rectangle arguments
if (isRectangle()) {
return RectangleContains.contains((Polygon) this, g);
}
// general case
return relate(g).isContains();
}
开发者ID:Semantive,
项目名称:jts,
代码行数:38,
代码来源:Geometry.java
示例5: contains
点赞 1
import com.vividsolutions.jts.operation.predicate.RectangleContains; //导入依赖的package包/类
/**
* Tests whether this geometry contains the
* argument geometry.
* <p>
* The <code>contains</code> predicate has the following equivalent definitions:
* <ul>
* <li>Every point of the other geometry is a point of this geometry,
* and the interiors of the two geometries have at least one point in common.
* <li>The DE-9IM Intersection Matrix for the two geometries matches
* the pattern
* <code>[T*****FF*]</code>
* <li><code>g.within(this) = true</code>
* <br>(<code>contains</code> is the converse of {@link #within} )
* </ul>
* An implication of the definition is that "Geometries do not
* contain their boundary". In other words, if a geometry A is a subset of
* the points in the boundary of a geometry B, <code>B.contains(A) = false</code>.
* (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 {@link #covers}.
*
*@param g the <code>Geometry</code> with which to compare this <code>Geometry</code>
*@return <code>true</code> if this <code>Geometry</code> contains <code>g</code>
*
* @see Geometry#within
* @see Geometry#covers
*/
public boolean contains(Geometry g) {
// short-circuit test
if (! getEnvelopeInternal().contains(g.getEnvelopeInternal()))
return false;
// optimization for rectangle arguments
if (isRectangle()) {
return RectangleContains.contains((Polygon) this, g);
}
// general case
return relate(g).isContains();
}
开发者ID:GitHubDroid,
项目名称:geodroid_master_update,
代码行数:39,
代码来源:Geometry.java