Introduction

What is a geodatabase?
A Geodatabase is a data storage and management framework developed by ESRI. It is a relational database containing spatial and non-spatial objects. The primary elements of a Geodatabase are feature classes, rasters and tables. A Feature Dataset is a container for feature classes (point, line, and polygon) that are thematically related and share the same coordinate system and geographic extent.

Why do we need a geodatabase?
Geodatabases are an organised way to keep similar data together. It allows a user to add spatial and non-spatial data in the same bucket, with capabilities such as topology, coded value domains, raster catalogues and with overall more geoprocessing performance.

How to develop a geodatabase?
Designing a geodatabase model or schema is probably the most important activity to start the implementation of any GIS analysis and/or GIS project. A database model basically says what different elements (data) it will have and how they will relate to each other (rules). Key steps for taking on a database model are through the conceptual, logical, and physical phases. This includes modelling the user’s view, defining objects and relationships, selecting geographic representations, and matching geodatabase elements. Additionally, it will involve creating the geodatabase structure in ArcCatalog to have all the relevant elements (i.e. feature datasets, features classes, attribute fields, domains, subtypes and topology), including the creation of metadata, and the collection and entry of data into the geodatabase

Geodatabase elements

In Section A, you will focus on the conceptual and logical phase of designing a geodatabase.
In Section B, you will create a personal geodatabase by implementing the geodatabase schema designed in Section A.
In Section C, you will create topology rules and learn how to fix topological errors in ArcMap.

Learning Objectives

At the end of this module you will be able to build a personal geodatabase using ArcCatalog. Particularly, you will be able to: 

– Recall the steps to database design and the main components of a geodatabase
– Create and import feature datasets, feature classes, attribute fields, subtypes, and domains
– Create topology rules and correct errors

Data Input

X:\UNOSAT_ADV_FJI\Training_Material\M1\Practical\Data_Input

File NameData Type
AOI_SUVAPolygon Shapefile
fji_polbnda_adm3_tikina.shpPolygon Shapefile
Land_cover_fiji.shpPolygon Shapefile
Road_type.csvTable

SECTION A: Designing a Geodatabase Model: Conceptual Design

IDENTIFY INFORMATION PRODUCTS AND/OR “NEED TO KNOW” QUESTIONS

The first step to design a geodatabase schema is to clarify “why” it is being created – what are the objectives or decisions it will support, which information products are expected, and questions that need to be answered. This first step also involves identifying knowledge sources, for example, collecting existing geodatabase models that can be replicated, the review of academic articles and reports, and interviews with experts.

Tropical Cyclone Harold and the spread of COVID-19 highly impacted informal settlements in several countries in the Pacific. In response, Government of Fiji announced the creation of a Hazard Sensitive Urban Plan and promised to guarantee the relocation of vulnerable communities, to arrange for land tenure, and to improve sanitation conditions of the most vulnerable households in informal settlements across urban areas in the country. You work for the GIS department that was requested to create an integrated geodatabase to serve this ambitious plan with the following objectives:
• Provide a baseline that allows a comprehensive description of the socio-economic profile, vulnerabilities to natural and man-made disasters, and public health conditions of informal settlements in the country.
• Identify suitable areas for relocation for families in hazard prone areas.
Your team has already identified diverse knowledge sources and experts to interview to develop the geodatabase schema. In your team, prepare a first draft of the geodatabase schema, following the steps below.

DEFINE FEATURE DATASETS AND FEATURE CLASSES

  • Identify thematic layers
Practicing Geodatabase Design – Suva Area
  • Group these different elements into “layers” or “feature classes” and “datasets”– for example “transportation”, “water”, “land use”
  • Fill Table 1 below withthe identified datasets and feature classes
Geodatabase Conceptual Design 1

IDENTIFY SUBTYPES, FIELDS, AND DOMAINS

Now that you have identified datasets and feature classes, you will identify subtypes, fields and domains and fill Table 2. Instructions and information are provided below.

Geodatabase Conceptual Design 2
  • Identify components of two datasets: (a) Land Use, containing feature classes for different types of buildings and land parcels, and (b) Population
  • Use the Land Tenure information (iTaukei, State or Freehold) and the Extract of the Fiji Population Census Form (below) as references to identify feature classes, subtypes, attribute fields, and domains. See the dataset “Transportation” in Table 2 as an example.
Extract of the Fiji Population Census Form

*TIP

– Thinking in terms of a “tree” with branches (see presentation and figure below) and brainstorming using mind maps (LINK) can help you design your schema.
– Think if the feature class is a polygon, a line, or a point. Each feature class can be just one of those.
– Each feature class (layer) must have two fields OBJECTID (the primary key) and SHAPE (the geometry, spatial references for the data entry points).
– Later in this module, you will identify “data types” for each field (SHORT, LONG, TEXT, DATE, etc).

SECTION B: Implementing a Geodatabase Schema in ArcCatalog

In this section, you will learn how to implement some elements of a geodatabase schema in ArcCatalog. You will:

– Create one personal geodatabase and four feature datasets.
– Import three shapefiles to create feature classes: “AOI_SUVA.shp”, “fji_polbnda_adm3_tikina.shp”, and “Land_cover_fiji.shp”.
– Import table “Road_type.csv” to create a feature class.
– Create three feature classes for “Land_parcels”, “Residential Buildings”, and “Trees”.
– Create domains for the feature classes.

GEODATABASE & FEATURE DATASETS

Create a New Personal Geodatabase

  • Open ArcCatalog and connect to folder X:\UNOSAT_ADV_FJI\Training_Material\M1\Practical\Data_Output 
  • Right click on folder Data Output > New > Personal Geodatabase*.  
  • Type as name “Urban_Planning_Baseline_SUVA.mdb” 

*Note: you can select between different geodatabase formats like personal geodatabase, file geodatabase, and enterprise geodatabase depenind on you purpose and capacity requirement. In this case, we are selecting personal geodatabse which has 2 GB data limit but highly compatible with other gis software.

Different types of geodatabases for ArcGIS

Create New Feature Datasets

  • Right click on “Urban_Planning_Baseline_SUVA.mdb” > New > Feature Dataset. Name it “Admin_Boundaries” 

The “New Feature Dataset Wizard” will ask you to select a coordinate system to set the spatial reference for the “Admin_Boundaries” feature dataset: 

  • In Projected Coordinate Systems, select“Fiji_1986_Fiji_Map_Grid” (you can search by EPSG code 3460)
  • No need to define a vertical coordinate system for this exercise > Click next
  • Accept default values for XY Tolerance (0,001) meter. It is more than acceptable for the geodatabase you are about to create 
  • Click finish  
  • By following the same procedure, create the following feature datasets: “AOI”, “Landuse” and “Transportation” 
Create New Feature Dataset – Set Spatial Reference

Once you finished, your feature datasets should look like the following:

QUESTIONS

What questions do you have about feature datasets?
______________________________________________________________________________

Why do we need feature datasets in a geodatabase? What are the advantages of having feature datasets?
______________________________________________________________________________

FEATURE CLASSES

Import Existing Feature Classes into the Geodatabase

We will now either import or create some feature classes (Admin, Land cover, AOI) to be stored into feature datasets.

To import existing shapefiles or feature classes into a new feature dataset:

  • Right click on “Admin_Boundaries” > Import > Feature Class (single) 
  • From the Feature Class to Geodatabase dialog box, select “fji_polbnda_adm3_tikina.shp” stored on X:\UNOSAT_ADV_FJI\Training_Material\M1 \Practical\Data_Input 
  • In “Output Feature Class”, name it “Fiji_Admin3” 
  • Repeat the same procedure to load the following shapefiles into the corresponding feature datasets:  
    – “Land_cover_fiji.shp” in the feature dataset “Land_use”
    – “AOI_SUVA.shp” in the feature dataset “AOI”
Importing Feature Class

Create New Feature Classes

(“Land Parcels”, “Residential Buildings”, “Government Facility”, and “Fiji_Roads”)

  • Right click on “Landuse” feature dataset > New > Feature Class
  • Enter “Land_Parcels” as name and “Land Parcels” as Alias
  • Select “Polygon” as feature type
  • Do not check any geometric properties
  • Click next
Creating New Feature Class

As you can see there are two attribute fields defined by default: “OBJECTID” and “SHAPE” which will define a unique identifier and geometric/spatial properties of all objects stored as records.

What are the different Data Types

Creating Attribute Fields

You need now to set attribute fields for the created “Land_Parcels” feature class:

  • In the upper window of New Feature Class dialog box, click on the empty cell under “SHAPE” 
  • Enter a new Field Name “Land_Tenure” and set the data type as Text
  • Click Finish

Repeat the process to create the feature class “Residential_Buildings” under “Land Use” feature dataset:

  • Right click on “Landuse” feature dataset > New > Feature Class  
  • Enter “Residential_Buildings” as name and “Residential Buildings” as Alias
  • Select polygon in the feature type.
  • Do not check any geometric properties  
  • Click Next
  • In the attribute fields enter the following fields:
    Area => Short Integer (Data Type)
    Floors => Short Integer (Data Type)
    Rooms => Short Integer (Data Type)
    Construction_Outer_Walls => Short Integer (Data Type)
  • Click Finish
Creating attribute fields

Repeat the process and create the feature class “Government Facilities” under “Land Use” feature dataset, as a Point Feature Class:

  • Enter “Trees” as name and “Government Facilities” as Alias 
  • Select “Point” as feature type 
  • Do not check any geometric properties  
  • Click next
  • In the attribute fields enter the following fields:
    Species => Text (Data Type)
    Condition => Short Integer (Data Type)
    Year_planted => Date (Data Type)
  • Click Finish
Attribute fields for “Trees” layer

Now you will add a new Line Feature Class to the feature dataset “Transportation”

  • Right click on “Transportation” feature dataset > New > Feature Class: Type “Fiji_Roads” as name and “Fiji Roads” as Alias
  • Select “Line” as feature type 
  • Do not check any geometric properties  
  • Click next
  • In the attribute fields enter the following fields:
    Road_name => Text (Data Type)
    Width => Short Integer (Data Type)
    Max_speed_limit => Short Integer (Data Type)
    Road_Type => Text (Data Type)
  • Click Finish
Attribute fields for “Fiji_Roads” layer

Now your Geodatabase should look like the one shown here:

Geodatabase feature datasets and feature layers

 “Land Parcels”, “Residential Buildings”, “Government Facility”, and “Fiji Roads” feature classes are still empty. In the next steps, we will define domains and subtypes, before the geodatabase is filled up with data.

QUESTIONS

What questions do you have about feature classes and field attributes?
______________________________________________________________________________

What is the difference between feature class, shapefile, and layers?
______________________________________________________________________________

Can you delete a field or alter it after it is created?
______________________________________________________________________________

What are the roles of “OBJECTID” and “SHAPE” in feature class file?
______________________________________________________________________________

DOMAINS

Attribute domains are rules that describe the legal values of a field type (a field will not accept a value that is not in that domain). Using domains helps ensure data integrity by limiting the choice of values for a field. For numeric attributes, you can set a range domain; for classified features, you can set a coded value domain. Attribute domains can be shared across feature classes, tables, and subtypes in a geodatabase while subtypes are defined only for a specific attribute field of a feature class. To enforce data integrity of your geodatabase you will create some domains. 

Create Coded Value Domains

  • Right click on “Urban_Planning_Baseline_SUVA.mdb” > Properties > Domain tab  
  • Enter the domain name: Land_Tenure  
  • Type a domain description: Land Tenure in Fiji 
  • Select Text as Field Type  
  • Select coded values as Domain Type 
  • Leave default values for Split and Merge Policy 
  • Enter the following coded values and descriptions
    Freehold => Freehold land means you have outright ownership of the property, can be purchased, transferred, or leased, subject to the conditions of the Land Sales Act.
    State => State land is crown land administered by the Department of Lands.
    iTaukei => iTaukei Land is owned by iTaukei communal groups or land-owning units and can be reserved land or leased under the administration of either the iTaukei Lands Trust Board or the Fiji Land Bank.
  • Click apply
  • Repeat the process to create the following domains by entering the information below:
Domain NameDescriptionField TypeDomain TypeCODECode Description
AreaArea of residential building in square metersSHORT INTEGERRANGEMin value: 5. Max Value: 1000
FloorsNumber of floors in residential buildingsSHORT INTEGERRANGEMin value: 1. Max Value: 30
RoomsNumber of rooms in residential buildingsSHORT INTEGERRANGEMin value: 1. Max Value: 15
Construction_Outer_WallsConstruction materials of outer walls of residential units in FijiSHORT INTEGERCODE1
2
3
4
5
6
Concrete, brick, or cement
Wood
Tin or Corrugated Iron
Traditional bure materials
Makeshift or improvised materials
Other materials
Max_speed_limit MaximumMaximum speed limit in roads in Fiji in km per hourSHORT INTEGERCODE1
2
3
50 km/h
60 km/h
80 km/h
  • Check that domain values created are properly defined
  • Right Click on Urban_Planning_Baseline_SUVA.mdb > Domains tab  

Import Domains

You can also import domain values from an csv or .dbf table by using the ArcToolbox tool “Table to Domain”

  • In ArcCatalog, click the search button
  • Search for the tool “Table to Domain’ 
  • Insert Input Table = “Road_Type.csv” from X:\UNOSAT_ADV_FJI\Training_Material\M1\Practical\Data_Input
  • Insert:
    Code Field = “ROAD_TYPE_ID”
    Description Field = “ROAD_TYPE_Description”
    Domain Name = “ROAD_TYPE_ID”
    Domain description = “ROAD_TYPE_Description”
    Update Option = “APPEND”
  • Click ok
  • Check that domain values created are properly defined
  • Right click on Urban_Planning_Baseline_SUVA.mdb > Domains tab 

Assign Domains to Features Class Attribute Fields

In the last steps you created and imported domains to your geodatabase. Now it is necessary to assign these domains to the different feature classes. To assign defined domains to corresponding feature classes:

  • Right click on “Land_Parcels” feature class > Properties  
  • Click Fields tab > Select “Land_Tenure” field name  
  • In Field Properties, select from the drop-list menu Land_Tenure as domain.
  • Notice that if the data type of your field is not the same as the data type of the domain, you will not be able to select. In the drop-list it appears only the domains with “TEXT” as data type.
  • Click apply 
Assigning Domains to Features Class Attribute Fields
  • Repeat the same procedure for resident and domains created

QUESTIONS

What are the questions you have about domains?
______________________________________________________________________________

Do you know other situations where defining domains could save time?
______________________________________________________________________________

What are the limitations you see of using domains?
______________________________________________________________________________

Can you think about an example of a situation where the way you define a domain can negatively impact a population group?
______________________________________________________________________________

Section C: Building Geodatabase Topology

A geodatabase topology allows you to specify rules that control the spatial relationships of features in a dataset. There are a variety of topology rules that can be applied to the feature classes stored into a geodatabase, depending on the requirements of GIS analysis we want to perform.   To create a topology, you must specify which feature classes will participate in the topology.  All feature classes participating in a topology must be in the same feature dataset. You must specify topology rules to control the allowable relationships of features within a feature class, between features in different feature classes, or between subtypes of features. Geodatabase has topology rules that can be applied to point, line, and polygon features. (For details, check out the ArcGIS geodatabase topology rules poster supplied in the folder X:\UNOSAT_ADV_FJI\Training_Material\M1\Practical\).

An example of a “Must not overlap” rule applied to polygons and lines. The red polygon and line mark the places where the rule is violated. These are stored in the topology as error features. Such rules can apply to features within the same feature class, to pairs of feature classes, or to subtypes of features.

BUILD A TOPOLOGY

For this exercise, you will define some topology rules to control spatial relationships between different objects in and between feature classes in the Land Use feature dataset.  

To save your time, a raster image of a sample area of Fiji has been digitized and the geodatabase populated using exactly the same schema of Parts 1, 2, and 3. To remember how to digitize maps of raster images, explore the “5201 – Intro to GIT4CR.pdf” from X:\UNOSAT_ADV_FJI\Training_Material\Booklet

  • Open ArcMap and connect to X:\UNOSAT_ADV_FJI\Training_Material\M1 \Practical\Data_Input in Catalog window.
  • Right click on the different layers in Urban_Planning_Baseline_TOPOLOGY.mdb and explore how the schema of Parts 1 and 3 is reflected on the different shapefiles.
  • Right click on “Landuse” feature dataset > New > Topology
  • Click next on the New Topology wizard dialog 
  • Type “Landuse_Topology” as topology name 
  • Leave the default value (0.001 m) for cluster tolerance. This value is based on the XY tolerance of the feature dataset > Click next 
  • Select all feature classes > Click next
Creating new topology

Ranks allow you to ensure that more accurate features are not snapped to the position of less accurate features when the topology is validated. You can assign up to 50 different ranks, with 1 being the highest rank. For this exercise you will keep the default value of 5 and established the following ranks:

Creating new topology – ranking
  • Click next 
  • Add a new rule 

Now you will be asked to add topological rules for selected feature classes. We suggest, for example, to add the following rules: 

  • Rule 1> In rule 1, select feature class “Land_Parcels” > Rule = Must Not Overlap
  • Rule 2 > In rule 2, select feature class “Land_Parcels” > Rule = Must Not Have Gaps
  • Rule 3 > In rule 3, select feature class “Residential_Building” > Rule = Must Be Covered By > Feature Class: “Land_Parcels”

Your topology rules should look like the following:

Final Topology Rules

You have now defined some rules governing topological relationships between objects (within “Landuse” feature dataset).  

  • After adding rules, click next > Click finish 

After the topology is created, you will be asked to validate it. You can choose either to validate the topology during the editing session in ArcMap, or to validate the whole topology in ArcCatalog. 

  • Click yes to validate now 
  • When the validation is done, from ArcCatalog, open the properties of “Landuse_Topology”

This is where you can review the topology rules as well as the validation results.

  • Click the Errors tab > Generate Summary to see a summary of errors

You can also Preview “Landuse_Topology” in ArcCatalog. If there are errors, it will not be an empty map. Instead, features with errors will be shown. In the case that the topology rules identified errors, you can fix them in ArcMap using the Topology Toolbar. 

*TIPS

A topology can be created between objects in the same feature class or between feature classes in the same feature database. You cannot create a topology between the features in datasets “transportation” and “land use”, for example.

QUESTIONS

Which topology rules could you apply for land cover and for trees? How could you make trees to not be in the middle of roads or inside of residential buildings?
______________________________________________________________________________

If you see buildings floating in the ocean in ArcMap, how could you fix it? Would it be an error of projection or topology?
______________________________________________________________________________

TOPOLOGICAL ERROR CORRECTION

Now you are ready to import the “Landuse_Topology” file, “Land_parcels”. “Residential_Building”, and “Trees” feature classes to ArcMap for editing.

  • Save ArcMap project as “M1_Urban_Planning_Baseline_Topology.mxd” inX:\UNOSAT_ADV_FJI\Training_Material\M1\Practical\Workspace
  • Load “Landuse_Topology” under Landuse dataset from “Urban_Planning_Baseline_Topology.mdb”.
  • In Adding Topology Layer dialog box, select Yes.
  • In Table of Contents window, right click on Land_cover_fiji > Select Remove
  • Right click on Land_pacels and select Zoom to layer
Topology Correction
  • Add the Topology Toolbar by clicking Customize > Toolbars > Topology.
  • Add the Start Editing toolbar by clicking Customize > Toolbars > Editor and turn on Editing mode

*TIPS

If the Topology Toolbar is greyed out, you must turn on Editing mode by clicking Editor > Start Editing

  • Click the error inspector button in the topology toolbar   
  • Search for topological errors for whole extent and zoom to the active error  
Error Inspector
  • Explore the tool by fixing errors manually
  • Right click on each error
  • Select the appropriate option
    Subtract (removes the shape or overlap)
    Create feature (turns the overlap or the gap into a new feature)
    Merge (creates a feature for the gap to merge with one of the shapes next to it or merge the overlap with one of the shapes next to it)
    Mark as exception
  • Click on the topology button “Validate Topology in current extent”  each time you want to update the error inspector after fixing some features

You can also edit vertices to correct topology errors by using the Editor and Edit Vertices:

Tool: Editor and Edit Vertices

In the images below, see the file before and after topology errors in land parcels were fixed.

Before and after topology correction

Now your Geodatabase is ready to be edited and populated! 

QUESTIONS

In your experience, what are the benefits of creating a geodatabase? What are the challenges?
______________________________________________________________________________