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
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.
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
|File Name||Data Type|
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.
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.
– 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).
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.
*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.
The “New Feature Dataset Wizard” will ask you to select a coordinate system to set the spatial reference for the “Admin_Boundaries” feature dataset:
Once you finished, your feature datasets should look like the following:
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?
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:
(“Land Parcels”, “Residential Buildings”, “Government Facility”, and “Fiji_Roads”)
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.
You need now to set attribute fields for the created “Land_Parcels” feature class:
Repeat the process to create the feature class “Residential_Buildings” under “Land Use” feature dataset:
Repeat the process and create the feature class “Government Facilities” under “Land Use” feature dataset, as a Point Feature Class:
Now you will add a new Line Feature Class to the feature dataset “Transportation”
Now your Geodatabase should look like the one shown here:
“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.
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?
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.
|Domain Name||Description||Field Type||Domain Type||CODE||Code Description|
|Area||Area of residential building in square meters||SHORT INTEGER||RANGE||Min value: 5. Max Value: 1000|
|Floors||Number of floors in residential buildings||SHORT INTEGER||RANGE||Min value: 1. Max Value: 30|
|Rooms||Number of rooms in residential buildings||SHORT INTEGER||RANGE||Min value: 1. Max Value: 15|
|Construction_Outer_Walls||Construction materials of outer walls of residential units in Fiji||SHORT INTEGER||CODE||1|
|Concrete, brick, or cement|
Tin or Corrugated Iron
Traditional bure materials
Makeshift or improvised materials
|Max_speed_limit Maximum||Maximum speed limit in roads in Fiji in km per hour||SHORT INTEGER||CODE||1|
You can also import domain values from an csv or .dbf table by using the ArcToolbox tool “Table to Domain”
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:
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?
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\).
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
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:
Now you will be asked to add topological rules for selected feature classes. We suggest, for example, to add the following rules:
Your topology rules should look like the following:
You have now defined some rules governing topological relationships between objects (within “Landuse” feature dataset).
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.
This is where you can review the topology rules as well as the validation results.
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.
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.
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?
Now you are ready to import the “Landuse_Topology” file, “Land_parcels”. “Residential_Building”, and “Trees” feature classes to ArcMap for editing.
If the Topology Toolbar is greyed out, you must turn on Editing mode by clicking Editor > Start Editing
You can also edit vertices to correct topology errors by using the Editor and Edit Vertices:
In the images below, see the file before and after topology errors in land parcels were fixed.
Now your Geodatabase is ready to be edited and populated!
In your experience, what are the benefits of creating a geodatabase? What are the challenges?