public GeometryAttribute getDefaultGeometryProperty() { GeometryDescriptor geometryDescriptor = featureType.getGeometryDescriptor(); GeometryAttribute geometryAttribute = null; if (geometryDescriptor != null) { Object defaultGeometry = getDefaultGeometry(); geometryAttribute = new GeometryAttributeImpl(defaultGeometry, geometryDescriptor, null); } return geometryAttribute; }
/** * Gets the geometry for this feature. * * @return Geometry for this feature. * @deprecated use {@link #getDefaultGeometry()}. */ public Geometry getDefaultGeometry() { return (Geometry) super.getDefaultGeometry(); // int idx = schema.defaultGeomIdx; // // if (idx == -1) { // return null; // } // // return (Geometry) attributes[idx]; }
public GeometryAttribute getDefaultGeometryProperty() { GeometryDescriptor geometryDescriptor = featureType.getGeometryDescriptor(); GeometryAttribute geometryAttribute = null; if(geometryDescriptor != null){ Object defaultGeometry = getDefaultGeometry(); geometryAttribute = new GeometryAttributeImpl(defaultGeometry, geometryDescriptor, null); } return geometryAttribute; }