GDALRasterizeGeometries - Function Signature
Hi this is a little bit of a strange question about how rasterio is using the GDALRasterizeGeometries function. This c-function is called in _features.pyx here:
My question has to do with the bolded arguments, 6 & 7. The python function docstring expresses the notion that the affine matrix, transform, is used convert between the shapes coordinate system to the pixels provided in image. However looking at the CPP source code for this function I see this function declaration:
As you can see its it seems rasterio is passing NULL to pfnTransformer and the affine transform to pTransformArg. This pTransformArg is not really meant to be used for the affine matrix, but as an argument to a valid pfnTransformer.
It *think* everything still works because of this code here that checks the arguments. If it sees that pfnTransformer is NULL it will automatically try to get the transform from the raster dataset. But I have not idead how in memory dataset will have that information
so I keep thinking this theory must be wrong.
In the end I am just trying to figure out how in the world you are passing just the affine transform into the GDALRasterizeGeometries as pTransformArg.
PS. I'm used to github formatting so this has been a little different to type up!
In the end I was just trying to write some CPP code that is similar to rasterio for rasterizing freatures (in memory).