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


Java GeometryType.getCoordinateReferenceSystem方法代码示例

本文整理汇总了Java中org.opengis.feature.type.GeometryType.getCoordinateReferenceSystem方法的典型用法代码示例。如果您正苦于以下问题:Java GeometryType.getCoordinateReferenceSystem方法的具体用法?Java GeometryType.getCoordinateReferenceSystem怎么用?Java GeometryType.getCoordinateReferenceSystem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.opengis.feature.type.GeometryType的用法示例。


在下文中一共展示了GeometryType.getCoordinateReferenceSystem方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: equals

import org.opengis.feature.type.GeometryType; //导入方法依赖的package包/类
@Override
public boolean equals(Object other) {
    if (!(other instanceof GeometryType)) {
        return false;
    }
    if (!super.equals(other)) {
        return false;
    }
    GeometryType o = (GeometryType) other;
    if (CRS == null) {
        return o.getCoordinateReferenceSystem() == null;
    }
    if (o.getCoordinateReferenceSystem() == null) {
        return false;
    }
    return true;
}
 
开发者ID:opengeospatial,项目名称:Java-OpenMobility,代码行数:18,代码来源:GeometryTypeImpl.java

示例2: equals

import org.opengis.feature.type.GeometryType; //导入方法依赖的package包/类
@Override
public boolean equals(Object other) {
    if (!(other instanceof GeometryType)) {
        return false;
    }
    if (!super.equals(other)) {
        return false;
    }
    GeometryType o = (GeometryType) other;
    if (CRS == null) {
        return o.getCoordinateReferenceSystem() == null;
    }
    if (o.getCoordinateReferenceSystem() == null) {
        return false;
    }
    return CRS.equals(o.getCoordinateReferenceSystem());
}
 
开发者ID:opengeospatial,项目名称:Java-OpenMobility,代码行数:18,代码来源:GeometryTypeImpl.java

示例3: cloneWithDimensionality

import org.opengis.feature.type.GeometryType; //导入方法依赖的package包/类
/**
 * Clones the given schema, changing the geometry attribute to match the given dimensionality.
 * 
 * @param schema schema to clone
 * @param dimensionality dimensionality for the geometry 1= points, 2= lines, 3= polygons
 *
 */
private FeatureType cloneWithDimensionality(FeatureType schema, int dimensionality) {
    SimpleFeatureType simpleFt = (SimpleFeatureType) schema;
    SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();
    builder.setName(schema.getName());
    builder.setCRS(schema.getCoordinateReferenceSystem());
    for (AttributeDescriptor desc : simpleFt.getAttributeDescriptors()) {
        if (isMixedGeometry(desc)) {
            GeometryDescriptor geomDescriptor = (GeometryDescriptor) desc;
            GeometryType geomType = geomDescriptor.getType();

            Class<?> geometryClass = getGeometryForDimensionality(dimensionality);

            GeometryType gt = new GeometryTypeImpl(geomType.getName(), geometryClass,
                    geomType.getCoordinateReferenceSystem(), geomType.isIdentified(),
                    geomType.isAbstract(), geomType.getRestrictions(), geomType.getSuper(),
                    geomType.getDescription());

            builder.add(new GeometryDescriptorImpl(gt, geomDescriptor.getName(),
                    geomDescriptor.getMinOccurs(), geomDescriptor.getMaxOccurs(),
                    geomDescriptor.isNillable(), geomDescriptor.getDefaultValue()));
        } else {
            builder.add(desc);
        }
    }
    schema = builder.buildFeatureType();
    return schema;
}
 
开发者ID:robward-scisys,项目名称:sldeditor,代码行数:35,代码来源:SLDEditorBufferedImageLegendGraphicBuilder.java


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