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.
You can use pyresample to transform data in one coordinate system to another coordinate system (ex. mercator projection) using one of the available resampling algorithms. For more information on how to resample your data see our How-Tos section. If resampling is a new concept for you then you may find the Concepts section helpful in explaining resampling without code or see the Tutorials to walk you through the process with some artificial data.
To be able to resample data, Pyresample must have a good understanding of the geometry of the area these pixels represent. Data to be resampled can consist of uniformly spaced/gridded pixels or a variably spaced “swath” of pixels. Pyresample uses “geometry” objects to describe the different properties of these geolocated datasets. If concepts like projections, pixel resolutions, or representing data on a sphere or spheroid are new to you it is recommended you start with the Concepts section to learn more without worrying too much about the actual code. After that, the Tutorials and How-Tos sections will be able to show you the code needed to apply these concepts to your data.
Throughout the documentation you’ll find information on various utilities provided by Pyresample to accomplish things like making plots with Cartopy or describing data from a NetCDF or GeoTIFF file. Pyresample is generally able to handle data represented as numpy arrays, numpy masked arrays, and in some parts Xarray DataArray objects and dask arrays. In addition to these libraries Pyresample also benefits from the works of the pykdtree and shapely libraries. Pyresample includes Python extension code written in Cython in the more performance critical portions of the library.
This documentation is still actively being redesigned and rewritten. Some information isn’t where you might expect it or might not meet your expectations based on the quality and approach of other pieces of documentation. Feel free to leave feedback as a GitHub issue, but know that we’re working on making this documentation and the library better.