Example: Import ERDAS GIS with GDAL and Assign Coordinate System

Manifold has the built-in ability to connect to, link, import and read/write to hundreds of different databases, file databases, file formats, web servers and similar data sources using Manifold's own internal code, with no need to install any additional software.  

 

In addition, Manifold includes a dataport that can launch the GDAL/OGR libraries to connect to any format those libraries support.   

 

Both the Manifold collection of data sources and the GDAL/OGR libraries collection of file formats are large collections so there is considerable overlap between the two.   In many cases there is a native Manifold dataport for a data source and there is also a module available in the GDAL/OGR collections for that format.   However, there are also data sources which Manifold supports that GDAL/OGR does not, and there are formats available within GDAL/OGR that Manifold does not include as a built-in to Manifold.

 

In this example we will use GDAL to get data from an ERDAS .gis file format that encodes a palette image.  Manifold can also read such images with the native ERDAS .gis dataport built into Manifold.   Neither Manifold nor GDAL can import such images with correct coordinate system, since the .gis format fails to provide full coordinate system information.   In both cases we must manually assign the initial coordinate system.

 

ico_nb_arrow_blue.png  To use GDAL or OGR we must install GDAL in Windows, and then we can use it from Manifold.  If we do not install GDAL, we will not be able to use the capabilities described in this topic. See the the GDAL / OGR topic for installation instructions. The Manifold GDAL dataport allows working with GDAL 2.0.x, 2.1.x or 2.2.x and automatically selects the latest version available with automatic adjustments for the call interface.

Import an ERDAS .gis Format File using GDAL

ERDAS is a raster-capable package introduced in 1978 and eventually acquired by Hexagon.  ERDAS .gis format files may be encountered on various government web sites.   In this example we import an ERDAS .gis format file that shows Thematic Mapper imagery acquired by the US Landsat satellite, the file being downloaded from

http://caddolakedata.us/data/general-caddo-data/tm-imagery-1993 with the following information provided as a description:

 

Info: Thematic Mapper (TM) Satellite Imagery - 1993

Scale/Resolution: 30m pixels

Data Type: raster layer, Erdas v7.5 GIS File

Source: U.S. Geological Survey (USGS), National Wetlands Research Center

Description: TM satellite imagery from January 30, 1993. The original TM scene was subsetted into 3 bands (4,5, & 3). The subsetted file was then processed using the RGBCLUS routine in Erdas v7.5. The resulting file is an 8-bit GIS file. Bands 4,5,3 were chosen because of the usefulness of those bands in environmental management.

 

In addition, the website's data page reports:

 

The various raster layers are also in UTM, Zone 15. Each raster layer is only available in NAD27 (CLARKE 1866)

 

We launch Manifold.

 

eg_gis_erdas_gdal01_01.png

 

Choose File - Import.

 

eg_gis_erdas_gdal01_02.png

 

In the Import dialog, navigate to the location of the desired file, as downloaded from the source web site.  Choose .Files (GDAL/OGR) (*.*) for the file type.

 

eg_gis_erdas_gdal01_03.png

 

Click on the .gis file to load it into the File name box and then press the Open button.

 

 

eg_gis_erdas_gdal01_04.png

 

 

The image immediately imports into Manifold, creating a new image and the image's table in the Project pane.  We can double-click open the image to see it in an image window.

 

 

eg_gis_erdas_gdal01_05.png

 

Choosing the Component panel in the Contents pane we see the initial coordinate system displayed in red color using the Pseudo Mercator placeholder default name.   That warns us we must assign an initial coordinate system.

 

btn_coord_sys_picker.png  We click the coordinate system picker button, choose Assign Initial Coordinate System and then Edit Coordinate System.  That launches the Coordinate System dialog.

 

 

eg_gis_erdas_gdal01_06.png

 

 

From the commentary in the web site, we must assign UTM zone 15.   We click the Standard tab and then we enter universal into the filter box to reduce the incredibly long list of Standard projections to a shorter list.  We scroll down and click on Universal Transverse Mercator Zone 15 (N) to choose that coordinate system.  We know from basic GIS knowledge that UTM is an abbreviation for Universal Transverse Mercator.   The web site did not say the intended Zone 15 is North or South, but we assume from the obviously North American focus of the web site they mean North, so we choose Zone 15 (N) and not Zone 15 (S).   

 

If we have an eye for details, we will note that the JSON description for the chosen coordinate system says it uses the WGS84 datum.   That is wrong for our data, which the originating web site says uses the NAD27 datum.   That is not a problem.   For now we will accept the coordinate system as is, and then in the next step we will change the datum by using the Repair command.

 

Press OK.

 

 

eg_gis_erdas_gdal01_07.png

 

The new UTM Zone 15 (N) coordinate system appears in the Component panel's readout.    However, we know that the UTM Zone 15 (N) system as defined uses the wrong datum so we must change the datum.   

 

btn_coord_sys_picker.png  We will change the datum by once again clicking the coordinate system picker button, choosing Repair Initial Coordinate System, and then choosing Edit Coordinate System.  That launches the Coordinate System dialog.

 

 

eg_gis_erdas_gdal01_08.png

 

In the Coordinate System dialog we click the Custom tab.

 

btn_datum.png

We press the base coordinate system picker button to launch the Base Coordinate System dialog.

 

 

eg_gis_erdas_gdal01_09.png

 

 

In the Standard tab we want to find something that looks like NAD27, that is, the North American Datum for 1927.   we enter 27 into the filter box to reduce the list to fewer entries.    The originating web site does not say exactly what they mean by "NAD27," but it is probably a safe guess that they mean the North American 1927 datum for the Continental United States, CONUS.   We click on North American 1927 (mean for CONUS) to select that datum and then we press OK.

 

 

eg_gis_erdas_gdal01_10.png

 

 

Back in the Coordinate System dialog we press OK.   Done!

 

 

eg_gis_erdas_gdal01_11.png

 

 

The image now has the correct initial coordinate system assigned.  It will exactly line up with other, known-good layers such as Bing.   In the illustration above we have created a map, added a Bing Streets layer to the map and then we have dragged and dropped the imported image into the map, zooming it to see how well the image aligns with Bing.   It aligns very well.

 

 

eg_gis_erdas_gdal01_12.png

 

 

We can zoom further into the view to look more closely at alignment between the two layers, noting how roads and rivers align at the edges.

 

 

eg_gis_erdas_gdal01_13.png

 

 

In the illustration above we have added a layer above the image that is a data source with Google streets in "transparent" style, where pixels in between the streets and labels are transparent.   That makes it clear that our initial coordinate system assignment is accurate, as all features in the layers align very well with the image.

Notes

Projections - Take care to find any available commentaries or metadata information that may accompany the .gis files in use.   .gis files do not provide full projection information and will result in imports that do not correctly specify projection information.  In that case, we will have to use whatever documentation we can find on the data set to learn what the correct projection should be so we can specify it using Assign Initial Coordinate System.

 

See Also

Images

 

Assign Initial Coordinate System

 

Repair Initial Coordinate System

 

Coordinate System

 

Base Coordinate System

 

GDAL / OGR

 

Style

 

Palette Images

 

Example: Spectacular Images and Data from Web Servers

 

Example: An Imageserver Tutorial