Mixed raster/vector pipelines
Feature description
The new CLI has a number of algorithms that convert between raster and vector:
Vector in, raster out
gridrasterize
Raster in, vector out
contourfootprintpixel_info(sort of)polygonize
Currently these algorithms cannot participate in pipelines, which must be exclusively raster or vector. But is possible to imagine this being more general, i.e.
gdal pipeline read in.tif !
footprint !
buffer 20 !
write covered_area.shp
Are there any major barriers to generalizing the pipeline logic such that pipelines can involve raster and vector processing steps? This could allow some commands such as gdal raster footprint to be simplified, as they would no longer need their own arguments for densification, buffering, convex hull, etc.
Additional context
No response
This feels fun!
That's an interesting proposal and that idea also occurred to me, given that the general mechanics for dealing with raster and vector pipelines is very similar and the code almost identical. One difficulty with generalized pipelines though is that there are raster and vector steps which share the same names "input", "output", "edit", "clip", etc. but not the same implementation. So the logic in GDAL[Raster|Vector]PipelineAlgorithm::ParseCommandLineArguments() that instantiates the chain of steps should be made smarter to ask each step for the nature of its input and output to be able to instantiate the appropriate one.
implemented in https://github.com/OSGeo/gdal/pull/12581