1 / 28

Spatial Concepts and Data Models

Spatial Concepts and Data Models. Reading: Shekhar & Chawla Chapter 2 November 22, 2005. Outlines. This chapter introduces spatial data model from Spatial ORDBMS perspectives Main concern is to define spatial data types and spatial operators in DBMS level

gabby
Télécharger la présentation

Spatial Concepts and Data Models

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Spatial Concepts and Data Models Reading: Shekhar & Chawla Chapter 2 November 22, 2005

  2. Outlines • This chapter introduces spatial data model from Spatial ORDBMS perspectives • Main concern is to define spatial data types and spatial operators in DBMS level • You’re encouraged to compare this with GIS perspectives where file-system is prevalent • Models of spatial information • Object vs. field view define different spatial data types • Operations on different spatial data types • Database design • Conceptual DB design tools can be extended to accommodate into spatial concepts (consensus is still lacking in this regard)

  3. Part I. Models of spatial information

  4. Two common views • Object view measures space • Forest stands are seen as three polygon • Field view measures attribute • Forest stands are seen as mathematical function given spatial framework

  5. Spatial object types in OGIS Data Model http://www.opengis.org/techno/specs.htm

  6. Exercise

  7. Operations on spatial data type • What are the examples of operations on different data type (e.g. string, number)? • Let’s say you define spatial data type, then what kind of operations would you build in your SDBMS? • Introducing the typology of operations on different spatial data types (field and object)…

  8. Types of field operations • Local: value of the new field at a given location in the spatial frame-work depends only on the value of the input field at that location(e.g. Thresholding) • Focal:value of the resulting field at a given location depends on the values that the input field assumes in a small neighborhood of the location(e.g. Gradient) • Zonal:Zonal operations are naturally associated with aggregate operators or the integration function. An operation that calculates the average height of the trees for each species is a zonal operation. Worboy M, 1995, GIS: A Computing Perspectives

  9. Exercise • Classify following operations on elevation field • Identify peaks (points higher than its neighbors) • Identify mountain ranges (elevation over 2000 feet) • Determine average elevation of a set of river basins

  10. Natural language that describes relationships between spatial objects • The relationships between you (or your house) and UW campus can be described differently • I’m passing by U-Village in the left hand side • I live north of UW campus • My house is 4 miles from UW campus • Can be seen as operations between point (you) and polygon (UW Campus) • Q. Which of the above would you find it easier to identify? • Q. how our brain structures geographic space • We are terrible in estimating distances, maybe only slightly better in retaining direction and orientation, but fairly good when it comes to remembering topological relationships (from the text p. 11) • Q. Which of the above measures topological relationship? • Q. Which of the above reveals metric information?

  11. Topology and metrics • Topology • properties of geometric figures that are invariant under continuous deformation (this kind of spatial relationship will remain the same after projection or transformation which is common in GIS) • E.g. adjacency, containment, and overlap • Learned by humans at a very early age • Metric • E.g. size, shape, distance, or direction • Refine, rather than define, spatial relations • Can be expressed either quantitative or qualitatively • E.g. 10 degree, NW, North of, Near Mark DM, 1999, Spatial Representation: A Cognitive View. In Maguire, D. J., Goodchild, M. F., Rhind, D. W., and Longley, P. (editors) Geographical Information Systems: Principles and Applications, 2nd edition, v. 1, pp. 81-89.

  12. Types of object operations • Topological • Inside (point, region) • Touches (region, region) • Overlap (region, region) • Metric • Euclidean-distance (point, point) • Direction (point, point) • Length (arc) • Area (region)

  13. Egenhofer’s 9-intersection model • Many spatial relations between objects are topological in nature • Many spatial objects take the form of polygon (or region) at some level • What is the topological relationship between polygon object A and polygon object B? • Can we formalize them?

  14. Green is A interior Red is boundary of A Blue –(Green + Red) is A exterior • Interior, boundary, exterior • Let A be an object in a “Universe” U. U A

  15. 9 intersections • A and B are spatial objects in a two dimensional plane. • intersections between interior, boundary, exterior of A, B • Can be arranged as a 3 by 3 matrix • Matrix element take a value of 0 (false) or 1 (true).

  16. 9-intersection model can be supported in SQL3 • So you can do the following queries in SDBMS: SELECT Parcel.name FROM Parcel, SoilUnit WHERE Within(Parcel.geo, SoilUnit.geo) AND SoilUnit.category = 4; • Commercial SDBMS includes topological operators in their module • Oracle Spatial • Informix Spatial DataBlade http://publibfp.boulder.ibm.com/epubs/pdf/9119.pdf

  17. Part II. DB Design Extending conceptual DB design tools with Spatial Concepts

  18. Example: ERD for State-park database Spatial entity is represented with multi-valued attributes (e.g. Lineid, Pointid) Spatial attributes are simply treated as any other nonspatial attributes

  19. Pictogram – spatial object type • Basic shape

  20. Pictogram – spatial object type • Multishape example: • Hawaiian islands

  21. Pictogram – spatial object type • Derived shape example • City center point from boundary polygon • The shape of the US can be derived from the US from the shapes of its state boundaries

  22. Pictogram – spatial object type • Alternate shape example: • A road is represented as a polygon for construction or as a line for navigation • A river can be represented as a polygon or a line depending on the scale (multiple representation)

  23. ERD with pictogram As spatial data type (point, line, polygon), and spatial operations (within, crosses) are defined, spatial semantics are captured better

  24. UML with pictogram

  25. Exercise • Draw the ERD or UML of your project database with pictogram • Make sure to indicate specifics of spatial object type that conform to OGIS spec. • (1) basic shape • (2) multishape if any • (3) derived shape if any • (4) alternate shape if any

  26. Discussions • As most of you use relational database, our ability to extend relational database to spatial concept is limited. In other words, you can’t define spatial data type or spatial functions (or operators) • How would you store field value (e.g. elevation) in relational database? • Can you link your table to raster image? • Can you write the SQL that returns the distance between two points? • Can you write the SQL that returns whether point A is within region B? Hint: can be done if spatial attribute is treated as nonspatial attribute, also use derived attribute

  27. P4 • Populate your database • Use Select * from tablename • Turn in the printout of results of select statement (or capture images) • Indicate spatial data type of two spatial entities using pictogram (hand-written) over your final ERD or UML • Indicate spatial reference system of your database

More Related