Marine Data Literacy

 

 

Providing instruction for managing, converting, analyzing and displaying oceanographic station data, marine meteorological data, GIS-compatible marine and coastal data, and mapped remote sensing imagery

 

Click HERE to receive monthly WHAT'S NEW summaries; must include your name

 

Home
Up
2.1 Preliminaries
2.2 Project Area
2.3 Project Map
2.4 Graticules & Frames
___2.4.1 Frames Check
2.5 Grid Templates
___2.5.1 Grid Check
2.6 GEBCO Contours
___2.6.1 GEBCO Check
2.7 Sediment Thickness
2.8 Boundaries & Coast
2.9 Marine Regions
2.10 Text Spreadsheet
2.11 Number Spreadsheet
2.12 Cutting a Shape
___2.12.1 Cutting Check
2.13 0-360 System
2.14 Image Georeferencing
2.15 Shape from XYs
2.16 Grid Stats
2.17 -180-to-180 Grids
2.18 Navy Waves
2.19 IDV & THREDDS
2.20 Land Stations
2.21 Color Web
2.22 De-Scaling Grids
2.23 Grid Extraction
2.24 Coastal Survey
2.25 NetCDF with NaN
2.26 Google Digitizing
2.27 UTM->WGS84
2.28 WGS84->UTM
2.29 Nav Charts
2.30 Argo MLDs
2.31 SST/Ice Climate
2.32 EU Wave Climate
2.33 GSHHG Vectors

Home > 2. Marine GIS > 2.14 Image Georeferencing

2.14 Image Georeferencing in Saga

New Version of Saga:  Usually a new version of Saga is quickly assimilated into these exercises.  The latest release, Version 2.1.2, is so radically different that it will take some time to catch up with revised exercises.  Please email me immediately whenever you find an old exercise that simply cannot be accomplished in the new Saga, due to big changes in the properties, etc.  I will try to provide fixes within about 2 days.

  • Exercise Title:  Image Georeferencing in Saga

  • Abstract:  This method finally provides a cogent description of the relatively simple method in Saga to georeference any image which has at least 4 points whose latitude and longitude are known.

  • Preliminary Reading (in OceanTeacher, unless otherwise indicated):

  • Required Software:

  • Other Resources: 

    • 24W_142332sams.jpg - Excellent satellite image of a typhoon in the northwestern Pacific, from the Joint Typhoon Warning Center (JTWC).  The label says "Typhoon 24W (Nari) Warning #26 Final Warning Issued at 15/0300Z" on November 15, 2013.  Another label says "Multispectral Satellite Imagery"

    • WARNING:  Other satellite images at JTWC may be labeled "IR Satellite Imagery," in which case they are obviously projected and do not have labeled graticules or edge marks to allow easy Saga georeferencing.

    • World Borders Dataset, by Bjorn Sandvik (use TM_WORLD_BORDERS-0.3.zip)

  • Author:  Murray Brown

  • Version:  2-24-2014

1.  Open the example image, a satellite view of a typhoon in the northwestern Pacific.  You can see that, fortunately, the image has a labeled graticule we can use in the georeferencing process.

You can save a copy of this file in the folder DATA > OCEAN > JTWC

NOTE:  At this point, if you wish, you can cut away the black borders with any graphics editor.

2.  Run Saga.  Then select MODULES > IMPORT/EXPORT IMAGES > IMPORT IMAGE
  • For IMAGE FILE, select the JPG satellite image
  • For options, leave it at ENFORCE TRUE COLOR

Then click OK to load the file.

3.  In Saga, this new grid or raster object appears.
4.  You can use ADD TO MAP to see the image in Saga.  Notice that the cursor locations (shown along the bottom) are not in geographic coordinates...they appear to be pixel locations on the image.

We must "georeference" the image to make locations on the image have real-world longitudes and latitudes.

5.  Select MODULES > PROJECTION-GEOREFERENCING > CREATE REFERENCE POINTS.

Leave these settings, and click OK.

6.  Use the ZOOM and PAN tools (along the top) to locate known locations on the image.  In our case this is easy because we have a graticule with labels.

When you find a good location, use the ACTION tool (the black arrow) to select the exact point you want and click.

7.  This window opens, where you should enter the known coordinates of the point.

Then click OK to capture the point.

NOTE:  The results will be a disaster if you use the wrong signs for the latitude or longitude, so be very careful.

8.  You must repeat this process at least four times, for points scattered around the image.  If the image is obviously projected, then more points than usual would be a good idea.  If you don't have a graticule, then you need a table of lat/lon values for known locations, such at tiny islands, highway junctions, city centers, etc.  The more good points you have, the better will be the calculations.
9.  When you are finished finding reference points, then open the MODULES menu along the top of the map, and turn OFF the module by clicking on CREATE REFERENCE POINTS.
10.  Answer YES.
11.  Now you can see a new points shape has appeared.  You can plot it if you want to see your points.
12.  We need to combine these locations with the image.  To do that, select PROJECTION-GEOREFERENCING > RECTIFY GRID
13.  Make these settings:
  • Set the REFERENCE POINTS (ORIGIN) to the points shape you just created
  • Then set X POSITION to be X_MAP, and the Y POSITION to be Y_MAP.
  • Leave REFERENCE POINTS (PROJECTION) not set.
  • For the source data, set the GRID SYSTEM to be the system for the original JPG image, and for the SOURCE, select the JPG image itself.
  • Select METHOD to be AUTOMATIC
  • Select GRID INTERPOLATION to be by NEAREST NEIGHBOR (required to maintain the RGB color coding of the result).
  • And finally select TARGET = USER DEFINED.

Then click OK.

 

14.  This window appears, containing the results of all the calculations and your input, above.

We simply accept these values, but it's obvious that if you know what you want you could make some changes here.

Click OK when you're ready to continue.

 
15.  Now you can see a new raster/grid with a system description that looks like good geographic locations. 
16.  You can use ADD TO MAP to see the newly georeferenced grid.
17.  The colors are not like the original, so on the right (in the properties) select COLORS > TYPE > RGB (stands for red/green/blue)

Then select SETTINGS > APPLY

18.  Here's the final, georeferenced satellite image, with the published colors from the original JTWC image.
19.  Whenever you georeference any data layer, its a good idea to add a known reference map, preferably global, to confirm accuracy.

Here the World Borders Map (see link above) has been added to confirm the properlocation of the land bodies and faint green coastline in the JTWC image.

20.  Now we need to save the new product.  In Saga, select MAPS > THUMBNAILS (bottom left corner) and find the final map.

Right-click on it, and select SAVE AS IMAGE.

21.  Navigate to PRODUCTS > SAGA > GEOIMAGES and enter the filename typhoon_nari_24w_20131015_jtwc_saga.png
22.  This window opens with many settings. 
  • For map size, you can select whatever you want.
  • For FRAME WIDTH, use zero to keep it minimal
  • CHECK both WORLD FILE and KML file.  These are critical auxiliary files for georeferencing.  Without them, you would be right back to the original image
  • We want a legend for various purposes, so CHECK by SAVE and leave the ZOOM (i.e. the legend size) at 1.

Then click OK.

23.  All of these new objects appear for use in various ways:
  • PNG - The actual image itself
  • KML - Auxiliary file used by Google Earth and Integrated Data Viewer for georeferencing images
  • PGW - Auxiliary file used by Saga and all other GIS systems for georeferencing PNG files
  • xxxxxx_legend.png - The image of the Saga legend.; not very useful in this case, but sometimes critical for other raster types

In other MDL exercises you'll be referred back here for georeferencing work, so expect to be asked for one or more of these product files.

24.  And just to prove how useful they are, here's a Google Earth map of the image.  You can open it by simply opening the KML file, above, in your folder.

 

The exercises, notes and graphics in this website are copyrighted, and may not be copied or abstracted in any way, without my explicit permission (in writing).  Making one copy for your personal use is allowed.  If you see any of these materials copied into any other website than MARINEDATALITERACY.ORG then they have been illegally pirated by others.  Please report any such instances of copyright infringement to me. Murray Brown m.brown.nsb <at> gmail.com