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:



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.  


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.



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.


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.



We can double-click one of the images open to view it.   For a more interesting display, we first create a map using a Bing streets image server as a base layer, 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.


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 we choose the Style pane.  



In the Style pane 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.



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.  


We 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.  



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 pane.



Back in the Style pane 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.   



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.


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.



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.



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.



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.



We do that first for the 54 classification code value.



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



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.



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.



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.



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 pane to select area objects in the table.  



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 window, in the Select pane we choose the Code field and then we double-click the Search template to launch it.



In the Search template, for Condition, we choose equal (=), and for the Value we enter 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.   


For the Round option, we leave the default none setting, to not round the Numbers values before making the equal comparison.


For the Action, we use the default replace selection option.


Press Select.  


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.



Next, we enter the value 2000000102 in the Value 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 pull down menu in the Action box to choose add to selection for the Action.  


Press Select.


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.


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.



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).



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



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.  



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.



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



Select Pane




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