Giter Site home page Giter Site logo

imview's Introduction

imview

Image viewers for geospatial data

Overview

This repo contains several utilities that I use on a daily basis for rapid data preview, detailed analysis, and figure generation. The imviewer.py tool is probably the most useful. It works well, but could use a rewrite, as it has been glommed together over the span of 4-5 years.

Viewers

  • imviewer - viewer for geospatial data, overlay capabilities
  • stack_view - viewer for "stack.npz" time series output (see pygeotools), allowing for point sampling and plotting
  • iv - lightweight viewer for standard images (jpg, png, etc.)
  • review_img - lightweight viewer to identify good and bad images

Modules

  • lib/pltlib - a collection of useful functions for matplotlib plotting, including drawing vector data over raster data

Command-line Examples

Preprocessing (optional):

mos_fn=BigDEM.tif
gdaldem hillshade $mos_fn ${mos_fn}_hs_az315.tif
gdaladdo -ro -r average --config COMPRESS_OVERVIEW LZW --config BIGTIFF_OVERVIEW YES $mos_fn 2 4 8 16 32 64
gdaladdo -ro -r average --config COMPRESS_OVERVIEW LZW --config BIGTIFF_OVERVIEW YES ${mos_fn}_hs_az315.tif 2 4 8 16 32 64

View color DEM overlaid on shaded relief map:

imviewer.py $mos_fn -overlay ${mos_fn}_hs_az315.tif -label 'Elevation (m WGS84)'

  • By default, this will quickly load a low-resolution preview (specify -full to load full-res image)
  • Lower right corner shows coordinates and value under cursor
  • Left-click to sample image coordinates, map coordinates and raster value
  • Can specify transparency with -alpha 0.5

View with user-defined color map and limits

imviewer.py -cmap 'RdYlBl' -clim -5 5 dem_dz_eul.tif -label 'Elevation difference (m)'

Link several images (allows for simultaneous zoom and pan):

imviewer.py -link dem.tif image.tif velocity.tif

View polyline shapefile overlay:

imviewer.py $mos_fn -overlay ${mos_fn}_hs_az315.tif -shp polyline.shp

Output high-quality figure with scalebar:

imviewer.py $mos_fn -overlay ${mos_fn}_hs_az315.tif -scale x -label 'Elevation (m WGS84)' -of png -dpi 300

View time series stack:

make_stack.py -tr 'mean' -te 'intersection' 20080101_dem.tif 20090101_dem.tif 20100101_dem.tif
stack_view.py 20080101_dem_20100101_dem_stack_3.npz
  • Left-click to extract time series at point on any of the context maps
  • Right-click to clear all points
  • Can zoom and pan on context maps

Installation

Install the latest release from PyPI:

pip install imview 

Note: by default, this will deploy executable scripts in /usr/local/bin

Building from source

Clone the repository and install:

git clone https://github.com/dshean/imview.git
pip install -e imview

The -e flag ("editable mode", setuptools "develop mode") will allow you to modify source code and immediately see changes.

Core requirements

License

This project is licensed under the terms of the MIT License.

imview's People

Contributors

dshean avatar atdunwoody avatar shashankbice avatar

Stargazers

C Manson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.