This constructor is responsible for setting the used, area, p_dataset, and band members of this struct. In the case where an access vector is given, the dataset which contain a raster dataset with a rasterized version of the access, where a pixel is '1' if it falls within accessible area.
First, if p_vector is not given, then the 'used' member remains false.
If p_vector is given, it is checked to ensure it has the same spatial reference system as the p_raster. Polygons are created such that The polygons contain the accessible area. This is done by buffering the linestrings in the access vector using buff_outer, and removing the buff_inner buffer.
A vector is created usign the output polygons from this calculation. Then, GDALRasterize() is called specifying: -at (all touched – sets all pixels touched by polygon) -burn 1 (setting the burn value to 1) -l access (specifying the layer name in the polygon dataset as 'access') -te {xmin} {ymin} {xmax} {ymax} (setting the extent to the raster extent) -ts {width} {height} (setting the dimensions to the raster dimensions) -ot Int8 (setting the output type to int8_t)
The resulting raster dataset created by the GDALRasterize() function is then checked by sampling functions to ensure their samples fall within accessible areas. The 'band' parameter's metadata is set according to the output raster dataset.
- Parameters
-
| GDALVectorWrapper | *p_vector |
| GDALRasterWrapper | *p_raster |
| std::string | layerName |
| double | buffInner |
| double | buffOuter |
| bool | largeRaster |
| std::string | tempFolder |
| int | xBlockSize |
| int | yBlockSize |