public void setNativeBoundingBox(ReferencedEnvelope box) { delegate.setNativeBoundingBox(box); }
public void setNativeBox(Catalog catalog, String name) throws Exception { FeatureTypeInfo fti = catalog.getFeatureTypeByName(name); fti.setNativeBoundingBox(fti.getFeatureSource(null, null).getBounds()); fti.setLatLonBoundingBox( new ReferencedEnvelope(fti.getNativeBoundingBox(), DefaultGeographicCRS.WGS84)); catalog.save(fti); }
featureType.setNativeBoundingBox( new ReferencedEnvelope(nativeBBOX, featureType.getNativeCRS()));
/** Initializes a feature type object setting any info that has not been set. */ public void initFeatureType(FeatureTypeInfo featureType) throws Exception { if (featureType.getCatalog() == null) { featureType.setCatalog(catalog); } initResourceInfo(featureType); // setup the srs if missing if (featureType.getSRS() == null) { lookupSRS(featureType, true); } if (featureType.getProjectionPolicy() == null) { setupProjectionPolicy(featureType); } // deal with bounding boxes as possible CoordinateReferenceSystem crs = featureType.getCRS(); if (featureType.getLatLonBoundingBox() == null && featureType.getNativeBoundingBox() == null) { // both missing, we compute them setupBounds(featureType); } else if (featureType.getLatLonBoundingBox() == null) { // native available but geographic to be computed setupBounds(featureType); } else if (featureType.getNativeBoundingBox() == null && crs != null) { // we know the geographic and we can reproject back to native ReferencedEnvelope boundsLatLon = featureType.getLatLonBoundingBox(); featureType.setNativeBoundingBox(boundsLatLon.transform(crs, true)); } }
featureType.setLatLonBoundingBox( LayerProperty.LATLON_ENVELOPE.get(props, DEFAULT_LATLON_ENVELOPE)); featureType.setNativeBoundingBox(LayerProperty.ENVELOPE.get(props, null));
public void setNativeBox(Catalog catalog, String name) throws Exception { FeatureTypeInfo fti = catalog.getFeatureTypeByName(name); fti.setNativeBoundingBox(fti.getFeatureSource(null, null).getBounds()); fti.setLatLonBoundingBox( new ReferencedEnvelope(fti.getNativeBoundingBox(), DefaultGeographicCRS.WGS84)); catalog.save(fti); }
bounds.include(f.getBounds()); ft.setNativeBoundingBox(bounds);
ft.setNativeBoundingBox(EMPTY_BOUNDS); ft.setLatLonBoundingBox(EMPTY_BOUNDS); ft.getMetadata().put("recalculate-bounds", Boolean.TRUE);
ftinfo.setNativeBoundingBox(bounds);
ftinfo.setNativeBoundingBox( bounds );
resource.setNativeBoundingBox(nativeBounds); resource.setLatLonBoundingBox(cb.getLatLonBounds(nativeBounds, resource.getCRS())); getCatalog().save(resource);
featureType.setNativeBoundingBox(EMPTY_BOUNDS); featureType.setLatLonBoundingBox(EMPTY_BOUNDS); featureType.getMetadata().put("recalculate-bounds", Boolean.TRUE);
resource.setNativeBoundingBox(nativeBounds); resource.setLatLonBoundingBox(cb.getLatLonBounds(nativeBounds, resource.getCRS()));
typeInfo.setSRS(_typeInfo.getSRS()); typeInfo.setProjectionPolicy(_typeInfo.getProjectionPolicy()); typeInfo.setNativeBoundingBox(_typeInfo.getNativeBoundingBox()); typeInfo.setLatLonBoundingBox(_typeInfo.getLatLonBoundingBox()); typeInfo.setCircularArcPresent(_typeInfo.isCircularArcPresent());
CatalogBuilder cb = new CatalogBuilder(getCatalog()); ReferencedEnvelope nativeBounds = cb.getNativeBounds(resource); resource.setNativeBoundingBox(nativeBounds); resource.setLatLonBoundingBox(cb.getLatLonBounds(nativeBounds, resource.getCRS())); getCatalog().save(resource); resource.setNativeBoundingBox(null); importer.calculateBounds(resource); assertFalse(resource.getNativeBoundingBox().isEmpty()); resource.setNativeBoundingBox(new ReferencedEnvelope()); assertTrue(resource.getNativeBoundingBox().isEmpty()); importer.calculateBounds(resource); resource.setNativeBoundingBox(customBbox); assertFalse(bbox.equals(resource.getNativeBoundingBox())); importer.calculateBounds(resource); resource.setNativeBoundingBox(customBbox); resource.getMetadata().put("recalculate-bounds", false); assertFalse(bbox.equals(resource.getNativeBoundingBox())); resource.setNativeBoundingBox(customBbox); resource.getMetadata().put("recalculate-bounds", true); assertFalse(bbox.equals(resource.getNativeBoundingBox())); resource.setNativeBoundingBox(customBbox); resource.getMetadata().put("recalculate-bounds", "true"); assertFalse(bbox.equals(resource.getNativeBoundingBox()));
lakesFt.setNamespace(catalog.getNamespaceByPrefix("sf")); lakesFt.setStore(catalog.getDefaultDataStore(catalog.getWorkspaceByName("sf"))); lakesFt.setNativeBoundingBox( new ReferencedEnvelope(-10, 10, -10, 10, DefaultGeographicCRS.WGS84));
featureType.setEnabled(false); featureType.setStore(dataStore); featureType.setNativeBoundingBox(envelope); featureType.setNativeCRS(DefaultGeographicCRS.WGS84); featureType.setAdvertised(false);