I work with QGIS 2.0.1.

For my raster file I have created a Layer Style with a transparent pixel list.

When I import a rasterfile in a new project and load the layer-style file, the map changed to the correct representation.

But the transparent pixel list is empty.

When i want to apply the style settings, the presentation changed back to the original shape style.


I have looked in the style file and the transparent pixel list are stored.

Code:

<rasterTransparency>
    <singleValuePixelList>
      <pixelListEntry min="0" max="0" percentTransparent="100"/>
      <pixelListEntry min="1" max="1" percentTransparent="40"/>
    </singleValuePixelList>
</rasterTransparency>

Second workflow:

  • Open the Properties from the raster file
  • Select the the Transparency menu
  • Click the + Button (add values button)
  • Enter the raster values and adjust the transparency
  • Export the list to .txt file

After this I load the transparency pixel list text file into the new Project additionally to the layerstyle . This works.

Why is the transparent pixel list stored in the layer style file but you must store the pixel list as a extra text file?

What can you do, that you don't have to save 2 files (Layerstyle and transparent pixel list .txt)?

  • Welcome to gis.stackexchange @RonUwe. It might be necessary to clarify your question to get an answer. Can you describe the exact workflow (buttons pressed) for "take over the settings, ..."? Do you mean when you press "Apply"? – underdark Feb 8 '14 at 14:25
  • I have edit my question to specify the problem. – RonUwe Feb 10 '14 at 13:35

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.