You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method Range.union(Range) in the package it.geosolutions.jaiext.range suggests that the resulting range represents the set-theoretic union of the two involved ranges. However, the concrete implementations, e.g. in RangeDouble do only return the smallest gapless range containing the union.
Did I miss a hint in the documentation on how unions of ranges are to be interpreted?
Otherwise, I suggest to extend the implementations of the class Range to support also gaps, e.g., by introducing another container class for sets of ranges. A clue in the documentation or renaming the method union would also solve this problem.
Example
Valid data is between 0 and 100, no-data values are the values from -9999 to 0 and from 100 to 9999 where 0 and 100 are excluded.
Range r1 = RangeFactory.create(-9999, true, 0, false);
Range r2 = RangeFactory.create(100, false, 9999, true);
Range r = r1.union(r2);
The resulting no-data range, however, is RangeInt[-9999, 9999], thus, covering also the valid data.
The text was updated successfully, but these errors were encountered:
The method
Range.union(Range)
in the packageit.geosolutions.jaiext.range
suggests that the resulting range represents the set-theoretic union of the two involved ranges. However, the concrete implementations, e.g. inRangeDouble
do only return the smallest gapless range containing the union.Did I miss a hint in the documentation on how unions of ranges are to be interpreted?
Otherwise, I suggest to extend the implementations of the class
Range
to support also gaps, e.g., by introducing another container class for sets of ranges. A clue in the documentation or renaming the methodunion
would also solve this problem.Example
Valid data is between 0 and 100, no-data values are the values from -9999 to 0 and from 100 to 9999 where 0 and 100 are excluded.
The resulting no-data range, however, is
RangeInt[-9999, 9999]
, thus, covering also the valid data.The text was updated successfully, but these errors were encountered: