mirror of
https://github.com/rasterio/rasterio.git
synced 2025-12-08 17:36:12 +00:00
Document driver options.
This commit is contained in:
parent
fc296b5456
commit
4e428c13d6
22
docs/options.rst
Normal file
22
docs/options.rst
Normal file
@ -0,0 +1,22 @@
|
||||
Options
|
||||
=======
|
||||
|
||||
GDAL's format drivers have many [configuration
|
||||
options](https://trac.osgeo.org/gdal/wiki/ConfigOptions) The way to set options
|
||||
for rasterio is via ``rasterio.drivers()``. Options set on entering are deleted
|
||||
on exit.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import rasterio
|
||||
|
||||
with rasterio.drivers(GDAL_TIFF_INTERNAL_MASK=True):
|
||||
# GeoTIFFs written here will have internal masks, not the
|
||||
# .msk sidecars.
|
||||
...
|
||||
|
||||
# Option is gone and the default (False) returns.
|
||||
|
||||
Use native Python forms (``True`` and ``False``) for boolean options. Rasterio
|
||||
will convert them GDAL's internal forms.
|
||||
|
||||
@ -48,7 +48,7 @@ def driver_count():
|
||||
cdef class GDALEnv(object):
|
||||
|
||||
cdef object is_chef
|
||||
cdef object options
|
||||
cdef public object options
|
||||
|
||||
def __init__(self, is_chef=True, **options):
|
||||
self.is_chef = is_chef
|
||||
|
||||
@ -4,6 +4,8 @@ import sys
|
||||
if sys.version_info[0] >= 3:
|
||||
string_types = str,
|
||||
text_type = str
|
||||
integer_types = int,
|
||||
else:
|
||||
string_types = basestring,
|
||||
text_type = unicode
|
||||
integer_types = int, long
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user