Geographic Information Systems Spatial Data Models and their Implementation Komal Kapoor Ajit Padukone Agenda • Spatial Data Models • Types of Spatial Data Models • Object Models • Types • Implementation • Operations • Field Models • Operations – Map Algebra • Raster Representation • Surface Models • Raster-based • Vector-based • GIS Libraries Models - What are they • A model is an artificial construction in which parts of a source domain are represented in a target domain. • The purpose of the model is to simplify and abstract away from the source domain. source: GIS: A Computing Perspective 2nd Edition, Worboys and Duckham Geospatial Information Models - Types 1) Object Models 2) Field Models 3) Surface Models source: Data Models in Commercial GIS Systems, Eric Hoel Object Models - Types 1) Spaghetti Model Simplest of the Object based data models. Geometric Representations do not have any explicit relationships. source: http://www.snowbirdnationals.com/weather.htm Spaghetti Model of Hurricane Data source: Data Models in Commercial GIS Systems, Eric Hoel Object Models - Types 2) Network Model One-dimensional collection of interconnected Point (Junctions) and Line (Edges) features. Facilitate modelling of constrained flow along edges and through junctions. source: Data Models in Commercial GIS Systems, Eric Hoel Object Models - Types A) Directed Network Models : Hydrological Networks source: www.riversystems.washington.edu/story/Amazon Object Models - Types B) Undirected Network Models: Transport Networks source: Assessing Spatial Aspects of School Location- Allocation in Copenhagen, Lasse MøllerJensen Object Models - Types 3) Topological Model Controls the Geometric relationships between features and maintain the geometric integrity. Represented in the form of Nodes, Arcs and Faces with explicit relationships between each other. source: http://spatialnews.geocomm.com/features/laserscan2/ source: Data Models in Commercial GIS Systems, Eric Hoel Object Models - Implementation The Open Geospatial Consortium, Inc.® (OGC) leads the development of standards for geospatial and location based services. The Simple Features Access Specifications define a standard Structured Query Language (SQL) schema that supports storage, retrieval, query and update of feature collections. The OGC Specifications define a data model for the spatial data. The basic primitives are Point, Curve and Surface. Also are defined other useful structures like MultiPoint, MultiLine, MultiPolygon, etc source: OpenGIS Implementation Specification for Geographic information - Simple feature access Object Models - Implementation Geometry Class Hierarchy source: OpenGIS Implementation Specification for Geographic information - Simple feature access Object Models - Operations Set Oriented Operations Operations Spaghetti Models Network Models Topological Models OGC Geometry Model equals Yes No Yes Yes subset of Yes No Yes Yes is empty Yes No Yes Yes member of Yes No Yes Yes disjoint from No No Yes Yes intersection Yes No Yes Yes union Yes No Yes Yes difference No No Yes Yes Object Models - Operations Topological Operations Operations Spaghetti Models Network Models Topological Models OGC Geometry Model boundary Yes No Yes Yes interior No No Yes Yes closure No No Yes Yes meets Yes No Yes Yes overlaps No No Yes Yes is inside No No Yes Yes covers No No Yes Yes connected No No Yes Yes components Yes No Yes Yes extremes No No Yes Yes is within No No Yes Yes Object Models - Operations Euclidean Operations Operations Spaghetti Models Network Models Topological Models OGC Geometry Model distance No Yes Yes Yes bearning/angle No No Yes Yes length No No Yes Yes area No No Yes yes perimeter Yes No Yes Yes centroid No No Yes Yes Field Based Models • Represent spatial variations of an attribute over a set of locations (spatial framework or support). • Spatial framework comprise tessellations which can be regular or irregular. Regular tessellations Souce : http://geosciences.tamuk.edu/~yu/web/L5312/lecture6.pdf Irregular tessellations : TIN Comparison of GRID and TIN TIN Advantages •ability to describe the surface at different level of resolution •efficiency in storing data •in many cases require visual inspection and Disadvantages manual control of the network Souce: http://www.ian-ko.com/resources/triangulated_irregular_network.htm GRID •easy to store and manipulate •easy integration with raster databases •inability to use various grid sizes to reflect areas of different complexity of relief. Map Algebra • Local o trigonometric, exponential, reclassification, selection, and statistical functions o E.g. mapping distances to categories ‘very close’, ‘close’, ‘far’, ‘very far’ (reclassification) o Syntax : sin(c:\data\inraster1) • Focal o Neighborhood operations : majority, maximum, sum, range, slope calculation etc. o Types of Neighborhoods : o Syntax : focalsum([inlayer1], rectangle, 3, 3) • Zonal o computing zonal statistics such as sum, mean, maximum etc. o Use for calculation of raster areas o Syntax : zonalmean([inlayer1], c:\spatial\inraster2) • Global o generation of Euclidean and cost distance metrics o Syntax : eucdistance(e:\data2\inrastersource) • Overlays o Uses multiple fields e.g. density o Syntax: mean([inlayer1], [inlayer2], [inlayer3]) Souce: ArchGIS 9.2 Desktop Help Raster Data Representation • Space is defined using equally sized cells arranged in rows and columns • Can comprise of single or multiple bands Source: ArchGIS 9.2 Desktop Help Each band represents a segment of the electromagnetic spectrum collected by a sensor. Examples of Raster • • • • MrSID A compression technique especially for maintaining the quality of large images. Allows for a high-compression ratio and fast access to large amounts of data at any scale. ESRI GRID A proprietary ESRI format that supports 32-bit integer and 32-bit floatingpoint raster grids. ERDAS Imagine Produced using IMAGINE image processing software created by ERDAS. IMAGINE files can store both continuous and discrete, single-band and multiband data. TIFF(Tagged Image File Format) Widespread use in the desktop publishing world. It serves as an interface to several scanners and graphic arts packages. TIFF supports black-andwhite, grayscale, pseudo color, and true color images, all of which can be stored in a compressed or decompressed format. Souce: ArchGIS 9.2 Desktop Help Raster Catalogs • • • Possible storage methods for multiple raster data: o store each raster dataset individually o mosaic them into one large raster dataset o store them as members of a raster catalog Raster catalogs can be used to display adjacent or overlapping raster's without having to mosaic them together into one large file. Each raster maintains it own properties: multiple formats, data types, file sizes, and coordinate systems. Used for storing massive image repositories, retaining overlaps between datasets, managing time series data, and when differences among adjoining images prevent mosaicking. Souce: ArchGIS 9.2 Desktop Help Source: ArchGIS 9.2 Desktop Help Surface Models (Digital Evaluation Models) • Used to represent the topography of the Earth • Built using remote sensing data or survey data • Some applications : o Creating relief maps o Rendering 3D visualizations o Modeling water flow o Rectification of aerial photography o Terrain analyses in geomorphology. Souce: Data Models in Commercial GIS Systems, E. Hoel, page 215-219. Surface Models (Contd…) • Raster-based • E.g. USGS DEM developed by the United States Geological Survey • Digital Terrain Elevation Data (DTED) developed by the National Imagery and Mapping Agency (NIMA) in support of military applications Source: http://www.esi.utexas.edu/gk12/workshops/gis/docs/elevation.ppt. Souce: Data Models in Commercial GIS Systems, E. Hoel, page 215-219. Surface Models (Contd…) • Vector-based o TINs are used to partition the geographic space • Advantages of TIN • Facilitates a very close approximation of the surface • Input vector data is incorporated directly in the model which can be queried as well. • Preserves proximity based connectivity. Hence interpolation neighborhoods are always comprised of the closest input data/samples. Souce: Data Models in Commercial GIS Systems, E. Hoel, page 215-219. Source:http://www.geog.ucsb.edu/~good/papers/451.pdf Raster and Vector Models 3D Terrain Modelling Inside Channel: Vector Source: http://www.ce.utexas.edu/stu/tateec Outside Channel: Raster Raster and Vector Models Source: http://www.ce.utexas.edu/stu/tateec GIS Libraries Open Source GIS libraries providebasic functionality for certain aspects and tasks of GIS Software. Most of them follow OGC's specifications regarding GIS Data Models and Operations. Typically used for graphics, GIS format support and conversion, reprojection, computational geometry, topological operations. Published under the MIT or LGPL licence. ( Can be used for commercial purposes without releasing source code. ) Source: Open Source GIS Libraries, Andreas Neumann, Marco Hugentobler GIS Libraries GDAL - Geospatial Data Abstraction Library - library to access raster data formats. - presents a single abstraction model for all formats to an application - written in C++ - Data Structures consist of a Dataset and a RasterBand. - Dataset consists Georeferencing data. - RasterBand consists the actual raster data. - Used by : Grass GIS Source: Open Source GIS Libraries, Andreas Neumann, Marco Hugentobler Google Earth GIS Libraries OGR - part of the GDAL package. - deals with vector data formats like GML, ESRI shapefiles, GRASS and POSTgreSQL. - Data Structures include Layer, Feature and Geometry. - Feature contains the attribute values and reference to feature geometry. GIS Libraries JTS / JCS - Java Topological Suite / Java Conflation Suite. - java libraries for 2D spatial functions. - supports the various spatial analysis methods and topological operations. - JCS is set of interactive tools for conflating and cleaning vector datasets. - used for coverage cleaning, coverage alignment and road network matching. - Projects using JTS : GeoServer, GeoTools, gvSIG, OpenJUMP, uDig. - Ported to C++ as GEOS - Ported to .NET as .NET Topology Suite. Source: Open Source GIS Libraries, Andreas Neumann, Marco Hugentobler GIS Libraries GPSBabel - cross-platform, free software to transfer routes, tracks, and waypoint data to and from consumer GPS units, and to convert between over a hundred types of GPS data formats. - useful because GPS data has many proprietary formats. - used by many collaborators to OpenStreetMap. - also popular in "Geocaching" communities. Source: Open Source GIS Libraries, Andreas Neumann, Marco Hugentobler Questions?