GED 554
Transcription
GED 554
GED 554 Topology (for geometry) Working with Data Tables, Databases (for attributes) April 12, 2013 Supported Data Types • ArcGIS supports three representations of geographic data. – Vector data for representing features – Raster data for images – Tabular data Spatial and attribute data form a geographic database… Features can be categorized into three basic classes… points lines polygons Geographic Feature Data Formats • Shapefile – introduced with ArcView (old version) – non-topological vector data format. – much GIS data in Shapefile format. – limited analysis capabilities due to lack of topology • Geodatabase – introduced in ArcInfo 8 – Object-oriented model – can characterize features more naturally by defining object types, topological, spatial and general relationships, and interactions. – Geodatabase features can be stored in a single database. – Create custom features in addition to points, lines, polygons – Brings physical model closer to logical model. Shapefile • Single feature class -can only contain one feature class • Attributes stored in dBASE table: *.dbf e.g. soils.dbf • Each shapefile consists of at least three files: *.shp, *.shx,and *.dbf. • If the shapefile has a defined coordinate system then the spatial reference information will be stored in a *.prj file • In addition to the above four files other files may be created and/or used by ArcGIS as needed Personel Geodatabase (single user) • Implemented as a Microsoft Access database (*.mdb file) by using MS jet engine which is installed with ArcGIS. MS access is not needed. • Can contain multiple feature classes • Generally used for personal or small work-group use. • Can handle small to moderately sized datasets (max. size is 2.0 GB) • Supports topology Feature Class Group objects into homogeneous types Create point, line, or area feature classes A collection of geographic objects with the same geometry (point, line, polygon) that share the same attributes. Feature Dataset • must have same coordinate system • should group feature classes based on topology Feature Feature Class Road Lines Boundaries Polygons Pole Points Label & Text Annotation Feature Dataset Set of feature classes that share the same spatial reference Linking Features and Attributes • Feature classes have an associated table • Each feature has a record in the table • A unique identifier links feature and attributes ArcCatalog is the Principal User Interface Used to Define and Manage the Geodatabase Relationship between geometries Topology is the arrangement that defines how point, line, and polygon features share coincident geometry. Topology • Topology rules define the permissible spatial relationships between features. • For example, the rule Must not overlap is used to manage the integrity of features in the same feature class. If two features overlap, the overlapping geometries are displayed in red (such as shown by the overlapping red area in the adjacent polygons and the linear segment of the two lines below). •Parcels cannot overlap. Adjacent parcels have shared boundaries. •Stream lines cannot overlap and must connect to one another at their endpoints. •Adjacent counties have shared edges. Counties must completely cover cities. •Road centerlines must connect at their endpoints. Why do we need topology in GIS? • Enforce geometric rules for spatial representation and maintain data integrity • Reduce data redundancy • Improve data access/update efficiency GIS=Lots of Tabular Data Working with tabular data • Table Structure – Records/rows and fields/columns – Columns can store number, text or date data types – User able to assign column names for additional attributes Fields are defined: • Name –attribute (column heading) • Field Type –number (long, short, float, double), text (“string”), or date • Length –no. of characters in text • Precision –no. of digits used to store numbers • Scale –no. of digits to right of decimal point Fields types in ArcGIS Associating Tables to Feature Classes • Can store attributes in feature table or separate table • Associate tables with common column key values – Primary keys have unique values – Primary keys can exist as Foreign keys in other tables When working with data tables • Goals: – Maximize flexibility for sorting, searching – Efficient storage; eliminate redundancy – Secure entry mechanisms – Rapid retrieval • Solution: – Database Management System (DBMS) A database is an organized collection of data. A database model is a type of data model that determines the logical structure of a database and fundamentally determines in which manner data can be stored, organized, and manipulated. The most popular example of a database model is the relational model, which uses a table-based format. F: Two-dimensional array of data elements H: Tree-like structure N: Many-to-many relationships in a tree-like structure R: Multiple tables which have “key” identifiers to combine data OO:A particular application can be defined directly in the database A DBMS provides: • Accuracy -reduce errors during entry by use of established rules, templates • Efficiency-rapid access & retrieval, no redundancy GIS attribute data models • Hierarchical–pre-1980 • Relational–1980’s, 1990’s; still dominant today • Object-oriented–late ’90’s; newest, still undergoing R&D Hierarchical Structure • File address for storage and retrieval is a linear path, e.g. C:\ESRI\ESRIDATA\CANADA\cities.shp Relational Database Structure • Consists of “relations” (tables) with multiple attributes (columns) per record • Every record (row) has a unique identifier (marker or key attribute) – Key is the glue between files that can be used to extract and/or assemble records and attributes Relational Database advantages • Data stored in separate files – Easy update, editing, searching without affecting or using all data • Flexibility – Using key(s), can extract and assemble records and attributes to form new tables – Subsets of database can be queried by standard means -SQL SQL • The most common query language used with the relational model is the Structured Query Language (SQL) • A special-purpose programming language designed for managing data held in a relational database management systems (RDBMS) Operator Description = Equal <> or != Not equal > Greater than < Less than >= Greater than or equal <= Less than or equal BETWEEN Between an inclusive range LIKE Search for a pattern IN To specify multiple possible values for a column Relational Database Structure: Properties of Relations • • • How many “A”objects are related to “B”objects Four types of cardinality – One-One – One-Many – Many-Many – Many-One User must know cardinality before connecting tables Table Association and Table Join • Table association – Attributes about a feature can be stored • Feature class table (Feature class) • Separate table (Object class) – Associate tables with common column (key) values • Primary keys: Common field on original table • Foreign keys: Common field on destination table • Table join – Merge two tables together into one table logically or physically (in ArcMap). GISC 6382 Applied GIS UT-Dallas Briggs 33 Connecting Tables with Joins • • • • Appears as a physical merging of two tables Works with one-to-one or many-to-one relationships Can be created either in ArcMap or ArcToolbox Edits can only be made to the columns of the destination table –to edit columns in the source or joined table, you must add it as it’s own data table to the ArcMap session Connecting Tables with Relationship Classes • Tables are virtually linked, not physically connected • Strengths: – No new feature class created – Once created the connection is active until removed – Dynamic association -can see changes to parent tables – Can edit, query, & symbolize the data in either table – User has more flexible cardinality associations available • Define the link in ArcCatalog • Use the relationship in ArcMap Geodatabase Elements • Objects & Object classes • Features & Feature classes • Feature datasets • Spatial references • Domains • Subtypes • Relationships & Relationship classes • Geometric networks • Labels and Annotation Objects & Object Classes • Geodatabases organize geographic data into a hierarchy of data objects. • Objects are instances of an object class that have properties and behavior. • Objects can be related to other objects via relationships • Objects have unique system identifiers (OID) • Object classes are tables in a geodatabase storing non-spatial data (e.g., Parcel owners) • Objects in an object class have the same – Properties - stored in the table as attributes – Behavior - implemented as a component A row stores an Object Object Classes (tables) Pump Table OID 175 Pump Type Axial Flow Inlet Size 24” ……. ……. … ………… ………… ……. Features and Feature Classes • Features are objects with required shape (Points, Multipoints, Lines & Polygons) that represent a real world object in a layer on a map. • Features classes are collections of features with same type of feature geometry and attributes. • A feature class is also an object class which stores spatial objects (features) (e.g., Parcels). • All the features in a feature class are in the same spatial reference. • Feature classes which store topological features must be contained within a feature dataset to ensure a common spatial reference. Feature Classes A row stores feature Feature Class Table Lateral Water Lines OID 583 … Shape X,Y,Z,M (BLOB) ………… Type Domestic ……. ……. ………… ……. BLOB: Binary Large Object Block Feature Datasets • Containers for feature classes • Shared spatial reference • May also contain – relationship classes – geometric networks – Annotations Annotation is one option in ArcGIS for storing text to place on your maps. Label is the main alternative to annotation. A label's text and position are generated dynamically according to a set of placement rules. Building a Geodatabase Design geodatabase • Building a geodatabase – Designing the geodatabase • (Think before your create) Create a new geodatabase – Creating a new geodatabase • (Name and location only) – Defining the geodatabase structure Defining GDB structure • (Schema and data) – Entering spatial data • (Loading or automation) Geodatabase Entering spatial data – Define additional properties • (Validataion, relationships, networks) Define additional properties Designing a Geodatabase • Conceptual Plan: Current and future needs – – – – – Data contents Coordinate system Data validation and modification rules Relationships among objects Custom objects • Logical Design – What needs to store (Not how to store) Creating a New Geodatabase • Create a new geodatabase using ArcCatalog – Create new – Rename default name GISC 6382 Applied GIS UT-Dallas Briggs 44 • Exercise: – Topology – Join • GIS Take-Home (Join/Relate) by email • Kandilli Campus Tour (April 26 Friday at 2:30 pm) – Private American High School (Robert College) – Disaster Preparedness Education Unit (Eq. Simulation) – National Eq. Mon. Center – Museum (Historical Equipments) – Astronomy – Geodesy • Seminar by ESRI Turkey Firm (İşlem) (April 29 Monday at 9.30 am) at Demir Demirgil Hall/South Campus)