The Python geospatial ecosystem is excellent, and confusing, because many libraries overlap. Here's the stack I'd install for remote sensing work, and what each piece does.
Reading and writing rasters
| Library | Role |
|---|
| rasterio | Read/write GeoTIFFs and other rasters; windows, reprojection |
| rioxarray | rasterio + xarray: geospatial-aware labelled arrays |
| GDAL | The foundation under most of these |
Multi-dimensional and time series
| Library | Role |
|---|
| xarray | Labelled N-dimensional arrays (time × band × y × x) |
| dask | Parallel, out-of-core computation for big arrays |
| zarr | Cloud-friendly chunked array storage |
Finding and loading imagery
| Library | Role |
|---|
| pystac-client | Search STAC catalogues (Planetary Computer, Earth Search) |
| odc-stac / stackstac | Load STAC items into xarray data cubes |
| earthengine-api | Google Earth Engine from Python |
Vector data
| Library | Role |
|---|
| geopandas | DataFrames with geometry |
| shapely | Geometry operations (validity, buffers, intersections) |
| pyproj | Coordinate reference systems and transforms |
Machine learning
| Library | Role |
|---|
| scikit-learn | Classical ML on pixel features (beginner's guide) |
| TorchGeo | Geospatial deep learning datasets and models |
Visualisation
| Library | Role |
|---|
| matplotlib | Static plots |
| leafmap / geemap | Interactive maps in notebooks |
A typical workflow
- Search imagery with pystac-client
- Load into xarray with odc-stac
- Mask clouds, compute indices (NDVI)
- Composite over time (median)
- Sample training data with geopandas polygons
- Train with scikit-learn or TorchGeo
- Write results with rioxarray, serve as tiles