diff options
| author | Daniel Wiesmann <daniel.wiesmann@gmail.com> | 2017-06-08 15:51:19 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-06-08 12:44:26 -0400 |
| commit | fe5e34a2954afdeaabbee80c762735acdd29a948 (patch) | |
| tree | fbc10f91b7d17f2410cd4c80793d228a5dd7d613 /docs/ref | |
| parent | 0c3c37a376bac149fe7e7e4b2696f8fb7990e2ab (diff) | |
Fixed #28288 -- Allowed passing papsz options to GDALRaster initialization.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/contrib/gis/gdal.txt | 66 |
1 files changed, 51 insertions, 15 deletions
diff --git a/docs/ref/contrib/gis/gdal.txt b/docs/ref/contrib/gis/gdal.txt index d6501cbf48..892f045fe6 100644 --- a/docs/ref/contrib/gis/gdal.txt +++ b/docs/ref/contrib/gis/gdal.txt @@ -1619,21 +1619,22 @@ the others are described below. The following table describes all keys that can be set in the ``ds_input`` dictionary. -=============== ======== ================================================== -Key Default Usage -=============== ======== ================================================== -``srid`` required Mapped to the :attr:`~GDALRaster.srid` attribute -``width`` required Mapped to the :attr:`~GDALRaster.width` attribute -``height`` required Mapped to the :attr:`~GDALRaster.height` attribute -``driver`` ``MEM`` Mapped to the :attr:`~GDALRaster.driver` attribute -``name`` ``''`` See below -``origin`` ``0`` Mapped to the :attr:`~GDALRaster.origin` attribute -``scale`` ``0`` Mapped to the :attr:`~GDALRaster.scale` attribute -``skew`` ``0`` Mapped to the :attr:`~GDALRaster.width` attribute -``bands`` ``[]`` See below -``nr_of_bands`` ``0`` See below -``datatype`` ``6`` See below -=============== ======== ================================================== +================= ======== ================================================== +Key Default Usage +================= ======== ================================================== +``srid`` required Mapped to the :attr:`~GDALRaster.srid` attribute +``width`` required Mapped to the :attr:`~GDALRaster.width` attribute +``height`` required Mapped to the :attr:`~GDALRaster.height` attribute +``driver`` ``MEM`` Mapped to the :attr:`~GDALRaster.driver` attribute +``name`` ``''`` See below +``origin`` ``0`` Mapped to the :attr:`~GDALRaster.origin` attribute +``scale`` ``0`` Mapped to the :attr:`~GDALRaster.scale` attribute +``skew`` ``0`` Mapped to the :attr:`~GDALRaster.width` attribute +``bands`` ``[]`` See below +``nr_of_bands`` ``0`` See below +``datatype`` ``6`` See below +``papsz_options`` ``{}`` See below +================= ======== ================================================== .. object:: name @@ -1673,6 +1674,41 @@ Key Default Usage raster bands values are instantiated as an array of zeros and the "no data" value is set to ``None``. +.. object:: papsz_options + + .. versionadded:: 2.0 + + A dictionary with raster creation options. The key-value pairs of the + input dictionary are passed to the driver on creation of the raster. + + The available options are driver-specific and are described in the + documentation of each driver. + + The values in the dictionary are not case-sensitive and are automatically + converted to the correct string format upon creation. + + The following example uses some of the options available for the + `GTiff driver`__. The result is a compressed signed byte raster with an + internal tiling scheme. The internal tiles have a block size of 23 by 23:: + + >>> GDALRaster({ + ... 'driver': 'GTiff', + ... 'name': '/path/to/new/file.tif', + ... 'srid': 4326, + ... 'width': 255, + ... 'height': 255, + ... 'nr_of_bands': 1, + ... 'papsz_options': { + ... 'compress': 'packbits', + ... 'pixeltype': 'signedbyte', + ... 'tiled': 'yes', + ... 'blockxsize': 23, + ... 'blockysize': 23, + ... } + ... }) + +__ http://www.gdal.org/frmt_gtiff.html + The ``band_input`` dictionary ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
