UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler...

27
UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1

Transcript of UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler...

Page 1: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.

UML and Object Modeling Elements

Longley et al., ch. 9

Zeiler, chs. 4 and 5, and 12

Review Zeiler ch. 1

Page 2: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.

Data Modeling for Spatial Analysis

• What is spatial analysis?– "a set of methods whose results change when the

locations of the objects being analyzed change"

• Methods for working with spatial data – to detect patterns, anomalies– to find answers to questions – to test or confirm theories

• deductive reasoning

– to generate new theories and generalizations• Inductive reasoning

Page 3: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.

What is Spatial Analysis (cont.)

• Methods for adding value to data – in doing scientific research

– in trying to convince others

• A collaboration between human and machine

Page 4: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.

Geodatabase Concepts

• ESRI's new data object-oriented data model – objects, features, behaviors

• Feature class– stored in a relational table– special field for geometric shape – geometric data incorporated into the database

• Point, multipoint, segment, path, ring, polyline, polygon,

• Zeiler p. 114

– no more division between ARC and INFO

Page 5: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.

Geodatabase Feature Geometries

Page 6: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.

Geodatabase Concepts ( cont. )

• Feature class• Feature data set

– contains feature classes

– defines topological role of features

– has a coordinate system

• Geodatabase– collection of feature datasets, rasters, TINs

– all data in relational tables

– behavior is coupled with features through rules

Page 7: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.

Unified Modeling Language• Entity-relationship diagrams

• Design methodologies, diagram notations

• UML– Not a design methodology

– Just a diagrammatic notation

– Endorsed by leading software and database companies

• HTML

Page 8: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.

UML ( cont. )

• diagrammatic notation = “visual language”...

• for constructing a data model• drawings constructed in Visio• tools to input a drawing to ArcGIS

– input data to the data model

Page 9: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.

Steps in Data Modeling(1) Model the user's view of data

– what are the basic features needed to solve the problem?

(2) Select the geographic representation – points, lines, areas, rasters, TINs

(3) Define objects and relationships – draw a UML diagram

(4) Match to geodatabase elements– specify relationships, “behaviors”

(5) Organize geodatabase structure

Page 10: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.

User’s View of Data

Page 11: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.

Select geographi

c rep.

Page 12: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.
Page 13: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.
Page 14: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.
Page 15: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.

UML Notationpp. 97-99

• a class is shown as a box

• top part contains the name of the class

• lower part contains the attributes

• methods associated with the class

• lines connect boxes and indicate relationships

Page 16: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.
Page 17: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.

UML Notation ( cont. )

• Abstract class – specify subclasses

underneath

– Mammals w/human, dog feature classes

– no new instances

• Feature Class– Specify subtypes

underneath

Page 18: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.

Objects and Features

• Object– An instance of a class (another meaning)

– in ArcGIS an object is non-spatial

– it is NOT a point, line, or area

– it has no geographic location

– it has no shape attribute in its table

– ship, vehicle, … customer, lake, house

• Feature– an object that has geographic location

– a point, line, area, TIN, raster

Page 19: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.

Relationships

• Links between classes, shown as lines

• One to one

• One to many

• Many to many

Page 20: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.

Relationships (cont.)

• 1:1 - solid line– one record in Class A linked to one record in

Class B• “is married to”• the class of state capitals linked to the class of

states

• 1:n - solid line with * at one end– one record in Class A linked to any number of

records in Class B• "owns" • the class of states linked to the class of area codes

Page 21: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.

Relationships (cont.)

• m:n - solid line with * at both ends– any number of records in Class A linked to any

number of records in Class B• "has visited”• "was never married to" • the class of mountain lions linked to the class of

wilderness areas

Page 22: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.
Page 23: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.
Page 24: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.

Type Inheritance

• White triangle• Class B inherits the

properties (attributes, methods) of Class A

• the class street inherits from the class transportation network

• Solid diamond• the parts and the whole

depend on each other

Page 25: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.
Page 26: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.

UML to ArcInfo 8

Page 27: UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.

Data Model Exercise

• Part 1 - Required - due May 1st, 5:00 p.m.• Part 2 - Extra credit - turn in before end of

term• Exercise and data on web• Data on server