Hello! For the purposes of rendering a single-band grid coverage I am first normalizing it to sample value range [0, 1]. I am using the DivideByConst JAI operator which has served my well up until now.
The coverage samples are typically quite small, in the range of [0.0, 0.0035993857840289434]. I simply do: Operations.DEFAULT.divideBy(coverage, new double[]{normalizationValue}); … where normalizationValue is 0.0035993857840289434 (I use the extrema operator to find this value). Should be straightforward I think but when I invoke the operator it throws an exception saying: SEVERE [se.havochvatten.symphony.exception.SymphonyWSExceptionMapper] (default task-101) java.lang.IllegalArgumentException: Range [-∞ .. ∞] is not valid.: java.lang.IllegalArgumentException: Range [-∞ .. ∞] is not valid. at deployment.symphony-ws-1.2.0-SNAPSHOT.war//org.geotools.coverage.Category.<init>(Category.java:324) at deployment.symphony-ws-1.2.0-SNAPSHOT.war//org.geotools.coverage.Category.<init>(Category.java:283) at deployment.symphony-ws-1.2.0-SNAPSHOT.war//org.geotools.coverage.processing.OperationJAI.deriveCategory(OperationJAI.java:840) at deployment.symphony-ws-1.2.0-SNAPSHOT.war//org.geotools.coverage.processing.OperationJAI.deriveSampleDimension(OperationJAI.java:789) at deployment.symphony-ws-1.2.0-SNAPSHOT.war//org.geotools.coverage.processing.OperationJAI.deriveGridCoverage(OperationJAI.java:573) at deployment.symphony-ws-1.2.0-SNAPSHOT.war//org.geotools.coverage.processing.OperationJAI.doOperation(OperationJAI.java:302) at deployment.symphony-ws-1.2.0-SNAPSHOT.war//org.geotools.coverage.processing.CoverageProcessor.doOperation(CoverageProcessor.java:575) at deployment.symphony-ws-1.2.0-SNAPSHOT.war//org.geotools.coverage.processing.CoverageProcessor.doOperation(CoverageProcessor.java:598) at deployment.symphony-ws-1.2.0-SNAPSHOT.war//org.geotools.coverage.processing.Operations.doOperation(Operations.java:759) at deployment.symphony-ws-1.2.0-SNAPSHOT.war//org.geotools.coverage.processing.Operations.divideBy(Operations.java:177) I am using GeoTools 26.5. I can see that the code on org.geotools.coverage.Category.<init>(Category.java:324) explicitly checks for this case the min or max value if the range is infinity, but not sure why the range is deemed [-inf, inf], nor why my specific use case seems unsupported. [Havochvatten] Tobias Gerdin Systemutvecklare, Konsult Enheten för systemutveckling Gullbergs Strandgata 15, 411 04 Göteborg Box 11930, SE-404 39 Göteborg tobias.ger...@havochvatten.se www.havochvatten.se<https://www.havochvatten.se/> [Havochvatten] Havs- och vattenmyndigheten behandlar dina personuppgifter i enlighet med dataskyddsförordningen och myndighetens dataskyddspolicy, läs mer på www.havochvatten.se/sa-behandlar-hav-dina-personuppgifter<https://www.havochvatten.se/sa-behandlar-hav-dina-personuppgifter> SwAM processes your personal data in accordance with the General Data Protection Regulation (GDPR) and our Data Protection Policy, see www.havochvatten.se/sa-behandlar-hav-dina-personuppgifter<https://www.havochvatten.se/sa-behandlar-hav-dina-personuppgifter>
_______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users