Shapefiles, Topology, and the Geodatabase Longley et al., ch. 9 Zeiler, chs. 4 and 5.

25

Transcript of Shapefiles, Topology, and the Geodatabase Longley et al., ch. 9 Zeiler, chs. 4 and 5.

Shapefiles, Topology, and the Geodatabase

Longley et al., ch. 9

Zeiler, chs. 4 and 5

Shapefiles and Topology

• discrete view

– separate, countable

– exhaust the space?

– space between objects?

• editing a polygon boundary?

ArcInfo Coverage

ArcView Shapefile

“Limited” Topology

• adjacency, connectivity (defined in coverages)– FNODE, TNODE

– LPOLY#, RPOLY#

• properties that are preserved under stretching of the space

• distinction between point, line, area is topological– can't make a line into an area

Adding a New Polygon w/in a Coverage

Shapefiles

• “Limited topology” - 6 kinds of shapefiles– Point

• Multipoint (several pts. represent one feature)

– polyline • multipart polyline (segments disconnected)

– Polygon• Multipart polygon

• Attributes in separate dBASE tables– no topological info.

Object-Oriented Data Modeling

• Objects in the real world– Natural rules and relationships

• Rivers flow downstream• Roads handle levels of traffic• Land parcels respect landuse laws• How to build this intelligence into data

structures?

OO Principles• things in the world are instances of

classes – John Smith - human being

– Harrison Blvd. - street

– Corvallis - city

– Mary’s Peak - mountain (Hugh Grant’s hill??)

• Identity, Inheritance, Encapsulation

OO Principles ( cont. )Identity

• classes form hierarchies– John Smith is an instance of the class male

human beings

– male human beings are a subclass of human beings

– human beings are a subclass of mammals

– mammals are a subclass of fauna

• each subclass shares the properties of the class– and may add special properties

OO Principles ( cont. )Identity

• geographic objects often group into complex objects – an airport is composed of runways, hangars,

terminals

– a state is composed of counties

– an area coverage is composed of polygons, arcs, nodes

OO Principles ( cont. ):Inheritance

• Object can inherit properites– old hierarchical database concept

• objects can inherit properties that are true of all objects of that type– e.g., for all polygons

– new county in Oregon, still can’t pump gas there

• and can also add new properties – e.g., properties true only of a certain class

– rural county, always has diesel gas

OO Principles ( cont. ):Encapsulation ( Behavior )

• Object can encapsulate behavior (functions)

• what kinds of behavior? • editing rules

– e.g, corners of a building must be square• might apply to all buildings but not all polygons• might apply only to some buildings

– two adjacent objects must have the same common boundary

Behavior ( cont. )• attribute rules

– e.g., range of possible numbers • dates in numerical format (only 1 to 12)

• split and merge rules– 1 feature split or 2 features merged, what

happens to attributes?

– e.g., split a street, the lengths of two parts are shares of the total

– e.g., merge two polygons, their population counts are summed for the combined polygon

– e.g., merge two polygons, their population densities are averaged, weighted by area

Example Merge Rule

Behavior ( cont. )• editing, attribute, split and merge rules • special procedures

– e.g., procedure to measure areas of polygons• associated with polygon object type

– e.g., procedure to annotate contours

• specific interaction rules between objects– e.g., a liquor store cannot be within 500 m of a

school

– an offramp is required if a street and a freeway intersect

– at least one stream must flow out of every stream junction

Encapsulation• things in the world are instances of

classes – John Smith - human being

– Harrison Blvd. - street

– Corvallis - city

– Mary’s Peak - mountain (Hugh Grant’s hill??)

• instances of a class must share ...– same topological dimensions

– same attributes

– same behaviors

A “Smarter” Data Model

• ArcInfo 7 coverage– geometric information not stored in database

• ArcInfo 8 geodatabase– stores geometric information as "shape" attribute

• closer to how we actually think about geographic features – e.g., we don't naturally think about an area

coverage as a collection of arcs

• Identity, Inheritance, Encapsulation (Behavior)

ArcInfo 8 and Microsoft COM

• 2,000 reusable software objects• Programmable in Visual Basic for

Applications (VBA) • Visual language for representing a data

model– Data modeling with Unified Modeling Language

(UML)

Microsoft COM( Component Object

Model )• Microsoft standard for re-usable software

components – Build software from parts, not from scratch– Makes software easier to write and reuse– Provides widest choice in services, tools,

languages, and applications– Controls, tools, and server components– Geographic objects and software objects

• e.g., ArcInfo and Excel

Windows PlatformWindows Platform

GeneralGeneralpurposepurpose

WebWebprofessionalprofessional

ComponentComponentdeveloperdeveloper CommercialCommercial

professional professional developerdeveloper

BorlandBorland DelphiDelphi

AdobeAdobePageMakerPageMaker

MacromediaMacromediaDirectorDirector

PowerSoft PowerSoft PowerBuilderPowerBuilder

NetObjects NetObjects FusionFusion

SoftQuadSoftQuadHotMetal ProHotMetal Pro

BorlandBorland IntrabuilderIntrabuilder

PowerSoft PowerSoft NetImpactNetImpact

BorlandBorland LatteLatte

Multiple Languages/Tools

VISIOVISIO