How does the rasterize tool decide which value to represent when a cell covers an area which inclueds different values? I need it in this case for polygons but would like to know for lines and points as well. What are the rules that it follows.
Looking at the source here and here, it seems GDAL just starts from the top of the list and works its way down, so it'll be in whatever order the shapes are stored in, overwriting any data that was stored in a given pixel. I'm not even sure it does anything with attribute indexes.
The rasterizer by default just uses the centre of the pixel for polygons, or Bresenham's algorithm for lines (presumably points are just nearest neighbour). There appears to be an option to fill any touched pixel that can, I think, be supplied on the command line. There's a comment to this effect in the code:
462 * <dt>"ALL_TOUCHED":</dt> <dd>May be set to TRUE to set all pixels touched 463 * by the line or polygons, not just those whose center is within the polygon 464 * or that are selected by brezenhams line algorithm. Defaults to FALSE.</dd>
So there is no blending at all, and it doesn't try to do anything clever.