data structures & geodatabase. geodatabase implemented in a relational database comes in two...

Post on 26-Dec-2015

221 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Data Structures & GeoDatabase

GeoDatabase• Implemented in a relational database• Comes in two flavors – Personal &

Enterprise (Access & Sys. Like Oracle) • Supports a model of topologically

integrated feature classes - 2D & 3D• Supports Data Models -- ArcHydro• Use can be simple or very complex!• In some applications database

designers will be needed to tune the database operation!

• Can use many different data structures

Outline

• Before looking at GeoDatabases we need to take a detailed look at the structure of the various types of data that can be used in a GeoDatabase

• Then we can look at the complexities of the GeoDatabase its self

Data Structures

Access

DBase

Shapefile

Coverage

GeoDataBase

GI

Spatial Data Attribute Data

Access

DBase

Other DBs

Grid

Raster

IDRISI

Vector

TopologicalNon-

Topological

Shapefile High levelData Models

Simple Data

TIN Object OrientedCoverage RegionsDynamic

segmentation

GeoDataBase

Access

DBase

Shapefile

Coverage

GeoDataBase

GI

Spatial Data Attribute Data

Access

DBase

Other DBs

Grid

Raster

IDRISI

Vector

TopologicalNon-

Topological

Shapefile High levelData Models

Simple Data

TIN Object OrientedCoverage RegionsDynamic

segmentation

GeoDataBase

Images

Data Structures

• You have to know something about these Vector structures– Shapefiles (multiple files same name)– Coverages (Folders)

• Workstation – (folder with INFO file)• PC (folder WITHOUT an INFO file)

– Can only open in ArcView3.3– Can then convert to a Shapefile

Data Structures

• You have to know something about these structures– Raster

• GRIDS

– Images• MrSid• Tiff• ERDAS• Etc/

Vector: General

• Points are defined by a single x,y coordinate pair

• Lines are defined by two or more x,y coordinate pairs

• Polygons are defined by lines that close to form the polygon boundaries

3 Shape files for map

Points, lines, polys

Vector: ShapefilesExtension Require

dWhat it is

.dbf Attribute data file

.shp Geometry

.shx Index to geometry

.sbn, .sbx Spatial index of features

.fbn, fbx Spatial index read only features

.ain, aih Attribute Index of active fields

.xml Metadata (AV8+)

.avl Legend data (Av3.x)

.prj Projection data etc.

Vector: Topology• Shapefiles are said to have NO topology• But they do (see Practical Vector GIS)• WHAT IS IT???• Topological association: spatial relationship

between features that share geometry• In Coverages (Workstation & PC): spatial

relationships between connecting or adjacent features in a data layer

• In GeoDatabases: a set of rules applied to feature classes that explicitly define spatial relationships that must exist between features.

Note:

• The chapter (2) in Practical Vector GIS has a lot of good information about this subject

Vector: Workstation Coverages

• Workstation ArcInfo coverages are a very common data structure

• They are stored in a workspace• A Workspace is any folder that has

– An INFO folder– And a set of coverages folders that have

• A bunch of .ADF files

• DON’T EVER MOVE THE CONTENTS OF A WORKSPACE EXCEPT IN ARC CATALOG!

Vector: Workstation Coverages

• Workstation ArcInfo coverages are a very common data structure

• A Workspace is any folder that has – An INFO folder– And a set of coverages folders that

have• A bunch of .ADF files

These folders are all

coverages

Line data

Extent

Poly or Point Attribute Table

TIC tableAn .AAT is a Arc Attribute table

A Coverage: pointsTIC

A Coverage: points

A Coverage: Arcs

2 Coverages for map

Can’t have Points and Polys in same coverage because polys have a label point in each poly – confusion would abound!

Raster data

•We have looked at this structure before•Here is ESRI’s diagram•The elevation values are average for each cell in the raster•There are a number of raster formats – ESRI’s is GRID

GRID STRUCTUREESRI COURSE VIEW OF SOILS

Explorer view

AWorkspace

Image data• A raster-based representation of a scene

• Cell attributes are NOT like feature data

• Typically produced by an optical or electronic device,

– camera or

– scanning radiometer.

• Examples

– remotely sensed data (for example, satellite data)

– scanned data, and photographs.

• Stored as a raster dataset of binary or integer values that represent the intensity of reflected light, heat, sound, or any other range of values on the electromagnetic spectrum.

• An image may contain one or more bands.

Image data• A raster-based representation of a scene

• Cell attributes are NOT like feature data

• Typically produced by an optical or electronic device,

– camera or

– scanning radiometer.

• Examples

– remotely sensed data (for example, satellite data)

– scanned data, and photographs.

• Stored as a raster dataset of binary or integer values that represent the intensity of reflected light, heat, sound, or any other range of values on the electromagnetic spectrum.

• An image may contain one or more bands.

.tif – tagged Image File Format

.tfw – Tiff world file (location)

.sid – MrSID format (LizardTech)

.img – ERDAS Imagine format

.jpg – Joint Photographic Experts …

USED FOR WHAT?

• Vector data – things with discrete borders– roads, minor civil divisions

• Raster data – continuous surfaces– Elevation, water table, sound levels

• Images – views of real world– Photos, satellite data

The Geodatabase

• It is a single container for many feature classes (FC) (layers, {themes} of any feature class type)

• Quite often the FCs are stored in Feature Datasets (FDS)

• Come in two flavors– Personal in Access databases– Enterprise in large commercial databases

• Oracle, DB2, SQL Server, ArcSDE

Geodatabase

Feature Dataset

Feature Classes

Stand alone Feature Classes

Source View

Display view

ArcCatalog view

}Cover

Line(arc)

point

poly

Anno

Table

You need to consider ...• What will it be used for?• What kind of data will be in the GDB

– Themes and geometry types (point, line, poly?)– Attributes -- spatial or non-spatial tables

• What will be the projection & data extent used?• What rules of data modification will be required?• Do you want to maintain relationships between

objects of different types?• Will you be using geometric networks?• Will you require topologically related features?• Will you store custom objects?

Definitions

Do all those words mean??????????

You need to consider ...• What will it be used for?• What kind of data will be in the GDB

– Themes and geometry types (point, line, poly?)– Attributes -- spatial or non-spatial tables What will it be

used for?• What kind of data will be in the GDB

– Themes and geometry types (point, line, poly?)– Attributes -- spatial or non-spatial tables

• What will be the projection used?• What rules of data modification will be required?• Do you want to maintain relationships between objects

of different types?• Will you be using geometric networks?• Will you require topologically related features?• Will you store custom objects?

•Connectivity: Constraint on the type of network features that may be connected to one another

–edge-junction rules–edge-edge rules

•Topology: Permissible relationships of features –within a feature class –between feature classes –between features in two different feature classes

You need to consider ...• What will it be used for?• What kind of data will be in the GDB

– Themes and geometry types (point, line, poly?)– Attributes -- spatial or non-spatial tables What will it be used for?

• What kind of data will be in the GDB– Themes and geometry types (point, line, poly?)– Attributes -- spatial or non-spatial tables

• What will be the projection used?• What rules of data modification will be required?• Do you want to maintain relationships between objects of

different types?• Will you be using geometric networks?• Will you require topologically related features?• Will you store custom objects?

Associations or links between two or more objects in a GDB.

Relationships can exist between 1) spatial objects (features in a feature class) 2) non-spatial objects (records in a table, or 3) spatial and non-spatial objects

You need to consider ...• What will it be used for?• What kind of data will be in the GDB

– Themes and geometry types (point, line, poly?)– Attributes -- spatial or non-spatial tables. What will it be used for?

• What kind of data will be in the GDB– Themes and geometry types (point, line, poly?)– Attributes -- spatial or non-spatial tables

• What will be the projection used?• What rules of data modification will be required?• Do you want to maintain relationships between objects of

different types?• Will you be using geometric networks?• Will you require topologically related features?• Will you store custom objects?

Objects: The representation of a real world entity stored in a GDB. An object has properties and behaviors.

You need to consider ...• What will it be used for?• What kind of data will be in the GDB

– Themes and geometry types (point, line, poly?)– Attributes -- spatial or non-spatial tablesWhat will it be used for?

• What kind of data will be in the GDB– Themes and geometry types (point, line, poly?)– Attributes -- spatial or non-spatial tables

• What will be the projection used?• What rules of data modification will be required?• Do you want to maintain relationships between objects of

different types?• Will you be using geometric networks?• Will you require topologically related features?• Will you store custom objects?

A one dimensional nonplaner graph (mathematics) that is composed of features.These features are constrained to exist within the network and can, therefor, be considered network features.

You need to consider ...• What will it be used for?• What kind of data will be in the GDB

– Themes and geometry types (point, line, poly?)– Attributes -- spatial or non-spatial tablesWhat will it be used for?

• What kind of data will be in the GDB– Themes and geometry types (point, line, poly?)– Attributes -- spatial or non-spatial tables

• What will be the projection used?• What rules of data modification will be required?• Do you want to maintain relationships between objects of

different types?• Will you be using geometric networks?• Will you require topologically related features?• Will you store custom objects?

Relationships between connected features in a geometric network ORShared borders between features in a topology

(Now that is circular!!!!)

You need to consider ...• What will it be used for?• What kind of data will be in the GDB

– Themes and geometry types (point, line, poly?)– Attributes -- spatial or non-spatial tablesWhat will it be used for?

• What kind of data will be in the GDB– Themes and geometry types (point, line, poly?)– Attributes -- spatial or non-spatial tables

• What will be the projection used?• What rules of data modification will be required?• Do you want to maintain relationships between objects of

different types?• Will you be using geometric networks?• Will you require topologically related features?• Will you store custom objects?

Custom Objects: In ArcGIS you are NOT limited to the objects provided. New objects can be added

More Definitions: Feature

• An object class in a GDB that has a field of type GEOMETRY.– Are stored in Feature Classes

• A representation of a real world object• A point, line or poly in a coverage or

shapefile• A representation of a real world object

in a layer on a map.

More yet: Feature Class

• Conceptual representation of a category of geographic features.

• Includes point, line, poly & annotation

• In a GDB, an object that stores features and has a geometry field type

Feature Dataset

• A collection of feature classes that share the same spatial reference.

• It is because they share the same spatial reference that they can participate in topological relationships with each other.

• Several feature classes with the same geometry may be stored in the same feature dataset.

• Object geometry and relationship classes can also be stored in a feature dataset

Some others

• Edge: – A line segment in a topology that defines

lines or polys boundaries – Multiple features in one or more feature

classes may share topology edges

• Dataset:– Any feature class, table, or collection of

feature classes or tables in the GDB– A named collection of logically related data

items arranged in a prescribed manor

IconsGDB

Feature Dataset

GDB table

IconsGDB

Feature Dataset

GDB table

IconsGDB

Feature Dataset

GDB table

Three ways to create a GDBPlan it

Import Existing

Data

Create a Schema

with ArcCatalo

g

Use CASE tools

Define connectivity

rules, relationships

Load data into

Schema:ShapefilesCoverages

GDB

Feature Datasets (FDS)

• Exist in a GDB to define a particular Spatial Reference

• Are a way to group feature Classes(FC) with the same spatial reference

• So they can participate in topological relationships with each other

• Topologically related FCs must reside in the same FDS

Spatial Reference• A coordinate System

– Geographic– UTM– Etc.

• A spatial domain (coord range, measures (M), and Z values (extent)

• Precision (# of system units/unit M)• MUST be specified when creating a FDS and

it feature classes or a stand alone feature class

Field Properties

• When creating a Feature Class or table you can specify the number of fields to be included

• And you can spec settings such as field type and max. size

• All fields have property default values, domains, aliases, and null allowance

Field Properties

• When creating a Feature Class or table you can specify the number of fields to be included

• And you can spec settings such as field type and max. size

• All fields have property default values, domains, aliases, and null allowance

Set values at creation time

Valid set or range of values

for the field

Aliases will display on

maps

Yes or NO for allowing nulls

(nothing)

Field Precision & Scale

• Max. field size and precision– Precision – number of digits (not the

“.”)– Scale – number of decimal places

• Personal GDBs support ONLY binary fields and precision and scale are ignored!

• NOT SO for enterprise GDB!!!

Required Fields

• Apply to all feature classes and tables• Automatically created • Required fields also have required

properties (domain) [can’t change]• Required fields for simple FCs are

– OBJECTID– Shape

• Note: when you import data there will be other fields you cannot change in ArcGIS – But you can change them in ACCESS

Topologies

• Many datasets have features that could share boundaries or corners

• By creating a Topology you set up rules defining how features share their geometries.

• Editing a boundary or vertex shared by two or more features updates the shape of all of them.

Topology rules

• Govern the relationships between between features within a FC or features in different FCs

• Example: moving a slope boundary in in one FC could update two slope class polys AND update a forest stand boundary in another FC.

• Topology editing tools in ArcMap are used to create and change the rules

Geometric Networks

• Some vector datasets need to support connectivity tracing and network connectivity rules– Communications– Pipelines– Transportation (roads, railroads, canals)

• Geometric networks allow you to turn simple point and line features into network edge and junction features

Data

• Numeric data can be stored in 4 types– Short integer– Long integer– Single precision floating point (floats)– Double precision floating point

(doubles)

Decimal vs. Binary

• Important concept• 8,4,2,1 place weight• The binary number 0110 = 6 in decimal• 0001 = 1, 0010 =2, 0011 = 3, 0100 =4• The short integer is 16 bits or 2 bytes• One is for sign leaving 15 for the number• Range is –32,000 to +32,000 • The long integer is 4 bytes or 32 bits• Range is –2 billion to +2 billion (more or less)

Decimal vs. Binary• Floats and doubles are coded in a

form similar to scientific notation• -3,125 -3.125 x 103 3.125E3 • Float is a 8 bit number and store up

to 7 significant digits – -3.4E-38 to –1.2E38 for neg numbers– 3.4E-38 to 1.2E38 for positive

• As a result floats and doubles are only approximate numbers!!!!!!!!

More yet

• You cannot express the number1,234,567.8

as a float because it contains more than 7 digits. As a float it will be

1,234,568• 0.1 cannot be expressed exactly

-- it will be0.099999

Summary of data types

Name Range, length

Size(bytes

)

Applications

Short Integer

-32,768 to 32,767

2 No fractions

Long Integer

-2,147,483,648To2,147,483,647

4 No fractions

Float ~-34E-38 to ~1.2E38

4 Fractional values

Summary of data types

Name Range, length

Size(bytes

)

Applications

Double ~ -2.2E-308

~ 1.8E308

8 Fractions OK

Text <=64,000 char

varies

Names etc.

Date mm/dd/yy

hh:mm:ss

8 Date and time

The BLOB

• Binary Large Object• Simply some data stored in the

GDB as a long sequence of binary numbers.

• Such as– Images– Multimedia– Code

Summary

GDB

Feature Datasets

Feature Classes

Features

top related