ISPRS Book Series 12 ISPRS Book Series in Photogrammetry, Remote Sensing and Spatial Information Sciences Book Series Editor: Zhilin Li Volume 12 Spatial Context Many disciplines are concerned with manipulating geometric (or spatial) objects in the computer – such as geology, cartography, computer aided design (CAD), etc. – and each of these have developed their own data structures and techniques, often independently. Nevertheless, in many cases the object types and the spatial queries are similar, and this book attempts to find a common theme. S The book starts with some of the basics of manipulating coordinate representations so that the resulting p object descriptions may be usefully combined and queried. The first chapter should be of value to a research students in fields with limited prerequisites in mathematics and computing. ti a l The book then considers the concepts necessary to express the spatial relationships between both 2D C and 3D entities, whether points, lines, polygons or polyhedra, so that they may be queried, grouped o n or combined. A unifying theme is a discussion of the various types of boundaries between regions of t space, based on the Voronoi diagram and its dual, the Delaunay triangulation, and various available e x static, dynamic and kinetic algorithms. Applications, including surface interpolation, crusts and skeletons, t contour and watershed handling, scanned map processing and solid line-work for urban mapping, are then described: this leads to the Unified Spatial Model for 2D mapping and GIS. The last section examines 3D space – both simple shell models for building exteriors as well as true 3D, where volumetric elements may be defined, such as rooms and corridors. Shell models require some introduction to basic CAD structures, and solid 3D requires advanced edge-based data structures. Both of these application areas lead to straightforward modelling techniques and emphasize the moral of this book: the spatial dual is the context. Example application areas described include geology, geography, Spatial Context forestry, surveying, cosmology, CAD – and many others. An Introduction to Fundamental Computer Algorithms for Spatial Analysis G o ld Christopher Gold an informa business SPATIALCONTEXT:ANINTRODUCTIONTOFUNDAMENTAL COMPUTERALGORITHMSFORSPATIALANALYSIS International Society for Photogrammetry and Remote Sensing (ISPRS) Book Series ISSN: 1572-3348 Book Series Editor Zhilin Li DepartmentofLandSurveyingandGeo-Informatics TheHongKingPolytechnicUniversity HongKong,P.R.China Spatial Context: An Introduction to Fundamental Computer Algorithms for Spatial Analysis Christopher M. Gold SouthwestJiaotongUniversity,Chengdu,ChinaandLIESMARS,WuhanUniversity, Wuhan,China CRCPress/BalkemaisanimprintoftheTaylor&FrancisGroup,aninformabusiness ©2016ISPRS TypesetbyMPSLimited,Chennai,India PrintedandboundinGreatBritainbyCPIGroup(UK)Ltd,Croydon,CR04YY Allrightsreserved.Nopartofthispublicationortheinformationcontainedhereinmaybe reproduced,storedinaretrievalsystem,ortransmittedinanyformorbyanymeans, electronic,mechanical,byphotocopying,recordingorotherwise,withoutwrittenprior permissionfromthepublisher. Althoughallcareistakentoensureintegrityandthequalityofthispublicationandthe informationherein,noresponsibilityisassumedbythepublishersnortheauthorforany damagetothepropertyorpersonsasaresultofoperationoruseofthispublication and/ortheinformationcontainedherein. LibraryofCongressCataloging-in-PublicationData Names:Gold,Chris,1944–editor. Title:Spatialcontext:anintroductiontofundamentalcomputeralgorithms forspatialanalysis/editor,ChristopherM.Gold,UniversityofSouth Wales,Cardiff,UK. Description:London,UK:CRCPress/BalkemaisanimprintoftheTaylor& FrancisGroup,anInformabusiness,[2016]|Series:InternationalSociety ForPhotogrammetryandRemoteSensing(ISPRS)bookseries;8|Includes bibliographicalreferencesandindex. Identifiers:LCCN2016010598(print)|LCCN2016016489(ebook)|ISBN 9781138029637(hardcover:alk.paper)|ISBN9781498779104(eBooksPDF)| ISBN9781498779104(ebook) Subjects:LCSH:Geospatialdata.|Geographicinformationsystems—Mathematics.| Computeralgorithms.|Algebras,Linear. Classification:LCCG70.217.G46S632016(print)|LCCG70.217.G46(ebook)| DDC910.285—dc23 LCrecordavailableathttps://lccn.loc.gov/2016010598 Publishedby: CRCPress/Balkema P.O.Box11320,2301EHLeiden,TheNetherlands e-mail:[email protected] www.crcpress.com–www.taylorandfrancis.com ISBN:978-1-138-02963-7(Hbk) ISBN:978-1-4987-7910-4(eBookPDF) SpatialContext:AnIntroductiontoFundamentalComputerAlgorithmsforSpatialAnalysis–Gold ©2016Taylor&FrancisGroup,London,ISBN978-1-138-02963-7 Table of contents Preface ix Acknowledgements xi Introduction xiii Chapter1 Preliminaries 1 1.1 Howtolivewithcoordinates 1 1.1.1 Vectors,geometry 1 1.1.2 Simplevectoralgebra 1 1.1.3 CCWpredicates(2D) 6 1.1.4 Sidedness,barycentriccoordinates 8 1.1.5 Area,volume,intersectioncalculations 12 1.1.6 3Dsidednessandintersection 14 1.1.7 Computergraphics 16 1.2 Graphs 22 1.2.1 Graphs,overview:Planargraphs,duality 22 1.2.2 Graphtraversal 23 1.3 Dominance 28 1.3.1 Dominance,Voronoi,circletests,parabolicuplifting 28 1.3.2 Incrementalalgorithm 33 1.3.3 TheVD/DTonthesphere 36 Chapter2 Modelsofspace 41 2.1 Modelsofspace:Introduction 41 2.2 Thecosmicspatialmodel 42 2.3 Backtoearth 47 2.3.1 Firsttherewerefields 47 2.3.2 Thentherewerethings 47 2.3.3 Thentherewereconnectedthings 47 2.3.4 Thentherewerecontinuousthings 48 2.3.5 Thenthereweresidednessanddirection 48 2.3.6 Boundaries:Two-sidednessandVoronoicells 48 2.3.7 Duality 49 2.3.8 Coordinates 50 2.3.9 Theobserver 50 2.3.10 Thecomputer 50 2.4 Spatialdatastructures 51 2.5 PANgraphsandquad-edges 51 2.6 Introductiontogeographicboundaries 56 Chapter3 Points 59 3.1 Single-cellanalysis:Labelledandunlabelled 59 3.1.1 Context 60 3.1.2 Nearest-pointinterpolation 60 3.1.3 Labelledskeletons 61 v 3.2 Triangulation–TINmodelling 62 3.3 Passiveinterpolation:Theproblem 64 3.4 Thedynamicalgorithm:Pointdeletion 69 3.5 Invasivemethods:Sibsoninterpolation 71 3.6 Postscript:Accuracy–TheKrigingapproach 75 3.7 Movingpoints:Thekineticalgorithm 78 3.7.1 Free-Lagrangeflowmodelling 82 3.7.2 KineticGIS–ThemarineGIS 85 Chapter4 Boundaries 91 4.1 ClassI:Linesofpoints 91 4.1.1 Crustandskeletontest 91 4.1.2 Polygon‘shapes’ 97 4.1.3 Contours–skeletonenrichment 98 4.1.4 Contours–skeletonpointelevation 101 4.1.5 Watersheds 104 4.1.6 Interpolatingfromcontours:Sibsoninterpolation 108 4.1.7 Slopes:Theforgottenneed 111 4.1.8 Runoffmodelling 115 4.2 ClassII:Clusterboundaries,or‘fat’voidboundaries 118 4.2.1 Clusters 118 4.3 ClassIII:Double-pointboundaries 121 4.3.1 Labelledskeleton–mapdigitizing 121 4.3.2 Scannedmapprocessing 126 4.3.3 HierarchicalVD–Spatialindexing 128 4.4 ClassIV:Solidlinesegments–half-linepairs 132 4.4.1 Complexobjects 132 4.4.2 TheconstrainedDTandthelinesegmentVD 133 4.4.3 BasicquerieswiththelinesegmentVD 141 4.4.4 Dynamicmappartitioning 142 4.4.5 Thekineticlinesegmentmodelandmapupdating 144 Chapter5 2DGIS 149 5.1 Spatialdecisionsupportsystems 149 5.2 Theunifiedspatialmodel 150 5.2.1 Discreteobjects:points 150 5.2.2 Impermeablelinearfeatures 150 5.2.3 Skeleton:groupedcontexts 151 5.2.4 Buffer:clippedcontexts 152 5.2.5 Overlays 152 5.2.6 Networks 154 5.2.7 Combiningthemall 155 5.2.8 Mobilepoints 155 5.3 OtherVoronoitechniques 157 Chapter6 3DGIS 161 6.1 3Dboundaryfaces 161 6.1.1 EmbeddedSpaces 161 6.1.2 CADandQuad-Edges 162 6.1.3 TINmodelsandbuildingextrusion 167 6.1.4 Bridgesandtunnels 169 6.1.5 TheExtendedTIN 172 6.1.6 LiDARbuildingmodels:thewalls 175 vi 6.1.7 LiDARbuildingmodels:simpleroofmodelling 179 6.1.8 LiDARbuildingmodels:compoundroofs 180 6.2 Solid3D:Realvolumes 185 6.2.1 3DVD/DT 185 6.2.2 Theaugmentedquad-edgeandthedualhalf-edge 188 Chapter7 Conclusions 205 7.1 Whathavewelearned? 205 Index 209 BookSeries 217 vii TThhiiss ppaaggee iinntteennttiioonnaallllyy lleefftt bbllaannkk SpatialContext:AnIntroductiontoFundamentalComputerAlgorithmsforSpatialAnalysis–Gold ©2016Taylor&FrancisGroup,London,ISBN978-1-138-02963-7 Preface The purpose of this book is, to borrow an old BritishArmy expression, ‘square-bashing’. My childrengrewupknowingthatsquareswerebadandtrianglesweregood:IhopeIcanpersuade you,thereader,likewise! Thisbookistheresultofover30yearsofpuzzlingovertheproblemofSpace.Greatscientistshave donethisbefore–Newton,LeibnitzandEinsteinamongothers.Wecannotcopythem.However, morerecentlytheproblemhasbecomeparticularlyacutewiththearrivalofdigitalcomputers,finite- precisionarithmeticand,inmyparticulardiscipline,thedesiretostoregeographicinformationin thecomputer. Clearlymanypeoplehavedoneso,andsuccessfully.Butifyoulookmorecloselyatthemethods usedtheyseemtobeahodgepodgeofdesperately-selectedmeasurestoresolvethesameclasses ofproblems,overandoveragain–whetherinGIS,CADoranyotherspatialdiscipline.Thisbook isdeliberatelyintendedtogoagainstthegrain:somethingisnotnecessarilygoodjustbecauseit works(approximately)onfasterandfastermachineswithmoreandmorestorage.Itisgoodifit leadstoaclearerunderstandingofhowtophraseanewquestion,inaformthatcanberesolved usingafairlysimpletoolkit.Complexityofmethodsmayoftenbenecessary,butitisnotalways necessary. Similarly,amethodisnotnecessarilygoodjustbecauseitusesconceptswearecomfortablewith, eversinceelementaryschool:oftenthesewereover-simplifications,ornotsufficientlygeneral.On theotherhand,ourintuitionisoftenprettysmart:ifwecanseetheanswer(perhapsofthespatial relationshipsbetweenasetofobjects)andthecomputercannot–thenperhapswecanrephrasethe methodstolookmorelikeours,andlesslikeacomputersolution–untilwerunintothebrickwall ofadigitalcomputer’slimitations,andhavetoback-track. Having worked in geology, geography, forestry, surveying, agriculture, water resources and computer science, I have tried to filter out a variety of concepts of space that we have used in common – trying to see where we are using clumsy, awkward, special-purpose techniques in a particulardiscipline, whenwecouldbeusingmoregeneralandcross-disciplinarytechniquesto betteradvantage.Wemustbearinmindtwodepressingadages:almostnobodyreadspapersand textbooksfromotherpeople’sdisciplines(andmanytextbookssimplyreplicatetheold-fashioned methodsoftheirpredecessors); andageneral-purposealgorithmcannot, bydefinition, befaster orbetterthanthebestspecial-purposeone.NeverthelessIbelieveitistimetocleanupasmuch aspossible, inthehopethatatleastsomeoftheconceptsmayfilterintothenextgenerationof textbooks,forstudentsasyetunborn. InthisbookIhaveattemptedtoclearouttheunderbrusharoundmanywaysofhandlingspatial objects,untilthereisareasonablechanceofthevisitorseeingthelargerview.Ihavenotdiscussed, exceptinthemostgeneralterms,theattributes(colouretc.)attachedtothoseobjects–manyother publicationsdothis,andtomethehardproblemscomefirst,inthespatialrelationshipsbetween them.Inbrief:theDualistheContext. ix
Description: