public ReferencedEnvelope getLatLonBoundingBox() { return delegate.getLatLonBoundingBox(); }
if (cinfo.getLatLonBoundingBox() == null && cinfo.getNativeBoundingBox() == null) { GeneralEnvelope envelope = reader.getOriginalEnvelope(); cinfo.setLatLonBoundingBox( new ReferencedEnvelope(CoverageStoreUtils.getWGS84LonLatEnvelope(envelope))); } else if (cinfo.getLatLonBoundingBox() == null) { setupBounds(cinfo); } else if (cinfo.getNativeBoundingBox() == null && cinfo.getNativeCRS() != null) { ReferencedEnvelope boundsLatLon = cinfo.getLatLonBoundingBox(); cinfo.setNativeBoundingBox(boundsLatLon.transform(cinfo.getNativeCRS(), true));
real.getProjectionPolicy(), real.getNativeBoundingBox(), real.getLatLonBoundingBox());
@Test public void testSingleBandedCoverage() throws Exception { // build a feature type (it's already in the catalog, but we just want to // check it's built as expected // LINES is a feature type with a native SRS, so we want the bounds to be there Catalog cat = getCatalog(); CatalogBuilder cb = new CatalogBuilder(cat); cb.setStore(cat.getCoverageStoreByName(MockData.TASMANIA_DEM.getLocalPart())); CoverageInfo ci = cb.buildCoverage(); // perform basic checks assertEquals(CRS.decode("EPSG:4326", true), ci.getCRS()); assertEquals("EPSG:4326", ci.getSRS()); assertNotNull(ci.getNativeCRS()); assertNotNull(ci.getNativeBoundingBox()); assertNotNull(ci.getLatLonBoundingBox()); // check the coverage dimensions List<CoverageDimensionInfo> dimensions = ci.getDimensions(); assertEquals(1, dimensions.size()); CoverageDimensionInfo dimension = dimensions.get(0); assertEquals("GRAY_INDEX", dimension.getName()); assertEquals(1, dimension.getNullValues().size()); assertEquals(-9999, dimension.getNullValues().get(0), 0d); assertEquals(Double.NEGATIVE_INFINITY, dimension.getRange().getMinimum(), 0d); // Huston, we have a problem here... // assertEquals(9999, dimension.getRange().getMaximum(), 0d); assertNull(dimension.getUnit()); }
@Test public void testMultiBandCoverage() throws Exception { Catalog cat = getCatalog(); CatalogBuilder cb = new CatalogBuilder(cat); cb.setStore(cat.getCoverageStoreByName(MockData.TASMANIA_BM.getLocalPart())); CoverageInfo ci = cb.buildCoverage(); // perform basic checks assertEquals(CRS.decode("EPSG:4326", true), ci.getCRS()); assertEquals("EPSG:4326", ci.getSRS()); assertNotNull(ci.getNativeCRS()); assertNotNull(ci.getNativeBoundingBox()); assertNotNull(ci.getLatLonBoundingBox()); // check the coverage dimensions List<CoverageDimensionInfo> dimensions = ci.getDimensions(); assertEquals(3, dimensions.size()); CoverageDimensionInfo dimension = dimensions.get(0); assertEquals("RED_BAND", dimension.getName()); assertEquals(0, dimension.getNullValues().size()); assertEquals(Double.NEGATIVE_INFINITY, dimension.getRange().getMinimum(), 0d); assertEquals(Double.POSITIVE_INFINITY, dimension.getRange().getMaximum(), 0d); assertEquals("W.m-2.Sr-1", dimension.getUnit()); }
final ReferencedEnvelope bbox = coverageInfo.getLatLonBoundingBox(); final GridCoverage coverage = resPool.getGridCoverage(coverageInfo, "waterView", bbox, null);
private void handleCoverageSummary(CoverageInfo cv) throws Exception { start("wcs:CoverageSummary"); String covId = NCNameResourceCodec.encode(cv); element("wcs:CoverageId", covId); element("wcs:CoverageSubtype", "RectifiedGridCoverage"); // TODO make this parametric handleWGS84BoundingBox(cv.getLatLonBoundingBox()); handleBoundingBox(cv.boundingBox()); end("wcs:CoverageSummary"); }
protected void handleDomain(CoverageInfo ci) throws Exception { start("wcs:Domain"); start("wcs:SpatialDomain"); handleBoundingBox(ci.getLatLonBoundingBox(), true); handleBoundingBox(ci.boundingBox(), false); handleGridCRS(ci); end("wcs:SpatialDomain"); end("wcs:Domain"); }
protected void handleCoverageSummary(CoverageInfo cv) { start("wcs:CoverageSummary"); elementIfNotEmpty("ows:Title", cv.getTitle()); elementIfNotEmpty("ows:Abstract", cv.getDescription()); handleKeywords(cv.getKeywords()); handleMetadataLinks(cv.getMetadataLinks(), "simple"); handleEnvelope(cv.getLatLonBoundingBox()); element("wcs:Identifier", cv.prefixedName()); end("wcs:CoverageSummary"); }
private void handleCoverageOffering(CoverageInfo ci) throws Exception { start("wcs:CoverageOffering"); for (MetadataLinkInfo mdl : ci.getMetadataLinks()) handleMetadataLink(mdl, "simple"); element("wcs:description", ci.getDescription()); element("wcs:name", ci.getPrefixedName()); element("wcs:label", ci.getTitle()); handleLonLatEnvelope(ci, ci.getLatLonBoundingBox()); handleKeywords(ci.getKeywords()); handleDomain(ci); handleRange(ci); handleSupportedCRSs(ci); handleSupportedFormats(ci); handleSupportedInterpolations(ci); end("wcs:CoverageOffering"); }
@Test public void testSkipMisconfigured() throws Exception { // enable skipping of misconfigured layers GeoServerInfo global = getGeoServer().getGlobal(); global.setResourceErrorHandling(ResourceErrorHandling.SKIP_MISCONFIGURED_LAYERS); getGeoServer().save(global); // manually misconfigure one layer CoverageInfo cvInfo = getCatalog().getCoverageByName(getLayerId(MockData.TASMANIA_DEM)); ReferencedEnvelope BBox = cvInfo.getLatLonBoundingBox(); try { cvInfo.setLatLonBoundingBox(null); getCatalog().save(cvInfo); // check we got everything but that specific layer, and that the output is still schema // compliant Document dom = getAsDOM(BASEPATH + "?request=GetCapabilities&service=WCS&version=1.1.1"); checkValidationErrors(dom, WCS11_SCHEMA); // print(dom); int count = getCatalog().getCoverages().size(); assertEquals(count - 2, dom.getElementsByTagName("wcs:CoverageSummary").getLength()); } finally { cvInfo.setLatLonBoundingBox(BBox); getCatalog().save(cvInfo); } }
final ReferencedEnvelope bbox = coverageInfo.getLatLonBoundingBox(); final GridCoverage coverage = resPool.getGridCoverage(coverageInfo, "multiband_select", bbox, null);
final ReferencedEnvelope bbox = coverageInfo.getLatLonBoundingBox(); final GridCoverage coverage = resPool.getGridCoverage(coverageInfo, "multiband_select", bbox, null);
/** * This method returns {@code true} in case we have POSTed a Coverage object with the name only, * as an instance when configuring a new coverage which has just been harvested. * * @param coverage */ private boolean isNewCoverage(CoverageInfo coverage) { return coverage.getName() != null && (coverage.isAdvertised()) && (!coverage.isEnabled()) && (coverage.getAlias() == null) && (coverage.getCRS() == null) && (coverage.getDefaultInterpolationMethod() == null) && (coverage.getDescription() == null) && (coverage.getDimensions() == null) && (coverage.getGrid() == null) && (coverage.getInterpolationMethods() == null) && (coverage.getKeywords() == null) && (coverage.getLatLonBoundingBox() == null) && (coverage.getMetadata() == null) && (coverage.getNativeBoundingBox() == null) && (coverage.getNativeCRS() == null) && (coverage.getNativeFormat() == null) && (coverage.getProjectionPolicy() == null) && (coverage.getSRS() == null) && (coverage.getResponseSRS() == null) && (coverage.getRequestSRS() == null); }
cv.getMetadata().get(ResourceInfo.TIME, DimensionInfo.class); ReaderDimensionsAccessor dimensions = new ReaderDimensionsAccessor(reader); handleEnvelope(cv.getLatLonBoundingBox(), timeInfo, dimensions); handleKeywords(cv.getKeywords());
if (dataset != null && dataset && time != null && time.isEnabled()) { tx.start("wcseo:DatasetSeriesSummary"); ReferencedEnvelope bbox = ci.getLatLonBoundingBox(); tx.start("ows:WGS84BoundingBox"); element(tx, "ows:LowerCorner", bbox.getMinX() + " " + bbox.getMinY(), null);
final ReferencedEnvelope bbox = coverageInfo.getLatLonBoundingBox(); final GridCoverage coverage = resPool.getGridCoverage(coverageInfo, "regional_currents", bbox, null); assertEquals(coverage.getNumSampleDimensions(), 2);
final ReferencedEnvelope bbox = coverageInfo.getLatLonBoundingBox(); final GridCoverage coverage = resPool.getGridCoverage(coverageInfo, "regional_currents", bbox, null);