当前位置: 首页>>代码示例>>Java>>正文


Java ReferencedEnvelope.reference方法代码示例

本文整理汇总了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
}
 
开发者ID:ianturton,项目名称:geotools-cookbook,代码行数:36,代码来源:APIExamples.java

示例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() );
}
 
开发者ID:STEMLab,项目名称:geoserver-3d-extension,代码行数:6,代码来源:ISOFeatureBoundsFeatureCollection.java


注:本文中的org.geotools.geometry.jts.ReferencedEnvelope.reference方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。