OBJECT-BASED VECTOR DATA MODEL Advances in computer technology have made it possible to store spatial data and attribute data together in a single system: A new data model called: Object-based Vector Data Model OBJECT-BASED VECTOR DATA MODEL A new data model requires new concepts, terms and data formats. The Windows ® environment is a familiar application of object-oriented technology Menus, icons, and dialog boxes instead of Command lines Clicking on a menu shows allowable operations for the object OBJECT-BASED VECTOR DATA MODEL This new model uses objects to represent and organize spatial features. The geometry (spatial data) of a feature is stored as an attribute along with other attributes in a record. Objects can have properties and methods to capture characteristics of real-world objects. OBJECT-BASED VECTOR DATA MODEL Object-based data model treats spatial data as objects. An object can represent any spatial feature: a road, a timber stand, or a hydrologic unit. An object can also represent a road layer or the coordinate system that the road layer is based on. OBJECT-BASED VECTOR DATA MODEL - TERMINOLOGY Object Anything that can be seen or touched. Objects have attributes and behaviors. Properties Attributes are characteristics that describe objects. They are also called data or properties. Text.Font = Arial Operations (actions) An object’s behaviors are called operations that either the object can perform or can be performed on. Table.AddRecord OBJECT-BASED VECTOR DATA MODEL - TERMINOLOGY Class A pattern or blueprint for creating an object. It contains all the attributes and behaviors that describe the object. Instance The object you create from a class is called an instance of a class. Object/Instance vs. Class Cookie – Cookie-cutter Car – Blueprint for manufacturing the car OBJECT-BASED VECTOR DATA MODEL - DIFFERENCES Main differences between georelational data model and object-based data model: Object-based data model stores spatial and attribute data of spatial features in a single system Spatial data are stored in a field using a data type called “BLOB” (binary large object) Using a single system resolves some of the issues of data storage and data file structure Object-based data model allows a spatial feature to be associated with a set of properties and methods A property describes an attribute or characteristic of an object A method performs a specific action. © Vicki Drake, SMC Spring 2008 1 OBJECT-BASED VECTOR DATA MODEL - CLASSES A class is a set of objects with similar attributes. A class defines the properties and methods of the objects that a members of that class. For example: a class called feature can cover point, line and polygon feature objects. The feature class defines the same properties and same methods for all three types of objects. OBJECT-BASED VECTOR DATA MODEL: GENERALIZATION AND SPECIALIZATION Hierarchical structures required for management of properties and methods in GIS Generalization and Specialization create the structure in which objects can be grouped into superclasses and subclasses. Generalization uses commonality among objects to group them into a higher-order class For example: three features types of point, line and polygon are grouped into same class through generalization Specialization differentiates objects of a given class by an attribute or attributes. For example: ‘geometry’ can differentiate the three feature types OBJECT-BASED VECTOR DATA MODEL – RELATIONSHIPS BETWEEN CLASSES Once objects are grouped into classes – relationships between classes can be defined Association: how many instances of one class can be associated with another class through multiplicity expressions. Common multiplicity expressions are one (default) and one or more (1..*) For example, an address is associated with one zip code, but can also be associated with one or more apartments OBJECT-BASED VECTOR DATA MODELS – MORE RELATIONSHIPS Aggregation: describes the whole-part relationship between classes For example – a census tract (whole) is an aggregate of a number of census blocks (parts) Multiplicity of “whole” typically 1 and multiplicity of “part” is zero or any positive integer. Composition: similar to aggregation For example – a highway can have zero or any number of rest areas OBJECT-BASED VECTOR DATA MODELS - RELATIONSHIPS Type inheritance: defines relationship between a superclass and a subclass. A subclass is a member of a superclass, inheriting properties and methods of the superclass. Subclass can have additional properties and methods separating it from other members of the superclass. For example: a residential area is a member of ‘built-up’ superclass but is separated from other members of that class by lot size OBJECT-BASED VECTOR DATA MODEL - RELATIONSHIPS Instantiation – an object of a class can be created from an object of another class. For example – a high-density residential area object can be created from a residential area object. OBJECT-BASED VECTOR DATA MODELS - GEODATABASE The Geodatabase model is part of a collection of thousands of objects, properties and methods designed by ESRI similar to the ‘coverage’ model of ArcINFO and the ‘shapefile’ model of ArcView OBJECT-BASED VECTOR DATA MODEL – GEOMETRIC REPRESENTATIONS The Geodatabase Data Model uses the geometry of point, polyline and polygon to represent vector-based spatial features. © Vicki Drake, SMC Spring 2008 2 The Geodatabase is similar to the shapefile in terms of feature geometries. The Geodatabase is also similar to the coverage in terms of simple features The difference is in the composite features of regions and routes. Regions: geometric characteristics of a region subclass are retained (although the region subclass is not supported itself) Multipart polygons may have spatially joint or disjoint components and can overlap Routes: the route subclass from coverages is replaced by polylines with “m” (measure) values. No sections or arcs, the geodatabase uses m values for linear measures along a route and stores the m value directly with the x- and y-coordinates in the geometry field. OBJECT-BASED VECTOR DATA MODEL – DATA STRUCTURE The Geodatabase Data Model distinguishes between “feature class” and “feature dataset” Feature class stores spatial data of the same geometry type Like a shapefile, it has simple features Feature dataset stores feature classes that share the same coordinate system and area extent. Like a coverage, it has multiple data sets Unlike a coverage, it can contain different theme layers (coverages only contain different parts of a single layer) A feature class does not have to be included in a feature dataset – a ‘stand alone’ feature class Feature classes included in a feature dataset ‘share’ topological relationships with each other OBJECT-BASED VECTOR DATA MODEL - INTERFACE An interface is a set of externally visible operations of an object Defines the communication boundary between two entities, such as a piece of software, a hardware device, or a user Properties and methods of the object may be hidden so an ‘interface’ is necessary to work with the properties and methods – not necessarily with the object itself. There are three basic principles underlying the concept of interface: Encapsulation Inheritance Polymorphism In ArcGIS, both ArcCatalog and ArcMap have embedded Visual Basic Editor, which runs macros using ArcObjects (the interface). Using the macros, you can create customized commands, menus, and tools Most ArcGIS users, however, do not have to deal with ArcObjects! OBJECT-BASED VECTOR DATA MODEL – ENCAPSULATION Encapsulation is the mechanism used to hide properties and methods of an object so the object can only be accessed through predefined interfaces In object-based programming, information hiding reduces software development risk. OBJECT-BASED VECTOR DATA MODELS - INHERITANCE Inheritance means an object inherits properties and methods from the class to which the object belongs. A subclass also inherits the class properties and methods For example: residential area is a superclass while low-density and high-density residential areas are subclasses. The principle of inheritance directly links the structural aspects and the behaviorial aspects of objects This saves time since the same properties and methods will not have to defined twice – once for low-density and once for high-density areas Inheritance is a way to form new classes using classes that have already been defined. © Vicki Drake, SMC Spring 2008 3 The new classes, known as derived classes take over attributes and behavior of the pre-existing classes OBJECT-BASED VECTOR DATA MODEL - POLYMORPHISM Polymorphism means the same method can produce different effects, depending on the kind of object to which the method is being applied. For example, if AddLayer is a method for adding data to a view, it can be set to add a coverage given a coverage data source or a shapefile if given a shapefile data source. Similar to inheritance polymorphism save repeating same methods for different classes. OBJECT-BASED VECTOR DATA MODELS – TOPOLOGY RULES The concept of topology was introduced with the coverage data model, but disappeared with the shapefile. coverage model enforces three topological relationships with its data structures: Connectivity Area definition Contiguity The geodatabase model defines topology as relationship rules, allowing the user to choose the ‘rules’ to be implemented in a feature dataset . OBJECT-BASED VECTOR DATA MODEL – TOPOLOGY RULES The Feature Type Polygon Line Point Rule Must not overlap, must not have gaps with, must be covered by feature class of, must cover each other, must be covered by, boundary must be covered by, area boundary must be covered by boundary of, and contains point Must not overlap, must not intersect, must not have dangles, must not have pseudo-nodes, must not intersect or touch interior, must not overlap with, must be covered by feature class of, must be covered by boundary of , end point must be covered by, must not self overlap, must not self intersect, and must be single part Must be covered by boundary of, must be properly inside polygon, must be covered by end point of, and must be covered by line. OBJECT-BASED VECTOR DATA MODELS – REAL WORLD TOPOLOGY RULES Here are a few real-world applications of topology rules: must not overlap County must not have gaps County boundary must not have dangles (i.e., must be closed) Contour lines must not intersect Label points must be properly inside polygons Census tracts and counties must cover each other Counties OBJECT-BASED VECTOR DATA MODEL - ADVANTAGES The main advantages of the Geodatabase topology are: The topology structure is not explicitly stored. © Vicki Drake, SMC Spring 2008 4 The user decides which topology rules are important for his dataset. The user has to specify the conditions of the dataset. The user decides what should happen with spatial objects if they do not meet all the conditions. Topological errors are not solved automatically, but the user has to solve errors manually. The validation process is relatively short. It should be noted that with this validation, only the errors are marked, not solved. After editing some objects in the geodatabase, not the entire dataset has to be validated again. The edited area is marked as a dirty area and only the dirty areas have to be validated again. The Geodatabase topology is easy to use. You don’t need to have special knowledge about topology to create a set of logical conditions for the data. The wizard to implement the topological rules is very useful and straightforward. OBJECT-BASED VECTOR DATA MODELS - DISADVANTAGES The main disadvantages of the Geodatabase topology are: There is a lot of redundancy. all edges shared between neighbors are stored twice. After validation of the topology, the dataset still does not satisfy the conditions. Only the errors are marked. So, at least one extra step is necessary. If there appears an object that does not meet the conditions specified, you have to be aware that this does not have to mean that there’s a topological error. It is also possible that the defined condition is not defined well. The toolkit in ArcGIS to solve the topological errors is not very extensive. Some errors can be solved, but for many errors a more advanced toolkit is necessary. Not all the possible topological rules can be implemented. For instance the rule “POINT_OBJECT must not be in POLYGON” cannot be implemented. OBJECT-BASED VECTOR DATA MODEL – VISUAL BASIC The "Basic" part refers to the BASIC (Beginners All-Purpose Symbolic Instruction Code) language. Visual Basic evolved from the original BASIC language Contains several hundred statements, functions, and keywords, Relate directly to the Windows GUI The "Visual" part refers to the method used to create the graphical user interface (GUI). Pre-built objects are added to the screen Replacing all the lines of code needed to describe the appearance and location of interface elements. OBJECT-BASED VECTOR DATA MODEL – VISUAL BASIC APPLICATIONS VBA is the application edition of Microsoft's Visual Basic programming language. VBA can normally only run code from within a host application rather than as a standalone application. OBJECT-BASED VECTOR DATA MODELS - VBA VBA is the application edition of Microsoft's Visual Basic programming language. VBA can normally only run code from within a host application rather than as a standalone application. It can however be used to control one application from another using OLE (object linking and embedding) Automation (for example, automatically creating a Word report from Excel data, or embed objects from the ArcObjects library into a PowerPoint application). OBJECT-BASED VECTOR DATA MODEL APPLICATIONS USING THE VBA ENVIRONMENT © Vicki Drake, SMC 5 Spring 2008 MS Office: Word, Excel, PowerPoint, Access etc. Visio AutoCAD ArcGIS Coral Draw ENVIRONMENT IN ARCGIS Customize Dialog Box Visual Basic Editor VBA OBJECT-BASED VECTOR DATA MODEL – ARCGIS RESOURCES http://www.esri.com/software/arcgis/about/literature.html http://www.esri.com/software/arcgis/about/arcobjects.html http://edn.esri.com/index.cfm?fa=docLibrary.gateway OBJECT-BASED VECTOR DATA MODEL – ARC/OBJECTS ArcObjects are a set of computer objects specially designed for programming with ArcGIS applications ArcObjects include data frames, layers, features, tables, catographic symbols, points, lines, polygons, records, fields, and so forth OBJECT-BASED VECTOR DATA MODEL – ARC/OBJECTS ArcObjects are platform independent software components, written in C++, that provide services to support ArcGIS applications either on a desktop or on a Web server and typical client/server deployments. Supporting a number of unique ArcGIS products with specialized applications, ArcObjects is built for a multi-use scenario. OBJECT-BASED VECTOR DATA MODELS - SUMMARY The geodatabase data model eliminates the complexity of coordinating between the spatial and attribute components – reducing processing overhead. By storing spatial and attribute data in tables, geodatabases operate fully within a relational database environment and bring GIS together with other information technology applications. The geodatabase data model provides the foundation for the development of different geodatabases for different disciplines. © Vicki Drake, SMC Spring 2008 6