Configuration#

You can configure the default behaviour of GeoUtils at the package level for operations that depend on user preference (such as resampling method, or pixel interpretation).

Changing configuration during a session#

Using a global configuration setting ensures operations will always be performed consistently, even when used under-the-hood by higher-level methods (such as Coregistration), without having to rely on multiple keyword arguments to pass to subfunctions.

import geoutils as gu
# Changing default behaviour for pixel interpretation for this session
gu.config["shift_area_or_point"] = False

Default configuration file#

Below is the full default configuration file, which is updated by changes in configuration during a session.

# Default global parameters for GeoUtils

[raster]

# Shift by half a pixel for "Point" pixel interpretation during raster-point operations
shift_area_or_point = True

# Raise a warning if two rasters have different pixel interpretation
warn_area_or_point = True