Intro to GIS
Lesson 7: Attribute Data
1
Objectives
2
3
Types of tables
G I S tables come in two main types
4
Tables
Source: Esri
5
Database management systems
6
Flat file D B M S
A flat file database
Customers
Service calls
Electric usage
Service personal
7
Hierarchical D B M S
Stores data in multiple tables
The tables have defined parent-child relationships
Defines pre-set hierarchy of table relationships
Very efficient for specific queries, but the allowable queries are limited by the structure
8
Relational D B M S
Stores data in multiple tables
Table relationships are defined as needed
Very flexible
Ideal for open-ended applications when types of queries not known beforehand
Most common type used in G I S applications
9
Joining tables
Source: Esri
10
Multiple joins
11
One-to-one joins
Source: Esri
12
Many-to-one joins
Source: Esri
13
One-to-many joins
Source: Esri
14
Many-to-many cardinality
In a many-to-many cardinality, multiple records in one table match multiple records in another table
These complex relationships are rarely satisfactorily treated in G I S, although a relate is one way to handle them
15
Rule of Joining
Source: Esri
16
Unmatched records in joins
Source: Esri
Sometimes a target record has no match in the join table
Records without a match will show <Null> values in the fields from the join table
If all of the join fields have <Null> values, the join may have been performed incorrectly, resulting in no matches
17
Statistics on tables
18
Thinking critically with statistics
Source: Esri
Exploring data with statistics helps you think critically about your data and identify potential issues
19
Charts
Source: Esri
Scatterplots are another great data exploration tool
This scatterplot shows the strong correlation between average temperature and latitude
Pro charts are linked to the map
20
Field Types
21
Creating fields
Fields have specific types that can be created
Each field must be defined before placing any data in it
Once defined, the field type cannot be changed
Fields have stringent naming rules to ensure that they work with many different types of databases
22
Binary data
23
A S C I I storage
American Standard Code for Information Interchange (A S C I I) is how computers store text
Each letter, character, and symbol is represented by a unique 7-bit binary code
C A T = {67,65,84} decimal = 100001110000011010100
cat = {99,97,116} decimal = 110001111000011110100
148 = {49,52,56} decimal = 011000101101000111000
24
Storing data
A S C I I stores “106” as three codes of 1 byte each = 3 bytes
106 = {49,48,54} decimal = 011000101100000110110
Binary stores “106” as a single 1-byte binary number
106 = 01101010
25
Byte storage limits
A single byte can store a value from 0 to
Larger numbers require more bytes
Signed numbers require a bit to store positive or negative, so storage limits are smaller
26
Integer versus float storage
Scientific notation
Binary stores whole numbers (integers)
To store decimal values, the computer stores a form of scientific notation with a mantissa and an exponent
27
Float precision
Large numbers start to lose precision because the number of significant digits in the mantissa is limited.
A double-precision floating point allots more storage to the mantissa value
28
Database storage
Database fields are typically defined by
The definition limits the values that can be stored
Text (A S C I I) field with 10 bytes “Mississipp”
Binary 2-byte signed integer: −32,767 to +32,767
Single-precision floating point x.xxxxxxxeyy
29
Arc G I S field data types
Pro has six basic field types: short and long for integers, float and double for decimal values, text, and date
30
Field type | Explanation | Examples |
Short | Integers stored as 2-byte binary numbers Range of values −32,000 to +32,000 | 255 12001 |
Long | Integers stored as 10-byte binary numbers Range of values −2.14 billion to +2.14 billion | 156000 457890 |
Float | Floating-point values with eight significant digits in the mantissa | 1.289385e12 1.5647894e − 02 |
Double | Double-precision floating-point values with 16 significant digits in the mantissa | 1.12114118119141e13 |
Text | Alphanumeric strings | ‘Maple St’ ‘John H. Smith’ |
Date | Date/time format for calendar dates and times | 07/12/2008 10/17/1963 13:24:06 |
Geometry fields
Source: Esri
31
Domains
32
Domains
Source: Esri
Domains are rules about what can be placed in a field
Coded domains provide lists of values to pick from
Range domains specify the range of numeric values permitted
Domains are especially useful when editing or when collecting data in the field on a G P S or mobile device
33
Examples of domains
34
Domain name | Field type | Domain type | Coded values |
Things | Text | Coded | Tree, Bench, Lightpole, Sign, Sculpture, Other |
ConditionClass | Text | Coded | Good, Fair, Poor |
LineCategories | Text | Coded | Sidewalk, Street, Trail, Powerline, Other |
SurfaceMaterials | Text | Coded | Concrete, Asphalt, Gravel, Dirt, Grass, Matting, Bark, Sand, Other |
LanduseClass | Text | Coded | Parking, Athletic field, Pool, Landscaping, Playground, Game court, General use, Other |
Creating domains
Source: Esri
35
Assigning domains
Source: Esri
Once created, the domain must be assigned to the field using the Fields view
The field type must match (Short, Float, and so on)
Domains can be reused for many fields if desired
36
Schema
Source: Esri
The structure of a table, including its fields, their definitions, its domains, and so on, are called the table schema
A schema can be saved without any data in it and used as a template to create another empty table with the identical structure
37
Tables in ArcGIS
38
Table views
Source: Esri
Tables are displayed and manipulated in a Table view
Table views can be sized and docked like other views
39
Table view properties
Like layers, table views have properties that affect how the tables are viewed and displayed
The settings are cosmetic and do not affect the source table
Some common table view settings include
Table view properties are set in the Fields view
40
Fields view
The Fields view is used to view and modify the properties of tables
It is critical to be aware of what types of changes are being made to fields when using Fields view
Source: Esri
41
Types of changes in Fields view
Cosmetic edits affecting the table view properties
Permanent edits affecting the source table
42
Editing fields
Source: Esri
43
Calculating fields
Source: Esri
The Calculate Field tool can be used to enter an expression to calculate new values for a field in a table
44
Importing Excel data
Source: Esri
Excel worksheets can be read directly by Pro, provided that certain formatting requirements are met
NAME, NUM, STREET, CITY, STATE, ZIP, PERCENT
ddd, 999, 999, ddd, ddd, 99.99
Smith, 527, W. Main St., Peoria, Il, 45098, 38.3
A comma-delimited C S V file may work better in some cases
45
Importing text
Source: Microsoft, National Climatic Data Center
Text tables may come in several formats
a) tab-delimited file
b) comma-delimited file (C S V)
c) fixed-column file
Pro cannot read the fixed-column format, but Excel can be used to convert one to a C S V
46
47