Feature description
It may be desirable to have a single pipeline producing several temporary outputs and combining them in a final sub-pipeline. A typical example would be to produce a shaded colored map from a DEM:
- compute the grayscale hillshade,
- compute the hypsometric/colored map
- combine both using the color-merge operation. (actually 2 and 3 can be a single sub-pipeline)
Potential syntax:
gdal raster pipeline read dem.tif ! \
hillshade ! \
write /vsipipe/hillshade ! \
read dem.tif ! \
color-map color-table.txt ! \
color-merge --grayscale /vsipipe/hillshade ! \
write colored-hillshade.tif
The sub-pipelines are implicitly defined by a write step which is not a final one, followed by a read step.
A non-final write step must compuslory write into a pseudo VSI file starting with /vsipipe/ . The implementation might decide that it is a /vsimem/ file or a temporary file on the file system, but the user shouldn't be able to write in an arbitrary location, at least in a .gdalg.json context as it could be a security issue.
One could also accept (require?) explicit markers of sub-pipelines using square brackets (rounded brackets need to be escaped in Bash):
gdal raster pipeline [ read dem.tif ! \
hillshade ! \
write /vsipipe/hillshade ] ! \
[ read dem.tif ! \
color-map color-table.txt ! \
color-merge --grayscale /vsipipe/hillshade ! \
write colored-hillshade.tif ]
Thoughts @hobu @dbaston @elpaso @jcphill @jratike80 ?
Additional context
No response
Feature description
It may be desirable to have a single pipeline producing several temporary outputs and combining them in a final sub-pipeline. A typical example would be to produce a shaded colored map from a DEM:
Potential syntax:
The sub-pipelines are implicitly defined by a write step which is not a final one, followed by a read step.
A non-final write step must compuslory write into a pseudo VSI file starting with
/vsipipe/. The implementation might decide that it is a /vsimem/ file or a temporary file on the file system, but the user shouldn't be able to write in an arbitrary location, at least in a .gdalg.json context as it could be a security issue.One could also accept (require?) explicit markers of sub-pipelines using square brackets (rounded brackets need to be escaped in Bash):
Thoughts @hobu @dbaston @elpaso @jcphill @jratike80 ?
Additional context
No response