本文整理汇总了Java中org.geotools.geometry.jts.ReferencedEnvelope.reference方法的典型用法代码示例。如果您正苦于以下问题:Java ReferencedEnvelope.reference方法的具体用法?Java ReferencedEnvelope.reference怎么用?Java ReferencedEnvelope.reference使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.geotools.geometry.jts.ReferencedEnvelope
的用法示例。
在下文中一共展示了ReferencedEnvelope.reference方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: exampleReferencedEnvelopeStaticMethods
import org.geotools.geometry.jts.ReferencedEnvelope; //导入方法依赖的package包/类
private void exampleReferencedEnvelopeStaticMethods() throws Exception {
// exampleReferencedEnvelopeStaticMethods start
ReferencedEnvelope env; // can hold both regular ReferencedEnvelope as well as ReferencedEnvelope3D
ReferencedEnvelope original = null; // can be instance of ReferencedEnvelope3D;
CoordinateReferenceSystem crs = null; //can be 2D or 3D
org.opengis.geometry.Envelope opengis_env = null; //can be instance of ReferencedEnvelope(3D)
com.vividsolutions.jts.geom.Envelope jts_env = null; //can be instance of ReferencedEnvelope(3D)
BoundingBox bbox = null; //can be instance of ReferencedEnvelope(3D)
//safely copy ReferencedEnvelope, uses type of original to determine type
env = ReferencedEnvelope.create( original );
//safely create ReferencedEnvelope from CRS, uses dimension to determine type
env = ReferencedEnvelope.create( crs );
//safely create ReferencedEnvelope from org.opengis.geometry.Envelope, uses dimension in Envelope to determine type
env = ReferencedEnvelope.create( opengis_env, crs );
//safely create ReferencedEnvelope from com.vividsolutions.jts.geom.Envelope, uses dimension in Envelope to determine type
env = ReferencedEnvelope.create( jts_env, crs );
//safely reference org.opengis.geometry.Envelope as ReferencedEnvelope
//--> if it is a ReferencedEnvelope(3D), simply cast it; if not, create a conversion
env = ReferencedEnvelope.reference ( opengis_env);
//safely reference com.vividsolutions.jts.geom.Envelope as ReferencedEnvelope
//--> if it is a ReferencedEnvelope(3D), simply cast it; if not, create a conversion
env = ReferencedEnvelope.reference ( jts_env);
//safely reference BoundingBox as ReferencedEnvelope
//--> if it is a ReferencedEnvelope(3D), simply cast it; if not, create a conversion
env = ReferencedEnvelope.reference ( bbox);
// exampleReferencedEnvelopeStaticMethods end
}
示例2: getBounds
import org.geotools.geometry.jts.ReferencedEnvelope; //导入方法依赖的package包/类
public ReferencedEnvelope getBounds() {
// we may not have the default geometry around in the reduced feature type,
// so let's output a referenced envelope if possible
return ReferencedEnvelope.reference( delegate.getBounds() );
}