<div dir="ltr"><div dir="ltr">Hi List,<div><br></div><div>I tried my command on GDAL 3.8.4, released 2024/02/08.</div><div>And the results are the same. The lowest value is still incorrect.</div><div><br></div><div>I can't imagine this is a bug that was never noticed before.</div><div>So I assume I'm doing something wrong. But I can't figure it out.</div><div><br></div><div>Please give me some advice.<br clear="all"><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr">Regards,<br>
<br>Paul</div></div></div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Op vr 5 apr 2024 om 10:27 schreef Paul Meems <<a href="mailto:bontepaarden@gmail.com">bontepaarden@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello List,<div><br></div><div>I have a Surfer grid which I want to convert into polygons using gdal_contour.</div><div>The min value of the lowest polygon is 0 which I didn't expect.</div><div>In the next step, I calculate the average of the min and max values, and in this case that average is wrong.<br clear="all"><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr">These are the values of the grid:</div><div dir="ltr"><font face="monospace">Grid Size (X*Y): 113 x 121<br></font></div><div dir="ltr"><font face="monospace">NoData Value: 1.70141E+38<br></font></div><div dir="ltr"><font face="monospace">Minimum: 105000<br>Maximum: 133000</font><br>
<br>This is my command:</div><div dir="ltr"><font face="monospace">gdal_contour -p -f "ESRI Shapefile" -fl -97000 -37000 23000 83000 89000 95000 101000 107000 113650 121000 129000 137000 143000 149000 155000 215000 275000 335000 -amin Min -amax Max "Surfer.grd" "tmp3p4f4i.shp"</font><br></div><div dir="ltr"><br></div><div>As you can see, the lowest value of the grid (105000) is between the values 101000 and 107000.</div><div>So I would expect to have the min value of the shapefile be 101000 and the max value 107000.</div><div><br></div><div>But the result is:</div><div><img src="cid:ii_lume6buv0" alt="image.png" style="margin-right: 0px;"></div><div>Min is 0 and max is 107000.</div><div><br></div><div>I also tried setting the lowest value of the grid to 107000 (one of the level values) but that also resulted in a min value of 0.</div><div><br></div><div>The polygons themselves are OK, just the min value of the lowest value is incorrect.</div><div><br></div><div>I'm using GDAL 3.6.3, released 2023/03/07 on Windows.</div><div><br></div><div>Why is this happening?</div><div>Do I need to set an additional argument?</div><div><br></div><div>Please advise.</div><div><br></div><div>With regards,<br></div><div dir="ltr"><br>Paul<br>
</div></div></div></div></div></div></div></div></div>
</blockquote></div></div>