# Pyresample

Pyresample is a python package for resampling geospatial image data. It is the primary method for resampling in the SatPy library, but can also be used as a standalone library. Resampling or reprojection is the process of mapping input geolocated data points to a new target geographic projection and area.

Pyresample can operate on both fixed grids of data and geolocated swath data. To describe these data Pyresample uses various “geometry” objects including the AreaDefinition and SwathDefinition classes.

Pyresample offers multiple resampling algorithms including:

- Nearest Neighbor

- Elliptical Weighted Average (EWA)

- Bilinear

- Bucket resampling (count hits per bin, averaging, ratios)

For nearest neighbor and bilinear interpolation pyresample uses a kd-tree approach by using the fast KDTree implementation provided by the pykdtree library. Pyresample works with numpy arrays and numpy masked arrays. Interfaces to XArray objects (including dask array support) are provided in separate Resampler class interfaces and are in active development. Utility functions are available to easily plot data using Cartopy.

Changed in version 1.15: Dropped Python 2 and Python <3.4 support.

## Documentation

- Installing Pyresample
  - Package test
  - Package installation
  - pykdtree and numexpr
- Geometry definitions
  - AreaDefinition
  - GridDefinition
  - SwathDefinition
  - Geographic coordinates and boundaries
- Geometry Utilities
  - AreaDefinition Creation
  - AreaDefinition Class Methods
  - Loading from disk
  - Loading from disk (legacy)
  - Writing to disk
  - Loading from netCDF/CF
  - Converting Coordinates
- Geographic filtering
  - GridFilter
- Resampling of gridded data
  - pyresample.image
- Resampling of swath data
  - pyresample.image
  - pyresample.kd_tree
  - pyresample.bilinear
  - pyresample.ewa
  - pyresample.bucket
- Using multiple processor cores
  - Multi core processing
- Preprocessing of grids
  - Preprocessing for grid resampling
- Spherical Geometry Operations
  - Satellite swath coverage over area of interest
- Plotting with pyresample and Cartopy
  - Displaying data quickly
  - Getting a Cartopy CRS
  - Getting a Basemap object
  - Adding background maps with Cartopy
- Reduction of swath data
- Roadmap
  - Roadmap to 2.0!
- API
  - Subpackages
  - Submodules
  - pyresample.area_config module
  - pyresample.boundary module
  - pyresample.data_reduce module
  - pyresample.geo_filter module
  - pyresample.geometry module
  - pyresample.grid module
  - pyresample.image module
  - pyresample.kd_tree module
  - pyresample.plot module
  - pyresample.resampler module
  - pyresample.spherical module
  - pyresample.spherical_geometry module
  - pyresample.version module
  - Module contents