2 GIS data modelling What is a data model? GIS data models CAD, graphical and image GIS data models Raster data model Vector data model Object data model
GIS Data Modelling3 What is a data model? The heart of any GIS is the data model. A data model is a set of constructions for describing and representing selected aspects of the real world in a computer. There is no single type of GIS data model that is best for all circumstances.
GIS Data Modelling4 The role of a data model in GIS People Interpretation and Explanation Operational GIS Analysis and Presentation GIS Data Model Description and Representation Real World
GIS Data Modelling5 Levels of data model abstraction Reality: real world phenomena Conceptual model: human-oriented model of selected objects and processes in relevance, often partially structured Logical model: implementation-oriented representation of reality, often expressed in the form of diagrams and lists Physical model: portrays the actual application in a GIS, often comprises tables stored as files or databases.
GIS Data Modelling6 Levels of abstraction Reality Conceptual model Logical model Physical model Increasing abstraction Human- oriented Computer- oriented
Conceptual model GIS Data Modelling7 A road: Centre line (position) Edge line (width) Shoulder Number of lanes One way/two way Speed limit Traffic conditions Pavement Underground structure Intersections Date of completion Maintenance date … Road Line Area Attributes Centre line Network Intersection Main section Shoulder Speed limit No. of Lines
Physical model GIS Data Modelling9 Road R-lineR-area R-… … Record 1Line-idArea-idRoad No.Name… Record 2Line-idArea-idRoad No.Name… Record nLine-idArea-idRoad No.Name… File: Road Record 1S-NodeE-NodeVerticesLength… Record 2S-NodeE-NodeVerticesLength… Record nS-NodeE-NodeVerticesLength… File: R-line Road
GIS Data Modelling10 GIS data models CAD, graphical and image GIS data models Raster data model Vector data model Object data model
GIS Data Modelling11 Geographical data models used in GIS Data modelApplication Computer-aided designSimple mapping ImageImage processing and simple grid analysis Raster/gridSpatial analysis and modelling Vector/geo-relational topological Operations on vector geometric features NetworkNetwork analysis Triangulated irregular network (TIN) Terrain analysis ObjectOperations on all types entities
GIS Data Modelling12 CAD, graphical and image GIS data models The earliest GIS were based on very simple models. CAD data model: Local drawing coordinates Objects do not have unique identifiers. No relationship details between objects are stored. Simple graphical data model: cartography Image model: field data rather than objects.
GIS Data Modelling13 The CAD data model A CAD model focuses on feature drawing only so that it does not represent any kind of relationships between objects.
GIS Data Modelling14 Simple graphical data model A simple graphical data model is adequate to make a cartographic representation of Hong Kong SAR.
GIS Data Modelling15 Image data model Image data: On the left is the false colour composite of Landsat ETM image using Band 4, 3 and 2. On the right is the classification of the image using 6 bands of the Landsat ETM images (excluding Band 6).
GIS Data Modelling16 Raster data model Raster data model uses an array of cells, or pixels, to represent real-world objects. Difference between raster and image data models: Image data do not have attribute table attached so that they have only one attribute field. Raster data have attribute table that can be joint to other tables so that they can have multiple attribute fields. Applications: image data: image processing; raster data: spatial analysis and modelling
GIS Data Modelling17 Grid with attributes
GIS Data Modelling18 Data structure of raster data model Cartographic model (database) Map layer (overlay, coverage, grid) Zone (region) Location
GIS Data Modelling19 Hierarchy of the raster data structure Cartographic Model Map layer Zone Orientation Resolution Title Map layer Value Label Zone Location Row coordinate Column coordinate
GIS Data Modelling20 Cartographic model The data for an area can be visualised as maps or layers. A cartographic model is a set of data describing selected characteristics of each location within a bounded geographic area in the form of map-like layers.
GIS Data Modelling21 Cartographic model (cont.) Topography Soil types Forest types Buildings Real world Soils
GIS Data Modelling22 Map layer A map layer is a set of data describing a single characteristic of each location within a bounded geographical area. Only one item of information is available for each location within a single layer. Major components of a layer are its resolution, orientation and zones.
GIS Data Modelling23 Map layer (cont.) Australia New South Wales Victoria Queensland South Australia West Australia Tasmania Y X Northern Territory N
GIS Data Modelling24 Zone A zone is a set of contiguous location that exhibit the same characteristic. Term class is often used to refer to all individual zones that have the same characteristics. Major components of a zone are its value, label and locations.
GIS Data Modelling25 Zone and class
GIS Data Modelling26 Value and label of a zone Value The item of information stored in a layer for each cell or pixel Cells in the same zone have the same value Label Additional information associated with each zone Can be numeric or alphabetic (i.e. numbers or text)
GIS Data Modelling27 Zone (cont.) Australia New South Wales Victoria Queensland South Australia West Australia Tasmania Y X Northern Territory N State IDState NameCapitalPopulation 02New South WalesSydney QueenslandBrisbane
GIS Data Modelling28 Location A location is the smallest unit of geographical space for which data a recorded (also called cell or pixel). A location is defined as that a portion of the cartographic plane is uniquely identified by an ordered pair of coordinates (row and column numbers).
GIS Data Modelling29 Vector data model Simple features Topological features Network data model TIN data model
GIS Data Modelling30 Vector representations pointlinearea Scalecity wells highway political boundary streams agriculture land urban land city highway airport
Multiple representation GIS Data Modelling31 Small-scale representation of cities as points Large-scale representation of cities as areas
GIS Data Modelling32 Simple features Point numberx, y coordinates 1(2, 8) 2(3, 3) 3(12, 7) 4(9, 4) Line numberx, y coordinates 1(1, 6), (4, 8), (8, 6), (13, 8) 2(1, 3), (4, 4), (9, 2), (13, 5) Polygon numberx, y coordinates 1(2, 5), (3, 8), … (2, 5) 2(6, 4), (8, 4), … (6, 4)
GIS Data Modelling33 The spaghetti structure Original map Map expressed in Cartesian coordinates FeatureNumberLocation Point Line Polygon X Y (single point) X 1 Y 1, X 2 Y 2, …, X n Y n (string) X 1 Y 1, X 2 Y 2, …, X 1 Y 1 (closed loop)
GIS Data Modelling34 Topological features Topological features are simple features structured using topological rules. Topology is the science and mathematics of relationships. In GIS, topology is used to validate the geometry of vector datasets.
GIS Data Modelling35 Arcs When planar enforcement is used, area objects in one layer cannot overlap and must exhaust the space of a layer. Every piece of boundary line is a common boundary between two areas. The stretch of common boundary between two junctions (nodes) may be called edge, chain, or arc. Arcs have attributes which identify the polygons on either side (left or right). In what direction by which we can define left or right? Arcs are fundamental for topological features.
GIS Data Modelling36 Arcs (cont.) Start node End note vertex An Arc
GIS Data Modelling37 Arc-node structure N3 N1 N2 N6 N5 N4 a1 a2 a3 a4 a5 a6 A B C Polygon topology PolygonArcs A B C a1, a5, a3 a2, a5, 0, a6 a6 0Outside map Node topology NodeArcs N1 N2 N3 a1, a3, a4 a1, a2, a5 a2, a3, a5 N4a4 N5 N6 0 a6 Arc coordinates Arc Start X, Y a1 a2 a3 40,60 70,50 10,25 a440,60 a5 a6 10,25 55,27 Intermediate X, Y End X, Y 70,60 70,10; 10,10 10,60 30,50 20,27; 30,30; 50,32 55,15; 40,15; 45,27 70,50 10,25 40,60 30,40 70,50 55,27 Arc topology Arc Start Node a1 a2 a3 N1 N2 N3 a4N4 a5 a6 N3 N6 End Node Left Polygon Right Polygon N2 N3 N1 N2 N A A B A B A A B C
GIS Data Modelling38 Topological features
GIS Data Modelling39 Network data model
GIS Data Modelling40 X-Y Coordinates node#coordinates x1, y1 x2, y2 x3, y3... x11, y11 Z Coordinates node#z_value z1... z2 z3 z A B C D E F G H I J K L M N EDGES adjacent A B C D E F G H I J K L M N B, K A, C, L B, D C, E, L D, F E, G F, H, M G, I H, J, N I, K A, J, N B, D, M G, L, N I, K, M NODES node# A B C D E F G H I J K L M N 1, 6, 7 1, 7, 8 1, 2, 8 2, 8, 9 2, 3, 9 3, 4, 9 4, 9, 10 4, 5, 10 5, 10, 11 5, 6, 11 6, 7, 11 7, 8, 9 7, 9, 10 7, 10, 11 TIN data model
GIS Data Modelling41 Creating TIN from contours
GIS Data Modelling42 TIN surface
GIS Data Modelling43 Object-oriented concepts An object is a self-contained package of information describing the characteristics and capabilities of an entity under study. In a geographical object data model, the real world is modelled as a collection of objects and relationships between them. Each entity in the GIS is an object. A collection of objects of the same type is called a class.
GIS Data Modelling44 Object data model For GIS purposes it is not sufficient merely to hold data on map elements in the data base. It must also be possible to access the operations to be performed on these elements. An object is an entity that has a state represented by the values of local variables (instance variables) and a set of operations or methods (instance methods). Individual objects belong to a class that defines the type of object. Each class has a superclass from which it can inherit both instance variables and methods.
GIS Data Modelling45 Polygon object definitionLand parcel object definition Superclasses (object)Superclasses (polygon) Class variables Number_of_polygons Class variables Instance variables List_of_nodes List_of_arcs Area Instance variables Value Owner Instance methods Calculate_centroid Draw Overlay Instance methods Transfer_ownership Re_zone Object data model (cont.)
GIS Data Modelling46 Object Land ParcelPolygon Polygon-1Polygon-2Land parcel-1 Object data model (cont.) Land parcel-2Land parcel-3
GIS Data Modelling47 Implementation of O-O model
GIS Data Modelling48 Three key hallmarks of object orientation Polymorphism Encapsulation Inheritance
GIS Data Modelling49 Polymorphism Application Geospatial database access objects Geospatial database CoverageCAD data Polymorphism Applications Data components Data sources
GIS Data Modelling50 Encapsulation Feature Data set Encapsulation Table Data set Object Class Relationship Class Feature Class
GIS Data Modelling51 Inheritance Simple Road Feature Inheritance Standard feature types Custom feature types Complex Road Feature Road Feature Road central line Road edge Overpass
GIS Data Modelling52 Advantages The natural model: directly corresponds to the object found in reality. Completeness: every object is completely bounded with a defined shell. Inheritance: a class can include subclasses that can inherit both its data and methods. Openness: allows to modify and expand instance variables and methods.
GIS Data Modelling53 Summary The heart of a GIS is the data model it employs. With increasing level of abstraction, models are created from human-oriented conceptual, logical to computer-oriented physical models There is no single type of GIS data model that is best for everything. Commonly used data models include: CAD, graphical and image data models Raster data model Vector data model Object-oriented data model