Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

srtm color table doesn't work #11

Open
landam opened this issue May 24, 2024 · 2 comments
Open

srtm color table doesn't work #11

landam opened this issue May 24, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@landam
Copy link
Contributor

landam commented May 24, 2024

@jehlijos I tested srtm color table (which contains absolute values) on sample data (see #10):

Screenshot from 2024-05-24 13-17-51

Applied color table seems to be incorrect:

image

This should work to me knowledge(?)

@landam landam added the bug Something isn't working label May 24, 2024
@landam landam added this to the Odevzdani projektu milestone May 24, 2024
@landam
Copy link
Contributor Author

landam commented Jun 5, 2024

srtm.txt

@pesekon2
Copy link
Contributor

pesekon2 commented Jun 5, 2024

The main part of the qml is rasterrenderer, its type can be paletted or singlebandpseudocolor.

Raster renderer for a paletted qml:

    <rasterrenderer alphaBand="-1" type="paletted" opacity="1" band="1" nodataColor="">
      <rasterTransparency/>
      <minMaxOrigin>
        <limits>None</limits>
        <extent>WholeRaster</extent>
        <statAccuracy>Estimated</statAccuracy>
        <cumulativeCutLower>0.02</cumulativeCutLower>
        <cumulativeCutUpper>0.98</cumulativeCutUpper>
        <stdDevFactor>2</stdDevFactor>
      </minMaxOrigin>
      <colorPalette>
        <paletteEntry alpha="255" color="#000000" value="-11000" label="-11000"/>
        <paletteEntry alpha="255" color="#00000a" value="-500" label="-500"/>
        <paletteEntry alpha="255" color="#000014" value="-300" label="-300"/>
        <paletteEntry alpha="255" color="#000046" value="-200" label="-200"/>
        <paletteEntry alpha="255" color="#000082" value="-100" label="-100"/>
        <paletteEntry alpha="255" color="#0000cd" value="-50" label="-50"/>
        <paletteEntry alpha="255" color="#6480ff" value="0" label="0"/>
        <paletteEntry alpha="255" color="#399769" value="0.10000000000000001" label="0.1"/>
        <paletteEntry alpha="255" color="#75c25d" value="100" label="100"/>
        <paletteEntry alpha="255" color="#e6e680" value="200" label="200"/>
        <paletteEntry alpha="255" color="#ca9e4b" value="500" label="500"/>
        <paletteEntry alpha="255" color="#d6bb62" value="1000" label="1000"/>
        <paletteEntry alpha="255" color="#b99a64" value="2000" label="2000"/>
        <paletteEntry alpha="255" color="#dcdcdc" value="3000" label="3000"/>
        <paletteEntry alpha="255" color="#fafafa" value="5000" label="5000"/>
        <paletteEntry alpha="255" color="#ffffff" value="8850" label="8850"/>
        <paletteEntry alpha="255" color="#ffffff" value="0" label="nv"/>
      </colorPalette>
      <colorramp name="[source]" type="randomcolors">
        <Option/>
      </colorramp> 
    </rasterrenderer>

For a singleband pseudocolor:

    <rasterrenderer alphaBand="-1" classificationMin="139.7902832" type="singlebandpseudocolor" opacity="1" band="1" classificationMax="664.6478882" nodataColor="">
      <rasterTransparency/>
      <minMaxOrigin>
        <limits>MinMax</limits>
        <extent>WholeRaster</extent>
        <statAccuracy>Estimated</statAccuracy>
        <cumulativeCutLower>0.02</cumulativeCutLower>
        <cumulativeCutUpper>0.98</cumulativeCutUpper>
        <stdDevFactor>2</stdDevFactor>
      </minMaxOrigin> 
      <rastershader>
        <colorrampshader classificationMode="1" clip="0" minimumValue="139.7902832" labelPrecision="4" colorRampType="INTERPOLATED" maximumValue="664.64788820000001">
          <colorramp name="[source]" type="gradient">
            <Option type="Map">
              <Option name="color1" type="QString" value="247,251,255,255"/>
              <Option name="color2" type="QString" value="8,48,107,255"/>
              <Option name="direction" type="QString" value="ccw"/>
              <Option name="discrete" type="QString" value="0"/>
              <Option name="rampType" type="QString" value="gradient"/>
              <Option name="spec" type="QString" value="rgb"/> 
              <Option name="stops" type="QString" value="0.13;222,235,247,255;rgb;ccw:0.26;198,219,239,255;rgb;ccw:0.39;158,202,225,255;rgb;ccw:0.52;107,174,214,255;rgb;ccw:0.65;66,146,198,255;rgb;ccw:0.78;33,113,181,255;rgb;ccw:0.9;8,81,156,255;rgb;ccw"/>
            </Option> 
          </colorramp>
          <item alpha="255" color="#f7fbff" value="139.790283203125" label="139,7903"/>
          <item alpha="255" color="#deebf7" value="208.02177185058594" label="208,0218"/>
          <item alpha="255" color="#c6dbef" value="276.25326049804687" label="276,2533"/>
          <item alpha="255" color="#9ecae1" value="344.4847491455078" label="344,4847"/>
          <item alpha="255" color="#6baed6" value="412.71623779296874" label="412,7162"/>
          <item alpha="255" color="#4292c6" value="480.9477264404297" label="480,9477"/>
          <item alpha="255" color="#2171b5" value="549.1792150878906" label="549,1792"/>
          <item alpha="255" color="#08519c" value="612.1621276855469" label="612,1621"/>
          <item alpha="255" color="#08306b" value="664.6478881835938" label="664,6479"/>
          <rampLegendSettings maximumLabel="" useContinuousLegend="1" suffix="" orientation="2" minimumLabel="" direction="0" prefix="">
            <numericFormat id="basic">
              <Option type="Map">
                <Option name="decimal_separator" type="invalid"/>
                <Option name="decimals" type="int" value="6"/>
                <Option name="rounding_type" type="int" value="0"/>
                <Option name="show_plus" type="bool" value="false"/>
                <Option name="show_thousand_separator" type="bool" value="true"/>
                <Option name="show_trailing_zeros" type="bool" value="false"/>
                <Option name="thousand_separator" type="invalid"/>
              </Option>
            </numericFormat>
          </rampLegendSettings>
        </colorrampshader>
      </rastershader>
    </rasterrenderer>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants