Data Models

download Data Models

of 47

description

Data Models

Transcript of Data Models

  • Geographical Data Modeling UML and Data Modeling ElementsExamples from the Marine Data Model and ArcHydro (Thanks to Dawn Wright)Longley et al., ch. 8

  • Models for GISrepresentation of reality --> modelGIS itself is based on a model of complexity and used to model complexityNot a full representation of reality: even at 1:1data model = limited representation of realitya discretization or partitioning of spacefinite, discrete nature of computing devices

  • Data ModelRepresentation of information about a form or a processE.g. a weather map with isothermsFIELD gridOBJECT isolineA good model allows us to infer processFIELD or OBJECT geo-relational

  • 3 Data Modelsgeo-relational coverage (object view; from classic ArcInfo polys) geo-relational shapefile (object view; from ArcView)geodatabase (object-oriented; new in ArcGIS 8,9 etc.)

  • Object Oriented GIS (p. 191)Object: a self-contained package of information describing an entityCollection of objects classObjects can have behavior encapsulationInheritance reusable objectsPolymorphism-objects can have their own implementation for application-e.g. create, draw, delete

  • Georelational Data Model:Classic ArcInfo and ArcViewcommand line interfaceUnix, NT, WindowsArcView as interface

  • ArcInfo Coverage as a Data StructureImage courtesy of Louisville/Jefferson County Information Consortium, Kentucky

  • Data StructureNot tied to process at allConcerned simply with what can be computed and what cantWay in which the data model is represented in the GISDEM for grid or layer model (e.g. array)contour for isoline modelTIN for Delaunay triangulation modelcoverages, shapefiles for geo-relationalgeodatabase for OO geodatabase

  • ArcGIS 9 Icons

  • GeodatabaseFeatures and attributes as objectsRelationships among features encodedValidation or editing rules, behaviorsContainer forVector, raster, tabular dataRelationshipsTopologyMS-Office

  • Relationships for a feature

  • ArcGIS Data Modelssupport.esri.com/datamodels.cfm

  • ArcMarine dusk.geo.orst.edu/djl/arcgis

  • Data Modeling for Spatial AnalysisWhat 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, anomaliesto find answers to questions to test or confirm theories deductive reasoning-general to specificto generate new theories and generalizationsinductive reasoning-specific to general

  • What is Spatial Analysis (cont.)Methods for adding value to data in doing scientific research in trying to convince othersA collaboration between human and machineHow do we set up the framework for spatial analysis? Data model to data structure

  • A Georelational to a Geodatabase ModelCoverage and shapefile data structureshomogenous collections of points, lines, and polygons with generic, 1- and 2-dimensional "behavior" as operationsCant distinguish behaviorsPoint for a marker buoy, same as point for observationsmart features in a geodatabaselighthouse must be on land, marine mammal siting must be in oceanObjects can self-police

  • Purpose of ArcHydro, ArcMarine etc.Basic template for implementing GIS projectsinput, formatting, geoprocessing, creating maps, performing analyses Basic framework for writing program code and maintaining applicationsdevelopment of tools for the communityPromote networking and data sharing through established standardscommon model=interoperability

  • ArcMarine Design StrategyGeneric Marine Data ModelUser GroupData ModelUser GroupData ModelUser GroupData ModelInheritance

  • Geodatabase ConceptsESRI's data object-oriented data model objects, features, behaviorsGeodatabasecollection of feature data sets, rasters, TINsall data in relational tables behavior is coupled with features through rules (object-orientation)Supports model-builder for processesFeature data setcontains feature classes defines topological role of featureshas a coordinate system

  • Geodatabase Concepts ( cont. )Feature classstored in a relational tablespecial field for geometric shape geometric data incorporated into the databasePoint, multipoint, segment, path, ring, polyline, polygon

  • Geodatabase Feature Class Geometries

  • Modeling ProcessReal World Objects and relationshipsDatabaseSchema(Object state)Physical ModelConceptual ModelLists, flow diagrams, etcLogical ModelDiagram in CASE ToolGraphic courtesy of ESRI

  • Data Model LevelsIncreasingAbstractionRealityConceptual ModelLogical ModelPhysical ModelHuman-orientedComputer-oriented

  • Specific Steps in Data Modeling(1) Conceptualize the user's view of datawhat are the basic features needed to solve the problem?(2) Select the geographic representation points, lines, areas, rasters, TINs(3) Define objects, features, and relationships draw a UML diagram, specify relationships, behaviors(4) Match to geodatabase elementsRefine relationships, behaviors(5) Organize geodatabase structure, add data

  • ( 1 ) Users View of Data

  • ( 1 ) Users View of Data cont.

  • (2)Select geographic rep.

  • Steps in Data Modeling(1) Conceptualize the user's view of datawhat 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, specify relationships, behaviors(4) Match to geodatabase elementsRefine relationships, behaviors(5) Organize geodatabase structure, add data

  • Unified Modeling LanguageEntity-relationship diagramsDesign the methodologies, diagram notationsUMLNot a design methodologyJust a diagrammatic notation based on methodsEndorsed by leading software and database companies

  • UML ( cont. )Diagrammatic notation = visual language...For constructing a data modelDrawings, relationships constructed in Visio (other tools available)Tools to input a drawing into ArcGISinput drawing to the data model

  • UML Notationa 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

  • Graphic courtesy of Maidment et al., ArcHydro team

  • UML Notation ( cont. )Abstract class specify subclasses underneathMammals w/human or dog feature classesno new instances Feature ClassSpecify subtypes underneathHuman, dog, cat

  • Objects and FeaturesObject (real world)in ArcGIS an object is non-spatial it is NOT a point, line, or area it has no geographic locationit has no shape attribute in its tableDrainage network, ship, vehicle, customer, lake, house, etc.Feature (spatial context)an object that has geographic locationa point, line, area, TIN, raster

  • RelationshipsLinks between classes, shown as linesOne to oneOne to manyMany to many

  • Relationships (cont.)1:1 - solid lineone record in Class A linked to one record in Class Bis married tothe class of state capitals linked to the class of states1:n - solid line with * at one endone 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

  • Relationships (cont.)m:n - solid line with * at both endsany 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

  • Graphic courtesy of Maidment et al., ArcHydro team

  • Type InheritanceWhite triangleClass B inherits the properties (attributes, methods) of Class Athe class street inherits from the class transportation networkSolid diamondthe parts and the whole depend on each other

  • Graphic courtesy of Maidment et al., ArcHydro team

  • Steps in Data Modeling(1) Conceptualize the user's view of datawhat 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, specify relationships, behaviors(4) Match to geodatabase elementsRefine relationships, behaviors(5) Organize geodatabase structure, add data

  • Steps in Data Modeling(1) Conceptualize the user's view of datawhat 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, specify relationships, behaviors(4) Match to geodatabase elementsRefine relationships, behaviors(5) Organize geodatabase structure, add datae.g., Marine Data Model tutorial

    As generic as possible As exhaustive as possible As temporally dynamic as possibleSometimes, a class that you define represents an abstract concept and, as such, should not be instantiated. Take, for example, food in the real world. Have you ever seen an instance of food? No. What you see instead are instances of carrot, apple, and (my favorite) chocolate. Food represents the abstract concept of things that we all can eat. It doesn't make sense for an instance of food to exist. Similarly in object-oriented programming, you may want to model an abstract concept without being able to create an instance of it. For example, the Number class in the java.lang package represents the abstract concept of numbers. It makes sense to model numbers in a program, but it doesn't make sense to create a generic number object. Instead, the Number class makes sense only as a superclass to classes like Integer and Float , both of which implement specific kinds of numbers. A class such as Number , which represents an abstract concept and should not be instantiated, is called an abstract class . An abstract class is a class that can only be subclassed-- it cannot be instantiated.

    http://java.sun.com/docs/books/tutorial/java/javaOO/abstract.htmlA full view of the model, a work in progress, approaching beta release, the implementation goals of which include:production of a common structure, a "geodatabase template", for assembling, managing, and publishing marine data in ArcGIS. Because the Unified Modeling Language code of the model is easily converted to an ArcGIS geodatabase, users can immediately begin populating the geodatabase rather than having to design it from scratch. users can produce, share, and exchange data in similar formats unified approaches encourage development teams to extend and improve ArcGIS software extending the power of marine GIS analyses by providing a framework for incorporating behaviors in data, and dealing more effectively with scale dependencies providing a mechanism for the implementation of data content standards, such as the Federal Geographic Data Committees Hydrography Data Content Standard for Inland and Coastal Waterways, critical for the Coastal National Spatial Data Infrastructure.