Here is a little description of how budget segregation works “under the hood”. This is all internal workings that you don’t need to know but it might help with the understanding:
How does Rasterized budget segregation work?
- By passing a string field name (Like “Method”) to the rasterization method a temporary rasterized version of the ShapeFile is created. The values in the raster correspond to our special
- The raster is stored in a special
VectorRasterobject which contains an open dataset and a Dictionary to create a relationship between our
GCDFIDfield and the value of the field we want to use as a mask
VectorRasterobject is passed to the budget segregation app which iterates cell-by-cell and aggregates values into bins named after the string values of the fields specified in step 1.
- The algorithm returns the dictionary of Stats objects.
Why do I see
GCDFID in my ShapeFile when I add it to a project?
The ESRI ShapeFile specification allows for inconsistent handling of FID fields. Combining that with limitations in the GDaL Rasterization algorithm, in order to do Rasterization of an ESRI ShapeFile using the FID field we need an internally consistent (to GCD) unique ID field to identify shapes in our workflow.