TIN Support in an Open Source Spatial Database

TIN Support in an Open Source Spatial Database

TIN support in an open source spatial database Ali Mohammed Al-Salami March, 2009 TIN support in an open source spatial database by Ali Mohammed Al-Salami Thesis submitted to the International Institute for Geo-information Science and Earth Observation in partial fulfilment of the requirements for the degree in Master of Science in GeoInformatics. Degree Assessment Board Thesis advisor Dr. Ir. R. A. de By Dr. I. Ivanova Thesis examiners Prof. Dr. M.J. Kraak Dr. Ir. M. van Keulen INTERNATIONAL INSTITUTE FOR GEO-INFORMATION SCIENCE AND EARTH OBSERVATION ENSCHEDE, THE NETHERLANDS Disclaimer This document describes work undertaken as part of a programme of study at the International Institute for Geo-information Science and Earth Observation (ITC). All views and opinions expressed therein remain the sole responsibility of the author, and do not necessarily represent those of the institute. Contents List of Tables v List of Figures vii Abstract ix Acknowledgements xi 1 Introduction 1 1.1 Motivation and problem statement ................. 1 1.1.1 Motivation ........................... 1 1.1.2 Research problem ....................... 2 1.2 Research identification ........................ 3 1.2.1 Research objectives ...................... 3 1.2.2 Research questions ...................... 4 1.2.3 Innovation aimed at . .................. 4 1.3 Method adopted ............................ 4 1.4 Thesis outline ............................. 5 2 TIN vision and definition of ADT for TIN 7 2.1 Standardizations ........................... 7 2.1.1 Abstract semantics from ISO ................ 7 2.1.2 OpenGIS Implementation Specification .......... 10 2.2 Definition of Abstract Data Type for TIN ............. 11 2.2.1 The Type System ....................... 12 2.2.2 TIN Operations ........................ 20 2.2.3 Other Functions ........................ 36 3 TIN Implementation Alternatives 37 3.1 Existing TIN data structures . ................. 38 3.1.1 Serialized object approach .................. 38 3.1.2 Tabular and multiple row object approaches ....... 38 3.2 Examples of existing libraries . ................. 43 3.2.1 The CGAL library ....................... 43 3.2.2 The TerraLib library . .................. 45 3.3 A desired TIN data structure . ................. 47 3.3.1 Evaluation of the available TIN data structures ..... 47 i Contents 3.3.2 Tiling TIN data structure . ................ 48 4 TIN Implementation 53 4.1 Introduction .............................. 53 4.2 Implementation requirements .................... 55 4.2.1 Platform and working environment ............ 55 4.2.2 External sources of TIN data set and TIN builder .... 56 4.3 TIN internal data structure implementation ........... 60 4.3.1 Vertex data type ........................ 60 4.3.2 Triangle data type ...................... 61 4.4 TIN Loader implementation ..................... 61 4.4.1 Input and output analysis . ................. 61 4.4.2 TIN Loader design ...................... 63 4.4.3 Implementation algorithms ................. 68 4.5 Function implementations ...................... 74 4.5.1 TIN functions scope ...................... 75 4.5.2 TIN functions algorithms implementation ......... 75 5 Discussions, Conclusions and Recommendations 79 5.1 Discussion ............................... 79 5.1.1 Research questions ...................... 79 5.1.2 Advantages and features . ................. 81 5.1.3 Limitations and difficulties ................. 82 5.2 Conclusions .............................. 83 5.3 Future improvements ......................... 84 A Preparation phase 85 A.1 Building the intermediate temporary database .......... 85 A.2 Reading data from the external TIN ................ 86 A.3 Constructing the required geometries for the ‘geom’ attributes probable in the corresponding tables ................ 89 A.4 Creating spatial indexes on the tables to help speedup the spatial search in PostgreSQL/PostGIS . ................ 91 A.5 Running the VACUUM ANALYZE command ........... 92 A.6 Maintaining the reference positioning values for neighbor trian- gles, for CGAL files only ....................... 92 A.7 Populating tmp tile table with the bounding boxes ....... 92 A.8 Determining which triangle and vertex belongs to which tile . 95 A.9 Computing the geometry in tmp tile table, as a true polygonal boundary ................................ 95 A.10 Finding the value of the new sequence of triangles and vertices and populate them into the corresponding tables ......... 96 A.11 For OFF files only, compute the references of neighbor triangles 97 A.12 Updating the reference positioning values of the incident vertices and neighbor triangles, for all tiles, for each triangle ....... 98 ii Contents B Populating TIN table 101 B.1 Create an object of type vertex[] . ................. 103 B.2 Create an object of type triangle[] . ................. 103 B.3 Populate TIN table .......................... 104 B.4 TIN loader ............................... 104 B.5 TIN functions ............................. 114 C Data type 131 Bibliography 133 iii Contents iv List of Tables 2.1 Signature for Stack Operations (after [Gut93])¨ .......... 13 2.2 Signature Describing the Type System ............... 14 2.3 Classes of Operations (after [GBE+00]) .............. 22 2.4 Classification of Types (after [GBE+00]) .............. 22 2.5 Unary Predicates (after [GBE+00]) ................. 24 2.6 Binary Predicates(after [GBE+00, Ope99]) ............ 25 2.7 Set Operations(after [GBE+00]) ................... 26 2.8 Aggregate Operations (after [GBE+00]) .............. 32 2.9 Numeric Operations (after [GBE+00]) ............... 34 2.10 Other operations ............................ 36 v List of Tables vi List of Figures 1.1 The adopted method based on [JBR99, EN07, Gut93,¨ SB06] . 5 2.1 Polygonal surface [Int02] ....................... 8 2.2 TIN construction [Int02] ....................... 9 2.3 Geometry class hierarchy [Ope06] ................. 10 2.4 Signature concept ........................... 13 3.1 A vertex-based TIN structure (1) [after [GK90]] ......... 39 3.2 A vertex-based TIN structure (2) [after [McK87]] ......... 40 3.3 Triangle-based TIN structure . ................. 41 3.4 A combination of the triangle-based and the vertex-based TIN structure [after [McK87]] ....................... 42 3.5 An edge-based TIN structure . ................. 43 3.6 CGAL’s TIN structure ......................... 44 3.7 Vertex and face numbering[after [CGA09] ............. 45 3.8 Tiling TIN data structure ...................... 50 4.1 TIN-in-database life cycle ...................... 53 4.2 Example of a CGAL file ........................ 57 4.3 Example of a triangle-based TIN data structure ......... 60 4.4 Temporarily intermediate database design ............ 64 4.5 MultiPolygon geometry type ..................... 65 vii List of Figures viii Abstract Triangulated Irregular Network (TIN) is commonly used in Geographic Information Systems (GIS) to represent any continuous field and is one of the standard implementation techniques for digital terrain models. How- ever, there are use-case needs for TIN-in-database in the GIS communities. Such needs like: one does not have to recompute a TIN repeatedly. There is a need for a library of storage and manipulation functions to be designed, developed and implemented in an open source spatial database allowing us to routinely use TIN with other feature data sets and making use of the offered capabilities of spatial databases. Therefore, it is of great value to implement such library. The main three objectives of this project are to: define a proper ADT for TIN; define alternative implementations of such ADT; and implement the type system and the functions of TIN. The first objective is achieved using the second-order-signature specification framework, the ISO abstract spa- tial schema specification, and the OGC abstract and implementation spec- ifications. The second objective is achieved by describing, analyzing, and adopting the possible approaches based on functions applicability, feasibil- ity of the desired platform and environment, and bridging the definition of the ADT with selected approach. The third objective is accomplished using the adopted implementation TIN tiling approach, considering implementa- tion platform, PL/pgSQL for implementation leading to a type system and TIN interpolation functions implemented in PostgreSQL/PostGIS. A library of TIN storage and manipulation functions has been devel- oped allowing us to ‘interoperably’ use it along with other spatial data sets in an open source spatial database while making use of the capabilities, scalability, security, and performance of such database and addressing real use-case needs of TIN-in-database. Keywords TIN, ADT, open source spatial database, GIS, ISO, OGC, PostgreSQL/PostGIS ix Abstract x Acknowledgements I would like to express my deep and sincere gratitude to my supervisors Dr. Ir. R. A. de By and Dr. I. Ivanova for their detailed and constructive comments, and for their important support throughout this work. I would like to thank the almighty God, for it is under his grace that we live, learn and flourish. Lastly, and most importantly, I wish to thank my family. They supported me, and loved me. To them I dedicate this thesis. xi Acknowledgements xii Chapter 1 Introduction 1.1 Motivation and problem statement 1.1.1 Motivation A Triangulated Irregular Network (TIN) is a vector-based data structure com- monly used in GIS software to represent any continuous field. For example, it is one of the standard implementation

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    151 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us