本文整理汇总了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;
}
示例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());
}
示例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;
}