<PAMDataset> <PAMRasterBand band="1"> <Metadata> <MDI key="STATISTICS_MINIMUM">0</MDI> <MDI key="STATISTICS_MAXIMUM">8850</MDI> <MDI key="STATISTICS_MEAN">500</MDI> <MDI key="STATISTICS_STDDEV">600</MDI> </Metadata> </PAMRasterBand> </PAMDataset>
RasterFunction renderingRule = new RasterFunction(); renderingRule.setFunctionName(selectedFunction); if ("ShadedRelief".equals(selectedFunction)) { // ShadedRelief renderingRule.setVariableName("Raster"); Map<String, Object> mapArguments = new HashMap<String, Object>(); mapArguments.put("Azimuth", 215); mapArguments.put("Altitude", 60.0); mapArguments.put("ZFactor", 4); mapArguments.put("Colormap", createColorMap()); renderingRule.setArgumentsAsMap(mapArguments); } else if ("Hillshade".equals(selectedFunction)) { // Hillshade renderingRule.setVariableName("DEM"); Map<String, Object> mapArguments = new HashMap<String, Object>(); mapArguments.put("Azimuth", 215); mapArguments.put("Altitude", 60.0); mapArguments.put("ZFactor", 4); renderingRule.setArgumentsAsMap(mapArguments); } else { // selected function is "Slope" renderingRule.setVariableName("DEM"); Map<String, Object> mapArguments = new HashMap<String, Object>(); mapArguments.put("ZFactor", 4); renderingRule.setArgumentsAsMap(mapArguments); } imageServiceLayer.setRenderingRule(renderingRule); imageServiceLayer.refresh();
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.