/**
* Tests whether any representative point of the test Geometry intersects
* the target geometry.
* Only handles test geometries which are Puntal (dimension 0)
*
* @param geom a Puntal geometry to test
* @return true if any point of the argument intersects the prepared geometry
*/
protected boolean isAnyTestPointInTarget(Geometry testGeom) {
/**
* This could be optimized by using the segment index on the lineal target.
* However, it seems like the L/P case would be pretty rare in practice.
*/
PointLocator locator = new PointLocator();
List coords = ComponentCoordinateExtracter.getCoordinates(testGeom);
for (Object coord : coords) {
Coordinate p = (Coordinate) coord;
if (locator.intersects(p, this.prepLine.getGeometry())) {
return true;
}
}
return false;
}
java类com.vividsolutions.jts.geom.util.ComponentCoordinateExtracter的实例源码
PreparedLineStringIntersects.java 文件源码
项目:Earth
阅读 25
收藏 0
点赞 0
评论 0
PreparedPolygonPredicate.java 文件源码
项目:Earth
阅读 28
收藏 0
点赞 0
评论 0
/**
* Tests whether all components of the test Geometry
* are contained in the target geometry.
* Handles both linear and point components.
*
* @param geom a geometry to test
* @return true if all componenta of the argument are contained in the target geometry
*/
protected boolean isAllTestComponentsInTarget(Geometry testGeom) {
List coords = ComponentCoordinateExtracter.getCoordinates(testGeom);
for (Object coord : coords) {
Coordinate p = (Coordinate) coord;
int loc = this.targetPointLocator.locate(p);
if (loc == Location.EXTERIOR) {
return false;
}
}
return true;
}
PreparedPolygonPredicate.java 文件源码
项目:Earth
阅读 28
收藏 0
点赞 0
评论 0
/**
* Tests whether all components of the test Geometry
* are contained in the interior of the target geometry.
* Handles both linear and point components.
*
* @param geom a geometry to test
* @return true if all componenta of the argument are contained in the target geometry interior
*/
protected boolean isAllTestComponentsInTargetInterior(Geometry testGeom) {
List coords = ComponentCoordinateExtracter.getCoordinates(testGeom);
for (Object coord : coords) {
Coordinate p = (Coordinate) coord;
int loc = this.targetPointLocator.locate(p);
if (loc != Location.INTERIOR) {
return false;
}
}
return true;
}
PreparedPolygonPredicate.java 文件源码
项目:Earth
阅读 28
收藏 0
点赞 0
评论 0
/**
* Tests whether any component of the test Geometry intersects
* the area of the target geometry.
* Handles test geometries with both linear and point components.
*
* @param geom a geometry to test
* @return true if any component of the argument intersects the prepared area geometry
*/
protected boolean isAnyTestComponentInTarget(Geometry testGeom) {
List coords = ComponentCoordinateExtracter.getCoordinates(testGeom);
for (Object coord : coords) {
Coordinate p = (Coordinate) coord;
int loc = this.targetPointLocator.locate(p);
if (loc != Location.EXTERIOR) {
return true;
}
}
return false;
}
PreparedPolygonPredicate.java 文件源码
项目:Earth
阅读 77
收藏 0
点赞 0
评论 0
/**
* Tests whether any component of the test Geometry intersects
* the interior of the target geometry.
* Handles test geometries with both linear and point components.
*
* @param geom a geometry to test
* @return true if any component of the argument intersects the prepared area geometry interior
*/
protected boolean isAnyTestComponentInTargetInterior(Geometry testGeom) {
List coords = ComponentCoordinateExtracter.getCoordinates(testGeom);
for (Object coord : coords) {
Coordinate p = (Coordinate) coord;
int loc = this.targetPointLocator.locate(p);
if (loc == Location.INTERIOR) {
return true;
}
}
return false;
}
PreparedPolygonPredicate.java 文件源码
项目:jts
阅读 28
收藏 0
点赞 0
评论 0
/**
* Tests whether all components of the test Geometry
* are contained in the target geometry.
* Handles both linear and point components.
*
* @param geom a geometry to test
* @return true if all componenta of the argument are contained in the target geometry
*/
protected boolean isAllTestComponentsInTarget(Geometry testGeom) {
List coords = ComponentCoordinateExtracter.getCoordinates(testGeom);
for (Iterator i = coords.iterator(); i.hasNext(); ) {
Coordinate p = (Coordinate) i.next();
int loc = targetPointLocator.locate(p);
if (loc == Location.EXTERIOR)
return false;
}
return true;
}
PreparedPolygonPredicate.java 文件源码
项目:jts
阅读 29
收藏 0
点赞 0
评论 0
/**
* Tests whether all components of the test Geometry
* are contained in the interior of the target geometry.
* Handles both linear and point components.
*
* @param geom a geometry to test
* @return true if all componenta of the argument are contained in the target geometry interior
*/
protected boolean isAllTestComponentsInTargetInterior(Geometry testGeom) {
List coords = ComponentCoordinateExtracter.getCoordinates(testGeom);
for (Iterator i = coords.iterator(); i.hasNext(); ) {
Coordinate p = (Coordinate) i.next();
int loc = targetPointLocator.locate(p);
if (loc != Location.INTERIOR)
return false;
}
return true;
}
PreparedPolygonPredicate.java 文件源码
项目:jts
阅读 28
收藏 0
点赞 0
评论 0
/**
* Tests whether any component of the test Geometry intersects
* the area of the target geometry.
* Handles test geometries with both linear and point components.
*
* @param geom a geometry to test
* @return true if any component of the argument intersects the prepared area geometry
*/
protected boolean isAnyTestComponentInTarget(Geometry testGeom) {
List coords = ComponentCoordinateExtracter.getCoordinates(testGeom);
for (Iterator i = coords.iterator(); i.hasNext(); ) {
Coordinate p = (Coordinate) i.next();
int loc = targetPointLocator.locate(p);
if (loc != Location.EXTERIOR)
return true;
}
return false;
}
PreparedPolygonPredicate.java 文件源码
项目:jts
阅读 29
收藏 0
点赞 0
评论 0
/**
* Tests whether any component of the test Geometry intersects
* the interior of the target geometry.
* Handles test geometries with both linear and point components.
*
* @param geom a geometry to test
* @return true if any component of the argument intersects the prepared area geometry interior
*/
protected boolean isAnyTestComponentInTargetInterior(Geometry testGeom) {
List coords = ComponentCoordinateExtracter.getCoordinates(testGeom);
for (Iterator i = coords.iterator(); i.hasNext(); ) {
Coordinate p = (Coordinate) i.next();
int loc = targetPointLocator.locate(p);
if (loc == Location.INTERIOR)
return true;
}
return false;
}
PreparedLineStringIntersects.java 文件源码
项目:jts
阅读 25
收藏 0
点赞 0
评论 0
/**
* Tests whether any representative point of the test Geometry intersects
* the target geometry.
* Only handles test geometries which are Puntal (dimension 0)
*
* @param geom a Puntal geometry to test
* @return true if any point of the argument intersects the prepared geometry
*/
protected boolean isAnyTestPointInTarget(Geometry testGeom) {
/**
* This could be optimized by using the segment index on the lineal target.
* However, it seems like the L/P case would be pretty rare in practice.
*/
PointLocator locator = new PointLocator();
List coords = ComponentCoordinateExtracter.getCoordinates(testGeom);
for (Iterator i = coords.iterator(); i.hasNext(); ) {
Coordinate p = (Coordinate) i.next();
if (locator.intersects(p, prepLine.getGeometry()))
return true;
}
return false;
}
BasicPreparedGeometry.java 文件源码
项目:Earth
阅读 28
收藏 0
点赞 0
评论 0
public BasicPreparedGeometry(Geometry geom) {
this.baseGeom = geom;
this.representativePts = ComponentCoordinateExtracter.getCoordinates(geom);
}
BasicPreparedGeometry.java 文件源码
项目:jts
阅读 26
收藏 0
点赞 0
评论 0
public BasicPreparedGeometry(Geometry geom) {
baseGeom = geom;
representativePts = ComponentCoordinateExtracter.getCoordinates(geom);
}
BasicPreparedGeometry.java 文件源码
项目:geodroid_master_update
阅读 28
收藏 0
点赞 0
评论 0
public BasicPreparedGeometry(Geometry geom)
{
this.baseGeom = geom;
representativePts = ComponentCoordinateExtracter.getCoordinates(geom);
}
BasicPreparedGeometry.java 文件源码
项目:terraingis
阅读 26
收藏 0
点赞 0
评论 0
public BasicPreparedGeometry(Geometry geom)
{
this.baseGeom = geom;
representativePts = ComponentCoordinateExtracter.getCoordinates(geom);
}