[gdal-dev] Random Raster Driver

Even Rouault even.rouault at spatialys.com
Sat Jul 5 05:44:23 PDT 2025


Alex,


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 
(https://gdal.org/en/stable/drivers/raster/vrt.html#built-in-pixel-functions). 
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.


Even


Le 04/07/2025 à 19:08, Alex Hagen-Zanker via gdal-dev a écrit :
> Hi all,
>
> 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.
>
> Now it is for my own use, but I'd be happy to polish it up if it can 
> become part of GDAL.
>
> There is documentation here:
>
> https://github.com/ahhz/random-raster/blob/main/docs/random_raster_driver.md
> <https://github.com/ahhz/random-raster/blob/main/docs/random_raster_driver.md>
> 	
> random-raster/docs/random_raster_driver.md at main · 
> ahhz/random-raster 
> <https://github.com/ahhz/random-raster/blob/main/docs/random_raster_driver.md>
> Create GDALDatasets containing rasters of random values, that do not 
> store the values on disk - ahhz/random-raster
> github.com
>
> Would this be of interest as a GDAL format?
>
> Kind regards, Alex
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20250705/b4f278de/attachment.htm>


More information about the gdal-dev mailing list