本文整理了Java中org.geotools.geometry.jts.JTS.toEnvelope()
方法的一些代码示例,展示了JTS.toEnvelope()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTS.toEnvelope()
方法的具体详情如下:
包路径:org.geotools.geometry.jts.JTS
类名称:JTS
方法名:toEnvelope
[英]Converts a AWT Rectangle2D into a JTS Envelope
[中]将AWT矩形2D转换为JTS信封
代码示例来源:origin: geotools/geotools
Binarizator(Polygon bbox, int pxWidth, int pxHeight, int tileWidth, int tileHeight) {
this.tileWidth = tileWidth;
this.tileHeight = tileHeight;
this.origW = pxWidth;
this.origH = pxHeight;
final ReferencedEnvelope env = JTS.toEnvelope(bbox);
w2gTransform =
RendererUtilities.worldToScreenTransform(env, new Rectangle(pxWidth, pxHeight));
if (w2gTransform == null) {
LOGGER.info("Null transformer, possible bad bbox requested " + env);
activeTiles = Collections.emptyList();
} else {
createTiles(pxWidth, pxHeight, tileWidth, tileHeight, w2gTransform);
}
}
代码示例来源:origin: geotools/geotools
public MultiLevelROIRaster(DatasetLayout layout, File file, SimpleFeature sf)
throws IOException {
// Initialization
this.file = file;
// Getting Feature Geometry
Geometry geo = (Geometry) sf.getDefaultGeometry();
// Getting as envelope
env = JTS.toEnvelope(geo);
// Save envelope as Geometry
footprint = JTS.toGeometry(env);
// Getting the Mask provider
maskOvrProvider = new MaskOverviewProvider(layout, file);
}
代码示例来源:origin: geotools/geotools
ReferencedEnvelope bbox = null;
if (obj instanceof Geometry) {
bbox = JTS.toEnvelope((Geometry) obj);
} else if (obj instanceof ReferencedEnvelope) {
bbox = (ReferencedEnvelope) obj;
代码示例来源:origin: geotools/geotools
@Test
public void toEnvelope() {
Coordinate[] coords = getPolyCoords();
GeometryFactory gf = new GeometryFactory();
Geometry geom = gf.createPolygon(gf.createLinearRing(coords), null);
ReferencedEnvelope refEnv = JTS.toEnvelope(geom);
assertTrue(geom.getEnvelopeInternal().equals(refEnv));
}
代码示例来源:origin: org.geotools/gt-main
ReferencedEnvelope bbox = null;
if( obj instanceof Geometry){
bbox = JTS.toEnvelope( (Geometry) obj );
代码示例来源:origin: mapplus/spatial_statistics_for_geotools_udig
protected static Filter getIntersectsFilter(String geomField, Geometry searchGeometry) {
return ff.and(ff.bbox(ff.property(geomField), JTS.toEnvelope(searchGeometry)),
ff.intersects(ff.property(geomField), ff.literal(searchGeometry)));
}
}
代码示例来源:origin: mapplus/spatial_statistics_for_geotools_udig
private Filter getIntersectsFilter(String geomField, Geometry searchGeometry) {
return ff.and(ff.bbox(ff.property(geomField), JTS.toEnvelope(searchGeometry)),
ff.intersects(ff.property(geomField), ff.literal(searchGeometry)));
}
}
代码示例来源:origin: mapplus/spatial_statistics_for_geotools_udig
protected Filter getIntersectsFilter(String geomField, Geometry searchGeometry) {
return ff.and(ff.bbox(ff.property(geomField), JTS.toEnvelope(searchGeometry)),
ff.intersects(ff.property(geomField), ff.literal(searchGeometry)));
}
}
代码示例来源:origin: org.geoserver.community/gs-wps-download
ReferencedEnvelope refEnvelope = JTS.toEnvelope(roiInNativeCRS_.getEnvelope());
scaling = new ScaleToTarget(reader, refEnvelope);
代码示例来源:origin: mapplus/spatial_statistics_for_geotools_udig
Geometry clipGeometry = (Geometry) feature.getDefaultGeometry();
Filter filter = ff.bbox(ff.property(geomName), JTS.toEnvelope(clipGeometry));
featureWriter.write(new ClipWithGeometryFeatureCollection(inputFeatures
.subCollection(filter), clipGeometry));
内容来源于网络,如有侵权,请联系作者删除!