Example: Import GIRAS vector LULC File and Style

In this example we import a GIRAS LULC file containing vector data showing land use and land cover and then we use Style to provide a more understandable display.  See also the companion Example: Import CTG Grid Cell File and Style topic.

 

LULC (Land Use Land Cover) data for locations in the United States has been provided by the USGS (U.S. Geological Survey) over the years using several different formats.   Legacy LULC data sets are often found that use two different formats for LULC data for the same region: the GIRAS (Geographical Information Retrieval and Analysis System) vector format, and  CTG (Composite Theme Grid) raster format.

LULC GIRAS Vector Format Files

Files in either CTG or GIRAS format do not use three-letter extensions.  For example, downloading and then decompressing any compressed files for the San Francisco 100K LULC data set from USGS will result in five files, as seen in Windows File Explorer:

 

lulc_giras_and_ctg_files_01.png  

One of the files, the grid_cell file, is raster data in CTG format.   The other four files contain vector data in GIRAS format.   The five files provide the following information:  

 

 

It is not always easy to remember that the grid_cell file uses a different format, so Manifold users will rename the grid_cell file to grid_cell.ctg to indicate it is a raster file in CTG format, a different format used than the other four files.  

 

lulc_giras_and_ctg_files_02.png

The grid_cell.ctg file can be imported into Manifold using the CTG dataport.  The other four files can be imported into Manifold using the GIRAS vector format dataport.    For example, to import the land_use drawing we can either just double-click it and Manifold will discover it is a GIRAS format file and import it, or we could manually specify use of the .Files (GIRAS) (*.*) dataport.

 

dlg_import_giras_lulc.png

 

To import from LULC GIRAS format:

 

  1. Choose File-Import from the main menu.

  2. In the Import dialog browse to the location of the file.

  3. Double-click the file desired

  4. A table and a drawing will be created.

 

il_import_giras01_01.png

In the illustration above we have double-clicked on the land_use file to import that file and to create a land_use table and a land_use Drawing drawing in the project pane.

 

il_import_giras01_02.png

 

We can double-click one of the images open to view it.   For a more interesting display, we first create a new data source using a Bing street maps imageserver as shown in the Example: An Imageserver Tutorial topic.   We then create a map and drag and drop the Bing layer into the map, and then we drag and drop the land_use Drawing drawing into the map. It appears using default formatting, showing the different regions of land use or land cover as areas.

 

il_import_giras01_03.png

If we open the land_use table we see that each area has a Code attribute that matches one of the Classification Codes set forth in the Notes section below, as documented by USGS.  We can use those codes to color the areas to show which land use each area represents.

 

GIRAS format stores projection information so the drawing has been imported with the correct coordinate system.  It appears in the right place, showing the parts of the San Francisco Bay region and neatly aligned with the background Bing map.  However, the drawing needs to be styled using the classification codes to provide useful colors.   

 

To do that we click on the land_use Drawing layer to make sure it is the active layer and then in the Contents pane we choose the Style panel.  

 

il_import_giras01_04.png

 

In the Style panel we click the Fill Color well to make it the active color and then in the field box we choose Code as the source of the controlling field.   We are telling the system to assign the fill color based on the value found in the Code field.

 

il_import_giras01_05.png

 

In the Style dialog we choose unique values as the method use, entering 100 for the number of unique values (choosing a reasonably large number to cover the most common types of land use codes in the Bay area).  We press the Tally button to load up the palette pane with the most common unique classification code values in the drawing.  

 

btn_style_palette.pngWe click the palette button and choose the Classic - Land Cover palette to load that palette into the color wells.   Press Update Style.   The new style immediately takes effect.  

 

il_import_giras01_06.png

 

That applies the Land Cover palette to the different classification code values in the drawing.   That is better than default gray tones, but we can improve the display by adapting the default palette with a few changes in the Style panel.

 

il_import_giras01_07.png

 

Back in the Style panel we click into the lower pane with rows for values and color wells, and choose Ctrl-A to select all rows.  We right-click onto the column of color wells and choose Reverse from the context menu.   

 

il_import_giras01_08.png

 

That reverses the order in which the palette is applied to the unique classification code values in the palette pane.    We press Update Style to see how that looks in the map.

 

il_import_giras01_09.png

Even better.  Now the portions of the drawing that we know are forested areas are green, and those portions that correspond to city areas are not green.   Next, we will eliminate the wrong colors that are used for ocean and bay regions.   Those should be blue.

 

Begin by pressing Ctrl-I to invert the selection, so that no rows are selected.  Or, accomplish the same thing by pressing Shift-Ctrl-A to unselect all rows.

 

il_import_giras01_10.png

 

From the classification table given in the Notes below (documentation easily found online at various USGS sites) we know that classification codes with a value of 54 represent bays or lakes.  We scroll down in the palette pane to double-click into the green color well for that classification code value and we change the color to light blue.

 

il_import_giras01_11.png

 

Scrolling up to the top of the palette pane we likewise change the color for classification code 2000000102 to light blue as well. From the table in the Notes section below we know that value codes for water as well.   We press Apply to see how that looks in the map.

 

il_import_giras01_12.png

 

Much better!   We now have a clear display of land use and land cover in the Bay area.   The ocean and bay regions are blue as well.    If we were interested in a particular set of classification codes for land use, we could consult the table in the Notes to find a category of interest and color those classification code values a contrasting color, such as bright red, to see where they are.

 

As interesting as the above display may be, if we do not intend to use the land use drawing on its own but want to keep displaying it in a map using Bing as a background, we may as well use the color of water regions displayed by Bing.     The easiest way to do that is to double-click into the color wells for the classification code values that represent water and to change the color to transparent color, represented with a hatch pattern.

 

il_import_giras01_13.png

 

We do that first for the 54 classification code value.

 

il_import_giras01_14.png

 

 

We then change the color for classification code 2000000102 to transparent color as well.   We then press Update Style.

 

il_import_giras01_15.png

 

In the map we see that all areas colored in transparent color have disappeared.   The Bing background now shows through in water regions of the drawing.

Editing Areas using Selection and Tables

In the illustration above we have made the fill color transparent for areas with classification codes for water.   However, the color used for borders remains the default black so the borders of those areas still appear, resulting in square border outlines in the lower left of the drawing.   If we do not intend to use areas for display, we can do better than simply making them transparent:  we can delete the areas if we like.

 

For example, we can Ctrl-click on the large rectangular area (now with transparent color for a fill color) to select it.

 

il_import_giras01_16.png

 

Selected areas are rendered in red selection color, including the transparent fill regions.    To delete the area we press the Delete key or choose Edit - Delete.

 

il_import_giras01_17.png

 

When the area is deleted the entire area disappears, including borders, because there is no longer an area object in that region.   If we like, we can simply Ctrl-click on all the areas representing water to select them all and then press Delete to delete them.   But that is risky because we might miss some small areas.

 

il_import_giras01_18.png

 

For example, if we zoom in to the Southern portion of the drawing just above Half Moon Bay we can see there is a sliver of an area representing ocean by Miramar Beach.   We have selected it in the illustration above to show where it is located.     It would be easy to miss such small area objects if we manually Ctrl-click on area objects to select them for deletion.

 

A better way is to use the Select panel to select area objects in the table.  

 

il_import_giras01_18a.png

 

We open the land_use table, which is the table from which the land_use Drawing component takes data.  With the focus on the table we use the Select panel.

 

il_import_giras01_19.png

 

In the Select panel we choose the Equal template and then for the Value we choose the Code field (the pull down parameter box will be loaded with all the fields in the table). In the Compare to box we choose the Expression setting and then enter the value 54.  We enter 54  because we know from the classification codes listings in the Notes below that the number 54 in the Code field is a code for water areas.   We press the Replace Selection button.    Now, all of the records in the table, whether they have been scrolled into view or not, for which the Code field has a value of 54 are selected.

 

il_import_giras01_20.png

Next, we enter the value 2000000102 in the Compare to box.  We use the value 2000000102 because from the lists in the Notes section we know that value codes for ocean areas.  

 

We use the down triangle in the Replace Selection button to pull down a menu that allows us to change the button's action to Add to Selection and then we press Add to Selection.  We have now added all records in the table for which the value of Code is 2000000102  to the selection.    The selection now includes all records with a Code value of either 54 or 2000000102.

 

At this point, we could simply press Delete and all of the selected records in the table would disappear, and all areas shown in the drawing that corresponded to those records would also disappear.     However, it makes sense to do a quick visual check to make sure we are deleting only the areas we want to delete and not accidentally deleting areas we would like to keep.

 

il_import_giras01_21.png

Back in the map we see all of the area objects corresponding to records that have a Code value of 54 or 2000000102 have also been selected.  The selected areas appear using red selection color.  We can pan and zoom to confirm these are, indeed, the areas we want to delete.

 

il_import_giras01_22.png

 

We press the Delete key and the areas are deleted.   The records which corresponded to those areas in the land_use table are also deleted (the drawing is just a visualization of what is in the table).

 

il_import_giras01_23.png

 

If we zoom into the region by Miramar Beach we see that the sliver of ocean area by the beach also has been deleted.  

 

il_import_giras01_24.png

 

Deleting unused areas cleans up the visual presentation and makes it easy to use the land_use Drawing layer with other layers, such as satellite imagery.

 

If we like, we can easily add other layers from other imageservers like seen in the Example: Spectacular Images and Data from Web Servers  topic.  In the map above we have added a Google satellite imageserver layer below the land_use Drawing layer.  

 

The image seen above is the same map published in larger size on the Data Sources page on the Manifold website.  

 

il_import_giras01_25.png

 

In the illustration above we have added a Google imageserver layer providing streets and labels with transparent background above the drawing layer.   We have zoomed in to the region near the lower right of the drawing to see how closely the vector land use layer is aligned with satellite imagery.  We can see how the dark green areas represent wooded land cover, while the lighter green areas represent grasslands.

 

The image seen above is similar to the map published in larger size on the Data Sources page on the Manifold website.   Especially in the larger view we can see how the land use vector drawing aligns very well with the satellite imagery.

 

Notes

Classification Codes - The value for each area in the land_use Drawing is a classification code that can be matched to a palette color to provide a more understandable display, as illustrated above.  USGS defines the following codes:

 

1 Urban or Built-Up Land

11 Residential

12 Commercial Services

13 Industrial

14 Transportation, Communications

15 Industrial and Commercial

16 Mixed Urban or Built-Up Land

17 Other Urban or Built-Up Land

 

2 Agricultural Land

21 Cropland and Pasture

22 Orchards, Groves, Vineyards, Nurseries

23 Confined Feeding Operations

24 Other Agricultural Land

 

3 Rangeland

31 Herbaceous Rangeland

32 Shrub and Brush Rangeland

33 Mixed Rangeland

 

4 Forest Land

41 Deciduous Forest Land

42 Evergreen Forest Land

43 Mixed Forest Land

 

5 Water

51 Streams and Canals

52 Lakes

53 Reservoirs

54 Bays and Estuaries

 

6 Wetland

61 Forested Wetlands

62 Non-forested Wetlands

 

7 Barren Land

71 Dry Salt Flats

72 Beaches

73 Sandy Areas Other than Beaches

74 Bare Exposed Rock

75 Strip Mines, Quarries, and Gravel Pits

76 Transitional Areas

77 Mixed Barren Land

 

8 Tundra

81 Shrub and Brush Tundra

82 Herbaceous Tundra

83 Bare Ground

84 Wet Tundra

85 Mixed Tundra

 

9 Perennial Snow and Ice

91 Perennial Snowfields

92 Glaciers

 

Oceans may be coded with a value of 2000000102 or 0.

 

See Also

Selection

 

Contents Pane

 

Contents - Select

 

Style

 

CTG, LULC Grid Cell

 

GIRAS, LULC Vector Format

 

Example: Spectacular Images and Data from Web Servers

 

Example: An Imageserver Tutorial

 

Example: Import CTG Grid Cell File and Style