throws IOException, SchemaException, TransformException, OperationNotFoundException, FactoryException { if (fc.getSchema().getGeometryDescriptor() == null) { fc.getSchema().getGeometryDescriptor().getCoordinateReferenceSystem();
private Query reprojectFilter(Query query) throws IOException { SimpleFeatureType nativeFeatureType = source.getSchema(); final GeometryDescriptor geom = nativeFeatureType.getGeometryDescriptor();
private Integer getFeatureTypeGeometrySRID() { return (Integer) featureType .getGeometryDescriptor() .getUserData() .get(JDBCDataStore.JDBC_NATIVE_SRID); }
private boolean isFeatureTypeGeometryGeodetic() { Boolean geodetic = (Boolean) featureType .getGeometryDescriptor() .getUserData() .get(OracleDialect.GEODETIC); return geodetic != null && geodetic; }
public Integer getFeatureTypeGeometrySRID() { return (Integer) delegate.getFeatureType() .getGeometryDescriptor() .getUserData() .get(JDBCDataStore.JDBC_NATIVE_SRID); }
} else { CoordinateReferenceSystem resultCRS = null; GeometryDescriptor gd = fs.getSchema().getGeometryDescriptor(); CoordinateReferenceSystem nativeCRS = gd != null ? gd.getCoordinateReferenceSystem() : null;
public ReprojectingFeatureCollection( SimpleFeatureCollection delegate, CoordinateReferenceSystem target) { this( delegate, delegate.getSchema().getGeometryDescriptor().getCoordinateReferenceSystem(), target); }
public GeometryAttribute getDefaultGeometryProperty() { GeometryDescriptor geometryDescriptor = featureType.getGeometryDescriptor(); GeometryAttribute geometryAttribute = null; if (geometryDescriptor != null) { Object defaultGeometry = getDefaultGeometry(); geometryAttribute = new GeometryAttributeImpl(defaultGeometry, geometryDescriptor, null); } return geometryAttribute; }
public GeometryAttribute getDefaultGeometryProperty() { GeometryDescriptor geometryDescriptor = featureType.getGeometryDescriptor(); GeometryAttribute geometryAttribute = null; if (geometryDescriptor != null) { Object defaultGeometry = getDefaultGeometry(); geometryAttribute = new GeometryAttributeImpl(defaultGeometry, geometryDescriptor, null); } return geometryAttribute; }
public GeometryAttribute getDefaultGeometryProperty() { Object value = feature.getAttribute(backendGeomPropertyName); GeometryAttribute attr = new GeometryAttributeImpl(value, featureTyp.getGeometryDescriptor(), null); return attr; }
private SeLayer getLayer() throws IOException { if (this.cachedLayer == null && featureType.getGeometryDescriptor() != null) { final String typeName = this.featureType.getTypeName(); final SeLayer layer = session.getLayer(typeName); this.cachedLayer = layer; } return this.cachedLayer; }
@Override public String getGeometryPath() { String gdName = schema.getGeometryDescriptor().getLocalName(); return (String) schema.getDescriptor(gdName).getUserData().get(MongoDataStore.KEY_mapping); }
/** Returns true if the type is usable as a mosaic index */ public static boolean isValidMosaicSchema( SimpleFeatureType schema, String locationAttributeName) { // does it have a geometry? if (schema == null || schema.getGeometryDescriptor() == null) { return false; } // does it have the location property? AttributeDescriptor location = schema.getDescriptor(locationAttributeName); return location != null && CharSequence.class.isAssignableFrom(location.getType().getBinding()); }
@Override public String getGeometryPath() { String gdName = schema.getGeometryDescriptor().getLocalName(); return (String) schema.getDescriptor(gdName).getUserData().get(MongoDataStore.KEY_mapping); }
public IncludedFeatureIterator( SimpleFeatureIterator delegate, SimpleFeatureCollection firstFeatures, SimpleFeatureCollection secondFeatures, SimpleFeatureType schema) { this.delegate = delegate; this.firstFeatures = firstFeatures; this.secondFeatures = secondFeatures; this.fb = new SimpleFeatureBuilder(schema); this.dataGeomName = this.firstFeatures.getSchema().getGeometryDescriptor().getLocalName(); }
public ZonalStatisticsIterator( SimpleFeatureIterator zones, String dataAttribute, SimpleFeatureCollection data, SimpleFeatureType targetSchema) { this.zones = zones; this.dataAttribute = dataAttribute; this.data = data; this.builder = new SimpleFeatureBuilder(targetSchema); this.dataGeomName = data.getSchema().getGeometryDescriptor().getLocalName(); }
public void testSchema() throws Exception { SimpleFeatureType schema = dataStore.getSchema(tname(getLine3d())); CoordinateReferenceSystem crs = schema.getGeometryDescriptor().getCoordinateReferenceSystem(); assertEquals(Integer.valueOf(getEpsgCode()), CRS.lookupEpsgCode(crs, false)); assertEquals( getNativeSRID(), schema.getGeometryDescriptor().getUserData().get(JDBCDataStore.JDBC_NATIVE_SRID)); assertEquals( 3, schema.getGeometryDescriptor().getUserData().get(Hints.COORDINATE_DIMENSION)); }
private BBOX bboxFilter(Envelope bbox) { return ff.bbox( wrapped.getSchema().getGeometryDescriptor().getLocalName(), bbox.getMinX(), bbox.getMinY(), bbox.getMaxX(), bbox.getMaxY(), null); }
public void testVirtualTable() throws Exception { // geopoint( id:Integer; name:String; geo:Geography(Point) ) StringBuffer sb = new StringBuffer(); sb.append("select * from "); dialect.encodeTableName(tname("geopoint"), sb); VirtualTable vt = new VirtualTable("geopoint_vt", sb.toString()); dataStore.addVirtualTable(vt); SimpleFeatureType featureType = dataStore.getSchema("geopoint_vt"); assertNotNull(featureType); assertNotNull(featureType.getGeometryDescriptor()); } }
public void testMaintainDefaultGeometryOnRetype() { builder.setName("testGeometries"); builder.add("geo1", Point.class, DefaultGeographicCRS.WGS84); builder.add("geo2", Polygon.class, DefaultGeographicCRS.WGS84); builder.setDefaultGeometry("geo1"); SimpleFeatureType type = builder.buildFeatureType(); // performing an attribute selection, even changing order, should not change // the default geometry, that had a special meaning in the original source SimpleFeatureType retyped = SimpleFeatureTypeBuilder.retype(type, new String[] {"geo2", "geo1"}); assertEquals("geo1", retyped.getGeometryDescriptor().getLocalName()); }