GeoTools
  1. GeoTools
  2. GEOT-844

RenderedLayerFactory.createRecoloredGrid fails for some ColorMaps

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.2-RC2
    • Fix Version/s: None
    • Component/s: unsupported
    • Labels:
      None

      Description

      the line
      double rangeStep = 254 / (entries.length - 1) ; // <<<< integer division BAD
      leads to failure later because 1 + round (1 + (entries.length - 1) * rangeStep) > 255 for some entries.length!!!

      recommend change to
      double rangeStep = 254.0 / (entries.length - 1) ;

      Repro: create color map TYPE_RAMP w/ 2 color entries, create raster symbolizer with the map and addLayer a grid coverage with this symbolizer.

        Activity

        Hide
        Andrea Aime added a comment -
        Mass closing all go-1 related issues as the module does not exist anymore
        Show
        Andrea Aime added a comment - Mass closing all go-1 related issues as the module does not exist anymore

          People

          • Assignee:
            Martin Desruisseaux
            Reporter:
            Anton V Tykhyy
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: