2D reprojection

On this page I describe how to convert images in different projections to WGS84 Lat/Long. Similar procedure can be applied to other datums.

GPS sensors return georeference information in WGS85 Lat Long, this projection is one of the most universal projections that covers all globe. At the same time many available images are in other projections, to track position with GPS mapping receivers (like GBA GPS) these images must be converted to WGS84 Lat Long.

To demonstrate the difference between projections I created 2 images, first is UTM projection and the second one is WGS84 Lat/Long of the same area

Fig.1 UTM (meters) Fig.2 WGS84 (Lat/Long)

 

 

Many different programs for the conversion available, most of them are not free. There are some free programs that can do conversion between limited number of datum, but as usual, the conversion is not straightforward (many steps are needed to convert. Manufactures of software are trying to push people to use their internal formats, this leads to necessity to use plug-ins, conversion utilities of different type and so on. For example here is an example of such "recommendation": http://www.digitalgrove.net/image_reprojection_with_erdas.htm. According to this advice, to reproject JPEG aerial image obtained from terraserver from UTM to WGS Lat Long we should do the following steps: 1). Change JPEG format to ECW format for the sole purpuse to create the header (for this we must download 20 Mb compressor), 2) edit the header (download 2Mb header editor), 3) download 6 Mb plug-in for ERDAS viewfinder 4) download ERDAS viewfinder (20 Mb) and convert ECW to GeoTiff, enter header info manually again 5) Reproject GeoTiff 6) convert GeoTiff to JPEG (or BMP) (formats accepted with GBA GPS) with Corel PhotoPaint, Adobe Photoshop or whatever. To perform our task we need to download ~50 Mb of different software and perform 6 tasks. After I did all the above mentioned, I decided to write this page to show how simple it could be if proper free and open source software is used.

Virtually any datum (and coordinate systems) conversion of many different formats can be done with Open Source GDAL project. For Windows OS it will be OpenEV Binary Kit for Windows (I am using OpenEV_FW_174.zip file available at http://openev.sourceforge.net or www.remotesensing.org). The size of zip file is ~ 17Mb, but this package solves almost everything needed for georeferencing and datum conversion. This package can be used also for conversion of DEM data, see example at http://www.msh-tools.com/topocreator.html

In the following example I describe procedure of using free Aerial images from Microsoft TerraServer with GBA GPS receiver. Similar can be applied to downloaded or scanned maps from different sources.

Get Images from Terraserver

There is a great free program for simple downloading the desired area and creation of the JPEG image. This is USAPhotoMaps by Doug Cox.

a) Select Map Location and download map data

b) Download the BigJpeg 2.5 program from the same site and copy the program and ijl15.dll to the USAPhotoMapsData folder.

c) Select the area of interest with "File-Boundaries for BigJPEg" menu. The *.jgw file will be created in the USAPhotoMapsData folder. This file contains so called "world" georeference informatiom - coordinates of the top - left corner (meters) and scale factors (in the case of Big Jpeg they are 1 meter/pixel in both x and y directions).

d) Run BigJpeg program (from USAPhotoMapsData folder). The JPEG file will be created, the size of the file will be big (remember we are using 1 meter/pixel scale).

The JPEG image is in UTM coordinate system (NAD83 datum), we need convert the file to WGS83 Lat/Long

Convert from UTM to WGS84 Lat/Long

The conversion is one-step operation (!) with gdalwarp utility form the OpenEV_FW package: Here is command prompt window showing this operation:

With this operation we created BMP file suitable for GBA GPS ROM maker program. BMP format is not georeferenced format, that is why we see ERROR 6. For our purpose this is absolutely unimportant, because georeference will be done with GBA GPS ROM maker. Conversion of 4454x3075 file (for the above example) takes ~20 sec . We used zone=18. Zone number is indicated in the USAPhotoMap, or this number is seen at the end of filename created by bigjpeg.

Do not forget to set paths if you are using different from OpenEV_FW folders. To do this, run setfw.bat from the OpenEV_FW folder (this must be done every time you run command prompt window). Alternatively paths can be set permanently in autoexec.bat or Control Panel-System-Environment variables (Windows XP).

With the gdawrp utility many other tasks can be also performed: selecting area, resampling image, spline, refining, etc. Please see http://www.remotesensing.org/gdal/gdal_utilities.html for description.

UTM JPEG from USAPhotoMap (zoomed out x20) WGS84 BMP after conversion

Here is the result. This is Killington, VT ski resort, covered area is ~4x4 km (original UTM image was 3800x3600, after conversion we get 4454x3075 pixels=meters). Even for relatively small area WGS84 differs significantly from UTM projection..

To use the BMP image with GBA GPS, it should be imported to the GBA GPS ROM maker and georeferenced with some noticable points. WGS84 coordinates of the points can be obtained from USAPhotoMaps by point the mouse to the selected points ("View-Lat/lon-Degrees" menu)