<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Hi,<div>Not sure we have access to this in QGIS but the raster to vector is based on the polygonize() function in Gdal.  I see they have a fpolygonize() function also that you can call with a python script.  The « f » stands for float.</div><div><br></div><div><a href="https://gdal.org/python/index.html">https://gdal.org/python/index.html</a></div><div><br></div><div>You could probably easily adapt the script found on the Gdal cookbook page.</div><div><br></div><div><a href="https://pcjericks.github.io/py-gdalogr-cookbook/raster_layers.html#polygonize-a-raster-band">https://pcjericks.github.io/py-gdalogr-cookbook/raster_layers.html#polygonize-a-raster-band</a><br><br><div dir="ltr">Nicolas Cadieux<div><a href="https://gitlab.com/njacadieux">https://gitlab.com/njacadieux</a></div></div><div dir="ltr"><br><blockquote type="cite">Le 9 nov. 2021 à 07:22, Bo Victor Thomsen <bo.victor.thomsen@gmail.com> a écrit :<br><br></blockquote></div><blockquote type="cite"><div dir="ltr">
  

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  
  
    <p>Greetings list -<br>
    </p>
    <p>I have a question about polygonization of a raster layer/file
      with float values as pixel values</p>
    <p>My raster layer  contains pixel <i>float</i>-values from -0.97
      to +4.78. When I run the<i> </i><i>"</i><i>Polygonize (raster to
        vector)</i><i>"</i> processing algorithm I get a new layer with
      nice polygons in the layer. However, all my depth values has been
      converted to integers in the range from 0 -  4. And the polygons
      has been dissolved in fewer and larger polygons that what I
      wanted.</p>
    <p>Is there a method i.e some qualifier or whatnot, that I can add
      to the GDAL command-line that would classify the decimal values
      from meters to  centimeters, i.e I would get a polygon layer with
      depth values like -0.99, -09.98 ... 4.78 (around 577 discrete
      values), and a larger number of smaller polygons ?</p>
    <p>I'm aware that I could take the raster layer, multiply the pixel
      values with 100.0; convert to integer; create the the polygon
      layer from the modified raster layer and lastly update the depth
      value in the polygon layer by dividing it with 100. And yes, I can
      make a processing model to do the work <br>
    </p>
    <p>But alas, I have hundreds of raster layers to process, so I
      trying to minimize the work for processing each of these raster
      files. <br>
    </p>
    <p> <br>
    </p>
    <p><br>
    </p>
    <pre class="moz-signature" cols="72">-- 
Med venlig hilsen / Kind regards

Bo Victor Thomsen</pre>
  
<span>_______________________________________________</span><br><span>Qgis-user mailing list</span><br><span>Qgis-user@lists.osgeo.org</span><br><span>List info: https://lists.osgeo.org/mailman/listinfo/qgis-user</span><br><span>Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user</span><br></div></blockquote></div></body></html>