WxGUI Map Swipe: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
m (remove hardcoded version specific urls, use latest version)
 
(17 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{ToModify}}
__TOC__
__TOC__


== Introduction ==
== Introduction ==
The '''Map Swipe''' is a [[wxGUI]] application which allows GRASS users to interactively compare two raster maps of the same area by revealing different parts of the raster maps. It is useful e.g. for comparing raster maps from different time periods. See also the {{cmd|wxGUI.MapSwipe|desc=manual|version=70}}.
The '''Map Swipe''' is a [[wxGUI]] application which allows GRASS users to interactively compare two raster maps of the same area by revealing different parts of the raster maps. It is useful e.g. for comparing raster maps from different time periods. See also the {{cmd|wxGUI.mapswipe|desc=manual}}.


The Map Swipe is available in GRASS 7 from the menu  
The Map Swipe is available in GRASS 7 from the menu  
Line 11: Line 9:
<!-- File menu? maybe we should make a Tools menu for nviz et al. -->
<!-- File menu? maybe we should make a Tools menu for nviz et al. -->


and will be backported to GRASS 6 after some testing.
<center>
{|
|-
| [[Image:MapSwipe1.png|center|thumb|425px|wxGUI Map Swipe]]
|
| [[Image:MapSwipe_multiple_layers.png|center|thumb|575px|wxGUI Map Swipe: multiple raster/vector maps]]
|-
|}
</center>


[[Image:MapSwipe1.png|center|thumb|500px|wxGUI Map Swipe]]


Implemented features:
Implemented features:
Line 19: Line 24:
* zooming, panning
* zooming, panning
* maps are loaded automatically when opening Map Swipe with two selected raster maps in Layer Manager
* maps are loaded automatically when opening Map Swipe with two selected raster maps in Layer Manager
* save display to graphic file
* new 'mirror' mode added - two synchronized maps side by side
* added text label with the name of currently displayed map
* in mirror mode: added cross to mirror the movement of mouse cursor
* '''new: multiple raster and vector maps with transparency'''
* '''new in 'mirror' mode: change the appearance of mirrored cursor (available in Map Swipe settings)'''


Possible enhancements:
Possible enhancements:
* add simplified layer manager for each window so that you can add any maps (raster/vector) - would it be useful?
* <strike>add simplified layer manager for each window so that you can add any maps (raster/vector)</strike> {{rev|58197}}
* <strike>add transparency levels (while in swipe mode) so one can actually see below the map that is (virtually) on top -- ''this will be useful if a "simplified layer manager" will be added!''</strike>
* <strike>Paulo van Breugel: rather then splitting the area between the two maps, the same area is shown for both maps. The display of two (or more) maps are synchronized so moving or zooming one map will move / zoom the other map too. This makes it easier to see changes between two maps in detail (similar to MirrorMap plug-in for QGIS). See also [http://trac.osgeo.org/grass/ticket/1669 ticket 1669].</strike>
* <strike>Add option to export the display to graphics file (PNG)</strike>
* add a query tool that when you click on a spot in one of the maps gives you the info for both
* add a button that launches Michael's new histogram tool to directly show the histograms of the two maps
* add your idea here
* add your idea here


Simple testing:
== Simple testing with sample data ==


You can use the North Carolina sample dataset ([http://grass.osgeo.org/sampledata/nc_spm_latest.tar.gz download]) for this test:
You can use the North Carolina sample dataset ([http://grass.osgeo.org/sampledata/nc_spm_latest.tar.gz download]) for this test:
Line 50: Line 66:


[[Image:Tsunami japan2011 sendai.jpg|center|thumb|500px|Pre and post disaster images of the tsunami in Japan in 2011. The upper MODIS image taken on February 26, 2011, shows the coastline under normal conditions while the lower MODIS image on March 13, 2011, shows a clear view of tsunami flooding along the coastline. Water, black and dark blue in these false-color images, still covers the ground as much as five kilometers (three miles) from the coast. Source: http://earthobservatory.nasa.gov/NaturalHazards/view.php?id=49634]]
[[Image:Tsunami japan2011 sendai.jpg|center|thumb|500px|Pre and post disaster images of the tsunami in Japan in 2011. The upper MODIS image taken on February 26, 2011, shows the coastline under normal conditions while the lower MODIS image on March 13, 2011, shows a clear view of tsunami flooding along the coastline. Water, black and dark blue in these false-color images, still covers the ground as much as five kilometers (three miles) from the coast. Source: http://earthobservatory.nasa.gov/NaturalHazards/view.php?id=49634]]
[[Image:Mapswipe tsunami mirror.jpeg|center|thumb|500px|Mirror view displays the same area on different maps synchronously]]


== Video tutorial ==
== Video tutorial ==

Latest revision as of 09:56, 4 December 2018

Introduction

The Map Swipe is a wxGUI application which allows GRASS users to interactively compare two raster maps of the same area by revealing different parts of the raster maps. It is useful e.g. for comparing raster maps from different time periods. See also the manual.

The Map Swipe is available in GRASS 7 from the menu

  • File → Map Swipe
wxGUI Map Swipe
wxGUI Map Swipe: multiple raster/vector maps


Implemented features:

  • orientation of the swipe line can be changed (horizontal or vertical)
  • zooming, panning
  • maps are loaded automatically when opening Map Swipe with two selected raster maps in Layer Manager
  • save display to graphic file
  • new 'mirror' mode added - two synchronized maps side by side
  • added text label with the name of currently displayed map
  • in mirror mode: added cross to mirror the movement of mouse cursor
  • new: multiple raster and vector maps with transparency
  • new in 'mirror' mode: change the appearance of mirrored cursor (available in Map Swipe settings)

Possible enhancements:

  • add simplified layer manager for each window so that you can add any maps (raster/vector) r58197
  • add transparency levels (while in swipe mode) so one can actually see below the map that is (virtually) on top -- this will be useful if a "simplified layer manager" will be added!
  • Paulo van Breugel: rather then splitting the area between the two maps, the same area is shown for both maps. The display of two (or more) maps are synchronized so moving or zooming one map will move / zoom the other map too. This makes it easier to see changes between two maps in detail (similar to MirrorMap plug-in for QGIS). See also ticket 1669.
  • Add option to export the display to graphics file (PNG)
  • add a query tool that when you click on a spot in one of the maps gives you the info for both
  • add a button that launches Michael's new histogram tool to directly show the histograms of the two maps
  • add your idea here

Simple testing with sample data

You can use the North Carolina sample dataset (download) for this test:

# set computation region
g.region rast=lsat7_2002_10 -p

# create RGB composites, first color-balance:
i.landsat.rgb b=lsat5_1987_10@landsat g=lsat5_1987_20@landsat r=lsat5_1987_30@landsat
r.composite b=lsat5_1987_10@landsat g=lsat5_1987_20@landsat r=lsat5_1987_30@landsat out=lsat5_1987.rgb

i.landsat.rgb b=lsat7_2002_10 g=lsat7_2002_20 r=lsat7_2002_30
r.composite b=lsat7_2002_10 g=lsat7_2002_20 r=lsat7_2002_30 out=lsat7_2002.rgb

# .. now load the two RGB composites into the "Map Swipe" tool.
Comparison of Landsat5/1987 and Landsat7/2002 near Raleigh, NC, USA

Disaster analysis

The Map swipe tool is particularly interesting for pre and post disaster analysis of satellite or other images.

Screenshot of map comparison:

Pre and post disaster images of the tsunami in Japan in 2011. The upper MODIS image taken on February 26, 2011, shows the coastline under normal conditions while the lower MODIS image on March 13, 2011, shows a clear view of tsunami flooding along the coastline. Water, black and dark blue in these false-color images, still covers the ground as much as five kilometers (three miles) from the coast. Source: http://earthobservatory.nasa.gov/NaturalHazards/view.php?id=49634
Mirror view displays the same area on different maps synchronously

Video tutorial