<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Alex,</p>
<p><br>
</p>
<p>I'm not super familiar myself with the usage of such random
rasters, but it seems to be fairly common indeed in GIS software,
and could likely make sense within GDAL too. I'm wondering if
instead of having a new driver, the random distribution functions
could not be exposed as VRT C++ built-in pixel functions
(<a class="moz-txt-link-freetext" href="https://gdal.org/en/stable/drivers/raster/vrt.html#built-in-pixel-functions">https://gdal.org/en/stable/drivers/raster/vrt.html#built-in-pixel-functions</a>).
That would make it possible to benefit from all the rest of the
VRT infrastructure like setting geospatial information, adding
metadata, multiband support etc There would be a bit of tweak to
do in the VRTDerivedRasterBand in that case to force it to always
operate on block boundaries (instead of any arbitrary requested
window), so that the per-block seed can be used, but that should
mostly be a matter of a few lines to add in its IRasterIO()
implementation.</p>
<p><br>
</p>
<p>Even<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">Le 04/07/2025 à 19:08, Alex
Hagen-Zanker via gdal-dev a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:GV1P251MB0747052BA977812DCE97438EB442A@GV1P251MB0747.EURP251.PROD.OUTLOOK.COM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
<div
style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"
class="elementToProof">
Hi all, </div>
<div
style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"
class="elementToProof">
<br>
</div>
<div
style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"
class="elementToProof">
I implemented a plugin raster format that produces raster of
random values using the all the distributions that are offered
by the standard library's random header. It is different from
other random raster functionality in e.g. ArcGIS or QGIS because
it does not store the data on file but generates blocks of data
on-demand. </div>
<div
style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"
class="elementToProof">
<br>
</div>
<div
style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"
class="elementToProof">
Now it is for my own use, but I'd be happy to polish it up if it
can become part of GDAL.</div>
<div
style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"
class="elementToProof">
<br>
</div>
<div
style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"
class="elementToProof">
There is documentation here: </div>
<div
style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"
class="elementToProof">
<br>
</div>
<div
style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"
class="elementToProof">
<a id="LPlnk984096"
href="https://github.com/ahhz/random-raster/blob/main/docs/random_raster_driver.md"
moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/ahhz/random-raster/blob/main/docs/random_raster_driver.md</a></div>
<div style="width: 100%; display: inline-block;"
class="_Entity _EType_OWALinkPreview _EId_OWALinkPreview _EReadonly_1">
<div
style="width: 100%; margin-top: 16px; margin-bottom: 16px; position: relative; max-width: 800px; min-width: 424px;"
class="LPBorder862455"
id="LPBorder_GTaHR0cHM6Ly9naXRodWIuY29tL2FoaHovcmFuZG9tLXJhc3Rlci9ibG9iL21haW4vZG9jcy9yYW5kb21fcmFzdGVyX2RyaXZlci5tZA..">
<table
style="padding: 12px 36px 12px 12px; width: 100%; border-width: 1px; border-style: solid; border-color: rgb(200, 200, 200); border-radius: 2px;"
role="presentation" id="LPContainer862455">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td>
<div
style="position: relative; margin-right: 12px; height: 120px; overflow: hidden; width: 240px;"
id="LPImageContainer862455">
<a
href="https://github.com/ahhz/random-raster/blob/main/docs/random_raster_driver.md"
id="LPImageAnchor862455" target="_blank"
moz-do-not-send="true"><img
style="display: block;" alt=""
id="LPThumbnailImageId862455"
src="https://opengraph.githubassets.com/6043ab82cae0d7a681691a0536f0523cc36150ff5a466ad797d69782e59b5e8b/ahhz/random-raster"
moz-do-not-send="true" width="240" height="120"></a></div>
</td>
<td style="width: 100%;">
<div
style="font-size: 21px; font-weight: 300; margin-right: 8px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px;"
id="LPTitle862455">
<a
style="text-decoration: none; color: var(--themePrimary);"
href="https://github.com/ahhz/random-raster/blob/main/docs/random_raster_driver.md"
id="LPUrlAnchor862455" target="_blank"
moz-do-not-send="true">random-raster/docs/random_raster_driver.md
at main · ahhz/random-raster</a></div>
<div
style="font-size: 14px; max-height: 100px; color: rgb(102, 102, 102); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px; margin-right: 8px; overflow: hidden;"
id="LPDescription862455">
Create GDALDatasets containing rasters of random
values, that do not store the values on disk -
ahhz/random-raster</div>
<div
style="font-size: 14px; font-weight: 400; color: rgb(166, 166, 166); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif;"
id="LPMetadata862455">
github.com</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div
style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"
class="elementToProof">
Would this be of interest as a GDAL format?</div>
<div
style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"
class="elementToProof">
<br>
</div>
<div
style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"
class="elementToProof">
Kind regards, Alex</div>
<div
style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"
class="elementToProof">
<br>
</div>
<div
style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"
class="elementToProof">
<br>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>