All Projects → mapbox → rio-pansharpen

mapbox / rio-pansharpen

Licence: MIT license
pansharpening landsat scenes

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to rio-pansharpen

rio-toa
Top Of Atmosphere (TOA) calculations for Landsat 8
Stars: ✭ 38 (-9.52%)
Mutual labels:  satellite, imagery, rasterio
rio-glui
Explore CloudOptimized geotiff on your browser using Mapbox GL JS
Stars: ✭ 47 (+11.9%)
Mutual labels:  satellite, imagery, rasterio
rio-rgbify
Encoded arbitrary bit depth rasters in psuedo base-256
Stars: ✭ 62 (+47.62%)
Mutual labels:  satellite, imagery, rasterio
rio-hist
Histogram matching plugin for rasterio
Stars: ✭ 71 (+69.05%)
Mutual labels:  satellite, imagery, rasterio
sentinel-tiler
A serverless Sentinel-2 tiles server using AWS Lambda
Stars: ✭ 59 (+40.48%)
Mutual labels:  satellite, imagery
untiler
Stitch image tiles into larger composite TIFs
Stars: ✭ 35 (-16.67%)
Mutual labels:  satellite, imagery
satproc
🛰️ Python library and CLI tools for processing geospatial imagery for ML
Stars: ✭ 27 (-35.71%)
Mutual labels:  satellite, rasterio
grib-doctor
Utilities for handling quirks of weather data grib files.
Stars: ✭ 20 (-52.38%)
Mutual labels:  satellite, imagery
pxm-manifest-specification
File specification for PXM (Pixel Monster)
Stars: ✭ 14 (-66.67%)
Mutual labels:  satellite, imagery
supermercado
Supercharger for mercantile
Stars: ✭ 100 (+138.1%)
Mutual labels:  satellite, imagery
snuggs
Snuggs are s-expressions for Numpy
Stars: ✭ 15 (-64.29%)
Mutual labels:  satellite, imagery
goes2go
Download and process GOES-16 and GOES-17 data from NOAA's archive on AWS using Python.
Stars: ✭ 77 (+83.33%)
Mutual labels:  satellite
raster-tiles-compactcache
Compact Cache V2 is used by ArcGIS to store raster tiles. The bundle file structure is very simple and optimized for quick access, resulting in improved performance over alternative formats.
Stars: ✭ 49 (+16.67%)
Mutual labels:  imagery
kubos-old
An open source platform for satellites
Stars: ✭ 68 (+61.9%)
Mutual labels:  satellite
CubeSatSim
CubeSatSim, the AMSAT CubeSat Simulator
Stars: ✭ 201 (+378.57%)
Mutual labels:  satellite
Satellite-Aerial-Image-Retrieval
Satellite/Aerial Image Retrieval: using Bing maps tile system to automatically download aerial imagery (maximum resolution available) given a latitude, longitude bounding box.
Stars: ✭ 36 (-14.29%)
Mutual labels:  satellite
aruco-geobits
geobits: ArUco Ground Control Point Targets and Detection for Aerial Imagery (UAV/MAV).
Stars: ✭ 32 (-23.81%)
Mutual labels:  imagery
Vector-Map-Generation-from-Aerial-Imagery-using-Deep-Learning-GeoSpatial-UNET
We propose a simple yet efficient technique to leverage semantic segmentation model to extract and separate individual buildings in densely compacted areas using medium resolution satellite/UAV orthoimages. We adopted standard UNET architecture, additionally added batch normalization layer after every convolution, to label every pixel in the ima…
Stars: ✭ 74 (+76.19%)
Mutual labels:  satellite
Imagery-Apps
Example JavaScript source code for ArcGIS imagery apps (Landsat Explorer and Sentinel Explorer) that you can expand or customize.
Stars: ✭ 24 (-42.86%)
Mutual labels:  imagery
PWSat2OBC
Source code of the PW-Sat2 On Board Computer (OBC) software.
Stars: ✭ 53 (+26.19%)
Mutual labels:  satellite

rio-pansharpen

https://circleci.com/gh/mapbox/rio-pansharpen.svg?style=shield&circle

pansharpens Landsat 8 scenes.

What is pansharpening?

Pansharpening is a process of using the spatial information in the high-resolution grayscale band (panchromatic, or pan-band) and color information in the multispectral bands to create a single high-resolution color image.

P pan-pixel cluster + M single multispectral pixel = M pan-sharpened pixel

Find more examples and information in the Mapbox pansharpening blog post.

Install

We highly recommend installing in a virtualenv. Once activated,

pip install -U pip
pip install rio-pansharpen

Or install from source

git clone https://github.com/mapbox/rio-pansharpen.git
cd rio-pansharpen
pip install -U pip
pip install -r requirements.txt
pip install -e .

Python API

pansharpen.worker

The worker module pansharpens Landsat 8. Visit the USGS Landsat page page for more information on Landsat 8 band designations.

1. worker.pansharpen

The worker.pansharpen function accepts the following as inputs:

  • numpy 3D array with shape == (3, vis_height, vis_width)
  • affine transform defining the georeferencing of the vis array
  • numpy 2D array with shape == (pan_height, pan_width)
  • affine transform defining the georeferencing of the pan array
  • pansharpening method

and outputs:

  • numpy 3D array with shape == (3, pan_height, pan_width)
>>> from pansharpen import worker
>>> from pansharpen.methods import Brovey
...
>>> pansharpened = worker.pansharpen(vis, vis_transform, pan, pan_transform,
                       pan_dtype, r_crs, dst_crs, weight,
                       method="Brovey", src_nodata=0)

2. worker.calculate_landsat_pansharpen

>>> from pansharpen import worker
>>> from pansharpen.utils import _calc_windows
>>> import riomucho
...
>>> worker.calculate_landsat_pansharpen(src_paths, dst_path, dst_dtype,
        weight, verbosity, jobs, half_window,
        customwindow)

CLI

pansharpen

Usage: rio pansharpen [OPTIONS] [SRC_PATHS]... DST_PATH

  Pansharpens a landsat scene. Input is a panchromatic band (B8), plus 3 color
  bands (B4, B3, B2)

     rio pansharpen B8.tif B4.tif B3.tif B2.tif out.tif

  Or with shell expansion

     rio pansharpen LC80410332015283LGN00_B{8,4,3,2}.tif out.tif

Options:
  --dst-dtype [uint16|uint8]
  -w, --weight FLOAT          Weight of blue band [default = 0.2]
  -v, --verbosity
  -j, --jobs INTEGER          Number of processes [default = 1]
  --half-window               Use a half window assuming pan in aligned with
                              rgb bands, default: False
  -c, --customwindow INTEGER  Specify blocksize for custom windows >
                              150[default=src_blockswindows]
  --help                      Show this message and exit.
  --help                 Show this message and exit.

Comparison of Different Pansharpening Methods

We've implemented the Weighted Brovey Transform for pansharpening, which is appropriate for data like Landsat where the panchromatic band is relatively similar in resolution to the color bands.

For more information on other pansharpening methods such as IHS, PCA, P+XS, Wavelet, VWP, Wavelet with Canny Edge Detector etc, please read our notes here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].