Design, Implementation, and Integration of Data Types for Three-Dimensional Spatial Data in Databases

MISSING IMAGE

Material Information

Title:
Design, Implementation, and Integration of Data Types for Three-Dimensional Spatial Data in Databases
Physical Description:
1 online resource (251 p.)
Language:
english
Creator:
Chen, Tao
Publisher:
University of Florida
Place of Publication:
Gainesville, Fla.
Publication Date:

Thesis/Dissertation Information

Degree:
Doctorate ( Ph.D.)
Degree Grantor:
University of Florida
Degree Disciplines:
Computer Engineering, Computer and Information Science and Engineering
Committee Chair:
Schneider, Markus
Committee Members:
Kahveci, Tamer
Dobra, Alin
Chow, Yuan-Chieh R
Obonyo, Esther

Subjects

Subjects / Keywords:
3d -- database -- gis -- iblob -- ten
Computer and Information Science and Engineering -- Dissertations, Academic -- UF
Genre:
Computer Engineering thesis, Ph.D.
bibliography   ( marcgt )
theses   ( marcgt )
government publication (state, provincial, terriorial, dependent)   ( marcgt )
born-digital   ( sobekcm )
Electronic Thesis or Dissertation

Notes

Abstract:
Spatial database systems so far have dealt mostly with two-dimensional spatial entities, and the support for three-dimensional data management has been largely neglected. The primary goal of the proposed research is to develop a new formal data model and type system called Spatial Algebra 3D (SPAL3D) for three-dimensional (3D) spatial data in database systems. In this research, we explore the fundamental properties and the structure of complex 3D spatial data from a data management and database perspective, identifies and designs algorithms for their most important operations and predicates, and supports their representation and storage in database systems. Recently, application domains such as urban planning, soil engineering, aviation, transportation and earth science, to name just a few, have shown more and more interest in handling large data sets (e.g., 3D maps) in the 3D space from a data management perspective. These application areas require not only 3D geometric visualization and spatial analysis methods but also database support for storing, retrieving, and querying the underlying large volumes of 3D data. Consequently, in addition to 2D (planar) and 2.5D (relief, terrain) data, spatial database systems and geographic information systems (GIS) should also incorporate the treatment of 3D data throughout their architecture. However, to our knowledge, only a few 3D data models have been proposed to handle 3D data in spatial database systems, and they are tailored to specific applications and simple 3D spatial objects only. More importantly, 3D functionalities hardly exist in spatial databases. The goal of this research is to provide solutions based on three fundamental pillars: (i) an abstract data model (SPAL3D-A) for the rigorous, mathematical definition of a comprehensive type system (algebra) for 3D spatial data including volumes, surfaces, and 3D lines, (ii) a discrete data model (SPAL3D-D) for the design of effective geometric data structures for the 3D spatial data types of SPAL3D-A and on efficient geometric algorithms on these data structures for the 3D operations and predicates of SPAL3D-A, and (iii) the implementation and database integration (SPAL3D-I) of the data structures and algorithms of SPAL3D-D as abstract data types into several extensible DBMS data models and query languages.
General Note:
In the series University of Florida Digital Collections.
General Note:
Includes vita.
Bibliography:
Includes bibliographical references.
Source of Description:
Description based on online resource; title from PDF title page.
Source of Description:
This bibliographic record is available under the Creative Commons CC0 public domain dedication. The University of Florida Libraries, as creator of this bibliographic record, has waived all rights to it worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
Statement of Responsibility:
by Tao Chen.
Thesis:
Thesis (Ph.D.)--University of Florida, 2012.
Local:
Adviser: Schneider, Markus.
Electronic Access:
RESTRICTED TO UF STUDENTS, STAFF, FACULTY, AND ON-CAMPUS USE UNTIL 2014-08-31

Record Information

Source Institution:
UFRGP
Rights Management:
Applicable rights reserved.
Classification:
lcc - LD1780 2012
System ID:
UFE0043694:00001


This item is only available as the following downloads:


Full Text

PAGE 1

DESIGN,IMPLEMENTATION,ANDINTEGRATIONOFDATATYPESFORTHREE-DIMENSIONALSPATIALDATAINDATABASESByTAOCHENADISSERTATIONPRESENTEDTOTHEGRADUATESCHOOLOFTHEUNIVERSITYOFFLORIDAINPARTIALFULFILLMENTOFTHEREQUIREMENTSFORTHEDEGREEOFDOCTOROFPHILOSOPHYUNIVERSITYOFFLORIDA2012

PAGE 2

c2012TaoChen 2

PAGE 3

ACKNOWLEDGMENTS First,Iwouldliketothankmysupervisor,Dr.MarkusSchneider,forprovidingtheguidanceandsupportthroughoutmyresearch.Iappreciatehisknowledgeandskillandhisassistanceinwritingreports.Second,Iwouldliketothanktheothermembersofmycommittee(Dr.AlinDobra,Dr.TamerKahveci,Dr.RandyChowandDr.EstherAdhiamboObonyo),fortheassistancetheyprovided.Iwouldalsoliketothankmyfamilyforthesupporttheyprovidemethroughmyentirelife. 3

PAGE 4

TABLEOFCONTENTS page ACKNOWLEDGMENTS .................................. 3 LISTOFTABLES ...................................... 7 LISTOFFIGURES ..................................... 8 ABSTRACT ......................................... 12 CHAPTER 1INTRODUCTION ................................... 14 1.1BackgroundandMotivation .......................... 14 1.2RoleofDifferentModelingLevels ....................... 16 1.3OrganizationoftheDissertation ........................ 18 2RELATEDWORK .................................. 19 2.13DDataRepresentationsinTraditionalDisciplines ............. 19 2.2DatabaseApplicationsfor3DSpatialData .................. 21 2.33DSpatialDataModelinginDatabases ................... 23 2.3.1AbstractSpecicationsfor3DSpatialData .............. 23 2.3.2Representationsof3DSpatialDatainDatabases .......... 24 2.3.3Operationson3DSpatialData .................... 26 2.4QualitativeSpatialRelationshipsbetween3DSpatialData ......... 27 2.4.1TopologicalRelationships ....................... 27 2.4.2CardinalDirectionRelationships ................... 30 3ABSTRACTTHREE-DIMENSIONALDATAMODELING ............. 33 3.1AnAbstractModelofThree-DimensionalSpatialDataTypes ....... 33 3.1.1DesignConsiderations ......................... 33 3.1.2Three-dimensionalSpatialDataTypes ................ 35 3.1.2.1MathematicalBackground:PointSetTopology ...... 35 3.1.2.2TheDataTypepoint3D ................... 37 3.1.2.3TheDataTypeline3D .................... 38 3.1.2.4TheDataTypeSurface ................... 45 3.1.2.5TheDataTypevolume ................... 53 3.1.3Three-dimensionalOperations .................... 58 3.1.3.1Overview ........................... 59 3.1.3.2GeometricOperations .................... 61 3.1.3.3NumericalOperations .................... 72 3.2ModelingQualitativeRelationshipsbetweenThree-dimensionalObjects 75 3.2.13DTopologicalRelationshipsModeling ................ 76 3.2.1.1Problemswith9IMbased3DTopologicalRelationships 76 4

PAGE 5

3.2.1.2TheNeighborhoodCongurationModel(NCM) ...... 77 3.2.1.3DeterminingPossibleTopologicalRelationshipsBasedontheNCMforTwoComplexVolumes .......... 83 3.2.1.4DeterminingPossibleTopologicalRelationshipsBasedontheNCMforTwoSimpleVolumes ........... 93 3.2.1.5ComparisonoftheNCMwiththe9-IntersectionModel .. 108 3.2.23DCardinalDirectionRelationshipsModeling ............ 111 3.2.2.1TheObjectsInteractionCubeMatrixfor3DComplexVolumes ........................... 113 3.2.2.2Detour:ModelingtheCardinalDirectionDevelopmentbetweenMovingPoints ................... 121 4DISCRETETHREE-DIMENSIONALDATAMODELING ............. 128 4.1ASlice-basedRepresentationof3DSpatialData .............. 129 4.1.1SliceUnits ................................ 130 4.1.2SliceRepresentationof3DSpatialDataTypesandBasicOperators 139 4.1.3SelectedIntersectionAlgorithmsfor3DSpatialOperations ..... 141 4.2ACompactTENBasedDataStructureforComplexVolumes ....... 147 4.2.1Background ............................... 148 4.2.2TheConnectivityEncodedTetrahedralMesh(CETM) ........ 152 4.2.2.1StoringaTetrahedralMesh ................. 154 4.2.2.2EncodingConnectivityInformationinaTetrahedralMesh 155 4.2.2.3OptimizingtheNumberofStoredConnectivityEncodings 158 4.2.3OperatorsforRetrievingTopologicalRelations ............ 163 4.2.3.1Topologicalrelationsamongtetrahedralmeshelements 163 4.2.3.2RetrievingtopologicalrelationsbasedonourCETM ... 165 4.2.4TheEvaluationandExperimentalStudyoftheConnectivityEncodedTetrahedralMesh ............................ 168 4.2.4.1TheEvaluationoftheStorageCostofourCETMDataStructure ........................... 169 4.2.4.2TheComparisonsofourCETMDataStructurewithOthers 174 4.2.4.3TheExperimentalStudyonCETM ............. 177 4.3AComparisonbetweenTheTwoApproaches ................ 181 4.4Detour:ComputingtheCardinalDirectionDevelopmentbetweenMovingPoints ...................................... 182 4.4.1TheSliceRepresentationforMovingPoints ............. 183 4.4.2TheTime-synchronizedIntervalRenementPhase ......... 185 4.4.3TheSliceUnitDirectionEvaluationPhase .............. 186 4.4.4TheDirectionCompositionPhase ................... 191 5INTEGRATIONANDIMPLEMENTATIONOFTHREE-DIMENSIONALDATAINDATABASES .................................... 193 5.1Integrationof3DSpatialDataTypesinDatabases ............. 193 5.1.1ExistingApproachesforHandlingStructuredObjects ........ 194 5

PAGE 6

5.1.2ProblemswithHandlingStructuredObjectsinDatabasesandOurApproach ................................ 196 5.1.3iBlob:ABlob-basedGenericTypeSystemImplementation ..... 200 5.1.3.1TypeStructureSpecications ................ 200 5.1.3.2IntelligentBinaryLargeObjects(iBLOB) ......... 205 5.1.4EvaluationoftheiBLOBapproach .................. 213 5.1.5IntegrationoftheCETMinDatabasesBasedoniBLOBs ...... 218 5.2Integrationof3DSpatialOperationsandPredicatesinSQL ........ 219 5.2.1IntegrationoftheTopologicalPredicatesinSQLBasedontheNCMModel ............................... 219 5.2.2Detour:IntegrationoftheSpatio-temporalDirectionalPredicatesinSQL .................................. 227 6CONCLUSIONS ................................... 231 APPENDIX:DRAWINGSOF50UNITTOPOLOGICALRELATIONSHIPENCODINGSANDALL72TOPOLOGICALRELATIONSHIPENCODINGS .......... 234 REFERENCES ....................................... 242 BIOGRAPHICALSKETCH ................................ 251 6

PAGE 7

LISTOFTABLES Table page 2-1Numberoftopologicalpredicatesbetweentwosimple3DspatialobjectsintheEuclideanplaneIR3 ............................... 29 3-1Setsandenumerationsof3Dspatialdatatypes. ................. 59 3-2Classicationof3Doperations. ........................... 60 3-3Interpretationtablefortheinterpretationfunction ................ 119 4-1ThestoragecostofCETMdatastructureforselected3DshapesinthePrincetonShapeBenchmarkrepository. ............................ 179 4-2Thecostofretrievingtetrahedrasharingthe3rdvertexofthe100thtetrahedroninCETM. ....................................... 180 4-3Thecostofretrievingtetrahedrasharingthe2ndand3rdverticesofthe100thtetrahedroninCETM. ................................ 180 5-1ThestoragecostandthetopologicalrelationretrievalperformanceofCETMdatastructureimplementedbasedontheiBLOBandtheBLOB. ........ 219 5-2Thenumberoftopologicalrelationshipsassignedtoeachofthe8traditionaltopologicalpredicates. ................................ 225 7

PAGE 8

LISTOFFIGURES Figure page 2-1The9-intersectionmatrixfortopologicalrelationships. .............. 28 2-2Anexampleoftheprojection-baseddirectionalmodel. .............. 30 2-3TheTCDrelationmodel. ............................... 31 3-1Apoint3Dobject. ................................... 38 3-2Thetopologist'scurve(x,sin x)forx>0. ..................... 40 3-3Acomplex3Dlineobjectexample. ......................... 42 3-4ThesubsetLNr(p,X)isalocalneighborhoodofthepointpinsubsetX .... 46 3-5Examplesofthesimplemanifoldsurfaces ..................... 48 3-6Examplesofthesimplenon-manifoldsurface. ................... 49 3-7Generalsurfacesthatconsistofacollectionofsimplesurfaces. ......... 51 3-8Examplesofcompositesurfaceobjects. ...................... 52 3-9Simplevolumeexamples. .............................. 55 3-10Anexamplevolume. ................................. 58 3-11Intersectionoperationsthatarenotclosed. .................... 63 3-12Geometricsetoperationswithclosure. ....................... 65 3-13Afnetransformations. ................................ 68 3-14Othergeometricoperations. ............................. 72 3-15Numericaloperations. ................................ 73 3-16Thedrawingofthe15neighborhoodcongurationsforpointp. ......... 81 3-17Examplesoftopologicalrelationshipscenariosandtheirencodings. ...... 82 3-18Thecompositionoftwoencodingsimpliesthecompositionoftwocongurations. 89 3-19Thealgorithmtodeterminecollectionofunittopologicalrelationshipencodings. 92 3-20ExamplesofthefourpossiblearrangementsofthethreesetsSa,Sb,andSxintheneighborhoodcongurationNC11. ...................... 97 3-21DrawingsofthevariantsoftheneighborhoodcongurationsNC11,NC12,NC13,andNC14. ....................................... 97 8

PAGE 9

3-22Examplesoftheneighborhoodcongurationtransitionsbetweenpointpandq. 100 3-23Thedirecttransitiontable .............................. 104 3-24ExamplesofthetopologicalencodingswiththecorrespondingBNCTG-AandBNCTG-B. ...................................... 106 3-25The8topologicalrelationshipsbetweentwovolumesthatcanbedistinguishedwithboth9IMandNCM. ............................... 110 3-26The4topologicalrelationshipsthatcanbedistinguishedwithNCMbutnot9IM. 111 3-27TheOICMmodelforAandB. ............................ 116 3-28TheOICMforthepreviousexample. ........................ 118 3-29Anexampleoftwomovingpoints .......................... 124 4-1Slicerepresentationsofspatialobjects ....................... 130 4-2Twotypesofslices .................................. 131 4-3Anexampleofasliceofaline3Dobject ...................... 134 4-4Anexampleofathicksliceofasurfaceobject ................... 136 4-5Anexampleofavolumeslice ............................ 139 4-6Thesp3D sweepalgorithm. ............................. 143 4-7Thesp3D sweep0algorithm. ............................. 144 4-8Thesp3D intersectalgorithm. ............................ 145 4-9Sweepingalgorithmsonslices ........................... 146 4-10Thevp3D sweepalgorithm. ............................. 146 4-11Thevp3D intersectalgorithm. ............................ 147 4-12Anexampleofatetrahedralmeshanditsrepresentation(assumevi
PAGE 10

4-17ThealgorithmfortheR03operationandthealgorithmfortheR13operation. .. 167 4-18Examplesofamanifoldedgeemandanon-manifoldedgeen .......... 171 4-19Examplesofamanifoldvertexvmandanon-manifoldvertexvn ......... 173 4-20Thecomparisonsbetweenourdatastructurewithothervedatastructuresfortetrahedralmeshes ................................ 178 4-21Anexampleoftheslicerepresentationsoftwosinglemovingpoints ...... 184 4-22Thealgorithmsinterval syncandcompute dir dev. ................ 187 4-23Asimplecardinaldirectionpreservingmapping .................. 190 5-1Aregionobjectasanexampleofacomplex,structuredapplicationobject. ... 196 5-2Threemodelingarchitectures. ............................ 197 5-3Thehierarchicalstructureofaregionobjectandthehierarchicalstructureofabookobject. .................................... 201 5-4IllustrationofaniBLOBobjectconsistingofastructureindexandasequenceindex. ......................................... 205 5-5Astructuredobjectconsistingofnsub-objectsandninternaloffsets ...... 207 5-6Astructuredobjectconsistingofabaseobjectandstructuredsub-objects ... 207 5-7Anout-of-ordersetofdatablocksandtheircorrespondingsequenceindex .. 208 5-8Theinitialin-orderanddefragmenteddataandsequenceindex. ........ 209 5-9Asequenceindexafterinsertingblock[j...l]atpositionk. ............ 209 5-10Asequenceindexafterdeletingblock[m...n]. .................. 210 5-11Asequenceindexafterreplacingblock[o...p]byblock[l...q]. ......... 210 5-12ThestandardizediBLOBinterface ......................... 211 5-13Thestructuredrepresentationofapolygontypeinshapeles. .......... 214 5-14ThestoragecomparisonbetweeniBLOBandnBLOBfor56TIGERshapeles. 215 5-15TherandomsinglereadtimecomparisonbetweeniBLOBandnBLOBfor56TIGERshapeles. .................................. 216 5-16TherandomsingleinserttimecomparisonbetweeniBLOBandnBLOBfor56TIGERshapeles. .................................. 216 10

PAGE 11

5-17TherandomsingledeletetimecomparisonbetweeniBLOBandnBLOBfor56TIGERshapeles. ................................ 217 5-18ThetreerepresentationofCETM. ......................... 218 5-19Anengineandseveralparts(a)andtheresultsofthequeriesQ1,Q2,andQ3(b). ......................................... 226 A-11-20outof50topologicalrelationshipsunitfortwocomplexvolumes. ..... 235 A-221-40outof50topologicalrelationshipsunitsfortwocomplexvolumes .... 236 A-341-50outof50topologicalrelationshipsunitsfortwocomplexvolumes .... 237 A-41-20outof72topologicalrelationshipsthatcanbedistinguishedwithNCMbetweentwosimplevolumes. ............................ 238 A-521-40outof72topologicalrelationshipsthatcanbedistinguishedwithNCMbetweentwosimplevolumes. ............................ 239 A-641-60outof72topologicalrelationshipsthatcanbedistinguishedwithNCMbetweentwosimplevolumes. ............................ 240 A-761-72outof72topologicalrelationshipsthatcanbedistinguishedwithNCMbetweentwosimplevolumes. ............................ 241 11

PAGE 12

AbstractofDissertationPresentedtotheGraduateSchooloftheUniversityofFloridainPartialFulllmentoftheRequirementsfortheDegreeofDoctorofPhilosophyDESIGN,IMPLEMENTATION,ANDINTEGRATIONOFDATATYPESFORTHREE-DIMENSIONALSPATIALDATAINDATABASESByTaoChenAugust2012Chair:MarkusSchneiderMajor:ComputerEngineering Spatialdatabasesystemssofarhavedealtmostlywithtwo-dimensionalspatialentities,andthesupportforthree-dimensionaldatamanagementhasbeenlargelyneglected.TheprimarygoaloftheproposedresearchistodevelopanewformaldatamodelandtypesystemcalledSpatialAlgebra3D(SPAL3D)forthree-dimensional(3D)spatialdataindatabasesystems.Inthisresearch,weexplorethefundamentalpropertiesandthestructureofcomplex3Dspatialdatafromadatamanagementanddatabaseperspective,identiesanddesignsalgorithmsfortheirmostimportantoperationsandpredicates,andsupportstheirrepresentationandstorageindatabasesystems. Recently,applicationdomainssuchasurbanplanning,soilengineering,aviation,transportationandearthscience,tonamejustafew,haveshownmoreandmoreinterestinhandlinglargedatasets(e.g.,3Dmaps)inthe3Dspacefromadatamanagementperspective.Theseapplicationareasrequirenotonly3Dgeometricvisualizationandspatialanalysismethodsbutalsodatabasesupportforstoring,retrieving,andqueryingtheunderlyinglargevolumesof3Ddata.Consequently,inadditionto2D(planar)and2.5D(relief,terrain)data,spatialdatabasesystemsandgeographicinformationsystems(GIS)shouldalsoincorporatethetreatmentof3Ddatathroughouttheirarchitecture.However,toourknowledge,onlyafew3Ddatamodelshavebeenproposedtohandle3Ddatainspatialdatabasesystems,andtheyare 12

PAGE 13

tailoredtospecicapplicationsandsimple3Dspatialobjectsonly.Moreimportantly,3Dfunctionalitieshardlyexistinspatialdatabases. Thegoalofthisresearchistoprovidesolutionsbasedonthreefundamentalpillars:(i)anabstractdatamodel(SPAL3D-A)fortherigorous,mathematicaldenitionofacomprehensivetypesystem(algebra)for3Dspatialdataincludingvolumes,surfaces,and3Dlines,(ii)adiscretedatamodel(SPAL3D-D)forthedesignofeffectivegeometricdatastructuresforthe3DspatialdatatypesofSPAL3D-Aandonefcientgeometricalgorithmsonthesedatastructuresforthe3DoperationsandpredicatesofSPAL3D-A,and(iii)theimplementationanddatabaseintegration(SPAL3D-I)ofthedatastructuresandalgorithmsofSPAL3D-DasabstractdatatypesintoseveralextensibleDBMSdatamodelsandquerylanguages. 13

PAGE 14

CHAPTER1INTRODUCTION 1.1BackgroundandMotivation Spatialdatabasesstorethetopologiesortheshapesofspatialobjectsasattributesinthedatabase.Spatialdatabasemanagementsystemsprovidetheabilitytorepresent,query,andmanipulatethespatialobjectsefciently.Foralmostadecade,mostspatialdatabasesystemsandgeographicinformationsystemshavebeenrestrictedtothehandlingoftwodimensionaldata.Thisrestrictionisfromadatamodelinganddatamanagementperspectiveratherthanavisualizationperspective.However,increasinglythethirddimensionbecomesmoreandmorerelevantforapplicationdomainslikepollutioncontrol,watersupplyanddistribution,soilengineering,spatialmining,urbanplanninganddevelopment,archaeology,andaviation,tonameonlyafew.Moreover,withthedevelopmentofnewtechnologiesforcollectingthree-dimensional(3D)data,largevolumesof3Ddatabecomeavailableandtheneedforhandlingthesedataisrapidlyincreasing.Asaresult,theintegrationof3DinformationintospatialdatabasesandGeographicInformationSystems(GIS)tosupportad-hocqueriesisdesiredbymanyapplicationdomains.Forexample,aspatialquerylikeFindallthebuildingpartsinNewOrleansthatarebelowthesealevelandthereforemightbeoodedmightbeaskedtohelpthecitygovernortoprepareforapotentialdisaster.AspatialaggregatequerysuchasFindtheareaofthesurfaceofthenewgeneticsbuildingcanhelptheconstructionmanagerestimatethecostofpaintingtheentirebuilding.Thedevelopmentofa3Ddatabasesystemhastwooverallgoals.Therstgoalistodevelopa3Dtypesystemthatrepresentsandstoresthe3Ddata,whilethesecondgoalistodesignandimplementalargeamountofoperationsonthe3Ddatatypes. Therstgoalistorepresentandhold3Ddatainadatabasesystem.Thisinvolvestheprocessofdeningdatatypesfor3Ddata,designingadatastructureforeachdatatype,andndingaproperstorageinadatabasecontextfor3Ddata.Toour 14

PAGE 15

knowledge,onlyafew3Ddatamodelshavebeenproposedtorepresentandstore3Ddatainspatialdatabasesystems.Mostofthedatamodelsaretailoredtospecicapplicationsandsimple3Dspatialobjectsonly.Thustheylacktheabilityofhandlinggeneralandcomplex3Dspatialobjects.Whenitcomestotherepresentationof3Ddataindatabasesystems,apopularstrategyappliedbymany3Ddatamodelsistodecompose3Ddata,e.g.volumes,intosmallerelementslikenodes,edges,andfacesandspreadthemintopredenedrelationaltables.TheadvantageisobviousthatDBMSfeaturesliketablejoinsandindexescanbedirectlyusedforaccessingspatialelements.Butthisapproachisproblematic.Fromaconceptualperspective,theobjectviewofthegeometryofaspatialobjectgetslost.Thevalidationofaspatialobjectbecomesextremelydifcult.Fromanimplementationperspective,inordertodevelopoperationslikeintersection,thegeometrieshavetobereconstructedandbeconvertedtomain-memoryrepresentations,whichisanexpensiveprocess.Fromastorageperspective,sinceelementsofasamespatialobjectaredistributedintorelationaltables,theymightnotbeclustered.ThisleadstotheincreaseoftheI/Ocostforretrievingspatialobjects.Therefore,amoreplausiblestrategyistotakeanobjectorientedapproachandstore3Dspatialdataindatabasesystemsasabstractdatatypes.The3Dspatialdatatypesshouldberstclasscitizenandarenodifferentfromothertraditionaldatatypeslikestring,integer,anddateindatabases.Thusinthisresearch,weintendtodesignapreciseandconceptuallycleandatatypesystemforgeneralandcomplex3Dspatialobjects,andproposedatastructuresforholdingtheminadatabasecontextfollowinganobjectorientedapproach. Thesecondgoalistoextendtheexistingdatabasemanagementsystemswithfunctionalitiesforqueryingandmanipulating3Ddata.Spatialfunctionalitiesexistinspatialdatabasesintheformofoperationsandpredicates.Spatialoperationsplayanimportantroleinspatialdatabasesbecausetheyarepartofspatialqueriesandareusedforperformingcomplexanalysistasksonspatialdata.Predicatesareaspecial 15

PAGE 16

kindofoperationsthatyieldbooleanresults.Theyarefrequentlyusedasselectionandjoinconditionsinqueries.Unfortunately,3Doperationsand3Dpredicateshardlyexistincurrentspatialdatabases.Althoughthereexistalargenumberofalgorithmsfor3Dgeometricproblemslikeintersectionincomputationalgeometryeldwhichcanbecandidatesfortheimplementationofoperations,theycannotbedirectlyusedinaspatialdatabasecontextforthefollowingreasons.First,mostalgorithmsaremainmemoryalgorithmsthatrequireinmemorydatastructuresforholdingspatialobjects.However,inadatabasecontext,thisrequirementisusuallynotsatisedbecausespatialobjectsarestoredondiskandmaynotbeentirelyloadedintomainmemoryduetotheirlargesize.Second,efcientgeometricalgorithmsusuallydealwithspatialobjectsthatfeaturethepropertyofsimplicity,convexityormonotonicity.However,spatialobjectsstoredindatabasesareunpredicted,thusthesepropertiescannotbeassumedinadatabasecontext.Itisimportanttounderstandthatalgorithmsthatworkwithcomplex3Dspatialobjectswithouttoorestrictiveconstraintsareneededforimplementingspatialoperationsandpredicates.Third,geometricalgorithmsrequiretailor-madeinternaldatastructuresandthedatastructuresmaybedifferentfordifferentalgorithms.However,inadatabasecontext,weuseauniquerepresentationforanyspatialobject.Asaresult,iftheimplementationofdifferentoperationsarebasedondifferentdatastructures,thenexpensivedatastructureconversionsareneededwhendifferentoperationsareexecuted.Therefore,theimplementationsof3Doperationsand3Dpredicatesarenotsimplyextensionsofexistinggeometricalgorithmsbutrequiremuchmoreeffort.Itisthegoalofthisresearchtobridgethisgapandtoproposesolutionsforselected3Doperationsand3Dpredicates. 1.2RoleofDifferentModelingLevels Toachievetheaforementionedgoalsfordevelopinga3Dspatialdatabasesystem,weproposesolutionsatthreemainlevelsofabstraction,whichwecalltheabstractlevel,thediscretelevel,andtheimplementationlevel.Thedenitionsofthestructureofspatial 16

PAGE 17

objectsaswellasofthesemanticsofoperationscanbegivenattheselevels.Ateachlevel,differentmodelsorconceptscanbedeployed. Amodelattheabstractlevelintheeldofspatialdatabasesenablesonetoexpressthepermissibleshapesofspatialobjects.Itdoesnothavetoexpresssemanticsintermsofniterepresentationsandisnotimpededbycomputer-specicpropertiesandconstraints.Forexample,atrajectoryisdescribedasa3Dcurveattheabstractlevel,whichisa(certainkindof)innitepointsetinthe3Dspacewithoutxinganyniterepresentationandwithoutconsideringanycomputer-specicproperties.Themainadvantageoftheabstractlevelisthatitisconceptuallycleanandsimple.Itisimportanttostartwithanabstractmodelwhendevelopingaspatialdatabasesystem.Manywhohavedevelopedspatialdatabasesystems,both2Dand3D,havegonestraighttoimplementingthesystemwithoutformulatinganabstractmodel.Theresultofstartingwiththeimplementationofasystemisanalogoustowhensomeonewritesaprogramwithoutperformingthestepsofanalysisanddesign.Thesystemimplementedincludesonlythethingsofwhichtheimplementersthinkastheyimplementandisthereforemakeshift.Inthisresearch,westartwiththedesignandrigorousdenitionofacomprehensiveabstractdatamodelfor3Ddata,calledSpatialAlgebra3DattheAbstractLevel(SPAL3D-A).Ouralgebraframeworkfacilitatesanunderstandingofthenatureandpropertiesof3Ddataandprovidesasetofthree-dimensionalspatialdatatypes,namelypoint3D,line3D,surface,andvolume,togetherwiththesignaturesandsemanticsofacollectionofspatialoperations(likeintersection,centroid).Inaddition,weexplorethetopologicalrelationshipsandcardinaldirectionrelationshipsbetweentwo3Dspatialobjects,whichcanbelaterintegratedinqueriesaspredicates. Adiscretemodeldealswiththedesignoftheniterepresentationsforspatialobjectsandthedesignofalgorithmsforoperationsandpredicatesinadatabasecontext.Forexample,atrajectoryisdescribedasa3Dpolygonallineatthediscretelevel.Theadvantageofthediscretelevelisthatitisclosertoandhencebettersupports 17

PAGE 18

theimplementationofconcepts.Inthisresearch,weproposeeffectivegeometricdatastructuresforthe3Dspatialdatatypesdenedattheabstractlevel,anddesignefcientgeometricalgorithmsonthesedatastructuresforthe3Doperationsandpredicates. Theimplementationleveliswherewemakeconnectionstotheunderlyingdatabasesystem.Thedatastructuresdesignedatthediscretelevelneedtobematerializedandstoredindatabases.Forexample,atrajectoryisdescribedasanorderedsetof3Dlinesegmentsandarestoredinrelationaltablesattheimplementationlevel.Algorithmsforoperationsareimplementedandoperationsareintegratedintoquerylanguagesatthislevel.Inthisresearch,wetakeanobjectorientedapproachandselecttheBinaryLargeObject(BLOB)thatareavailableinmostcommercialdatabasesastheunderlyingdataholderfor3Dspatialobjects.However,BLOBssufferfromtheproblemsoflackingsupportforefcientupdates,tediousbyteleveldatamanipulation,andnostructurepreservation.ThusweintroduceanoveldatatypecalledIntelligentBinaryLargeObject(iBLOB)thatleveragesthetraditionalBLOBtypeindatabases,preservesthestructureofspatialobjects,andprovidessmartqueryandupdatecapabilities. 1.3OrganizationoftheDissertation Thisdissertationisorganizedinto6chapters.Theorganizationofthechaptersfollowsourstrategyofdeveloping3Dspatialdatabasesystemsatthreelevelsofabstractions.Chapter 2 discussestherelatedworkindeveloping3Dspatialdatabasesystems.Chapter 3 introducesanabstractmodelfor3Dspatialobjectsandtheiroperations.Chapter 4 introducesthedatarepresentationsofthe3Dspatialdatatypesatadiscretelevel.Chapter 5 introducestheimplementationofthe3DdatatypesbasedonournoveliBlob.Finally,Chapter 6 makesconclusionanddescribesthefuturework. 18

PAGE 19

CHAPTER2RELATEDWORK Inthischapterwediscussrelatedworkasfarasitisrelevantfordatamodelingapproachesfor3Dspatialdata.Sofar,datamodelsfor3DspatialdataarehardlyavailableforspatialdatabasesandGIS;thesesystemsexclusivelymodelandmanage2Dand2.5Dspatialdata.Webeginwithanoverviewofthe3DdatarepresentationstrategiesintraditionaldisciplinesinSection 2.1 .Section 2.2 presentsacross-sectionofourextensiveliteraturestudyofmanypossibleandpromisingapplicationareasthatwouldprosperfrom3DspatialdatasupportinGIS.Duetospaceconsiderations,wehavenotlistedthenumerousreferencesthatdocumenttheseapplications.Section 2.3 summarizestheavailablemodelingconceptsfor3Dspatialdatainspatialdatabases.Finally,asoneofthetopicsinourresearchwork,twomostimportantqualitativespatialrelationshipsbetween3Dobjects,thetopologicalrelationshipsandthedirectionalrelationships,arediscussedinSection 2.4 2.13DDataRepresentationsinTraditionalDisciplines Researchon3Dspatialdatamodelinginapplicationshashadalongtraditionindisciplineslikesolidmodeling,geometricmodeling,computeraideddesign(CAD),constructivesolidgeometry(CSG),computergraphics,computervision,androbotics.Ingeneral,therearetwoapproachestorepresent3Dobjects,namelytheboundaryrepresentationandthevolumerepresentation. Boundaryrepresentation(oftenabbreviatedasB-reporBREP)isamethodforrepresentingshapesusingthelimits.Thelimitsofa3Dobjectsarethelowerdimensionalboundaryelementslikevertices,edges,andfaces.Facesareboundedwithedgesandedgesareboundedwithvertices.Boundaryrepresentationsmodel3Dobjectsnotonlybystoringthelowerdimensionalboundaryelements,butalsobymaintainingtheirconnectivityinformationsinadatastructure.Famousdatastructures 19

PAGE 20

forthispurposearetheDoubly-ConnectedEdgeList(DCEL),theQuad-Edge[ 45 ],andtheWingedEdge[ 8 38 ]. Thevolumerepresentationisadecompositionbasedapproachthatdecomposesa3Dobjectintosimplercomponentslikecubes,tetrahedraandspheres.Then,componentsoftheobjectcanbewellorganizedinsmartdatastructuresliketrees.Onevolumerepresentationthatisappliedincomputeraideddesign(CAD)systemsforconstructingmanmadeobjectslikepartsofenginesistheConstructivesolidgeometryrepresentation.Constructivesolidgeometryisaproceduralmodelingtechniqueusingprimitives.Theseprimitivesareusuallypredenedobjectsofsimpleshapeslikecuboids,cylinders,prisms,pyramids,spheres,andcones.Booleanoperationssuchasunion,intersectionanddifferenceareusedtocombineprimitivestoconstructacomplexsolid.Byarrangingthebooleanoperationsandprimitiveobjectsintoabinarysearchtree[ 94 ],whichisalsocalledtheCSGtree,acomplexsolidcanbeconstructedinabottomupfashion.ImprovementsforconstructingsuchaCSGtreecanbefoundin[ 16 ].Anothersimilartechniqueistheprimitiveinstancing(PI)modelingstrategy.WithPI,insteadofusingstandardpredenedprimitives,userscandenedtheirownprimitivestobuildcomplexsolids. OthervolumerepresentationsexistliketheVoxelmodel,theOctree[ 5 13 ],andtheBSPtree[ 52 74 ].Theyareincommonbasedonthespacepartitioningtechniquesthatdecomposespaceintogridsorcells.Intheserepresentations,aspacepartitionstrategyisrstdetermined,i.e.,OctreeorBSPtree,thena3Dsolidisdecomposedandorganizedinthecorrespondingpartitiontreestructure. Thereisalargevarietyanddivergenceofconceptsandstructuresonrepresenting3Dgeometricobjects.Inthisresearch,weleverageanumberoftheseconceptsbutfocusespeciallyontheirsuitabilityandtransferabilitytospatialdatabaseandGISapplicationsandadaptthemcorrespondingly. 20

PAGE 21

2.2DatabaseApplicationsfor3DSpatialData Despiteofthevarious3Dmodelsinotherdisciplineslikethosementionedabove,inaspatialdatabaseandGIScontexthowever,thesupportfor3Dspatialdatahandlingisratherlimited.Asimpletransferof3DconceptsfromotherdisciplinesisimpededsincemostoftheirdatastructuresareinappropriateforGISpurposes(forexample,theconstructiveapproachincomputeraideddesign)and/orusepuremainmemorystructures(forexample,incomputergraphics)whereasspatialdatabasesandGISrequireexternaldataandindexstructures.Moreover,mostavailable3Ddatamodelsfocusmainlyonvisualizationsandrepresentationsof3Dspatialdata,thusthedatastructuresareusuallynotoptimizedforspatialcomputations.Ontheotherhand,unliketheotherdisciplineslikeCADwhoseapplicationsrequirehighqualityvisualizations,amajortaskofspatialdatabasesystemsandGISisthedatamanagementanddatamanipulation[ 83 ],whichalsoholdsfor3Dspatialdata.Therefore,theexistingdatamodelsdonotfullysatisfytheneedsofGISapplications. Thelackingconsiderationof3DdatamanagementinspatialdatabasesystemsandGISraisesthequestionwhichapplicationscouldbenetfromsuchasupportandthusdocumenttheneedfor3Ddatamodelinganddatamanagement.Forexample,forpollutioncontrol,inordertokeepthemaximumloadofresidentsaslowaspossible,theemissionofpollution,exhaustfumes,andnoisearesimulatedduringtheplanningofconstructionprojects.Suchsimulationsare,however,onlyrealisticiftheyoperateonthebasisof3Dmodels.Anothersimilarapplicationareaisthecalculationofnoxiousemissionafterenvironmentalaccidents,consideredhereinthecontextwithgeologicalandmeteorologicalmodels.Forwatersupplyanddistribution,thecomputationofwatershedrunoffanddrainagebasinsisofinterest.Forsherymonitoringorsimulating,theshpopulationanditsmovementsarerelevant.Ingeology,soilengineering,andmining,3Drepresentationsgivethechancetoidentifylocationswhereitisworthwhiletoexploitoredepositsoroilresourcesorplacesthatimpedetestdrillsduetospecic 21

PAGE 22

geologicalformationsorsoilstrata.Afurtherapplicationisthemodelingofgeologicalpropertiesofearthquakeareas.Simulationsandcomparisonscanhereresultinimprovedpredictionmethods.Anotherapplicationisanimalobservation.Interestingquestionsrelate,forexample,tothemigrationbehaviorofanimals.Frequently,animalslikebirdsorwhalesareequippedwithsensorstopursuetheirmigrationroutes.Ifweproducea2Dmapfromthesedata,muchinformationgetslost.Forexample,querieswhetherwhalespreferparticulardivingdepthswithspecicvaluesfortemperatureorsaltcontentcannotbeanswered.Inurbanplanningandurbandevelopment,manyconstructionplansareeasedby3Dmodels.Ausual2Dmapcandescribethecourseofsubwaysandsupplymainsbelowthesurfaceonlyinalimitedmanner.Possiblequeriesarewhetheratintersectionpointsawaterpipepassesaboveorbelowagaspipeandwhethertherearesoilstratathatshouldnotbeusedforgeologicalreasons.Inarcheology,manyexcavationsitesarecharacterizedbythefactthattheselocationshavebeeninhabitedforseveralcenturiesorevenmillenniums.Hence,trovesofdifferentepochsarelocatedindifferentsoilstrata.Sinceexcavationsproceedoverlongperiods,itisoftendifculttocorrelatethetrovescorrectly.Ifwerecordthetrovesandthesiteofthediscovery,alsolateranalysisarefeasible.Theconnectionoftheexcavationstratawiththeuseofspecialmaterials,orthedistributionofsimilartrovesareofparticularinterest.Modelsofthearchaeologicalsitesinaspeciccenturyeitherwithrespecttolandscapeordestroyedbuildingscanalsobedesigned.Inaviation,planesmoveinthe3Dspace.Duetoimprovedsatellitenavigation,pilotsarenowadaysmoreexibleindeterminingtheirightroutesthansometimeago.Examplequeriesarehereifthereareotherplanesnearbywhoserouteshavetobetakenintoaccount,iftherearebadweatherfrontsthathavetobebypassed,whattheircurrentshapeis,howtheywillprobablydevelop,andifitispossibletoavoidyingoverinhabitedareasduringtake-offandlanding.Ifthevisibilityislowortheterrainisdifcult,asyntheticviewcanbecomputedtoeasetheorientationandincrease 22

PAGE 23

thesafety.Fortelecommunication,inordertobeabletopositiontheaerialsofmobilephonenetworks,thewavepropagationcanbesimulatedwiththeaidof3Dmodels.Incadastermanagement,effortsareincreasinglymadetocapturecadastraldataalsointhreedimensions.2Drepresentationsareoftenunsuitableforreproducingthelegalsituationcorrectly.Thisrelatesbothtoconstructionprojectsaboveorbelowthesurface(apartmenthouses,subways)andtoissuesofpollutioncontrol. 2.33DSpatialDataModelinginDatabases 2.3.1AbstractSpecicationsfor3DSpatialData Whilethereisalargevarietyanddivergenceofconceptsandstructuresatthediscretelevelandtheimplementationlevel,attheabstractlevel,wesharewiththesedisciplinestheidenticationof3Dpoints,lines,surfaces,andvolumesasthebasic3Dspatialobjectsaswellastheuseofpointsettheoryandpointsettopologyforformallyspecifyingtheseobjects.3DspatialobjectsaremodeledaspointsetsoftheEuclideanspaceIR3withparticularproperties.However,wearenotawareofanyefforttoformallyspecifyageneralsetof3Dspatialdatatypestogetherwitharathercomprehensivecollectionof3Doperationsandpredicatesinanabstractmodel.Thisresearchwithitsformalandabstractspecicationofanalgebrafor3Ddataismeanttobearststeptowardsthisgoal. Awidelyappliedstandardspecicationforgeographicfeatures,whichmostcommercialdatabaseslikeOracle,mysqlandPostgreSQLusetodeveloptheirspatialpackageextensions,isdevelopedbytheOpenGeospatialConsortium(OGC).OGCisanon-protorganizationthatdealswithconceptualschemesfordescribingandmanipulatingthespatialcharacteristicsofgeographicfeatures.OGCdenes3DprimitiveslikeGM SurfaceandGM Solid(ISO19107:SpatialSchema)asthebasisforthree-dimensionalspatialobjects.Ingeneral,asoliddescribedbyOGCisaboundedthree-dimensionalmanifoldthathasitsextentlimitedbyasequencesetofsurfaces.OtherprimitivesexistfordescribingotherspatialtypeslikeGM CurveandGM Point. 23

PAGE 24

However,thespecicationdoesnothaverigorousformaldenitionsforeachobjectitdescribes,andpropertieslikegeneralityandclosurearenotconsidered.Further,sincetheprimitivesdescribesimplegeometricfeatures,itisnotclearhowthecomplexspatialobjectslikenon-manifoldsurfacesandvolumeswithmultiplecomponentscanbemodeledbasedontheprimitives. 2.3.2Representationsof3DSpatialDatainDatabases Asanintermediatesteponthewaytoatreatmentof3DdatainGIS,2.5DrepresentationshavebeendesignedlikeDigitalTerrain/ElevationModels[ 104 ](DTM/DEM)andTriangulatedIrregularNetworks[ 102 ](TIN).Theydescribetherelieforsurfaceofaterrainbystoringforagivenpoint(x,y)oftheplaneitselevationz.ThedifferenceisthatDTMusesaregulargridtorepresentasurfacewhileTINusesatrianglemeshtorepresentasurface.Anoverviewofthesetwoapproachescanbefoundin[ 61 ].However,thisaugmentationisnotsufcienttofullyrepresenta3Dobject.Asanimprovement,auniedmultidimensionaldatamodelisproposedin[ 26 ],whichallowstostoreandtodescribedifferentdimensionaldataaswellastherelationshipsbetweenthesedata. Sofar,onlyalimitednumberof3DdatamodelshasbeenproposedforspatialdatabasesandGIS;Ingeneral,therearetwomodelingstrategiesforrepresenting3Ddatainadatabasecontext,thetopologicalmodelandthegeometricalmodel.Thetopologicalmodelsassumethefullpartitionofthe3Dspace(similartotheplanarpartitionin2Dspace),andutilizeseveralprimitiveslikenodes,edgesandfacestorepresentsuchapartition.Byexplicitlystoringtheprimitivesandtheircorrespondingtopologicalrelationshipsinseparatepredenedrelationaltables,theelementsbelongingtoasame3Dobjectcanbetrackedandreconstructedifneeded.Areviewofthecurrentavailabletopologicalmodelscanbefoundin[ 108 ].Weconneourselvesheretothe3DFormalDataStructure(3DFDS)[ 71 ]andtheTetrahedralNetwork(TEN)[ 65 ].TheFormalDataStructure(3DFDS)[ 71 ]providesfourprimitivesnode,arc,face, 24

PAGE 25

andedgetosupporttherepresentationofafull3Dspacepartition.Fourelementaryobjects,point,line,surfaceandbodycanbedistinguished.Inaddition,relationshipslikenode-on-face,arc-on-face,node-in-body,andarc-in-bodyarealsoexplicitlystoredinrelationaltablestoallowsingularities.Theimplementationofthismodelisproposedin[ 72 ].TheTetrahedralNetwork(TEN)[ 2 65 ]employsasimplex-orientedapproach,inwhichfourprimitives,tetrahedron,triangle,arc,andnodearedenedtorepresentafullpartitionofthe3Dspace.Eachprimitiveisthesimplestforminitsdimension,anddonotoverlapwithotherprimitives.Thetetrahedron-triangle-edgelinkisexplicitlystored.3Dobjectsareassembledbytheseprimitives,whereabodyiscomposedoftetrahedron,asurfaceoftriangle,alineofarcsandapointofnodes.Thetopologicalmodelsrelyonrelationaltablestomanagethegeometryofa3Dobject,thusbenetfromthebuild-infeaturesofaDBMSlikeindexesandconstraints.However,itlosesthegeometryandexpensivetablejoinsanddatastructureconversionsareneededtoreconstructsuchageometry. Thegeometricalmodelstakeanobject-orientedapproach,thusaremoreintuitive.Theavailabilityofuserdeneddatatypes(UDT)inmostofthecommercialdatabasessystemsmakesitpossibletointegrategeometricalmodelsintodatabasesystems.Differentfromthetopologicalmodelsthatusessimplestgeometriesasconstructiveprimitives,thegeometricalmodelsusemoresophisticatedprimitivestodescribe3Dobjects.Agoodreviewofthegeometricalmodelscanbefoundin[ 58 ].OneapproachistodeneaprimitivecalledMultiPolygontorepresentavolumeobject[ 58 ].AMultiPolygonisacollectionof3Dpolygonsthatmayormaynotshareboundary.Thus,itcanbeutilizedtodenetheboundingsurfaceofavolumeobject.However,itisbasedontheexisting2DspatialpackageofmainstreamDBMS,e.g.OracleSpatial,thusisnotareal3Dsolution.Abetterapproachistoimplementpolyhedronastheprimitiveforvolumedatatypeindatabases.In[ 3 ],theauthorshowshow3Dspatialobjectscanbemodeled,i.e.stored,validatedandqueried,inaGeo-DBMSbyusing 25

PAGE 26

polyhedronasaprimitive.Apolyhedronprimitiveconsistsofoutershellsandinnershells,whereashellisasetofconnectedpolygonalfacesthatencloseasubsetofthe3Dspace.Thepolygonalfacesconsistsofouterringsandinnerrings,whereringsarerealizedbystoringtheverticesexplicitly(x,y,z)andbydescribingthearrangementoftheseverticesinthefacesofthepolyhedron.Apolyhedronrepresentsasimplevolumeobjectthatispossiblywithcavities.However,ithasdifcultytorepresentirregularcomplexvolumeobjectslikenon-manifoldsandmulti-componentvolumes.Further,thedatastructureisnotsuitableforspatialoperationslikeintersectionandvolumecomputation.Anotherattemptistousetetrahedronastheprimitiveforvolumes.Unlikeitscorrespondentsinthetopologicalmodelthatrepresentstetrahedrawithreferencestotriangles,thisapproachphysicallystorestetrahedra,andderivestrianglesandedgeswheneverneeded.Tetrahedronbasedmodelsarepresentedin[ 80 81 ].However,inthisapproach,theconnectivityinformationamongtetrahedaneedstobederived,thustolocateneighborsofatetrahedronbecomesveryexpensive. 2.3.3Operationson3DSpatialData Afewapproachesproposeoperationsonbasic3Dspatialobjects.In[ 26 105 ]besidesthegeometricsetoperationsintersection,union,anddifference,operationsaresuggestedthatcomputethepartofa3Dgeometrythatislocatedaboveanother3Dgeometry,projecta3Dgeometryontoaplane,andcalculatemetricvalueslikethedistance,area,andvolumeof3Dgeometries.In[ 103 ]thecollectionofoperationsproposedcontains(i)projectionfunctionsfrom2Dobjectstotheir3Dcounterparts,andviceversa,(ii)metricfunctionslikethelength,theminimum,maximum,andaveragegradientsandazimuthsof3Dpolylines,thegradient,azimuth,centerofgravity,centroid,surfacearea,andperimeterof3Dpolygons,andtheboundingcube,centerofgravity,centroid,surfacearea,andcontentofpolyhedra,and(iii)minimalandmaximaldistancecomputationsbetweenalltypesof3Dobjects.Theworkin[ 3 ]proposesapolyhedronprimitivewithoperationslikepoint-in-polyhedrontest,intersectiontest, 26

PAGE 27

computationofarea,perimeter,volume,boundingbox,andcentroid,anddistancebetweencentroids.OperationsoftheGeoToolKit[ 6 ]includedistance,surfacearea,andvolumefunctions,topologicalpredicatestestingforintersectionandcontainment,theintersectionoperation,andtheprojectionontoagivenplane. Insummary,despitelittlenuances,thereseemstobeaconsensusaboutthekindof3Dobjectsthatshouldbesupportedinamodelfor3Dspatialdata.However,itisunclearhowtheseobjecttypesshouldbedened,whatpropertiestheyshouldhave,whichoperationsandpredicatesshouldbedenedonthem,andhowtorepresentthesedatatypes.Itisthegoalofthisresearchworktoprovidethesolutions. 2.4QualitativeSpatialRelationshipsbetween3DSpatialData Researchonqualitativespatialrelationshipshashadalongtraditioninspatialdatabases,GeographicInformationSystems(GIS),andotherdisciplineslikecognitivescience,robotics,andarticialintelligence.Topologicalrelationshipsandcardinaldirectionsrelationshipsarethetwomostimportantqualitativespatialrelationshipsthatcharacterizetherelativepositionofspatialobjectslikeinside,meet,north,andwest.FromadatabaseandGISperspective,theexplorationoftheserelationshipsbetweenspatialobjectshasbeenmotivatedbytheneedofformallydenedtopologicalpredicatesanddirectionalpredicatesaslterconditionsforspatialselectionsandspatialjoinsinspatialquerylanguagesandasasupportforspatialdataretrievalandanalysistasks.Sofar,mosteffortshavefocusedonmodelingspatialrelationshipsbetweenobjectsin2Dspaceandthemodelsinthe3Dspacehavebeenrare. 2.4.1TopologicalRelationships Aspecialemphasisofspatialresearchhasbeenputontheexplorationoftopologicalrelationships(forexample,overlap,inside,disjoint,meet)betweenspatialobjects.Theydescribepurelyqualitativepropertiesthatcharacterizetherelativepositionsofspatialobjectstowardseachotherandthatarepreservedundercertaincontinuoustransformationsincludingallafnetransformations.Fromadatabaseand 27

PAGE 28

GISperspective,theirinvestigationhasbeenmotivatedbythenecessityofformallydenedtopologicalpredicatesaslterconditionsforspatialselectionsandspatialjoins.Extensivestudyhasbeenperformedonthetopologicalrelationshipsbetweentwospatialobjectsintwo-dimensionalspace.Animportantapproachforcharacterizingthemrestsontheso-called9-intersectionmodel,whichemployspointsettheoryandpointsettopology[ 32 ].Themodelisbasedontheninepossibleintersectionsoftheboundary(@A),interior(A),andexterior(A)]TJ /F1 11.955 Tf 7.09 -4.34 Td[()ofaspatialobjectAwiththecorrespondingcomponentsofanotherobjectB.Eachintersectionistestedwithregardtothetopologicallyinvariantcriteriaofemptinessandnon-emptiness.ThetopologicalrelationshipbetweentwospatialobjectsAandBcanbeexpressedbyevaluatingthematrixinFigure 2-1 .Atotalof29=512differentcongurationsarepossiblefromwhichonlyacertainsubsetmakessensedependingonthecombinationofspatialdatatypesjustconsidered.Acompletecollectionofmutuallyexclusivetopologicalrelationshipscanbedeterminedforeachcombinationofsimplespatialdatatypes[ 33 ]and,asageneralization,foreachcombinationofcomplexspatialdatatypes[ 88 ]. Atopicthathasbeenpartiallyformallyexploredattheabstractleveldealswithtopologicalrelationshipsbetweensimple3Dspatialobjects.In[ 31 ],theauthorappliesthe9-intersectionmodeltosimply-connected3Dspatialobjects,thatis,simple3Dlines,simplesurfaces(noholes),andsimplevolumes(nocavities),inordertodeterminetheirtopologicalrelationships.Table 2-1 showsthenumbersoftopologicalrelationshipsidentied.Zlatanovaalsoinvestigatedthepossible3Dtopologicalrelationshipsin[ 106 ]bydevelopingacompletesetofnegativeconditions.The9-intersectionmodelfor3D 0@A\B6=?A\@B6=?A\B)]TJ /F2 11.955 Tf 10.41 -4.34 Td[(6=?@A\B6=?@A\@B6=?@A\B)]TJ /F2 11.955 Tf 10.41 -4.33 Td[(6=?A)]TJ /F2 11.955 Tf 9.74 -4.34 Td[(\B6=?A)]TJ /F2 11.955 Tf 9.74 -4.34 Td[(\@B6=?A)]TJ /F2 11.955 Tf 9.74 -4.34 Td[(\B)]TJ /F2 11.955 Tf 10.4 -4.34 Td[(6=?1A Figure2-1. The9-intersectionmatrixfortopologicalrelationships. 28

PAGE 29

Table2-1. Numberoftopologicalpredicatesbetweentwosimple3DspatialobjectsintheEuclideanplaneIR3 simplesimplesimplesimple3Dpoint3Dlinesurfacevolume simple3Dpoint2333simple3Dline3332919simplesurface3294119simplevolume319198 canbeextendedwiththedimensionalitybeingconsidered.In[ 14 ],thevaluesofthematrixelementsareextended.Besidesthe?and:?symbols,theisusedtoindicatethenospecicationfortheresultingsetatthisposition,andthenumbers(0,1,2,3)refertothedimensionalityoftheresultingset.Therefore,unlikethe1:1mappingbetweenthematrixwithtopologicalrelationshipsin9-intersectionmodel,amatrixthatcontainsavaluerepresentsaclassoftopologicalrelationships.Asaresult,thetopologicalrelationshipsareclusteredandmanageabletotheuser.However,thefocushasbeenonlyonthesimple3Dspatialobjects,theexplorationofvalid9IMsforcomplexspatialobjectsisstillleftopen,andthisisourgoaltobridgethisgap. Abovetwomodelsincommonapplythesettheorytoidentifytopologicalrelationships.Thus,theycanbecategorizedtopoint-setbasedtopologicalrelationshipsmodels.Therearealsootherapproachesthatdonotemploythepoint-settheory.Theapproachin[ 82 ]investigatestopologicalpredicatesbetweencellcomplexes,whicharestructuresfromalgebraictopology.Itturnsoutthat,duetolimitationsofcellcomplexes,thetopologicalrelationshipsbetweenthemareonlyasubsetofthederivedpoint-setbasedtopologicalrelationships.Thetopologicalrelationshipsbetween3Dspatialobjectsthatconsistofaserialofcellcomplexescanbedescribedbythecombinationofrelationshipsbetweenthosecell[ 48 ].DimensionModelisamodelthatisindependentofthe9-intersectionmodel.Itdenesdimensionalelementsonaspatialobject,andallthedimensionalelementscontributetonalresult.Threelevelsofdetailsforthetopologicalrelationshipsaredevelopedfordifferentapplicationpurposes.Thedimensionmodelcan 29

PAGE 30

Figure2-2. Anexampleoftheprojection-baseddirectionalmodel. distinguishsomecases,especiallymeetcases,thatthe9-intersectionmodelcannotidentify.However,sinceitleavestheabstracttopologicalspacewhereonlypointsetsareused,itisnotclearhowthedimensionalelementscanbeconstructed. 2.4.2CardinalDirectionRelationships Besidestopologicalrelations,cardinaldirectionshaveturnedouttobeanimportantclassofqualitativespatialrelations.Itdescribesabsolutedirectionalrelationshipslikenorthandsouthwestwithrespecttoagivenreferencesystemincontrasttorelativedirectionalrelationshipslikefrontandleft;thus,cardinaldirectionsdescribeanorderinspace.Similartotopologicalrelations,inspatialdatabasestheyarealsorelevantasselectionandjoinconditionsinspatialqueries.Hence,thedeterminationofandreasoningwithcardinaldirectionsbetweenspatialobjectsisanimportantresearchissue.Foralongtimetheresearchfocushasbeenonthecardinaldirectionrelationsbetween2Dspatialobjects.Cardinaldirectionmodelsfor3Dspatialobjectsarerare.Mostmodelsdevelopedarepoints-basedmodelssothattheextentofobjectsisignored.AnabsolutedirectionmodelthatconsiderscardinaldirectionslikenorthandeastcanbefoundinSLC99GEOINF.Itignorestheelevationandprojectsthespacetoa2Dcoordinatesystem.InLLL08CSSE,aconceptualframeworkthatdepictspositionalrelationshipsincludingbothdistanceanddirectionrelationshipsisdeveloped.Forallthementionedmodels,spatialobjectsaregeneralizedaspoints,anddirectionsarebasedonpointlocationssothatthemodelsbecomeratherimprecise. 30

PAGE 31

Theprojection-baseddirectionalmodel[ 14 ]extrudesareferenceobjectalongthecoordinateaxesinthedirectionrequested.Theextrusionbodyistestedfortheintersectionwithatargetobject.ThemodelenablesthedenitionofthesemanticsofasetofcardinaldirectionssuchaseastOf,westOf,northOf,southOf,aboveandbelow.Figure 2-2 showsanexample.ThetwoextrusionbodiesofthereferenceobjectAareidentiedasaboveandbelow.ThetargetobjectBintersectstheextrusionbodybelowsothatBisbelowA.ThetargetobjectsCandDintersecttheextrusionbodyabovesothattheyareaboveA.ThetargetobjectEdoesnotintersectanyextrusionbodysothatnostatementcanbemade.Obviously,theexpressivenessisamajorweaknessofthismodelsincethemodelcannotdeterminethecardinaldirectionforallspatialcongurations. Thethree-dimensionalcardinaldirection(TCD)model[ 20 ]partiallyconsiderstheshapeofobjects.Basedonthedirectionrelationmatrix(DRM)model[ 44 ]forcardinalrelationsinthetwo-dimensionalspace,theTCDmodeltakestheminimumboundingbox(cube)ofareferenceobject,extendsitsboundaryfacestoplanes,anddividesthespaceinto27directiontiles,asshowninFigure 2-3 A.ThesuperscriptsU,BandMdenotethetop,middle,andbottomofthereferenceobject,respectively.Thismodelleadstothe27atomicTCDrelations,NWU,...,SEU,NWM,...,SEM,NWB,...,SEBthatsymbolizethebasiccardinaldirectionrelationsbetweenthecomponentsofthetargetobjectandthereferenceobject.TheTCDrelationsformasetofexhaustive (A)(B)(C) Figure2-3. TheTCDrelationmodel.The27atomicTCDrelations(A),andtwoscenarioswherethecardinaldirectionbetweentwoobjectsAandBarebothdir(A,B)=NU:OU:OM(B,C). 31

PAGE 32

andpairwisedisjointrelations.Figure 2-3 BshowsanexampleoftwovolumesAandB.IfAistakenasthereferenceobject,thenthedirectionrelationshipbetweenAandBisdir(A,B)=NU:OU:OM.TheTCDmodelpresentsamajorimprovementonexpressiveness.However,theshapeofthereferenceobjectdoesnotcontributetothedeterminationofnalresult,thusmayleadtothelossofprecisionandsometimesincorrectresults.Forinstance,inFigure 2-3 C,themodelyieldsdir(A,B)=NU:OU:OMasthedirectionrelationshipsbetweenobjectsAandB.ButthedirectionOUshouldnotbepartofdirectionrelationshipssincenopartofBliesdirectlyaboveA.Anotherproblemwiththismodelistheconversenessproblem,whichleadstounintuitivecardinalrelations.Forexample,themodelyieldsdir(B,A)=WM:OM:EM:SWM:SM:SEM:WB:OB:EB:SWB:SB:SEBinFigure 2-3 B.ButthisisunequaltotheexpectedinverseSB:OB:OMofdir(A,B). 32

PAGE 33

CHAPTER3ABSTRACTTHREE-DIMENSIONALDATAMODELING Anabstractmodelofthethree-dimensional(3D)datainspatialdatabasesprovidesrigorousandcomprehensivespecicationof3Dspatialdataand3Doperationsintermsofwhatthenatureofthe3Ddatais,howtoconstructsuchspatialobjects,andwhatthesemanticsoftheoperationsare.Onemustunderstandthat,whendevelopingadatamodel,itisimportanttostartwithanabstractmodelwhosefocusisoncompleteness,closure,consistencyandgenericityofthetypedenitionsandthesemanticsofoperations,ratherthantheperformanceissueslikeefciencyandscalabilityofthedatastructuresandalgorithms. Inthischapter,weintroduceindetailsanabstractdatamodelfor3Ddata,calledSpatialAlgebra3DattheAbstractLevel(SPAL3D-A).Werstpresentthedenitionsof3DspatialdatatypesandthesemanticsofcorrespondingoperationsinSection 3.1 .TheninSection 3.2 ,wediscusstwomajorqualitativespatialrelationshipsbetween3Dspatialobjects,whichismotivatedbytheneedofspatialpredicatesinthedatabasequerylanguage. 3.1AnAbstractModelofThree-DimensionalSpatialDataTypes WenowcometothecoreoftheSpatialAlgebra3DattheAbstractLevel(SPAL3D-A),thedenitionsofthethree-dimensional(3D)spatialdatatypesandoperations.Werstdescribesomedesignconsiderationsfor3DspatialdatatypesinSection 3.1.1 .Theremainingsectionsfocusontherigorousdenitionofeachsingledatatype(Section 3.1.2 )andtheoperationsonthem(Section 3.1.3 ). 3.1.1DesignConsiderations Thedevelopmentofour3DspatialdatatypesandSPAL3Dasawholeisinuencedbyseveraldesigncriteriawhichwesummarizeinthissubsection. Therstdesigncriterionreferstothegeneralityandversatilityofthespecied3Dspatialdatatypes.Thetypesshouldbedenedasgeneralaspossiblebutnot 33

PAGE 34

gobeyondspatialreality.Theyshouldbeapplication-neutral,i.e.,theyshouldnotberestrictedtoaparticularapplicationbutapplicabletoabroadanddiversespectrumofapplicationdomains. Aseconddesigncriterionisthefullmentofclosureproperties.Thismeansthatthetypesshouldbeclosedundertheoperationsofgeometricunion,intersection,anddifference.Theresultofeachsuchoperationshouldyieldawell-denedobjectthatcorrespondstothedenitionofthespatialdatatypes.Thebenetisthatpossiblegeometricanomalieslikedanglingormissingpiecesareavoided.Forexample,theintersectionoftwovolumesshouldbeavolumeagain;danglingandmissingpoints,lines,andsurfacesshouldnotexist. Athirddesigncriterionrelatestoarigorousdenitionofthedatatypes.Theirsemantics,whichdeterminestheadmissiblepointsetsfortheirobjects,requiresaformal,precise,anduniquedenitioninordertoavoidambiguitiesbothfortheuserandtheimplementor.Hence,wedesignanabstractmodelrst.Uniquenessespeciallyimpliesthateachobjecthasauniquerepresentation,evenifseveraldifferentrepresentationswouldyieldthesamepointsetforanobject. AfourthdesigncriterionistheextensibilityofthetypesystemofSPAL3D.ItiscommonconsensusinthespatialdatabaseandGIScommunitythatacompleteandclosedsetofspatialdatatypesandoperationscannotbedetermined.Eventhoughadesignermayprovideagoodcollectionoftypesandoperations,therewillalwaysbeapplicationsrequiringadditionaloperationsonavailabletypesornewtypeswithnewoperations.AtypesystemforSPAL3Dmustthereforebeextensiblefornewtypes,operations,andpredicates. Foreachdatatypewegivebothanunstructuredandastructureddenition.Theunstructureddenitiondeterminesthepointsetviewofaspatialobject,i.e.,suchanobjectisspeciedasapurepointset.Thestructureddenitiongivesanequivalent,uniquerepresentationandemphasizesthecomponentviewofa3Dspatialobject.In 34

PAGE 35

general,objectsofall3Dspatialdatatypesmayonlyincludeanitenumberofdisjointcomponents.Inaddition,surfacesmayhaveholes,andvolumesmayincorporatecavities.Theformalframeworkforbothviewsleveragespointsettheoryandpointsettopology[ 41 ].Weassumethatthereaderisfamiliarwiththeirbasicconceptsliketopologicalandmetricspaces.ForanobjectAofeach3Dspatialdatatype,wewilldistinguishdifferentobjectcomponentsandspecifythetopologicalnotionsofboundary(@A),interior(A),exterior(A)]TJ /F4 11.955 Tf 7.09 -4.34 Td[(),andclosure( A).Thesenotionsarelaterneeded,e.g.,forthecomputationoftopologicalrelationshipsbetween3Dspatialobjects. 3.1.2Three-dimensionalSpatialDataTypes 3.1.2.1MathematicalBackground:PointSetTopology Ourdenitionsofthespatialdatatypesinthree-dimensionalspacearebasedonpointsettheoryandpointsettopology[ 42 ].Spatialdataareembeddedintothethree-dimensionalEuclideanspaceR3andmodeledasinnitepointsets.Beforewepresenttheunstructuredandstructureddenitionsofthedatatypes,weintroduceafewneededmathematicalnotationsaswellassometopologicalandmetricconcepts. LetNbethesetofnaturalnumbers,N0=N[f0g,Rbethesetofrealnumbers,R+=fx2Rjx>0g,andRnwithn2Nbethen-dimensionalEuclideanspace.WeassumetheexistenceofaEuclideandistancefunctiond:R3R3!Rwithd(p,q)=d((x1,y1,z1),(x2,y2,z2))=p (x1)]TJ /F7 11.955 Tf 11.95 0 Td[(x2)2+(y1)]TJ /F7 11.955 Tf 11.95 0 Td[(y2)2+(z1)]TJ /F7 11.955 Tf 11.95 0 Td[(z2)2.Thenforanypointp2R3andr2R+,thesetNr(p)=fq2R3jd(p,q)rgiscalledthe(closed)neighborhoodwithradiusrandcenterp.WecanthinkoftheneighborhoodaroundpasaclosedballcontainingallofthepointsinR3thatarenearp. LetXR3andp2R3.pisaninteriorpointofXifthereexistsaneighborhoodNr(p)suchthatNr(p)X.pisanexteriorpointofXifthereexistsaneighborhoodNr(p)suchthatNr(p)\X=;.pisaboundarypointofXifpisneitheraninteriornorexteriorpointofX.pisaclosurepointofXifpiseitheraninteriororboundarypointofX.Thesetofallinterior/exterior/boundary/closurepointsofXiscalledtheinterior/ 35

PAGE 36

exterior/boundary/closureofXandisdenotedbyX/X)]TJ /F1 11.955 Tf 10.41 -4.34 Td[(/@X/ X.ApointpisalimitpointofXifforeveryneighborhoodNr(p)holdsthat(Nr(p))]TJ /F7 11.955 Tf 12.06 0 Td[(p)\X6=;.XiscalledanopensetinR3ifX=X.XiscalledaclosedsetinR3ifeverylimitpointofXisapointofX.ItfollowsfromthedenitionthateveryinteriorpointofXisalimitpointofX.Thus,limitpointsneednotbeboundarypoints.Theconverseisalsotrue.AboundarypointofXneednotbealimitpoint;itisthencalledanisolatedpointofX.FortheclosureofXweobtainthat X=@X[X. Forthespecicationofthespatialdatatypes,denitionsareneededforboundedandconnectedsets.TwosubsetsX,YR3aresaidtobeseparatedif,andonlyif,X\ Y=?= X\Y.AsetXR3isconnectedif,andonlyif,itisnottheunionoftwononemptyseparatedsets.AsetXR3issaidtobeboundedifthereisanr2R+suchthatjjpjj
PAGE 37

homeomorphicspaceshavethesametopology,oraretopologicallyequivalent.Iftwotopologicalspacesaretopologicallyequivalent,theyareindistinguishablebytopologicalmethods,sofromatopologicalviewpointtheyarethesame.Roughlyspeaking,atopologicalsetisageometricobject,andthehomeomorphismisacontinuoustilting,translating,bendingandtwistingoftheobjectintoanewgeometricshape.Thus,asquareandacirclearehomeomorphictoeachother,butasphereandadoughnutarenot. Finally,weintroducethedenitionsforthesimplestgeometricshapesofeverydimensioninDenition 2 .Wecalltheseshapesthen-dimensionaldiskdenotedasDn. Denition2. Letr2R+,thenwerefertothesetBr(O)=fp2Rnjkpkrgasthen-dimensionaldiskwithradiusrorsometimesthen-dimensionalball,denotedDn.Theboundaryofthen-dimensionaldiskDn,denotedas@Dn,isdenedtobetheset@Br(O)=fp2Rnjkpk=rg.Theinteriorofthen-dimensionaldiskDn,denotedas(Dn),isdenedtobethesetBr(O)=fp2Rnjkpk
PAGE 38

Figure3-1. Apoint3Dobject. applicationperspectivea3Dpointobjectshouldbeabletoincorporateanitesetofsingle3Dpoints. Denition 3 speciesavalueoftypepoint3Dasanitesetofsingleorisolatedpointsinthe3Dspace.Unstructuredandstructureddenitionscoincideforthistype. Denition3. Thespatialdatatypepoint3Disdenedas point3D=fPR3jPisniteg Wecallavalueofthistypecomplexpoint.IfP2pointisasingletonset,i.e.,jPj=1,Pisdenotedasasimplepoint.IfjPj=0,i.e.,P=?,Piscalledemptypoint.Thetopologicalnotionsofboundary,interior,exterior,andclosureofapoint3Dobjectaredenedasfollows.Forasimplepointp,wespecify@p=?andp=p.ForacomplexpointP=fp1,...,png,weobtain@P=?,P=Sni=1pi,P)]TJ /F4 11.955 Tf 10.43 -4.34 Td[(=R3)]TJ /F4 11.955 Tf 11.97 0 Td[((@P[P)=R3)]TJ /F7 11.955 Tf 11.97 0 Td[(P,and P=@P[P=P. Denition 3 statesthattypepoint3D(seeanexampleinFigure 3-1 )containsallnitesetsofthepowersetofR3.Theemptypoint?istheidentityofgeometricunionandisadmittedsinceitcanbetheresultofageometricoperation,e.g.,ifapointobjecthasnothingincommonwithanotherpointobjectinageometricintersectionoperation. 3.1.2.3TheDataTypeline3D Three-dimensionallinesaretheoriginofthereductionandgeneralizationprocessto2Dlinesandtheone-dimensionalobjectsinthe3Dspace.Again,theinvolvementofthethirddimension,i.e.,theheight,makesthefundamentaldifference.Forexample, 38

PAGE 39

ifweconsideraroadinthemountainsasa3Dcurve,thiscurvehasratherdifferentpropertiesthanits2Dcounterpart.Thelengthcomputationwillleadtodifferentvalues.The3Dlinegeometryofaroadenablescalculationslikethemaximum,minimum,oraverageheightoftheroadaswellasthemaximumorminimumslope.Thismakesitpossible,e.g.,tocapturethe3DgeometryoftheU.S.busnetworkinasingle3Dlineobjectandtointersectitwithanothersingle3DlineobjectmodelingtheU.S.taxinetwork.Forthese3Dobjects,thissectioncontainsthedenitionofthespatialdatatypeline3D. Beforewepresenttheunstructuredandstructureddenitionsofthisdatatype,weintroduceafewneededmathematicalnotationsaswellassometopologicalandmetricconcepts.LetNbethesetofnaturalnumbers,N0=N[f0g,Rbethesetofrealnumbers,R+=fx2Rjx>0g,andRnwithn2Nbethen-dimensionalEuclideanspace.Fortwopointsp=(x1,y1,z1),q=(x2,y2,z2)2R3,weassumetheexistenceoftheEuclideandistancefunctiondist:R3R3!Rwithdist(p,q)=p (x1)]TJ /F7 11.955 Tf 11.96 0 Td[(x2)2+(y1)]TJ /F7 11.955 Tf 11.96 0 Td[(y2)2+(z1)]TJ /F7 11.955 Tf 11.95 0 Td[(z2)2.Withthisnotionofdistance,wecanproceedtodenewhatismeantbyaneighborhoodofapointinR3.Forp2R3and2R+,thesetN(p)=fq2R3jdist(p,q)
PAGE 40

Denition 5 introducesthenotionsofaconnectedset,apath-connectedset,andaboundedsetinR3. Denition5. TwosubsetsX,YR3aresaidtobeseparatedifX\ Y=?= X\Y.AsetXR3isconnectedifitisnottheunionoftwononemptyseparatedsets.AsetX2R3ispath-connectedifforallpointsx,y2Xthereisacontinuousmappingf:[0,1]!Xsuchthatf(0)=xandf(1)=yholds.AsetXR3issaidtobeboundedifthereisanr2R+suchthatjjpjj0g.Theclosureofthissetisconnectedbutnotpath-connected.Itsboundaryisthesetf(0,z)j)]TJ /F4 11.955 Tf 21.36 0 Td[(1z1gbutthereisnocontinuouspathwithintheclosurethatjoinspointsoftheinterior(i.e.,thecurveitself)withpointsoftheboundary.AlthoughAdoesnotreachthey-axis,itshowsabadbehaviornearthataxisbecauseitoscillatesanunboundednumberoftimesasitapproaches.Suchanunboundednumberofoscillationscannotbelatermappedtoaniterepresentationinanimplementation;hence,weareinterestedinexcludingthiscasefromourobjectrepresentations.Therequirementofpath-connectednessofapointsetexcludesthiscase.Thedeeperreasonisthateachpath-connectedsetissemi-analytic[ 70 ]andthat Figure3-2. Thetopologist'scurve(x,sin x)forx>0. 40

PAGE 41

thisisnotthecaseforconnectedsets.NotethatthesetAr=f(x,sin x)jxr>0gispath-connected;itoscillatesanitenumberoftimesasitapproachesx=r.2 Finally,forafunctionf:Xs!YandasetAXweintroducethenotationf(A)=ff(x)jx2Ag.Denition 6 givesusanunstructureddenitionfor3Dlinesastheunionoftheimagesofanitenumberofcontinuousmappings. Denition6. Thespatialdatatypeline3Disdenedas line3D=fLR3j(i)L=Sni=1fi([0,1])withn2N0andfi:[0,1]!R3(ii)81in:fi:[0,1]!R3isacontinuousmapping(iii)81in:fi([0,1])isaboundedandpath-connectedset(iv)81in:jfi([0,1])j>1g Wecallavalueofthistypecomplexline.Forn=1,weobtainasimpleline;forn=0,wegettheemptyline?indicatingtheemptypointset. Condition(i)denesacomplex3Dlineobjectastheunionoftheimagesofanitenumberofmappingsfromtheone-dimensionalinterval[0,1]tothe3Dspace.Condition(ii)requiresthateachofthesefunctionsiscontinuousaccordingtoDenition 4 .Condition(iii)onlyadmitswellbehavingpointsetsasimagesofthesefunctions.Condition(iv)avoidsdegeneratelineobjectsconsistingofasinglepoint.Imagesofdifferentfunctionsmayintersecteachother.Thesamelineobjectcanberepresentedbydifferentcollectionsoffunctions.Figure 3-3 Ashowsacomplex3Dlinethatcanbedescribedastheunionoftheimagesofsixcontinuousmappingsaccordingtotheunstructuredview. Example3.1.0. Tounderstandthedenitionbetter,itisworthwhiletohaveacloserlookatasingleimagel([0,1]).Avector-valuedfunctionorvectorfunctionrcanrepresentsuchanimage.Itisafunctionwhosedomainisthesetofrealnumbersandwhoserangeisasetof3Dvectors.ThismeansthatforeverynumbertinthedomainofrthereisauniquevectorinV3(thesetofall3Dvectors)denotedbyr(t).Iff(t),g(t),andh(t) 41

PAGE 42

(A)(B) Figure3-3. Acomplex3Dlineobjectexample.Acomplex3Dlinethatcanbedescribedastheunionoftheimagesofsixcontinuousmappings(thickpointsindicatethestartandendpointsofthefi)intheunstructuredviewandasthreeblocksinthestructuredview(A),andaspacecurveasacomponentofaline3Dobject(B). arethecomponentsofthevectorr(t),thenf,g,andharereal-valuedfunctionscalledthecomponentfunctionsofr,andwecanwrite r(t)=hf(t),g(t),h(t)i=f(t)i+g(t)j+h(t)k wherei=h1,0,0i,j=h0,1,0i,andk=h0,0,1iarethestandardbasisvectorsinV3.Iff,g,andharecontinuous,thenrisalsocontinuous.Wecanobserveacloseconnectionbetweencontinuousvectorfunctionsandline3Dobjects.Supposef,g,andharecontinuousrealvaluedfunctionson[0,1].ThenthesetC=f(x,y,z)2R3jt2[0,1],x=f(t),y=g(t),z=h(t)gdescribesaspacecurve,i.e.,acomponentofaline3Dobject.Ifweconsiderthevectorfunctionr(t)=hf(t),g(t),h(t)i,thenr(t)isthepositionvectorofthepointP=(f(t),g(t),h(t))onC.Thus,anycontinuousvectorfunctionrdenesaspacecurveCthatistracedoutbythetipofthemovingvectorr(t),asshowninFigure 3-3 B.Obviously,risboundedandpath-connected.2 Forastructureddenition,weseparatethepointsetofaline3Dobjectintoappropriatecomponentscalledcurves.Acurve,whichisformallydenedinDenition 7 ,isconsideredanon-self-intersecting3Dlineandthusarestrictedspacecurve.Thisrestrictioncouldberelaxedbuthastheadvantagethateachcomplex3Dlinecanbeuniquelydescribedasacollectionofnon-self-intersecting3Dlines. Denition7. ThesetcurvesofcurvesoverR3isdenedas 42

PAGE 43

curves=ff([0,1])j(i)f:[0,1]!R3isacontinuousmapping(ii)f([0,1])isaboundedandpath-connectedset(iii)8a,b2]0,1[:a6=b)f(a)6=f(b)(iv)8a2f0,1g8b2]0,1[:f(a)6=f(b)(v)jf([0,1])j>1g Thevaluesf(0)andf(1)arecalledtheendpointsofacurve.Iff(0)=f(1),wecallthecurveclosedoraloop. Thisdenitionforbidsself-intersecting(condition(iii))andself-touching(condition(iv))curves,i.e.,theequalityofdifferentinteriorpointsandtheequalityofaninteriorpointwithanendpoint.Asanimportantspecialcase,wementioncurvesthatdescribestraightlinesegmentsinthe3Dspace. Forauniquedenitionofcomplexlinesfromasetofcurves,wewillhavetorequirethatthesecurvesdonotshareanypointsexceptcommonendpoints.Forthispurpose,inDenition 8 ,wespecifythepredicatesquasi-disjointandmeetoncurves. Denition8. LetAcurves,andletl1,l22Abedenedbythefunctionsf1andf2.Then l1andl2arequasi-disjoint,8a,b2]0,1[:f1(a)6=f2(b)^8a2f0,1g8b2]0,1[:(f1(a)6=f2(b)^f2(a)6=f1(b))^:((f1(0)=f2(0)^f1(1)=f2(1))_(f1(0)=f2(1)^f1(1)=f2(0)))l1andl2meet,l1andl2arequasi-disjoint^9a,b2f0,1g:f1(a)=f2(b)l1andl2areconnectedinA,9c1,...,cn2A:l1=c1,l2=cn,and8i2f1,...,n)]TJ /F4 11.955 Tf 11.95 0 Td[(1g:ciandci+1meet Duetotheuniquenessconstraint(seeSection 3.1.1 ),thedenitionofquasi-disjointrequiresthattwocurvesdonotshareanyinteriorpoints,anendpointofonecurvedoesnotcoincidewithaninteriorpointoftheothercurve,andbothcurvesdonotformaloop 43

PAGE 44

together.Thereasonforforbiddingsuchcompositeloopsisthataloopcanbedescribedbyasinglefunction.Notethattwocurvesthatarebothloopsandmeetinacommonendpointarequasi-disjoint.Twocurvesmeetiftheyshareexactlyandonlyoneendpoint.Twocurvesinasetareconnectediftheycanbelinkedbyachainofcurvesofthatset. Next,inDenition 9 ,weintroducetheconceptofablockspecifyingaconnectedcomponentofacomplexline. Denition9. Thesetblocksofblocksoverthesetcurvesisdenedas blocks=fSmi=1lij(i)m2N,81im:li2curves(ii)81i
PAGE 45

line3D=fSni=1bij(i)n2N,81in:bi2blocks(ii)81i
PAGE 46

(A)(B)(C)(D) Figure3-4. ThesubsetLNr(p,X)isalocalneighborhoodofthepointpinsubsetXin(A),(B),(C)and(D). Denition11. LetXbeasubsetinthethree-dimensionalEuclideanspaceR3(XR3),pbeapointinXandNr(p)betheneighborhoodwithradiusrandcenterp,thenthesetLNr(p,X)=Nr(p)\XiscalledthelocalneighborhoodofpinX. Withtheconceptoflocalneighborhood,wecannowdeneasurface.AsimpleformofasurfaceisasetXwhereforanypointp2X,thereexistalocalneighborhoodLNr(p,X)suchthatLNr(p,X)ishomeomorphictoa2Ddisk(D2)[ 42 ].Inotherword,asimpleformofasurfaceisasetwhereeverywhereislocallyhomeomorphictoaclosed2Ddisk(Figure 3-4 A).Wecallsuchsurfacesthesimplemanifoldsurfacesandwegivethedetaileddenitionlater.However,intherealworld,asurfaceobjectismorecomplex,whichmaycontainpointswheresuchahomeomorphismtoa2Ddiskdoesnotexist.Forexample,thesetXinFigure 3-4 Cisintuitivelyasurfaceobject,butitisnothomeomorphictoa2Ddiskatpointp.Thus,weaimatdeningthemostgeneralformofasurfaceobjectthatisbounded,doesnotcontainanyvolumepart,tanglinglinesortanglingpoints,andpossiblycontainsmultiplesurfacecomponents.Forthispurpose,werstdeneasurfacepoint. Denition12. LetXR3andp2X.WecallpasurfacepointinXif,andonlyif,thereexistsalocalneighborhoodLNr(p,X)atpwithsomeradiusrsuchthatthefollowingconditionshold: (i)9n2N9N1,N2,...,NnLNr(p,X):LNr(p,X)=n[i=1Ni(ii)81i
PAGE 47

Condition(i)meansthatanappropriatelocalneighborhoodofpcanbecoveredbyanitenumberofsubsets.Theeasiestcaseisthatn=1holds.ThismeansthelocalneighborhoodaroundpformsasimplesurfaceasindicatedinFigures 3-4 Aand 3-4 B.Condition(ii)onlyallowsthatanytwosubsetsofthedecompositionshareeitherthepointporacurvethatcontainsp.AnexamplefortherstcaseisgiveninFigure 3-4 Cbythepointpandthetwoincidentgreysubsurfaces.AnexampleforthesecondcaseisgiveninFigure 3-4 Dbythepointqandthetwoincidenttriangles.Condition(iii)requiresthatallsubsetsaretopologicalequivalenttoaclosed2Ddisk.Asaresult,eachsurfacepointhasalocalneighborhoodthatdoesnotcontainanyvolumeparts,danglinglines,orisolatedpointsbutpossiblymultiplesimplesurfacecomponents. Ingeneral,asurfacecanbedenedasasetthatcontainsonlysurfacepoints.Itensuresthatvolumeparts,danglinglines,orisolatedpointsdonotexistinasurfaceobject.Thus,wecallasetXasurfacesetifXcontainsonlysurfacepoints.However,itrunsintotheproblemthatitmayhavemissingpointsandlinesintheformofpuncturesandcuts.Thuswedeneadditionalconceptstoavoidtheseanomalies.WedenetheexteriorofasetXinR3.pisanexteriorpointofXifthereexistsaneighborhoodNr(p)suchthatNr(p)\X=;.ThesetofallexteriorpointsofXiscalledtheexteriorofXandisdenotedbyX)]TJ /F1 11.955 Tf 7.08 -4.34 Td[(.WecanobservethatanymissingpointsormissinglinesinasurfacesetXarenotexteriorpointsofthesetX.ItisbecausethattheneighborhoodofapuncturepointoracutlinealwaysintersectswithX.Thus,wecallXaregularsurfacesetifXcontainsonlysurfacepointsandX=R3)]TJ /F7 11.955 Tf 11.96 0 Td[(X)]TJ /F1 11.955 Tf 7.08 -4.34 Td[(. wearenowabletogivetheunstructuredtypedenitionforcomplexsurfacesinDenition 13 Denition13. Thespatialdatatypesurfaceisdenedas 47

PAGE 48

(A)(B)(C)(D)(E)(F) Figure3-5. Examplesofthesimplemanifoldsurfaces.Examplesoftheclosedsimplemanifoldsurfaces(A,B,C)andexamplesoftheopensimplemanifoldsurfaces(D,E,F). surface=fSR3j(i)Sisaboundedset(ii)8p2S:pisasurfacepointinS(iii)S=R3)]TJ /F7 11.955 Tf 11.95 0 Td[(S)]TJ /F14 11.955 Tf -82.38 -28.25 Td[((iv)Thenumberofpath-connectedsubsetsofSisniteg Wecallavalueofthistypeacomplexsurface. Thestructureddenitionmodelscomplexsurfacesasobjectspossiblyconsistingofseveralcomponents.Justlikeseparatingthepointsetofaregion2Dobjectintosimpleregions,weseparatethepointsetofasurfaceintosimplesurfaces.Asimplesurfaceobjectisthenon-separablebasicunitofasurfaceobject.Tostateadenitionofsimplesurface,westartwiththedenitionofsimplemanifoldsurfacesinDenition 14 Denition14. ThesetsmsofsimplemanifoldsurfacesoverR3isdenedas sms=fSR3j(i)Sisaconnectedandboundedset(ii)8p2S,9r2R+,h:LNr(p,S)!D2,wherehishomeomorphismg Condition(i)eliminatesdisjointsurfacesets.Condition(ii)automaticallyensuresallconditionsintheunstructureddenitiontobesatised.Amanifoldsurfaceis,everywhere,locallyhomomorphic(thatis,ofcomparablestructure)toa2-dimensionaldisk.Thusitisthesimplestformofasurfaceobject.Figure 3-5 showstheexamplesofsimplemanifoldsurfaces.However,simplemanifoldsurfacesdescribeonlyasubsetofsimplesurfaces.Condition(ii)istoorestrictforsimplesurfacesinrealworldandthuscanbeeasilyviolated.Ifwepickacornerofapieceofpaperandattachittoanotherpointonthatpaper,theresultisnotanobjectofsimplemanifoldsurfacetype. 48

PAGE 49

(A)(B)(C)(D)(E) Figure3-6. Examplesofthesimplenon-manifoldsurface.Examplesoftheclosedsimplenon-manifoldsurfaces(A,B,C)andexamplesoftheopensimplenon-manifoldsurfaces(D,E). Condition(ii)isviolatedattheattachedpoint,becauseonthatpointtheredoesnotexistalocalneighborhoodthatishomeomorphictoa2-dimensionaldisk.Wecallsuchpointsnon-manifoldsurfacepoints,andwegivetheirdenitioninDenition 15 Denition15. LetSR3andp2S.Wecallpanon-manifoldsurfacepointonS,iftheredoesnotexistr2R+,sothatLNr(p,S)ishomeomorphictoa2-dimensionaldiskD2. TheDenition 15 indicatesthatanysubsetinEuclideanspaceR3containinganon-manifoldsurfacepointisnotlocallyhomeomorphictoa2-dimensionaldiskatthatspecicnon-manifoldsurfacepoint.Withthisconceptbeingintroduced,wecannowgivethedenitionforsimplenon-manifoldsurfacesasfollows: Denition16. Thesetsnmsofsimplenon-manifoldsurfacesoverR3isdenedas snms=fSR3j(i)Sisaconnectedandboundedset(ii)8p2S,r2R+:LNr(p,S)6=Nr(p)(iii)8p2S,r2R+:9NLNr(p,S),whereNishomeomorphictoD2g(iv)9nmp=fp2Sjpisanon-manifoldsurfacepointonSg:S)]TJ /F7 11.955 Tf 11.96 0 Td[(nmpisaconnectedsetg InDenition 16 ,condition(ii),(iii)excludesvolume,tanglinglinesandtanglingpointsfromthedenition.Condition(i)eliminatesdisjointsets.Thesimplepropertyandthenon-manifoldfeatureareensuredbycondition(iv).Theexistenceofnon-manifoldsurfacepointsdistinguishesanon-manifoldsurfaceobjectfromamanifoldsurfaceobject.Further,anon-manifoldsurfaceobjectisalsosimplebecausetheremovalof 49

PAGE 50

allnon-manifoldsurfacepointsresultsinasingleconnectedandnon-separableset.Figure 3-6 showsexamplesofsimplenon-manifoldsurfaces.Nowthedenitionforsimplesurfacescanbegivenasfollows: Denition17. ThesetssofsimplesurfacesoverR3isdenedas ss=sms[snms Asimplesurfacethereforeiseitherasimplemanifoldsurfaceorasimplenon-manifoldsurface.Thedenitionofsimplesurfacesprovidesasimplest,non-separableformofapossiblesurfaceobject.Now,wedistinguishtheinterior,exterior,andtheboundaryofasurfaceobject.LetXR3andp2R3,pisaninteriorpointofXifthereexistsaneighborhoodNr(p)suchthatNr(p)X.TheinteriorofX(X)isasetthatconsistsofallinteriorpointsinX.However,thisdenitiondoesnotworkonsurfaceobjects,itisbecausethatifX6=;thenXisasetwithvolumes,thusXisnotasurfaceobject.Asaresult,weneednewdenitionsfortheinteriorofasimplesurfaceobject.GivenasimplemanifoldsurfaceS2ss,itsinteriorisdenedas: S=fp2Sj9r2R+:(i)9h:LNr(p,S)!D2,wherehishomeomorphism(ii)Nr(p))]TJ /F7 11.955 Tf 11.96 0 Td[(LNr(p,S)isnotaconnectedsetg TheabovedenitionfortheinteriorofasurfaceobjectensuresthatthesimplesurfaceSislocallyhomeomorphictoa2-dimensionaldiskatitsinteriorpoints(condition(i))andtheinteriorpointsdonotlieontheedgeofasurfaceobject(condition(ii)).WedonotchangethedenitionoftheexteriorsetofasimplesurfacesetX.ThustheboundaryofthesimplesurfaceXis@X=R3)]TJ /F7 11.955 Tf 12.19 0 Td[(X)]TJ /F7 11.955 Tf 12.19 0 Td[(X)]TJ /F1 11.955 Tf 7.08 -4.33 Td[(,andtheclosureofthesimplesurfaceXis X=X[@X.Forexample,thepointpinFigure 3-4 AisainteriorpointofthesurfaceX,whilethepointpinFigure 3-4 BisaboundarypointofthesurfaceX.Moreover,if@S=;,wecallSanopensimplesurfacebecauseitdoesnothaveboundarythatenclosesitsinterior(Figure 3-5 D-FandFigure 3-6 D-E).Otherwise,Sisaclosedsimplesurface(Figure 3-5 A-CandFigure 3-6 A-C). 50

PAGE 51

Amoregeneralsurfaceobjectusuallycontainsacollectionofsuchsimplesurfaces.Forexample,Figure 3-7 Ashowsasurfacethatconsistsoftwoconnectedsimplemanifoldsurfaceobjects.AmoregeneralsurfaceexampleisshowninFigure 3-7 B,whichconsistsofthreeconnectedsimplesurfaceobjectsandadisconnectedrectangle.However,itispossibletorepresentasurfaceoroneofitscomponentsbydifferentcollectionsofsimplesurfaces.Thus,therepresentationofageneralsurfaceobjectwithsimplesurfacesmaynotunique.Forexample,theintersectionoftwocomponentsofageneralsurfacemaybealinespanningtheinteriorsofbothofthem.Then,itisnotclearwhetherweshouldviewtheunionofthetwotwocomponentsasbeingtwo,three,orfoursimplesurfaces.(Foranillustrationofthis,seeFigure 3-7 C).Theintersectionmayalsobealinecrossingonlypartiftheinteriorofoneofthetwocomponents.Inthiscase,wecanviewthesurfaceasanintersectionofeithertwoorthreesimplesurfaces.Onlywhentheintersectionoftwosuchcomponentsisapointistherenoconfusionaboutwhatthemanifoldsare.Thusweneedaformaldenitionofacomponenttoasurfacethatcanonlybeinterpretedonewayinsofarasthesimplesurfacesthatcompriseit.Weplacecertainconstraintsontheintersectionofsimplesurfaceswithothersimplesurfacessothatwecanobtainadenitionthatprovidesforuniqueness.Considerthereforethefollowingconceptofacompositesurfacetospecifyaconnectedcomponentofageneralsurfaceobject.Thisdenitionincorporatesconstraintsthateliminateambiguityaboutthesimplesurfacesthatcompriseageneralsurface. Denition18. ThesetcsofcompositesurfacesoverR3isdenedas (A)(B)(C) Figure3-7. Generalsurfacesthatconsistofacollectionofsimplesurfaces. 51

PAGE 52

(A)(B)(C)(D)(E) Figure3-8. Examplesofcompositesurfaceobjects. cs=fSmi=1Sij(i)m2N,81in:Si2ss(ii)LetI=fp2R3jcard(Sij1im^p2Si)>1g.(a)8p2I:pisanon-manifoldsurfacepoint(b)81im:Si)]TJ /F7 11.955 Tf 11.95 0 Td[(Iisaconnectedsetg InDenition 18 ,Condition(ii)introducestwoconstraintsontheintersectionsetI,whichcontainsallpointsthataresharedbymorethanonesimplesurfaces.Condition(ii)aexpressesthatduetotheuniquenessconstraintasharedpointmustbeanon-manifoldpoint.Otherwise,ifthereexistsasharedpointthatisnotanon-manifoldpoint,thenrstwecanconcludethatitisonlysharedbytwosimplesurfaces.Second,bydenitiontheunionofthesetwosimplesurfacebecomesanothersimplesurfacebecausethetwosimplesurfaceswillstillbeconnectedthroughthatsharedpointaftertheremovalofnon-manifoldpoints.Inthiscase,wecanreplacethetwosimplesurfaceswiththeirunion,andarestillbeabletorepresentthesamesurfaceobjects.Thisviolatestheuniquenessconstraint.Condition(ii)bexpressesthattheremovalofsharedpointsfromeverysimplesurfaceshouldnotaffecttheirconnectivity.Otherwise,thesimplesurfacecanbefurtherbrokendowntosmallersimplesurfacecomponents,andtheuniquenessrepresentationconstraintwillbeviolated. Thedenitionofcompositesurfacesgivesauniqueinterpretationintermsofacollectionofsimplesurfacesforanygeneralconnectedsurfaceobject.Figure 3-8 showsseveralexamplesofthecompositesurfaceobjects.Accordingtothedenition,wecanidentifyuniquerepresentationforeachofthesesurfaceobjects.Forexample,Figure 3-8 Aisacompositesurfaceconsistsofthreerectangles.Figure 3-8 Bisa 52

PAGE 53

compositesurfaceconsistsoftwosimplesurfaces,asimplenon-manifoldandasimplemanifoldtobespecic.WhereasFigure 3-8 Cshowsacompositesurfaceexamplethatconsistsofthreesimplesurfaces.Further,letCSbeacompositesurfaceobjectwithsimplesurfacesS1,...,Sm,thentheinteriorofCSisCS=Smi=1SiandtheboundaryofCSis@CS=Smi=1@Si. Twocompositesurfacesc1,c22csaredisjointif,andonlyif,c1\c2=;.Thestatingofthestructureddenitionforcomplexsurfaceisnowpossible.Thestructureddenitionofthespatialdatatypesurfaceis Denition19. ThesetsurfaceofcomplexsurfacesoverR3isdenedas surface=fSni=1cij(i)n2N,81in:ci2cs(ii)81i
PAGE 54

punctures,cuts,andstripes.Atanyrate,itsboundaryismissing.Avolumedenedasaclosedpointsetadmitsisolatedordanglingpoint,line,andsurfacefeatures. Regularclosedpointsets[ 101 ]avoidtheseanomalies.LetXR3.Xiscalledregularclosedif,andonlyif,X= X.Theeffectoftheinterioroperationistoeliminatedanglingpoints,danglinglines,danglingsurfaces,andboundaryparts.Theeffectoftheclosureoperationistoeliminatepunctures,cuts,andstripesbyappropriatelysupplementingpointsandaddingtheboundary.Duetotheirdenition,closedneighborhoodsareregularclosedsets. Withthedenitionofboundedandconnectedsetsintroduced,wearenowabletogiveanunstructuredtypedenitionforvolumesinDenition 20 Denition20. Thespatialdatatypevolumeisdenedas volume=fVR3j(i)Visregularclosed(ii)Visbounded(iii)ThenumberofconnectedsetsofVisniteg Wecallavalueofthistypeacomplexvolume. Althoughthisdenitiontellsuswhatavolumeis,itdoesnotrevealhowonebuildsavolume.Asfortheotherdatatypes,therefore,weneedtoconstructastructureddenitionofvolumewhichenforcestheuniquenessconstraintaboutthecomponentswhichcompriseavolume.Thestructureddenitionmodelscomplexvolumesasobjectspossiblyconsistingofseveralcomponentsandpossiblyhavingcavities.Itdistinguishessimplevolumes,simplevolumeswithcavities(alsocalledsolids),andcomplexvolumes.Inordertoobtainamorene-grainedandstructuredviewofvolumes,thesimplevolumesarefurtherdistinguishedwithmanifoldsandsimplenon-manifolds,westartwiththedenitionofthesimplestvolumeobject,whichwecallthemanifolds,inDenition 21 Denition21. ThesetmanifoldsoverR3isdenedas 54

PAGE 55

(A)(B)(C)(D)(E) Figure3-9. Simplevolumeexamples.Examplesofamanifold(A),anon-manifold(B),andsimplevolumeswithcavities(C,D,E). manifolds=fVR3j(i)Visregularclosed(ii)Visbounded(iii)R3)]TJ /F7 11.955 Tf 11.96 0 Td[(Visaconnectedset(iV)8p2V,9r2R+,h:LNr(p,V)!D3,wherehishomeomorphismg Thisdenitiongivestheformaldescriptionofasimplestvolumeobjectin3Dspace,thathasconnectedinteriorwithoutanomalies(condition(i)andcondition(ii)),hasnocavities(condition(iii)),andiseverywherelocallyhomomorphic,i.e.topologicallyequivalent,toathree-dimensionalball(condition(iv)).Figure 3-9 Ashowsanexampleofamanifold.However,thisdescribesonlyasubsetofsimplevolumes.Thecondition(iv)istoostrictforalargenumberofothersimplevolumeobjects.Thereexistanothersetofsimplevolumes,whichwecallthesimplenon-manifoldvolumes.Todenethesimplenon-manifolds,werstrenethedenitioninDenition 15 anddenetheconceptofnon-manifoldvolumepointsinDenition 22 Denition22. LetVR3andp2S.Wecallpanon-manifoldvolumepointonV,iftheredoesnotexistr2R+,sothatLNr(p,V)ishomeomorphictoa3-dimensionalballD3. TheDenition 22 indicatesthatanypointsetinR3Euclideanspacecontaininganon-manifoldvolumepointisnotlocallyhomeomorphictoa3-dimensionalballatthatspecicnon-manifoldvolumepoint.Withthisconceptbeingintroduced,wecannowgivethedenitionforsimplenon-manifoldsasfollows: Denition23. Thesetsnmofsimplenon-manifoldsoverR3isdenedas 55

PAGE 56

snm=fVR3j(i)Visregularclosed(ii)Visbounded(iii)R3)]TJ /F7 11.955 Tf 11.95 0 Td[(Visaconnectedset(iv)9nmp=fp2Vjpisanon-manifoldvolumepointg:V)]TJ /F7 11.955 Tf 11.95 0 Td[(nmpisaconnectedsetg Ingeneral,volumesdescribedinDenition 23 arevolumeobjectsthathaveconnectedinteriorwithoutanomalies(condition(i)andcondition(ii))andhavenocavities(condition(iii)).Buttheyinvolvenon-manifoldvolumepoints(condition(iv)),atwhichisnotlocallyhomeomorphictoa3-dimensionalball.ThisfeaturedistinguishesthemfrommanifoldswedenedinDenition 21 .Further,thecondition(iv)ensuresittobesimplebecausetheremovalofallnon-manifoldvolumepointsresultsinasingleconnectedandnon-separableset.Figure 3-9 Bshowsanexampleofasimplenon-manifold.Nowthedenitionforsimplevolumescanbegivenasfollows: Denition24. ThesetsvofsimplevolumesoverR3isdenedas sv=manifolds[snm This,inparticular,meansthatasimplevolumeiseitheramanifoldorasimplenon-manifoldthathasaconnectedinterior,aconnectedboundary,andasingleconnectedexterior.Hence,itdoesnotconsistofseveralcomponents,anditdoesnothavecavities.Theconceptofacavityistopologicallynotdirectlyinferablesincepointsettopologydoesnotdistinguishbetweenouterexteriorandinnerexteriorofaset.Thisrequiresanexplicitandconstructivedenitionofavolumecontainingcavitiesandtheembeddingofavolumewithinavolumebyuseofsetoperations.Thusthedenitionforsimplevolumeswithcavitiescanbegivenasfollows: Denition25. Thesetsvcofsimplevolumeswithcavities,alsocalledsolids,overR3isdenedas 56

PAGE 57

svc=fVR3j(i)9V0,...,Vn2sv:V=V0)]TJ /F12 11.955 Tf 11.95 8.97 Td[(Sni=1Vi(ii)Visconnected(iii)81in:ViV0^(@V0\@Vi=;_(@V0\@Vi)2(point3D[line3D))(iv)81j
PAGE 58

Figure3-10. Anexamplevolume.Thevolumehasthree(andnotfour)components.Thelargestcomponentcontainsacavity.Wecouldalsosaythatthispicturehasthree(andnotfour)volumes. pointsorcurves,ortoliewithinacavityofanothersolidandpossiblyshareoneorseveralsingleboundarypointsorcurveswiththeboundaryofthecavity.Solidshavingcommonsurfacepartswithothersolidsorcavitiesaredisallowed.Theargumentationissimilartothatforthesoliddenition.However,herewehaveanadditionalconstraintthatrequirestheintersectionoftwosolidstobealineobjectthatcontainsnoclosedcurvecomponents.Itisnecessarytoachievetheuniquenessofrepresentation.Withoutthisconstraint,wecannotensurethatthemeetoftwosolidswillnotcreatecavities.ConsiderthefollowingscenarioinFigure 3-9 E,twosolidsmeetataring,andasaresult,acavityiscreated.Thuswithouttheconstraintincondition(ii),itisdifculttosayifthevolumeinFigure 3-9 Eisasinglecomponentsimplevolumewithcavitiesorisatwocomponentcomplexvolumewithnocavities.Ourdenitioncanavoidthisanduniquelyidentifythisvolumeasasimplevolumewithonecavity.AnexampleofacomplexvolumeobjectisshowninFigure 3-10 ,wherethevolumeconsistsofthree(andnotfour)components. LetV=Sni=1VibeavolumewithV1,...,Vn2svc.ThentheboundaryofVis@V=Sni=1@ViandtheinteriorofVisV=Sni=1Vi=V)]TJ /F6 11.955 Tf 12.5 0 Td[(@V.TheclosureofVis V=@V[V,andtheexteriorofVisV)]TJ /F4 11.955 Tf 10.4 -4.34 Td[(=R3)]TJ ET q .478 w 263.46 -523.66 m 273.47 -523.66 l S Q BT /F7 11.955 Tf 263.46 -533.64 Td[(V. 3.1.3Three-dimensionalOperations Section 3.1.3.1 givesanoverviewforalloperationsbelongingtothersttwocategories.Wegivethesignatureandthesemanticsofoperationsintherstcategory, 58

PAGE 59

Table3-1. Setsandenumerationsof3Dspatialdatatypes. TypesetnameSetofspatialdatatypesEnumerationofspatialdatatypes SPATIAL3Dfpoint3D,line3D,surface,volumegf0,1,2,3g whichyieldanotherspatialobject,inSection 3.1.3.2 .TheoperationsinthesecondcategorythatyieldnumericalvaluesareintroducedinSection 3.1.3.3 3.1.3.1Overview Thissectionpresentsasummaryoftheoperationsfor3Dspatialdatatypesandaclassicationofthembycategoriessuchasgeometricoperations,predicates,etc.Italsowillexplainthenotationusedforthesignaturesoftheoperations.Finally,itpresentsasampledatabaseuponwhichsamplequerieswillillustratetheoperations.OperationsinthealgebraSPAL3Dareveryimportantastheyformthebasisformanyoperationsinqueriesinvolvingspatialobjects.TherearethreeprinciplesinthedesignoftheoperationsinSPAL3D.Firstofall,theoperationsmustbeasglobalaspossible.Secondly,theymustdeterminetheinterestingfeaturesofspatialobjects.Finally,thespecicationsoftheoperationscontainboththeirsignaturesandsemantics.Thesignaturesoftheoperationsshowthatmostoftheoperationsarepolymorphicoperations,inthatthereisoverloadingonmanyoftheirinputsandtheiroutputs.Therstprinciplepreventsaproliferationofoperations.Globaloperationsresultintheavoidingofthisproliferationbyoverloadingoperationssothatasmanyofthespatialdatatypesaspossiblecanperformthesameoperation.Thus,thereisusuallyonlyonedenitionforeachoperationevenwhenSPAL3Dpermitstheoperationtohaveseveralorallofthespatialdatatypesasoperands.Forthispurpose,introducedinTable 3-1 isthetypesetSPATIAL3Daswellasanenumerationoverit. Thus,0=point3D,1=line3D,2=surfaceand3=volume.Itisbyusingtheenumerationthatweoverloadtheoperationsandsimplifythenotationdeningthem. Thesecondprincipledealswiththeneedofusersforoperationsthatproduceresultswithdifferenttypes.Becauseofuserrequirements,wemusthavethesekind 59

PAGE 60

Table3-2. Classicationof3Doperations. CategorySub-categoryOperations GeometricGeometricsetunion,dierence,symmetricdierence,operationsoperationsintersection,common0,common1,common2 GeometricAfnetranslate,scale,rotate,revolve,reectyz,operationstransformationsreectxy,reectxz GeometricOthergeometricconvexhull1,convexhull2,convexhull3,projectxy,operationsoperationsprojectxz,projectyz,boundingbox,boundary Numericallength,perimeter,area,surfacearea,volume,operationsxmaximum,ymaximum,zmaximum,xminimum,yminimum,zminimum,distance,cardinality, SpatialTopologicaldisjoint,meets,covers,coveredby,inside,predicatespredicatescontains,overlaps,equals SpatialDirectionalnorth,south,east,west,nothwest,northeast,predicatespredicatessouthwest,southeast,samelocation ofoperations.Themostelegantoperationsyieldeitheranotherspatialobject(i.e.,geometricsetoperations,afnetransformations,andothergeometricoperations)astheirresultorabooleanvalue(i.e.,predicates).Theoperationsthatarealgebraicallyclosedareespeciallyelegant.Moremundaneoperations,suchasthosethatdetermineanareaoranaverageforspatialobjects,arealsoimportant,thoughclosureissuesforthemareirrelevant.Thisisbecauseusersviewthemasimportant.Thesemoremundaneoperationsarenumericaloperations.Table 3-2 summarizestheoperationsabouttobedenedbylistingtheirnamesandtheclassofoperationsintowhichtheyfall. Thirdly,whendeningoperations,therearebothsignaturesandsemantics.Thesemanticsofanoperation,ofcourse,areformulasthatproducetheresultoftheoperation.Asignature!ofabinaryoperationmeansthattheoperandsintheoperationaretypeandandtheresultistype.Thoughthetwooperandsmaybedifferenttypes,however,theymusthavevaluesthatfallwithinthesamespace.Ifthetwooperandsarethesametype,thesignatureis!.Whenthetwooperandsarethesametypeforanoperationthatyieldsanotherspatialobject,thentheresultmightbethesametypeastheoperands.Thisisclosureofanoperation.So,forsomegeometric 60

PAGE 61

setoperations,itistruethat!.Also,wewillalwaysuseAandBasnotationtorepresentanoperandofanyspatialdatatype. Finally,whiledeningtheoperationsweillustratetheirusefulnessbyformulatingsamplequeriesinahypothetical,butplausibleextensionofSQL.Thequeriesindicatehowthe3Ddatatypescanexploitdatabasesupport.Becausethespatialdatatypesareabstract,theycanappearinrelationalschemasasattributestypesliketheotherstandarddatatypes.Wewillusethefollowingexampledatabasesforthesamplequeries. DB1: Anastronomicaldatabasedealingwithsolarsystemsandcontaininginformationonthestars,planets,andasteroidspresentwithinthesolarsystems. solarsystem(name:string,diameter:integer,place:volume)star(name:string,diameter:integer,center:point3D)planet(name:string,diameter:integer,orbit:line3D)asteroid(name:string,diameter:integer,orbit:line3D) DB2: AGeographicInformationSystem(GIS)databaseformountains,riversystem,soilsystem,buildingsandpipelines. mountain(name:string,geoShape:volume)river_system(name:string,type:string,area:surface)soil(texture:string,geoShape:volume)building(name:string,year:integer,shape:volume)pipeline(id:integer,type:string,shape:line3D) 3.1.3.2GeometricOperations Geometricoperationsaretheoperationsthatproducespatialobjectsastheirresult.Theoperationsthatresultinanotherspatialobjectarethosethatmostdistinguishtheoperationsofspatialdatabasesystemsfromdatabasesystemsthatdonothaveaspatialcomponent.Thismakesthemofadifferentnaturethantheoperationsinnon-spatialdatabasesystems.Fromtheperspectiveoffunctionality,wecanfurtherdistinguishthegeometricoperationstothreesub-categories:thegeometricsetoperations,theafnetransformations,andtheothergeometricoperations. Geometricsetoperations 61

PAGE 62

Geometricsetoperationsperformunions,differences,symmetricdifferences,andintersectionsbetweentwospatialobjects.Geometricsetoperationscanhaveasoperandsspatialobjectsofallspatialdatatypes.Andesiredpropertyforgeometricsetoperationsistheclosureproperty,thatisoperationsproducearesultwiththesamedatatypeastheoperands.Forexample,itisnicetohavetheintersectionoftwovolumesproducesavolume.However,thisisnotguaranteedintherealworldscenario,anditismathematicallynaturalthatgeometricsetoperationssometimesproducearesultthathaspieceswithalowerdimensionthantheoperands.Forexample,theintersectionoftwosurfacesoftenproducesaline3Dobject,anditmayevenproduceacombinationofline3Dobjectsandsurfaceobjects.Moreimportantly,usersmaybeinterestedinthelower-dimensionalpiecesofanoperation. Thisisnotaproblemforunion,difference,andsymmetricdifferenceoperationsbecausetheyalwaysproducearesultthathasadatatypeequaltotheoperandswhentheoperandshavethesametype.Inanotherword,thesethreeoperationsareclosed.Intersectionoperations,however,oftenproduceamixtureofpointsetsofdifferentspatialdatatypes,thusarenotclosedinpractical.Thus,wedesigntwodifferentkindsofintersectionoperations.Onekindisthetheoreticallyelegantoperationthathasclosure,andtheotherkindcapturespiecesofintersectionoperationswithdifferentdimensionality. Thus,werstdenethekindofintersectionoperationsthatreturnslower-dimensionalpiecesoftheintersectionbetweentwooperands.Sinceeachoperationcanonlyproduceresultsofonedatatype,andwehavespatialdatatypesforthreedifferentlower-dimensionalspatialobjects-0D,1D,and2D,therearethreesuchoperations.Wecallthemthecommonkoperationswhreekisequaltothedimensionoftheresultantspatialobject.Eachcommonkoperationproducesthepiecesofanintersectionequaltoaspatialobjectofasingledimensionwithallotherpiecesthrownaway.Thus,common0operationproducesonlyapoint3Dobject,thecommon1operationproducesonlya 62

PAGE 63

Operations Signature Semantics fp2A\BjpisisolatedinA\Bg common0 ifA2line3D,B2i,1i3 fp2@A\@Bjpisisolatedin@A\@Bg ifA,B2i,2i3) Sfl(@A\@B)[(@A\B)[(A\@B)[ ij!k (A\B)jl2line3Dg where ifA,B2surface common1 0k
PAGE 64

combinationoftypesinSPATIAL3D,eventhoughsomeofthemarenotrelevant.Onlythosecombinationsofoperandtypesreturnnewresultswhenthedimensionofthesecondoperandisequalorhigherthanthedimensionoftherstoperand.Ifthedimensionofthesecondoperandissmaller,thentherstoperandisreturnedunchanged.Thedierenceoperationmustthereforeapplyclosuretotheresulttoavoidthegenerationofanomalies. Thesignatureofthesymmetricdierenceoperationisthesameastheunionoperation.Italsodiscardsalllower-dimensionalparts.Italsohasanuninteresting,butsyntacticallynecessaryresultwhentheoperandsaredifferenttypes.Aswiththedierenceoperation,however,wemustapplyclosuretotheresulttoavoidanomalies. Theintersectionoperationyieldsaresultthatisofdimensionequaltotheoperandoflowerdimension.Aspreviouslynoted,asetintersectionmaytheoreticallyincludepiecesofadimensionlowerthantheoperandoflowerdimension.Butsincewehavedenedthreeotherkindofintersectionoperationsforhandlingsuchpieces,inthisintersectionoperation,wediscardallpiecesofthepointsetotherthanthehighest-dimensionalparts. Figure 3-12 givessignaturesandsemanticsforthegeometricsetoperationsthatareclosed.Now,weusesomeexamplestoillustratequeriesforthegeometricsetoperationsinahypotheticalextensionofSQL.InQ1,wepresentaqueryrequiringoneofthecommonkoperationsbasedonthesolarsystemdatabasepreviouslyspecied.Q2andQ3demonstratequeriesfortheclosedgeometricsetoperationsusingtheGISdatabasepreviouslyspecied. Q1: FindplaceswheretherecouldbeacollisionbetweenEarthandanasteroid. SELECTcommon[0](planet.orbit,asteroid.orbit)FROMplanet,asteroidWHEREplanet.name='Earth' Q2: FindthepartofsewerpipelinesthatbelongstothePhysicsbuilding. 64

PAGE 65

Operations Signature Semantics A[B ij!ij union ji!i AjB where 0j
PAGE 66

impliesthatthespatialobjectthatresultshasthesametopologyastheoriginalobject.Withthepossibleexceptionofthereectoperations,theresultantobjecthastheexactsameshape.Itisjustshiftedtoanotherlocationorhaschangeditssize.Theafnetransformationsaretheoperationstranslate,scale,rotate,andthereectoperations.Sometypesofrotationcanalsobecalledrevolve.Thethreereectoperationsarereectxy,reectyz,andreectxz. Thetranslateoperationisrelativelyeasy.Itsimplyshiftsthelocationofspatialobjectstoadifferentplacein3Dspace.Thus,inadditiontothespatialobjectthattheoperationtranslates,itsoperandsinvolvethex,y,andz-valuesthatgivetheamountanddirectionofthetranslation.Morespecically,weaddtothecoordinatesofeachpointinthetranslatedobjectthesizeofthetranslationinthex,y,andzdirectionsrespectively.Thex,y,andz-valuesbywhichanobjectistranslatedamounttoa3Dpoint.Thus,thesignatureofthetranslateoperationincludesthepoint3Dset.Wemayalsoviewthetranslateoperationasmovingthelocationoftheoriginoftheaxesratherthanmovingtheobjectitself,butonlyforthetranslatedobject. Scalinghastodowithincreasingordecreasingthesizeofaspatialobject.Whenscaling,weincreaseordecreasetheobject'ssizebyaspecicfactorineachdirectionwithrespecttoareferencepoint.Thereferencepointisapointatthecenteroftheoriginalobject,whichremainstobethecenteroftheresultantobjectafterscaling.Scalingwithrespecttothecenterofanobjectensuresthattheresultantobjecthasthesametopologyastheoriginalobject.Thereferencepointusedforthescalinghereisthecenteroftheminimumspanningsphereofthescaledobject.Theminimumspanningsphereofageometricobjectisalsocalledtheboundingballwhichisthesmallestspherecontainingthegeometricobject.Thisappliestoalltypesofobjects,e.g.volume,point3D. Rotationturnsanobjectaroundareferencepoint.Therotationformulasinthisarticlespecifyrotationwithrespecttothereferencepointthatisatthecenterofan 66

PAGE 67

object.Aspatialobjectmayrotateaboutitsowncenteroritmaybeinrotationaboutanotherobject.Therotationoftheobjectitselfisaboutthecenteroftheobject'sownminimumspanningsphere.Forrotationofanobjectaboutanotherobject,therotationisaboutthecenteroftheotherobject'sminimumspanningsphereThissecondtypeofrotationisreallyrevolve.Ineithercase,whetherwerotatethespatialobjectitselforrevolvetheobjectaboutanotherobject,wemustdeterminethepointatthecenteroftheminimumspanningsphereoftheobjectaboutwhichtherotationtakesplace.Thenameoftheoperationthatrotatesaspatialobjectaboutitsowncenterisrotateandthenameoftheoperationthatrotatesanobjectaboutanotherobjectisrevolve.Forbothoftheseoperations,theshaperemainsthesame. Therotateoperationresultinanangularmovementofthespatialobjectrelativetotheobject'scentersothatthedistanceofeachpointintheobjectfromthecenteroftheminimumspanningsphereremainsxed.Theangularmovementofeachpointoftheobjectcanbedecomposedintoanangularmovementinthexyplaneandanangularmovementrelativetothez-axis.Ineffect,theserotationdenitionstransformthecoordinatesoftheobject'spointsettosphericalcoordinates,addtheanglesfromtheoperandsoftheoperationtothetwoangleswithinthesphericalcoordinatesofeachpointandtransformtheresultbacktorectangularcoordinates.Theauthorbelievesthatthesedenitionsarebetterforusersofaspatialdatabasesystembecauseitfreesusersfromhavingtospecifytheaxisoftherotation.Theydohavetospecifyangularmovement,buttheauthorbelievesthatthisiseasierthanspecifyinganaxisofrotation. Thedenitionsforrotateandrevolvearealmostthesame,buttheirsignaturesandsemanticsarebothslightlydifferent.Bothsignaturesincludethetwoanglesofrotationandtherotatedobject.Therevolveoperation,inaddition,hasanoperandfortheobjectaboutwhichtherotationtakesplace.Theonlydifferenceinthesemanticsisthat,forrotate,thecenteroftherotationistherotatingobject'sownminimumspanningsphere 67

PAGE 68

Operations Signature Semantics translate f(x+x0,y+y0,z+z0)j(x,y,z)2A^ x0,y0,z02Rg point3D f(x+a(x)]TJ /F7 11.955 Tf 11.96 0 Td[(xc),y+b(y)]TJ /F7 11.955 Tf 11.95 0 Td[(yc),z+c(z)]TJ /F7 11.955 Tf 11.96 0 Td[(zc))j scale (x,y,z)2A^a,b,c2Rg where(xc,yc,zc)isthepointatthecenter oftheminimumspanningsphereofA f(xc+sin(+arccosz)]TJ /F9 7.97 Tf 6.59 0 Td[(zc )cos(+arctany)]TJ /F9 7.97 Tf 6.59 0 Td[(yc x)]TJ /F9 7.97 Tf 6.58 0 Td[(xc), yc+sin(+arccosz)]TJ /F9 7.97 Tf 6.59 0 Td[(zc )sin(+arctany)]TJ /F9 7.97 Tf 6.59 0 Td[(yc x)]TJ /F9 7.97 Tf 6.58 0 Td[(xc), real zc+cos(+arccosz)]TJ /F9 7.97 Tf 6.59 0 Td[(zc ))j(x,y,z)2A, rotate real! =p (x)]TJ /F7 11.955 Tf 11.96 0 Td[(xc)2+(y)]TJ /F7 11.955 Tf 11.96 0 Td[(yc)2+(z)]TJ /F7 11.955 Tf 11.96 0 Td[(zc)2g whereandaretheanglesofrotationofA inthexyplaneandrelativetothez-axis, and(xc,yc,zc)isthepointatthecenter oftheminimumspanningsphereofA f(xc+sin(+arccosz)]TJ /F9 7.97 Tf 6.59 0 Td[(zc )cos(+arctany)]TJ /F9 7.97 Tf 6.59 0 Td[(yc x)]TJ /F9 7.97 Tf 6.58 0 Td[(xc), yc+sin(+arccosz)]TJ /F9 7.97 Tf 6.59 0 Td[(zc )sin(+arctany)]TJ /F9 7.97 Tf 6.59 0 Td[(yc x)]TJ /F9 7.97 Tf 6.58 0 Td[(xc), ij zc+cos(+arccosz)]TJ /F9 7.97 Tf 6.59 0 Td[(zc ))jA2i,(x,y,z)2A, revolve realreal =p (x)]TJ /F7 11.955 Tf 11.96 0 Td[(xc)2+(y)]TJ /F7 11.955 Tf 11.96 0 Td[(yc)2+(z)]TJ /F7 11.955 Tf 11.96 0 Td[(zc)2g,B2j whereandaretheanglesofrotationofA where inthexyplaneandrelativetothez-axis, 0i,j3 and(xc,yc,zc)isthepointatthecenter oftheminimumspanningsphereofB reectxy f(x,y,)]TJ /F7 11.955 Tf 9.3 0 Td[(z)j(x,y,z)2Ag reectyz f()]TJ /F7 11.955 Tf 9.29 0 Td[(x,y,z)j(x,y,z)2Ag reectxz f(x,)]TJ /F7 11.955 Tf 9.3 0 Td[(y,z)j(x,y,z)2Ag Figure3-13. Afnetransformations. while,forrevolve,thecenteristheminimumspanningsphereoftheobjectaboutwhichtheotherobjectrevolves. Reectionisproducingthemirrorimageofanobject.Wecanreectanobjectthroughanyofthethreeaxesplanesasiftheplanesweremirrors.Thereectxy,reectyz,andreectxzoperationsyieldaspatialobjectafterithasbeenreectedthroughthexy-plane,yz-plane,andxz-planerespectively.Mathematicallythereectoperationsaresimplebecausetheyonlyrequirenegatingoneofthecoordinatevalues.Toreectaspatialobject,wenegateitszcoordinatevaluesforreectxy,itsxcoordinatevaluesforreectyzanditsycoordinatevaluesforreectxz. 68

PAGE 69

Figure 3-13 givessignaturesandsemanticsfortheafnetransformations.Anexample(Q4)isusedtoillustratequeriesfortheafnetransformations. Q4: ShowwhatthePhysicsbuildinglookslikeifitisrotated30degreescounter-clockwiseandshifted10meterstotheeast. SELECTtranslate(rotate(building.shape,30,0),10,0,0)FROMbuildingWHEREbuilding.name='Physics' Othergeometricoperations Additionalspatialoperationsaretheonesotherthangeometricoperationsandafnetransformationsthatproduceaspatialobjectastheirresult.Theresultoftheoperationsis,generally,apartoranapproximationofthespatialobjectuponwhichtheoperationisapplied.Often,theseoperationshaveonlyoneoperand.Someofthemapplytoonlyoneorasubsetofthe3Dspatialdatatypes.Thespatialoperationsaretheconvexhulloperations,theprojectionoperations,boundingbox,andboundary. Theconvexhullofaspatialobjectistheminimumconvexobjectthatcontainstheobject.InEuclideanspace,anobjectisconvexifforeverypairofpointswithintheobject,thestraightsegmentthatconnectsthemisentirelywithintheobject.Forexample,asolidcubeisconvex,butanythingthatisholloworhasadentinit,forexample,acrescentshape,isnotconvex.Thus,theconvexhullofaspatialobjectisthesmallestconvexobjectthatcontainstheobject.Inanotherword,aspatialobjectCHisaconvexhullofthespatialobjectX,ifandonlyifCHisconvexandXCH,andforanyconvexobjectCsuchthatXC,wehaveCHC.Ingeneral,theconvexhullofaspatialobjectofany3Dspatialtype,i.e.,point3D,line3D,surfaceorvolume,isaconvexspatialobjectoftypevolumeaccordingtothedenition.Butsimilartotheintersectionoperation,anomaliesalsooccurfortheconvexhulloperation.Forexample,whencomputingconvexhullforaline3Dobjectwhosepointsarecollinear,orasurfaceobjectwhosepointsarecoplanar,orapoint3Dobjectwhosepointsareeithercollinearorcoplanar,theconvexhullisnomoreaobjectoftypevolume,buta3Dsegment(type 69

PAGE 70

line3D)oraconvex3Dpolygon(typesurface).Thus,wemustregularizetheresultofaconvexhulloperationbyaskingtheusertospecifythedesireddimensionalityofaconvexhull.Sincewecanonlyhaveanyconvexhullasa1Dobject(line3D),a2Dobject(surface),ora3Dobject(volume),wedenethreeconvexhulloperationswiththenameconvexhullk,wherekisequaltothedimensionoftheresultantspatialobjectand1k3.Eachoperationproducesaconvexspatialobjectwithaspecicdimensionality.Figure 3-14 containsthesignatureandthesemanticsofthethreeconvexhulloperations. Theprojectionoperationsproduceanapproximationofaspatialobject.Theapproximationisamappingoftheobjectintooneoftheaxesplanes.Theprojectxyoperationprojectsanobjectintothexy-plane,theprojectyzoperationprojectsitintotheyz-plane,andtheprojectxzoperationproducesaprojectionintothexz-plane.Thesemanticsoftheprojectionoperationsaresimple.Wemerelysettozerotheappropriatecoordinateforallpointsintheprojectedspatialobject.Thesignaturesforprojectionsindicatethattheresultantobjectexistsinalower-dimensionalspacethattheoriginalobject.Infact,theyindicatethat,exceptforvolumes,projectionsproduceatwo-dimensional(2D)versionoftheprojectedobjectin3Difweeliminatethezero-edoutcoordinate.Thus,projectionsofpoint3Dobjectsproducepoint2Dobjects,line3Dobjectsproduceline2Dobjects,andsurfacesproduceregion2Dobjects.Projectionsofvolumesalsoproduceregion2Dobjects. Theanomaliesthatoccurfortheintersectionoperationalsooccurforprojectionoperations.Itispossiblethatpartorallofa3Dobjectisperpendiculartotheplaneintowhichtheobjectisprojected.(Note,however,thatitisnotpossibleforpartofavolumestobeperpendiculartoaplane.)Insuchacase,thepartoftheobjectthatisperpendiculartotheplanewillprojectintoanobjectthathaspartsofdifferingdimensions.Thus,aswedidfortheintersectionoperations,wemustregularize 70

PAGE 71

theresultofprojectionoperationsbythrowingoutthelower-dimensionalparts.Thesignaturesoftheprojectionoperationsindicatethisandthesemanticsreectit. Theboundingboxoperationresultsinaboxthatenclosesanentirespatialobjectevenwhentheobjectisamulti-componentobject.Thus,itisdifferentfromtheotherspatialoperationsinthissubsectionbecauseitsresultisbiggerthanitsoperand.Theresultis,however,acrudeapproximationofitsoperand.Asitssignatureindicates,wecanndtheboundingboxofanytypeofspatialobject,evenacomplexpointobject,buttheresultisalwaysavolume. Whenweapplytheboundaryoperationtoanobject,theresultisitsboundary.Therefore,tounderstandtheresultofthisoperation,rememberthattheboundariesofvolumesaresurfaces,ofsurfacesarelines,andoflinesarepoints.Pointshavenoboundariesand,therefore,wecannotapplytheboundaryoperationtopoint3Dobjects. Figure 3-14 givessignaturesandsemanticsfortheotherspatialoperations.Recallthedistancefunctiond.Denethefollowing2Dclosedneighborhoodsofradius:Nxy(x1,y1,0)=f(x,y,0)jd((x,y,0),(x1,y1,0))
PAGE 72

Operations Signature Semantics convexhull1 !line3D fL2line3Dj8SR3,AS,Sisconvex: AL^LSg convexhull2 !surface fL2surfacej8SR3,AS,Sisconvex: AL^LSg convexhull3 !volume fL2volumej8SR3,AS,Sisconvex: AL^LSg SxyifA2point3D_A2volume projectxy Sxy)-221(fp2SxyjpisisolatedinSxygifA2line3D point3D Sxy)-221(fp2Sxyj8,Nxy*SxygifA2surface !point2D whereSxy=f(x,y,0)j(x,y,z)2Ag line3D SyzifA2point3D_A2volume projectyz !line2D Syz)-221(fp2SyzjpisisolatedinSyzgifA2line3D surface Syz)-221(fp2Syzj8,Nyz*SyzgifA2surface !region2D whereSyz=f(0,y,z)j(x,y,z)2Ag volume SxzifA2point3D_A2volume projectxz !region2D Sxz)-221(fp2SxzjpisisolatedinSxzgifA2line3D Sxz)-221(fp2Sxzj8,Nxz*SxzgifA2surface whereSxz=f(x,0,z)j(x,y,z)2Ag f(x,y,z)2R3j bounding !volume xminimum(A)xxmaximum(A)^ box yminimum(A)yymaximum(A)^ zminimum(A)zzmaximum(A)g boundary i!bi=2b @A (1i3) Figure3-14. Othergeometricoperations.Figure 3-15 hasdenitionsofxminimum,xmaximum,yminimum,ymaximum,zminimum,andzmaximummwhichareusedintheboundingboxdenition. SELECTprojectxy(building.shape)FROMbuildingWHEREbuilding.name='Chemistry' 3.1.3.3NumericalOperations Wenowmoveawayfromspatialoperationsanddiscussnumericaloperations.Numericaloperationsproduceasinglenumericalvalueastheirresult.Theygatherinformationaboutthestatisticsofaspatialobject.Themostcommonlyusednumericaloperationsarevolume,area,surfacearea,perimeter,length,operationsthatgivethemaximumcoordinatesandtheminimumcoordinatesofanobjectinallthreedirections,distance,andcardinality. 72

PAGE 73

Operations Signature Semantics length line3D nXi=1ZAiq (dx dti)2+(dy dti)2+(dz dti)2dti !real wherex=fi(ti),y=gi(ti),andz=hi(ti)and A1,A2,...,AnarethecurvesoftheblocksofA. perimeter length(@A) surface nXi=1ZZAiq uivi)]TJ /F4 11.955 Tf 11.95 0 Td[((@x @ui@x @vi+@y @ui@y @vi+@z @ui@z @vi)duidvi area !real wherew=((@x @w)2+(@y @w)2+(@z @w)2), x=fi(ui,vi),y=gi(ui,vi),andz=hi(ui,vi)and A1,A2,...,AnarethesurfacecomponentsofA. surfacearea area(@A) volume nXi=1ZZZAidxdydz volume !real whereA1,A2,...,Anarethe simplevolumeswithcavitiesofA. xmaximum xmaxwhere(xmax,y,z)2A^8(x,y,z)2A,xmaxx ymaximum ymaxwhere(x,ymax,z)2A^8(x,y,z)2A,ymaxy zmaximum !real zmaxwhere(x,y,zmax)2A^8(x,y,z)2A,zmaxz xminimum xminwhere(xmin,y,z)2A^8(x,y,z)2A,xminx yminimum yminwhere(x,ymin,z)2A^8(x,y,z)2A,yminy zminimum zminwhere(x,y,zmin)2A^8(x,y,z)2A,zminz ij minfd((xa,ya,za),(xb,yb,zb))j distance !real (xa,ya,za)2A^(xb,yb,zb)2Bg 0!int jAj cardinality 1!int jblocks(A)j 2!int jss(A)j 3!int jsvc(A)j Figure3-15. Numericaloperations. Thoughtheresultsthattheseoperationsproducearesimple,theformulasrequiredtoperformmanyofthemarecomplicated.Thisisbecausethecontinuousshapesandboundariesof3Dspatialobjectsmeansthatonlythroughuseofcalculusisitpossibletoconciselyandrigorouslyspecifytheresultofsomeoftheoperations.Also,wemustsometimesdealwitheachofthecomponentsofaspatialobjectseparately. Calculusisinvolvedinthecalculationoflength,area,andvolume.Thesethreeoperationscomputethesizeofaspatialobject.However,someofthemareonly 73

PAGE 74

meaningfulforcertainspatialtypes.Specically,theygivethesizesofline3Dobjects,surfaceandvolumesrespectively.Thedenitionoflengthusesanintegral,ofareausesadoubleintegral,andofvolumeusesatripleintegral.Furthermore,togettherespectiveresultsforeachofthesethreeoperations,thereisanintegrationovereachofthecomponentsofanobjectseparatelyandthenasumoftheintegralsofthecomponents.Thereadercanseethisinthesemanticsspecifyingtheoperations. Theoperationsperimeterandsurfaceareaproduceinformationaboutthesizeoftheboundaryofaspatialobject.Theperimeterofasurface,however,issimplyfoundbyapplyingthelengthoperationtoitsboundary.Similarly,thesurfaceareaofavolumeisfoundbyapplyingtheareaoperationtothevolume'sboundary. Boththesignaturesandthesemanticsoftheoperationsthatcalculatemaximumandminimumcoordinatesareeasy.Theoperationsarexmaximum,ymaximum,zmaximum,xminimum,yminimum,andzminimum.Theseoperationssimplyselectthemaximumandminimumcoordinatevaluesfromthepointsetrepresentingaspatialobject.Maximumandminimumcoordinatevaluesmaybecalculatedforanobjectofany3Dspatialdatatype.Moreover,thedistanceoperationcomputestheminimumdistancebetweentwospatialobject. Thecardinalityoperationdeterminesthenumberofcomponentsofaspatialobject.Thus,itdeterminesthenumberofpointsinapoint3Dobject,thenumberofblocksinaline3Dobject,thenumberofsimplesurface(ss)inasurfaceorthenumberofsimplevolumeswithcavities(svc)inavolume.Itistheonlyoperationthatproducesanintegerasitsresult. Figure 3-15 givessignaturesandsemanticsfornumericaloperations.Recallagainthatdisafunctionrepresentingthedistancebetweentwopoints. Belowaretwoexamples(Q8andQ9)illustratequeriesfornumericaloperations. Q8: ComputetheareaofthePhysicsbuilding. SELECTarea(building.shape)FROMbuilding 74

PAGE 75

WHEREbuilding.name='Physics' Q9: Gettotallengthofthesewerpipeline. SELECTlength(pipeline.shape)FROMpipelineWHEREpipeline.type='sewer' OperationsplayanimportantroleintheSpatialAlgebra3D(SPAL3D).Theoperationscanproducethreedifferenttypesofresults.Eachoneoftheoperationsyieldsanotherspatialobject,anumericalvalueorabooleanvalue.Theoperationsthatyieldanotherspatialobjectastheirresult,calledgeometricoperations,breakdownfurtherintogeometricsetoperations,afnetransformations,andothergeometricoperations.Wewillseethatthedesignofthethree-dimensional(3D)spatialdatatypespromotesclosureintheoperationsthatresultinanotherspatialobject.Theoperationsthatresultinabooleanvalueare,ofcourse,spatialpredicates.Twomostimportantspatialpredicatesarethetopologicalpredicateslikeinsideandthedirectionalpredicateslikenorth.Inrecentyears,greateffortshavebeenspentonexploringpossibletopologicalrelationshipsanddirectionalrelationshipsbetweentwospatialobjects.WediscussthisindetailsinSection 3.2 .Inthissection,wefocusonthersttwocategoriesandonlymentionsomespatialpredicates. 3.2ModelingQualitativeRelationshipsbetweenThree-dimensionalObjects BesidesallspatialoperationswehavediscussedinSection 3.1.3 ,thecategoryleftisthespatialpredicates.Predicatesareimportantinqueriesbecausetheydescribewhethertwovaluessatisfyacertainrelationship,thustheyareusedfrequentlyaslterconditionsforselectionqueriesandjoinqueries.Spatialpredicatesaretheonesthatdescribethespatialrelationshipsbetweentwospatialobjects.Motivatedbythis,weexplorethequalitativerelationshipsbetweentwo3Dobjects,whichcharacterizetherelativepositionofspatialobjectslikeinsideandbelow. 75

PAGE 76

Inthissection,weexploretwomostimportantqualitativespatialrelationshipsbetweentwo3Dobjects,thetopologicalrelationshipsandthecardinaldirectionrelationships. 3.2.13DTopologicalRelationshipsModeling Thetopologicalrelationshipsbetweenspatialobjectsareconsideredtobeimportantforspatialdatabases.Theyleadtotopologicalpredicates,whichcanbeembeddedintospatialqueriesasjoinorselectionconditions.Beforerushingintotheimplementationoftopologicalpredicates,topologicalrelationshipsbetweenspatialobjectsmustberstunderstoodandclaried.Thisrequiresadetailedstudyofavastnumberofpossiblespatialcongurationsattheabstractlevel,andasaresult,methodsthatareabletoclassifyandidentifyasmanyaspossibledifferentspatialcongurationsareneeded.Whilealotofresearchhasalreadybeencarriedoutfortopologicalrelationshipsinthe2Dspace,theinvestigationinthe3Dspaceareratherneglected.Developedmodelingstrategiesaremostlyextensionsfromthepopular9intersectionmodel(9IM)whichhasbeenoriginallydesignedforsimple2Dspatialobjects.Weobservethatalargenumberoftopologicalrelationships,especiallytheonesbetweentwocomplex3Dobjectsarestillnotdistinguishedinthesemodels. Werstreviewthe9IMbasedmodelsanddiscusstheproblemsinSection 3.2.1.1 .TheninSection 3.2.1.2 ,weproposalanewframeworkcalledNeighborhoodCongura-tionModel(NCM)formodeling3Dtopologicalrelationships. 3.2.1.1Problemswith9IMbased3DTopologicalRelationships Thecentralconceptualapproach,uponwhichalmostallpublicationsinthiseldhavebeenbased,isthe9-intersectionmodel[ 32 ].Thismodelchecksthenineintersectionsoftheboundary,interior,andexteriorofaspatialobjectwiththerespectivecomponentsofanotherspatialobjectforthetopologicallyinvariantcriterionofnon-emptiness.Extensionshavebeenproposedtoobtainmorene-grainedtopologicalpredicates.However,themainfocushasbeenonspatialobjectsinthe2Dspace;the 76

PAGE 77

studyoftopologicalrelationshipsbetweenspatialobjectsinthe3Dspacehasbeenrare.Anavailablestrategyistoapply9IMbasedmodelsandtoinvestigatethetotalnumberofrelationshipsthatcanoccurinrealitybetweenspatialobjectsin3Dspace.Thereviewofthemodelingstrategiesbasedon9IMispresentedinSection 2.4.1 However,thethirddimensionintroducesmorecomplicatedtopologicalsituationsbetween3Dspatialobjects.Whendirectlyapplyingthe9IMbasedmodelsto3Dcomplexspatialobjectslikevolumes,theysufferfromamajorproblem,whichwecallthehighgranularityproblem.Thatis,the9IMconsiderstheinterior,exterior,andboundarypointsetsasthebasicelementsforemptyandnon-emptyintersectiontests,whichignoresthefactthattheinterior,exterior,andtheboundaryofaspatialobjectarealsocomplexspatialobjectparts,andmayhavemultiplecomponents.Thustheinteractionbetweenanypairofthebasicelementsfromtwospatialobjectscanbecomplex,andemptyornon-emptymaynotbeenoughtodescribesuchinteractions.Forexample,theboundaryofavolumeobjectisaclosedsurfaceobject,whichmayhavemultiplecomponents.Thustheinteractionbetweentheboundariesoftwovolumeobjectsisequivalenttotheinteractionbetweentwocomplexsurfaceobjects,whichcantouchatapoint,meetataface,crosseachother,orhavetouch,meet,andcrosscoexistononeormorecomponents.Since9IMbasedmodelsdonothavethecapabilitytohandletheseinteractiondetailsfortheirbasicelements,alargenumberoftopologicalrelationshipsbetweencomplexvolumesarenotdistinguished. 3.2.1.2TheNeighborhoodCongurationModel(NCM) Inthissection,weareparticularinterestedincomplexvolumesthatmaycontaincavitiesormultiplecomponents.AformaldenitionofcomplexvolumeobjectscanbefoundinSection 3.1.2.5 ,whichmodelsvolumesasspecialinnitepointsetsinthethree-dimensionalEuclideanspace.Ourapproachisalsobasedonthepointsettheoryandthepointsettopology.Thebasicideaistoevaluatethevaluesofasetofbooleanneighborhoodcongurationagstodeterminethetopologicalrelationshipsbetweentwo 77

PAGE 78

volumes.Eachneighborhoodcongurationagindicatestheexistenceornon-existenceofacharacteristicneighborhoodcongurationofthepointsinagivenscenario.Theneighborhoodcongurationofapointdescribestheownershipsofthepointsthatarenearthereferencepoint.Iftheexistenceofaneighborhoodcongurationisdetected,thenthecorrespondingneighborhoodcongurationagissettotrue.Forexample,forascenariothatinvolvestwovolumesAandB,ifthereexistsapointpwhoseneighboringpointsallbelongtobothAandB,thenthecorrespondingneighborhoodcongurationagexist nei in overlap(seeDenition 27 (1))issettotrue.Later,thisneighborhoodcongurationagcontributestothedeterminationofthetopologicalrelationshipsbetweenAandB. Thus,twostepsareinvolvedinourapproach.Therststepistoexploreallpossibleneighborhoodcongurationsforagivenscenariooftwospatialvolumeobjects,andthesecondstepistoidentiedandencodedtopologicalrelationshipswiththeneighborhoodcongurationags. Step1:Exploringneighborhoodcongurationinformation Inthissection,weexploreallneighborhoodcongurations.Webeginwithsomeneededtopologicalandmetricconcepts.LetRbethesetofrealnumbers,R+=fx2Rjx>0g,andR3bethethree-dimensionalEuclideanspace.RecalltheEuclideandistancefunctiond:R3R3!Rwithd(p,q)=d((x1,y1,z1),(x2,y2,z2))=p (x1)]TJ /F7 11.955 Tf 11.96 0 Td[(x2)2+(y1)]TJ /F7 11.955 Tf 11.96 0 Td[(y2)2+(z1)]TJ /F7 11.955 Tf 11.95 0 Td[(z2)2.Thenforanypointp2R3andr2R+,thesetNr(p)=fq2R3jd(p,q)rgiscalledtheclosedballwithradiusrandcenterp.Letdenoteasmallpositivevalue(!0),wecalltheclosedballN(p)the(closed)neighborhoodofpointp.WecanthinkoftheneighborhoodaroundpasatinyclosedballcontainingallpointsinR3thataremostnearp. Withthenecessarytopologicalconceptsintroduced,wenowexplorethepossibleneighborhoodcongurationsofpointsinascenariothatinvolvestwovolumeobjects.LetusassumetwovolumesAandBthatarepointsetsinR3(AR3,BR3).Thengiven 78

PAGE 79

apointp2R3,anypointqinitsneighborhoodN(p)(q2N(p))hasoneofthefollowingfourpossibleownerships:(i)q2A^q=2B,(ii)q=2A^q2B,(iii)q2A^q2B,and(iv)q=2A^q=2B.Asaresult,wecandescribetheownershipofaneighborhoodbycombiningtheownershipsofallpointsinit.Wecallthisownershipdescriptionofaneighborhoodtheneighborhoodconguration.Withthefourpossibleownershipsofasinglepoint,wecanobtainatotalofC14+C24+C34+C44=15possibleownershipcombinationsforaneighborhood.Inanotherword,15neighborhoodcongurationsarepossibleforanypointinR3whereAandBareembedded.Asaresult,wecandene15correspondingneighborhoodcongurationagsforthescenariothatinvolvesAandBinDenition 27 Denition27. LetAR3andBR3,andletp2R3andN(p)denotetheneighbor-hoodofpwithatinyradius,werstdenefourownershipagsforp: (A,B,p),9x2N(p):x2A^x2B(A,B,p),9x2N(p):x2A^x=2B(A,B,p),9x2N(p):x=2A^x2B(A,B,p),9x2N(p):x=2A^x=2B Thenwedenethefollowing15neighborhoodcongurationagsforascenarioinvolvestwoobjectsAandB: (1)exist nei in overlap(A,B),9p2R3:(A,B,p)^:(A,B,p)^:(A,B,p)^:(A,B,p)(2)exist nei in op1(A,B),9p2R3::(A,B,p)^(A,B,p)^:(A,B,p)^:(A,B,p)(3)exist nei in op2(A,B),9p2R3::(A,B,p)^:(A,B,p)^(A,B,p)^:(A,B,p)(4)exist nei in ext(A,B),9p2R3::(A,B,p)^:(A,B,p)^:(A,B,p)^(A,B,p) 79

PAGE 80

(5)exist nei contain overlap op1(A,B),9p2R3:(A,B,p)^(A,B,p)^:(A,B,p)^:(A,B,p)(6)exist nei contain overlap op2(A,B),9p2R3:(A,B,p)^:(A,B,p)^(A,B,p)^:(A,B,p)(7)exist nei contain overlap ext(A,B),9p2R3:(A,B,p)^:(A,B,p)^:(A,B,p)^(A,B,p)(8)exist nei contain op1 op2(A,B),9p2R3::(A,B,p)^(A,B,p)^(A,B,p)^:(A,B,p)(9)exist nei contain op1 ext(A,B),9p2R3::(A,B,p)^(A,B,p)^:(A,B,p)^(A,B,p)(10)exist nei contain op2 ext(A,B),9p2R3::(A,B,p)^:(A,B,p)^(A,B,p)^(A,B,p)(11)exist nei contain op1 op2 ext(A,B),9p2R3::(A,B,p)^(A,B,p)^(A,B,p)^(A,B,p)(12)exist nei contain op2 overlap ext(A,B),9p2R3:(A,B,p)^:(A,B,p)^(A,B,p)^(A,B,p)(13)exist nei contain op1 overlap ext(A,B),9p2R3:(A,B,p)^(A,B,p)^:(A,B,p)^(A,B,p)(14)exist nei contain op1 op2 overlap(A,B),9p2R3:(A,B,p)^(A,B,p)^(A,B,p)^:(A,B,p)(15)exist nei contain op1 op2 overlap ext(A,B),9p2R3:(A,B,p)^(A,B,p)^(A,B,p)^(A,B,p) Theabove15neighborhoodcongurationagsidentifyallpossibleinteractionsbetweentwospatialvolumesAandBinR3atanysinglepoint.WedemonstratethevalidityoftheseneighborhoodcongurationagsbycreatingdrawingsforthecorrespondingneighborhoodcongurationsinFigure 3-16 .Forexample,ifag(8)yieldstrue(Figure 3-16 (8)),thenitmeansthatthereexistapointwhoseneighborhoodconsists 80

PAGE 81

(1)(2)(3)(4)(5)(6)(7)(8) (9)(10)(11)(12)(13)(14)(15) Figure3-16. Thedrawingofthe15neighborhoodcongurationsforpointp. ofpointsthatareonlyfromtherstoperandobjectAandpointsthatareonlyfromthesecondoperandobjectB.Thetruevalueofthisag(exist nei contain op1 op2)furtherindicatestheexistenceofameetingonfacetopologicalrelationshipbetweentwovolumeobjectsAandB. Step2:Topologicalrelationshipencodingwithneighborhoodcongurationags Wehaveintroduced15neighborhoodcongurationagsfortwocomplexvolumeobjectsembeddedintheEuclideanspaceR3.TheseagscapturealltopologicalsituationsfortwovolumesatallpointsintheEuclideanspaceR3.Inotherwords,wehaveidentiedthetopologicalrelationshipsbetweentwovolumesataverylowgranularitylevel,whichinvolvesasmallneighborhoodofapoint.Thus,todeterminethetopologicalrelationshipsbetweentwovolumes,wejustneedtocollectthevaluesofall15neighborhoodcongurationags.First,letF[]denoteanarraythatstoresthevalueofall15neighborhoodcongurationagsthataredenedintheprevioussection.FurtherweassumetheorderingoftheagsstoredinF[]isthesameasinDenition 27 .Now,wearereadytodenethetopologicalrelationshipencodingfortwovolumeobjects. Denition28. LetA,BbetwovolumeobjectsinR3(A,BR3),andletFVdenotethefunctionthatencodesthetopologicalinteractionbetweentwovolumeswithrespecttotheithneighborhoodcongurationag'svalue(1i15).Thenwehave: 81

PAGE 82

(111111001100001)(111111011110011)(111111001110001)(a)(b)(c) Figure3-17. Examplesoftopologicalrelationshipscenariosandtheirencodings. FV(A,B,i)=8>><>>:0ifF[i]yieldsfalseforAandB1ifF[i]yieldstrueforAandB Thus,wecanusea15bitbinaryarraytoencodethetopologicalrelationshipbetweenAandB.ThedenitionforthetopologicalrelationshipencodingTREisgivenas: TRE(A,B)=(FV(A,B,0)FV(A,B,1)...FV(A,B,14)) Denition 28 introduceda15bitsbinaryrepresentationforthetopologicalrelationshipsbetweentwovolumeobjects.Figure 3-17 presentsthreeexamplesofthetopologicalrelationshipencodings.TheencodinginFigure 3-17 aindicatesthat9topologicalrelationshipagsyieldtrueforthescenarioinvolvingAandB,whichareexist nei in overlap,exist nei in op1,exist nei in op2,exist nei in ext,ex-ist nei contain overlap op1,exist nei contain overlap op2,exist nei contain op1 ext,exist nei contain op2 ext,andexist nei contain op1 op2 overlap ext.Todemonstratethevalidityoftheencoding,wehavemarkedthecorrespondingpointspithatvalidatesthetruevalueofagF[i].InFigure 3-17 b,threeadditionalags,whichareexist nei contain op1 op2,exist nei contain op1 op2 ext,andex-ist nei contain op1 op2 overlap,becometrueduetothepointsp8,p11,andp14respectively.Therefore,Figure 3-17 presentsthreedifferenttopologicalrelationshipsthatcanbedistinguishedbyourencoding,whichareoverlapencoded 82

PAGE 83

by111111001100001,overlapwithmeetonfaceencodedby111111011110011,andoverlapwithmeetonedgeencodedby111111001110001. Asaresult,weobtainatotalof215=32768possibletopologicalrelationshipencodingvalues,whichimpliesatotalof32768possibletopologicalrelationshipsbetweentwocomplexobjects.However,notallencodingvaluesrepresentvalidtopologicalrelationships.Asimpleexampleofaninvalidencodingistheencoding000000000000000.Itisinvalidbecausewecannotassociatearealwordscenariowithit.Wecallatopologicalrelationshipencodingvalidfortwoobjectsif,andonlyif,theencodingcanbederivedfromarealworldscenariothatinvolvestwospatialobjects.Thustheopenquestionsarenow(i)whichandhowmanyarethevalidtopologicalrelationshipencodingsfortwocomplexvolumes(seeSection 3.2.1.3 ),(ii)whichandhowmanyarethevalidtopologicalrelationshipencodingsfortwosimplevolumes(seeSection 3.2.1.4 ).Thesetwoquestionsareimportantforthreemainreasons.First,wewouldliketogetanindicationoftheexpressivenessofourNCMmodel.Atthispointweknowthat32768encodingscanbeformed.Butwedonotknowhowmanycorrespondtothepossiblerealworldscenariosoftwocomplex/simplevolumesthatrepresentvalidspatialcongurations.Second,wewouldliketocomparethenumberofvalidencodingswiththenumberofvalid9-intersectionmatricesfrom[ 31 ]and[ 106 ]forthecomplex/simplevolumes.Third,sincemostcurrenttopologicalrelationshipsreasoningmodelsarebasedonthe9-intersectionmatrixmodel,webelievethattheknowledgeaboutthevalidNCMtopologicalencodingswillleadtonewinsightsoftopologicalreasoning. 3.2.1.3DeterminingPossibleTopologicalRelationshipsBasedontheNCMforTwoComplexVolumes Inthissection,weproposesolutionstotherstaforementionedquestionregardingwhichandhowmanyarethevalidtopologicalrelationshipencodingsfortwocomplexvolumes.Acomplexvolumeisavolumepossiblywithcavitiesormultiplevolume 83

PAGE 84

components,whereisolatedpoints,linesorsurfacepartsarenotallowedandtheanomalieslikemissingpoints,missinglines,andmissingsurfacespartsarenotallowed.Aformaldescriptionaboutacomplexvolumeobjectisgivenin[ 89 ].Inordertodeterminethevalidtopologicalrelationshipencodings,weemployathree-stageprooftechniquecalledproof-by-constraint-composition-drawing.Inarststage,wedetermineandprovethecorrectnessofacollectionofconsistencyconstraintsthatcanbeusedtolteroutallimpossibleencodingsthatdonotrepresentvalidtopologicalrelationshipsbetweencomplexvolumes.Inasecondstage,weidentifyasmallersetoftopologicalencodingsfromtherststagethatsatisfyfollowingtwoconditions(i)theycanbeusedtocomposeallresttopologicalencodingsfromtherststage;(ii)theycannotbecomposedbyanyothertopologicalencodings.Wecallthetopologicalencodingsthatsatisfythesetwoconditionstheunittopologicalencodings.Here,thecompositionoperationreferstothelogicaloroperation.Inthisstage,wealsoprovethatanytopologicalencodingthatcanbecomposedbyunitencodingscanbederivedfromarealworldscenariothatiscomposedbyscenariosderivedfromthoseunitencodings.Asaresult,weonlyneedtoprovethevalidityoftheunitencodings,sothatallotherencodingsthatcanbecomposedfromtheunitencodingsarealsovalid.Inathirdstage,weverifythecorrectnessoftheunittopologicalencodingsidentiedfromthesecondstagebydrawingprototypicalspatialcongurations. Therststage:lteringouttheinvalidtopologicalencodings Webeginwiththerststage,thatis,thespecicationoftheconstraintsforlteringinvalidencodings.Weobservethatthe15neighborhoodcongurationsarenotcompletelyindependentfromeachother.Thereexistcorrelationsbetweensomecongurations.Forexample,theexistenceoftheneighborhoodconguration(5)inFigure 3-16 (5)impliestheexistenceofboththeneighborhoodconguration(1)(Figure 3-16 (1))andtheneighborhoodconguration(2)(Figure 3-16 (2)).Thus,weexplorethesecorrelationsbetweenthe15topologicalrelationshipsandusethemto 84

PAGE 85

identifytheconstraints.LetEbea15bitarraythatstoresthetopologicalencoding.ThuswehaveforanybitEiofE,with1i15,Ei20,1.LetNCiwith1i15referstotheneighborhoodconguration(i)inFigure 3-16 (i).IfEisavalid15bittopologicalencodingfortwocomplexvolumeobjectsAandB,itmustsatisfytheconstraintsspeciedinLemma 1 toLemma 5 Lemma1. TherealwaysexistaneighborhoodcongurationthatonlycontainspointsbelongingtoneitherAnorB,i.e., E41 Proof. Theproofforthislemmaistrivial.SincevolumeobjectsAandBinthe3Dspacearebounded,R3)]TJ /F7 11.955 Tf 11.95 0 Td[(A)]TJ /F7 11.955 Tf 11.95 0 Td[(B6=;. Lemma2. (i)If,andonlyifNC1exists,atleastoneofthefollowingsevenneighbor-hoodcongurations,NC5,NC6,NC7,NC12,NC13,NC14,NC15mustexist;(ii)if,andonlyifNC2exists,atleastoneofthefollowingsevenneighborhoodcongurations,NC5,NC8,NC9,NC11,NC13,NC14,NC15mustexist;(iii)if,andonlyifNC3exists,atleastoneofthefollowingsevenneighborhoodcongurations,NC6,NC8,NC10,NC11,NC12,NC14,NC15mustexist;(iv)if,andonlyifNC4exists,atleastoneofthefollowingsevenneighborhoodcongurations,NC7,NC9,NC10,NC11,NC12,NC13,NC15mustexist,i.e., (i)E1=1,9i2f5,6,7,12,13,14,15g:Ei=1(ii)E2=1,9i2f5,8,9,11,13,14,15g:Ei=1(iii)E3=1,9i2f6,8,10,11,12,14,15g:Ei=1(iv)E4=1,9i2f7,9,10,11,12,13,15g:Ei=1 Proof. First,weproveLemma 2 (i),thatis,ifNC1existsatleastoneofthesevenneighborhoodcongurations,NC5,NC6,NC7,NC12,NC13,NC14,NC15mustexist.Forthispurpose,werstintroducesomeneededconceptsinpoint-settopology.LetXR3andp2R3.pisaninteriorpointofXifthereexistsaneighborhoodNr(p)suchthatNr(p)X.pisanexteriorpointofXifthereexistsaneighborhoodNr(p)suchthatNr(p)\X=;.pisaboundarypointofXifpisneitheraninteriornorexteriorpointof 85

PAGE 86

X.Thesetofallinterior/exterior/boundarypointsofXiscalledtheinterior/exterior/boundaryofXandisdenotedbyX/X)]TJ /F1 11.955 Tf 10.41 -4.34 Td[(/@X.ForavolumeobjectVinthe3Dspace,wehaveV6=;^V)]TJ /F2 11.955 Tf 10.41 -4.34 Td[(6=;^@V6=;.SoifweassumethatfortwovolumeobjectsAandB,NC1exists,butnoneofthesevencongurations,NC5,NC6,NC7,NC12,NC13,NC14,NC15exist,then,foranypointp2R3,itsneighborhoodNr(p)iseitherNr(p)A(pisaninteriorpointofA)orNr(p)\A=;(pisanexteriorpointofA).Asaresult,theredoesnotexistaboundarypointofA.Thisisacontradictiontotherequirementthatanyvolumeobjectmusthaveinteriorpoints,boundarypointsandexteriorpoints.Hence,theassumptionisinvalid.Nowweprovethatifatleastoneofthesevenneighborhoodcongurations,NC5,NC6,NC7,NC12,NC13,NC14,NC15exists,thenNC1mustexist.IfNC5exists,thenthereexistsapointpwithaneighborhoodNr(p)suchthatNr(p)containspointsbelongingonlytoAandpointsbelongingtobothAandB(Denition 27 ).SothereexistsasetXNr(p)sothatXcontainsonlypointsfromA.Thenanypointq2XhasaneighborhoodthatbelongsonlytoA.Hence,NC1exists.Similarly,wecanprovetheexistenceofNC1fortheothersixneighborhoodcongurations.Similarly,therestofLemma 2 ,Lemma 2 (ii)toLemma 2 (iv)canbeprovedinasameway. Lemma3. Iftheneighborhoodconguration(1)doesnotexist,thentheremustexistneighborhoodconguration(2)and(3),i.e., E1=0)E2=1^E3=1 Proof. AccordingtoLemma 2 (i),ifNC1doesnotexists(E1=0),thenneighborhoodcongurationsNC5,NC6,NC7,NC12,NC13,NC14,andNC15donotexist.Further,ifweassumethatNC2doesnotexist(E2=0),thenaccordingtoLemma 2 (ii),theneighborhoodcongurationsNC5,NC8,NC9,NC11,NC13,NC14,andNC15donotexist.Asaresult,onlytheneighborhoodcongurationsNC3,NC4,andNC10possiblyexist.However,theseneighborhoodcongurationsdonotcontainanypointsthatarefromvolumeobjectA,thusviolatestherequirementthatbothvolumeobjectAandvolume 86

PAGE 87

objectBmustexist.Hence,theassumptionisinvalid.Similarly,wecanproveifNC1doesnotexists(E1=0)thenNC3mustexist(E3=1). Lemma4. (i)IfNC11exists,atleasttwoofthefollowingneighborhoodcongurations,NC8,NC9,NC10mustexist;(ii)ifNC12exists,atleasttwoofthefollowingneighborhoodcongurations,NC6,NC7,NC10mustexist;(iii)ifNC13exists,atleasttwoofthefollowingneighborhoodcongurations,NC5,NC7,NC9mustexists;(iv)ifNC14exists,atleastoneofthefollowingneighborhoodcongurations,NC5,NC6,NC8mustexists,i.e., (i)E11=1)(E8=1_E9=1)^(E8=1_E10=1)^(E9=1_E10=1)(ii)E12=1)(E6=1_E7=1)^(E6=1_E10=1)^(E7=1_E10=1)(iii)E13=1)(E5=1_E7=1)^(E5=1_E9=1)^(E7=1_E9=1)(iv)E14=1)(E5=1_E6=1)^(E5=1_E8=1)^(E6=1_E8=1) Proof. First,weproveLemma 4 (i),thatis,ifNC11exists,atleasttwoofthefollowingneighborhoodcongurations,NC8,NC9,NC10mustexist.Accordingtothedenitionoftheneighborhoodconguration(11)inDenition 27 ,ifNC11exists(E11=1),thenthereexistsaopenballBinthe3Dspacethatcontainsthreepointsets,thesetSathatcontainspointsthatareonlyfromvolumeobjectA(SaA),thesetSbthatcontainspointsthatareonlyfromB(SbB),andthesetSxthatcontainspointsthatareneitherfromAnorfromB.SowehaveB=Sa[Sb[SxandSa\Sb\Sx=;.SinceBisaclosedballinthe3Dspace,itsinteriorisconnected.Thus@Samustmeetwith@Sbor@Sx,and@Sbmustmeetwith@Saor@Sx,and@Sxmustmeetwith@Saor@Sb.ThisresultsintheexistenceofatleasttwooftheneighborhoodcongurationsNC8,NC9,andNC10.TherestofLemma 4 ,Lemma 4 (ii)toLemma 4 (iv),canbeprovedinasimilarmanner. Lemma5. IfneighborhoodcongurationsNC1,NC2,NC3,andNC4exist,thenatleastthreeofthesixneighborhoodcongurations,NC5,NC6,NC7,NC8,NC9,NC10,atleastoneofthethreeneighborhoodcongurations,NC5,NC6,NC7,atleastoneofthe 87

PAGE 88

threecongurations,NC5,NC8,NC9,atleastoneofthethreeneighborhoodcongu-rations,NC6,NC8,NC10,andatleastoneofthethreeneighborhoodcongurations,NC7,NC9,NC10,mustexisti.e., E1=1^E2=1^E3=1^E4=1)(E5=1_E6=1_E7=1)^(E5=1_E8=1_E9=1)^(E6=1_E8=1_E10=1)^(E7=1_E9=1_E10=1)^9i,j,k2f5,6,7,8,9,10g,i6=j6=k:Ei=1^Ej=1^Ek=1 Proof. LetSa,Sb,Sab,SxR3withSa=A)]TJ /F7 11.955 Tf 12.97 0 Td[(B,Sb=B)]TJ /F7 11.955 Tf 12.97 0 Td[(A,Sab=A\B,andSx=R3)]TJ /F7 11.955 Tf 12.05 .01 Td[(A)]TJ /F7 11.955 Tf 12.04 .01 Td[(B.ThenwehaveSa[Sb[Sab[Sx=R3.IfneighborhoodcongurationsNC1,NC2,NC3,andNC4exist,thenwehaveSa6=;,Sb6=;,Sab6=;,andSx6=;.Sothesefoursetsmustmeetwitheachothertoformthe3Dspace.SoforSabitmustmeetwithatleastoneoftheotherset,SaorSborSx.Asaresult,atleastoneoftheneighborhoodcongurations,NC5,NC6,andNC7mustexist((E5=1_E6=1_E7=1)).Similarly,wecanproveE5=1_E8=1_E9=1,E6=1_E8=1_E10=1,andE7=1_E9=1_E10s=1.Further,wecannothaveeveryoneofthefoursetsonlymeetwithoneotherset,otherwisethefoursetscannotformtheentire3Dspace.Asaresult,atleastthreeoftheneighborhoodcongurationsNC5,NC6,NC7,NC8,NC9,andNC10,mustexist. Sofarinthisrststage,wehaveidentiedveconstraintsthateveryvalidtopologicalrelationshipencodingsfortwocomplexvolumeobjectsmustsatisfy.Wehavealsoprovedthecorrectnessoftheconstraintssothatweensurethattheencodingsthatdonotsatisfytheseconstraintsareinvalidones.Wehavedevelopedasimpleprogramthatchecksthevalidityofall32768(215)15bitencodingswithrespecttotheconstraints,fromLemma 1 toLemma 5 .Asaresult,wegetatotalof697encodingsthatsatisfyallaboveveconstraints. Thesecondstage:identifyingtheunittopologicalencodings 88

PAGE 89

= 110110001000000j011100001110000=111110001110000 Figure3-18. Thecompositionoftwoencodingsimpliesthecompositionoftwocongurations. Ourremainingtaskistoshowthecompletenessoftheconstraints(thatis,nofurtherconstraintismissing)andthecorrectnessoftheremainingencodings(thatis,theremainingencodingsareallvalid).AsimplestrategyistoshowforeachremainingencodingthataspatialcongurationoftwocomplexvolumeobjectsAandBexistswhichrepresentsarealworldscenarioandcanbemappedtotheencoding.However,thecreationofspatialcongurationdrawingsforall697encodingsisatediouseffortandisunnecessary.Thusitisthetaskofthisstagetoreducethenumberofencodingsthatneedtobedrawn.Forthispurpose,weexploretherelevanceamongtheencodings.Weobservethatsomeencodingscanbecomposedbysomeotherencodingsbyapplyingalogicaloroperation(joperation).Forexample,theencoding111110001110000canbecomposedbyapplyingthelogicaloroperationjonthefollowingtwoencodings,110110001000000and011100001110000,sowehave111110001110000=110110001000000j011100001110000.Further,weprovethatifanencodingEcanbecomposedbyencodingsE1,...,Em,i.e.,E=E1j...jEmthenthespatialcongurationthatcanprovethecorrectnessoftheencodingEcanalsobedrawnbycomposingthespatialcongurationsoftheencodingsE1,...,Em.WegivethedenitionforsuchaspatialcompositionoperationinDenition 29 Denition29. LetS1=hA1,B1iandS2=hA2,B2iwithA1,B1,A2,B2R3andA1\A2=A1\B2=B1\A2=B1\B2=;denotetwoseparatespatialcongurations 89

PAGE 90

whereeachcontainsapairofspatialvolumeobjects.LetS0=hA0,B0ibeanotherspatialconguration.Thenthespatialcompositionoperationisdenedasfollows: S0=S1S2def,(A0=A1[A2)^(B0=B1[B2) Lemma 6 showsthatthelogicalorofthecongurationencodingsimpliesthespatialcompositionofcorrespondingspatialcongurations. Lemma6. LetS1andS2denotetwoseparatespatialcongurations.LetthefunctiontpEdenotethefunctionthatmapsaspatialcongurationtoatopologicalrelationshipencoding.Thenwehave, tpE(S1S2)=tpE(S1)jtpE(S2) Proof. Animportantpropertyofthecompositionoperation(seeDenition 29 )isthatnonewtopologicalrelationshipsareintroducedwhilecomposingtwoseparatedspatialcongurations.Asaresult,theexistenceofthespatialcongurationsinthecomposedspatialcongurationareallinheritedfromthetwooperandspatialcongurations.Inotherwords,anneighborhoodcongurationdoesnotexistinthecomposedspatialcongurationifthesameneighborhoodcongurationdoesnotexistineitheroperandspatialconguration.Hence,thetopologicalencodingforthecomposedspatialcongurationisthelogicaloroftheencodingsforthetwooperandspatialcongurations. Forthepreviousexample,wecanmakethespatialcongurationdrawingsS1andS2fortheencodings110110001000000and011100001110000respectivelytoprovethecorrectnessofthesetwoencodings.IfwecomposeS1andS2,thenaccordingtoLemma 6 ,theencodingfortheresultspatialcongurationistheresultof110110001000000j011100001110000,whichistheencoding111110001110000.Asaresult,bycomposingS1andS2,wecanpresentaspatialcongurationdrawingfor111110001110000,whichprovesthecorrectnessoftheencoding111110001110000.Figure 3-18 showshowthecompositionoftwoencodingsimpliesthecompositionoftwospatialcongurations. 90

PAGE 91

Now,giventhesetof697encodingsfromtherststage,wedonothavetodrawthespatialcongurationsforeveryencodingtoprovetheircorrectness,instead,weonlyneedtondoutacollectionoftopologicalrelationshipencodingsinthese697encodingsthatcanbeusedtocomposetherestoftheencodings.LetthesetTPdenotethesetcontaining697topologicalrelationshipencodings.ThenwecallthesetTPU=fu1,u2,...,ungwithui2TP(1in)thesetofunittopologicalrelationshipencodingsifitsatisesthefollowingtwoconditions:(i)foranyencodingeinTPbutnotTPU(e2TP)]TJ /F7 11.955 Tf 12.45 0 Td[(TPU),thereexistsasetCTPU,C=fc1,...,cmgwith1
PAGE 92

algorithmDetermineNCMUnitEncodings(EL) inputAnarrayELof697records.Eachindexbetween1and697isanencodingid. Eachrecordstoresanintegerwhosebinaryvalueequalsatopological relationshipencoding. outputAnarrayULoftheencodingidandtheencodingintegervaluepair,who areidentiedasunitencodings.(1) i 1;j 1;n 697;ucnt 0;UL emptylist(2) foreachiin1...ndo(3) encoding EL[i];isComposable false;currentCompositeVal 0;(4) foreachjin1...ndo(5) c EL[j];(6) ifi!=jthen(7) ifencodingjc=encodingthen//apotentialcomposableencoding(8) currentCompositeVal=currentCompositeValjc;(9) ifcurrentCompositeVal=encodingthen(10) isComposable true;(11) break;(12) endif;(13) endif;(14) endif;(15) endfor;(16) ifisComposable=falsethen//foundaunitencoding(17) ucnt++;(18) UL[ucnt] (i,encoding);(19) endif;(20) endfor;(21) returnUL; endDetermineNCMUnitEncodings. Figure3-19. Thealgorithmtodeterminecollectionofunittopologicalrelationshipencodings. u1,u2,...,um(m50)suchthatE=u1ju2j...jum.Asaresult,inordertoperformthevalidationofall697topologicalrelationshipencodings,weonlyneedtodrawprototypicalspatialcongurationsinR3forthe50unitencodings.Ifwecanshowthattheunitencodingsareallvalid,thenweknowthatallencodingsthatcanbecomposedfromthissetofunitencodingsarealsovalid.Itisahugereductionintermsofthenumberofspatialcongurationdrawingsforthevalidationprocess.Wepresentall50spatialcongurationdrawingstogetherwiththeircorrespondingunittopologicalrelationshipencodingsandthecorresponding9IMmatricesinFigure A-1 toFigure A-3 92

PAGE 93

Finally,wecanconcludethatourNCMmodelisabletodistinguishatotalof697differenttopologicalrelationshipsbetweentwocomplexvolumeobjectsinthe3Dspace. 3.2.1.4DeterminingPossibleTopologicalRelationshipsBasedontheNCMforTwoSimpleVolumes Wehaveidentiedallvalidtopologicalrelationshipsbetweentwocomplexvolumesthatmaycontaincavitiesormultiplecomponents.Inthissection,wewouldliketondouthowmanyofthesetopologicalrelationshipsarestillvalidbetweentwosimplevolumes.Duetotheirsimplestructure,simplevolumeobjectshavealwaysattractedparticularinterestamongresearchersinspatialinformationscience.AswehaveseeninSection 2.4.1 ,mostavailabletopologicalrelationshipmodelsarebasedonsimplespatialobjects.Althoughourmodelismoregeneral,wenowconsiderthecaseofsimplevolumesasaspecialcaseofcomplexregionsinordertobeabletocompareourapproachtoothers. Asimplevolumeobjectisdenedasabounded,regularclosedsethomeomorphic(thatis,topologicallyequivalent)toaclosedballinR3.Asimplevolumeobjectisalsooftencalledasa3D-manifold.This,inparticular,meansthatithasaconnectedinterior,aconnectedboundary,andaconnectedexterior,Hence,itisnotallowedtoconsistofseveralcomponents,itmustnotcontainnon-manifoldpoints,anditmustnothavecavities.Duetotheseuniquepropertiesofasimplevolumeobject,besidestheconstraintsinLemma 1 toLemma 5 ,additionalconstraintsareneededtoidentifytheencodingsamongthe697topologicalrelationshipencodingsfortwocomplexvolumeobjectsthatarealsovalidfortwosimplevolumeobjects. Onemostimportantcharacteristicpropertyofasimplevolumeobjectisthepathconnectednessofitsinterior,exterior,andboundary.Wehavegiventhedescriptionabouttheinterior,theexteriorandtheboundaryofagivenpointsetinR3intheproofforLemma 2 .WesayapointsetS(SR3)ispathconnectedif,andonlyifforanytwopointsx,y2S,thereexistsapathLjoiningthetwopointsxandy,wherethepathLis 93

PAGE 94

acontinuousfunctionf:R!R3fromtheunitinterval[0,1]tothesetSwithf(0)=xandf(1)=y(LetRbethesetofrealnumbers).Asaresult,anypointonthepathLbelongstothesetS.Hence,givenasimplevolumeobjectA,itsinteriorA,exteriorA)]TJ /F1 11.955 Tf 10.41 -4.34 Td[(andboundary@Aareallpathconnectedsets.Basedonthisproperty,wegivetheadditionalconstraintsfortwosimplevolumesAandBinLemma 7 toLemma 11 Lemma7. (i)IfneighborhoodcongurationNC2exists,thentheremustexistneighbor-hoodcongurationNC9;(ii)ifneighborhoodcongurationNC3exists,thentheremustexistneighborhoodcongurationNC10,i.e., (i)E2=1)E9=1(ii)E3=1)E10=1 Proof. Firstweprove(i),thatis,ifNC2exists(E2=1),NC9exists(E9=1).SincebothAandBexist,theinterior,theexterior,andtheboundaryofbothvolumeobjectsexist.Givenanypointx2B)]TJ /F1 11.955 Tf 7.08 -4.34 Td[(,theneighborhoodcongurationonxcanonlybeoneofthefollowingthreecongurations:NC2,NC4,andNC9.IfNC2exists,thenthereexistsapointqsuchthatq2A^q2B)]TJ /F1 11.955 Tf 7.08 -4.33 Td[(.AccordingtoLemma 1 ,NC4alwaysexists,whichmeansthattherealwayexistapointpsuchthatp2A)]TJ /F2 11.955 Tf 10.33 -4.34 Td[(^p2B)]TJ /F1 11.955 Tf 7.09 -4.34 Td[(.Sop,qbothexistandtheyallbelongtotheexteriorofB.SincetheexteriorofB(B)]TJ /F1 11.955 Tf 7.08 -4.34 Td[()isapathconnectedset,thustheremustexistapathLconnectingpandqsuchthateverypointonLisintheexteriorofB.Further,sincepisintheinteriorofAandqisintheexteriorofA,thepathLthatconnectsqandpmustcrosstheboundaryofA.Inotherwords,theremustexistapointmsuchthatm2LandmisontheboundaryofA.SincemisonthepathL,misintheexteriorofB.Asaresult,theneighborhoodcongurationonmcanonlybeoneofthefollowingthree:NC2,NC4,andNC9.NC2andNC4canbeexcludedforbeingtheneighborhoodcongurationonmbecausemisneitherintheinteriorofA(NC2)northeexteriorofA(NC4).Hence,theneighborhoodcongurationonmcanonlybeNC9,whichprovestheexistenceofneighborhoodconguration(9)(NC9).Inasimilarway,wecanprove(ii). 94

PAGE 95

Lemma8. (i)IfneighborhoodcongurationNC11exists,thentheremustexistbothneighborhoodcongurationNC9andNC10;(ii)ifneighborhoodcongurationNC12exists,thentheremustexistbothneighborhoodcongurationNC6andNC10;(iii)ifneighbor-hoodcongurationNC13exists,thentheremustexistbothneighborhoodcongurationNC5andNC9;(iv)ifneighborhoodcongurationNC14exists,thentheremustexistbothneighborhoodcongurationNC5andNC6;(v)ifneighborhoodcongurationNC15exists,thentheremustexistneighborhoodcongurationsNC5,NC6,NC9,andNC10i.e., (i)E11=1)E9=1^E10=1(ii)E12=1)E6=1^E10=1(iii)E13=1)E5=1^E9=1(iv)E14=1)E5=1^E6=1(v)E15=1)E5=1^E6=1^E9=1^E10=1 Proof. Therststatementiseasytoprove.AccordingtoLemma 2 (ii)andLemma 2 (iii),ifNC11exists,thenNC2andNC3mustexist,whichfurtherindicatestheexistenceofNC9andNC10(seeLemma 7 ).Wethenprove(ii),thatisifneighborhoodcongurationNC12exists(E12=1),thentheremustexistbothneighborhoodcongurationNC6andNC10(E6=1^E10=1).IfNC12exists,toprovetheexistenceofNC10issimple.AccordingtoLemma 2 (iii),ifNC12exists,thenNC3exists,whichimpliestheexistenceofNC10(seeLemma 7 (ii)).Now,weprovethattheexistenceofNC12impliestheexistenceofNC6.IfNC12exists,thenaccordingtothedenitionoftheneighborhoodconguration(12),thereexistsasetSthatcontainspointsonlyfromB,pointsfrombothAandB,andpointsfromneitherAnorB.LetthesetsSb,Sab,SxSdenotethesetthatcontainspointsonlyfromB,thesetthatcontainspointsfrombothAandB,andthesetthatcontainspointsfromneitherAnorBrespectively.ThenwehaveSb[Sab[Sx=S,Sb,SabB,SabA,andSbA)]TJ /F1 11.955 Tf 7.09 -4.33 Td[(.SincetheinteriorofBispathconnected,thengiventwopointsp,qsuchthatp2Sbandq2Sab,thereexistsapathLthatconnectspandq,andLstillliesintheinteriorofB(LB).However,sincepisintheexterior 95

PAGE 96

ofAandqisintheinteriorofA,Lthatconnectsp,qmustcrosstheboundaryofA.LetmdenotetheintersectionpointbetweenthepathLand@A,thentheneighborhoodofmisstillintheinteriorofB(N(m)B)becausemisaninteriorpointofB,andtheneighborhoodofmalsocontainspointsfromtheinteriorofA(N(m)\A6=;)becausemisontheboundaryofA.Therefore,theneighborhoodcongurationonmisNC6.Hence,wehaveprovedtheexistenceofNC6.Similarly,wecanprovethecorrectnessof(iii),(iv),and(v). TheneighborhoodcongurationNC11describesaneighborhoodN(p)ofpointpthatconsistsofthreepointssets,onefromthevolumeobjectAdenotedasSa,onefromthevolumeobjectBdenotedasSb,andtheotherfromtheexteriorofbothAandBdenotedasSx.WehaveN(p)=Sa[Sb[SxandSa\Sb\Sx=;.Further,weobservethatdifferentarrangementofthethreepointsetsinNC11arepossibleaccordingtothedifferentinteractionsamongthem.Forexample,Figure 3-16 (11)showsonepossiblearrangementofthethreesets,whereSxisadisconnectedsetanditmeetswithbothSaandSbonboundaryface,whileSaandSbdonotmeetonface.Morearrangementsofthethreesetsarepossible.ForexampleSacanmeetonlywithSbonfacebutnotwithSx(Figure 3-20 C).However,accordingtoLemma 8 (i),atleasetwooutofthethreeneighborhoodcongurations,NC8,NC9,andNC10,mustexistinN(p),thatis,everysetmustmeetwithatleastoneotherset.Thus,atotaloffourpossiblearrangementsamongthethreesetsarepossible,wecallthesearrangementstheneighborhoodcongurationvariantsforNC11.Figure 3-20 demonstratesthefourarrangements.TheneighborhoodcongurationvariantsfurtherdistinguishesthedifferentinteractionsamongthethreesetsforNC11,thusaremoredetailedneighborhoodcongurations.However,notallarrangementsarevalidarrangementsforsimplevolumes.AccordingtoLemma 8 (i),neighborhoodcongurationNC9andNC10mustexistinN(p),whichmeansthatSaandSbmustbothmeetSxonface.Asaresult,onlythetwovariantsinFigure 3-20 AandFigure 3-20 Barevalidarrangementsofthethreesetsfortwo 96

PAGE 97

(a)(b)(c)(d) Figure3-20. ExamplesofthefourpossiblearrangementsofthethreesetsSa,Sb,andSxintheneighborhoodcongurationNC11. NC11aNC11bNC12aNC12bNC13aNC13bNC14aNC14b Figure3-21. DrawingsofthevariantsoftheneighborhoodcongurationsNC11,NC12,NC13,andNC14. simplevolumesAandB.ThearrangementsinFigure 3-20 CandFigure 3-20 Darevalidarrangementsfortwocomplexvolumesbutinvalidfortwosimplevolumes.Similarly,wecanndthevariantsforneighborhoodcongurationsNC12,NC13,andNC14.Denition 30 givesaformaldenitionfortheseneighborhoodcongurationvariants. Denition30. LetA,BR3,p2R3andN(p)denotetheneighborhoodofpwithatinyradius,andletgetncdenotethefunctionthatdeterminestheneighborhoodcongurationonagivenpointp.ThenwedeneforeachneighborhoodcongurationNCiwithi2f11,12,13,14gtwoneighborhoodcongurationvariantsNCiaandNCib: NC11a,9p2R3:getnc(p)=NC11^(9q2N(p):getnc(q)=NC8)NC11b,9p2R3:getnc(p)=NC11^(:9q2N(p):getnc(q)=NC8)NC12a,9p2R3:getnc(p)=NC12^(9q2N(p):getnc(q)=NC7)NC12b,9p2R3:getnc(p)=NC12^(:9q2N(p):getnc(q)=NC7)NC13a,9p2R3:getnc(p)=NC13^(9q2N(p):getnc(q)=NC7)NC13b,9p2R3:getnc(p)=NC13^(:9q2N(p):getnc(q)=NC7)NC14a,9p2R3:getnc(p)=NC14^(9q2N(p):getnc(q)=NC8)NC14b,9p2R3:getnc(p)=NC14^(:9q2N(p):getnc(q)=NC8) 97

PAGE 98

Fortwosimplevolumes,wereplacetheoriginalneighborhoodcongurationsNC11,NC12,NC13andNC14withtheirvariantswhichdescribetheinteractionsbetweenthetwovolumesinaneighborhoodinmoredetails.Figure 3-21 showsthetwovariantsforeachofthefourneighborhoodcongurations.Now,withthenewcongurationsdened,weintroduceanadditionalconstraintinLemma 9 Lemma9. (i)IfNCiwith11i14exists,thenoneofitsneighborhoodcongurationvariants,NCiaandNCib,mustexist;(ii)ifNC8doesnotexist,thenneitherNC11anorNC14aexist;(iii)ifNC7doesnotexist,thenneitherNC12anorNC13aexist;i.e., (i)Ei=1,NCia_NCib(i2f11,12,13,14g)(ii)E8=0):NC11a^:NC14a(iii)E7=0):NC12a^:NC13a Proof. Theproofforiistrivial.WetakeNC11forexample.AccordingtoDenition 30 ,NCia_NCibisequivalentto(9p2R3:getnc(p)=NC11^(9q2N(p):getnc(q)=NC8))_(9p2R3:getnc(p)=NC11^(:9q2N(p):getnc(q)=NC8)),whichisfurtherequivalentto9p2R3:getnc(p)=NC11.Thus(i)isproved.Similarly,wecanprovethecorrectnessof(i)forNC12,NC13andNC14.Now,weprove(ii).AccordingtoDenition 30 forNC11aandNC14a,oneconditionforthemtoexististheexistenceoftheneighborhoodcongurationNC8.ThusifNC8doesnotexist(E8=0),neitherNC11anorNC14aexists.Similarly,wecanprovethatifNC7doesnotexist(E7=0),neitherNC12anorNC13aexists. Sofar,wehaveintroducedneighborhoodcongurationvariantsandtheconstraintsthatdealswiththesevariants.Now,weintroducethelastconstraintforvalidatingthetopologicalencodingsfortwosimplevolumes.Forthispurpose,itisnecessarytointroduceanimportantconceptcalledtheboundaryneighborhoodcongurationtransitiongraph.Werstdenetheconceptofneighborhoodcongurationtransitionbetweentwopointsinthe3Dspace. 98

PAGE 99

Denition31. Letp,q2R3betwopointsinthe3Dspace.WecallalinkLthatconnectspointpandqapathfromptoqifandonlyifthepathLisacontinuousfunctionf:R!R3fromtheunitinterval[0,1]tothe3Dspacewithf(0)=pandf(1)=q(LetRbethesetofrealnumbers).LetthefunctiongetncdeterminestheneighborhoodcongurationonagivenpointforaspatialcongurationthatinvolvestwovolumeobjectsAandB.Thenwecallnc1!...!ncntheneighborhoodcongurationtransitiononLfromptoqif,andonlyif,itsatisesthefollowingconditions: (i)nc1=getnc(p),ncn=getnc(q)(ii)81i
PAGE 100

(a)(b)(c) Figure3-22. Examplesoftheneighborhoodcongurationtransitionsbetweenpointpandq. alwaysexistsapathLthatconnectspandqsuchthatL@V.Further,ifpisontheboundaryofA(p2@A),theneighborhoodcongurationonpcanonlybeoneofthefollowingneighborhoodcongurations:NC6,NC7,NC8,NC9,NC11a,NC11b,NC12a,NC12b,NC13a,NC13b,NC14a,NC14b,andNC15.WecalltheseneighborhoodcongurationstheboundaryneighborhoodcongurationsforA.LetBNCAbeasetthatcollectsallboundaryneighborhoodcongurationsforA,thenBNCA=fNC6,NC7,NC8,NC9,NC11a,NC11b,NC12a,NC12b,NC13a,NC13b,NC14a,NC14b,NC15g.Similarly,thecollectionofboundaryneighborhoodcongurationsforBisBNCB=fNC5,NC7,NC8,NC10,NC11a,NC11b,NC12a,NC12b,NC13a,NC13b,NC14a,NC14b,NC15g.Therefore,wecalltheneighborhoodcongurationtransitiononpathLfromptoqtheboundaryneigh-borhoodcongurationtransitionifL@Vandp,q2@V.Aboundaryneighborhoodcongurationtransitiononlyconsistsofboundaryneighborhoodcongurations,thatisifnc1!...!ncnistheboundaryneighborhoodcongurationtransitiononpathLfromptoq(L@V,p2@V,q2@V,V2fA,Bg),then81inwehavenci2BNCV.Forexample,inFigure 3-22 BNC9!NC13!NC6!NC12adescribesaboundaryneighborhoodcongurationtransitiononLfromptoqwhereLconnectsp,qandliesontheboundaryofA.AllthefourneighborhoodcongurationsNC9,NC13,NC6andNC12abelongtothesetofboundaryneighborhoodcongurationsforA(BNCA). Further,letnc1!...!ncnbea(boundary)neighborhoodcongurationtransition,thenwecallnci!nci+1adirect(boundary)transitionfromncitonci+1.According 100

PAGE 101

toDenition 31 ,adirecttransitionimpliesthatthereexistsapathonwhichonlyneighborhoodcongurationsnc1andnc2exist.Aneighborhoodcongurationtransitionisformedbyasequenceofdirectneighborhoodcongurationtransitions.Whenn=2inaneighborhoodcongurationtransition,thentheneighborhoodcongurationtransitionitselfisadirecttransition.Forexample,thetransitionNC9!NC15inFigure 3-22 BisadirectboundaryneighborhoodcongurationtransitiononL0fromptop0,whichimpliesthatthechangeoftheneighborhoodcongurationonlyhappenedoncefromNC9toNC15,anditistherstpartoftheboundaryneighborhoodcongurationtransitionNC9!NC13!NC6!NC12a. However,weobservethatthedirecttransitiondoesnotexistbetweenanytwoarbitraryneighborhoodcongurations.Inotherwords,forcertainpairsofneighborhoodcongurations,directtransitionbetweenthemisnotpossible.Forexample,apaththatcontainsdirectiontransitionfromNC9toNC12adoesnotexistforanyspatialcongurations.Italwaysinvolvesintermediateneighborhoodcongurations.InFigure 3-22 B,anypathlyingontheboundaryofAthatconnectstwopointswiththeirneighborhoodcongurationsasNC9andNC12amustrstpassthroughpointswithneighborhoodcongurationsasNC15andthenpassthroughpointswithneighborhoodcongurationsasNC6.NopathexiststhatrepresentsadirecttransitionNC9!NC12a. OurlastconstraintforlteringinvalidtopologicalencodingsbetweentwosimplevolumesisbasedontherequirementoftheexistenceofaneighborhoodcongurationtransitionbetweenanytwopointsontheboundaryofAandtheboundaryofB.Duetotheboundarypathconnectednesspropertyforsimplevolumes,givenanytwopointsp,qontheboundaryofasimplevolumeobjectV,therealwaysexistsapathLthatconnectsthetwopointsandliesontheboundary(L@V).Asaresult,foranytwoneighborhoodcongurationsNxandNythatexistontheboundaryofV,therealwaysexistsaneighborhoodcongurationtransitionthatstartswithNxandendswithNy(Nx!...!Ny).Therefore,givenatopologicalencodingthatidentiesallexisting 101

PAGE 102

neighborhoodcongurationsinaspatialscenario,itisavalidencodingfortwosimplevolumesAandBifaboundaryneighborhoodcongurationtransitionexistforanyneighborhoodcongurationpairthatexistsontheboundaryofAorB.Otherwise,theencodingisaninvalidonefortwosimplevolumes.Forthispurpose,weneedtorstidentifyallpossibledirecttransitionsthatexistbetweenboundaryneighborhoodcongurationpairs.Later,thesedirecttransitionswillbeusedtondoutallpossibleboundaryneighborhoodcongurationtransitionsontheboundaryofAandB.WeidentifythesedirecttransitionsbetweenboundaryneighborhoodcongurationsinLemma 10 Lemma10. LetA,Bbetwovolumesinthe3Dspace,letBNCAandBNCBdenotethetwosetsofboundaryneighborhoodcongurationsforAandBrespectively,andletdirectTbethefunctionthatcheckswhetheradirecttransitionbetweentwoneighbor-hoodcongurationsispossible.Itreturns1ifadirecttransitionispossible,returns0ifsuchadirecttransitiondoesnotexist.Then,foranytwoneighborhoodcongurationsNCxandNCyontheboundaryofA(NCx,NCy2BNCA),wehave: Ifx,y2f6,7,8,9g:directT(NCx,NCy)=0;Ifx,y2f11a,11b,12a,12b,13a,13b,14a,14bg:directT(NCx,NCy)=0;Ifx2f6,7,8,9,15g,y2f11a,11b,12a,12b,13a,13b,14a,14b,15g:ThevalueofdirectT(NCx,NCy)isgiveninFigure 3-23 A; ForanytwoneighborhoodcongurationsNCxandNCyontheboundaryofA(NCx,NCy2BNCB),wehave: Ifx,y2f5,7,8,10g:directT(NCx,NCy)=0;Ifx,y2f11a,11b,12a,12b,13a,13b,14a,14bg:directT(NCx,NCy)=0;Ifx2f5,7,8,10g,y2f11a,11b,12a,12b,13a,13b,14a,14b,15g:ThevalueofdirectT(NCx,NCy)isgiveninFigure 3-23 B; Proof. Forthislemma,weprovethedirecttransitionsforneighborhoodcongurationsontheboundaryofA,thentheproveforthedirecttransitionsfortheneighborhood 102

PAGE 103

congurationsontheboundaryofBcanbesolvedinasimilarmanner.Werstprovethatifx,y2f6,7,8,9g,directT(NCx,NCy)=0.Letx=6andy=7,ifweassumethatadirecttransitionispossiblebetweenNC6andNC7,thentheremustexistapathLthatconnectstwopointsp,qwhoseneighborhoodcongurationsareNC6andNC7respectivelysuchthatL@AandtheneighborhoodcongurationofanypointonLiseitherNC6orNC7.Asaresult,theremustexisttwopointsp,q2Lsuchthat(i)theneighborhoodcongurationofpisNC6andtheneighborhoodcongurationofqisNC7;(ii)p,qareadjacentpointsonL.Accordingtocondition(ii),pisintheneighborhoodofqandqisintheneighborhoodofp.Inotherwords,intheneighborhoodcongurationofp(NC6),theremustexistapointqwhoseneighborhoodcongurationisNC7.However,itisnotpossiblesinceinNC6theredoesnotexistpointsthatbelongtoboththeexteriorofAandB,whileNC7containssuchpoints.Inthesameway,wecanprovethatnodirecttransitionexistsbetweenanyx,ypairwhenx,y2f6,7,8,9gandanyx,ypairwhenx,y2f11a,11b,12a,12b,13a,13b,14a,14bg.Moreover,alltheneighborhoodpairsinFigure 3-23 AthathasdirectTvalueas0canalsobeprovedinthesameway.Now,weprovethecorrectnessofthe1valuesinFigure 3-23 A.WerstconsidertheneighborhoodpairNC6andNC12a.AccordingtothedenitionforNC12a(Denition 30 )andLemma 8 (ii),letpdenotethepointwhoseneighborhoodcongurationisNC12a,thenthereexistsapointqintheneighborhoodofpthathastheneighborhoodcongurationNC6.Asaresult,theneighborhoodcongurationtransitiononthepaththatconnectspandqisadirecttransitionbecausenootherneighborhoodcongurationexistsbetweenpandq.Similarly,wecanprovetheexistenceofthedirecttransitionsbetweenotherneighborhoodcongurationpairsthathavedirectTvaluesas1s. InLemma 10 ,wehaveidentiedforboundaryofA(B)allneighborhoodcongurationpairsbetweenwhichadirectiontransitionispossible.Finally,wecanconstructaboundaryneighborhoodcongurationtransitiongraph(BNCTG)foranygiven 103

PAGE 104

directT NC6 NC7 NC8 NC9 NC15 NC11a 0 0 1 1 1 NC11b 0 0 0 1 1 NC12a 1 1 0 0 1 NC12b 1 0 0 0 1 NC13a 0 1 0 1 1 NC13b 0 0 0 1 1 NC14a 1 0 1 0 1 NC14b 1 0 0 0 1 NC15 1 0 0 1 0 directT NC5 NC7 NC8 NC10 NC15 NC11a 0 0 1 1 1 NC11b 0 0 0 1 1 NC12a 0 1 0 1 1 NC12b 0 0 0 1 1 NC13a 1 1 0 0 1 NC13b 1 0 0 0 1 NC14a 1 0 1 0 1 NC14b 1 0 0 0 1 NC15 1 0 0 1 0 (A)(B) Figure3-23. ThedirecttransitiontablefortheneighborhoodcongurationsontheboundaryofA(A)andthedirecttransitiontablefortheneighborhoodcongurationsontheboundaryofB(B). topologicalencoding.Inprinciple,werstidentifytheexistingneighborhoodcongurationsaccordingtothegivenencoding,andweconstructtwoboundaryneighborhoodcongurationtransitiongraphs,oneforneighborhoodcongurationsthatareontheboundaryofA,namedasBNCTG-A,andtheotherforneighborhoodcongurationsthatareontheboundaryofB,namedasBNCTG-B.InaBNCTG-A(BNCTG-B),thenodesrepresenttheneighborhoodcongurationsthatexistontheboundaryofA(B),andeachedgethatlinkstwonodesrepresentsthepossibleexistenceofadirecttransitionbetweenthetwoneighborhoodcongurations.Asaresult,theBNCTG-A(BNCTG-B)constructedpresentsallpossibleneighborhoodcongurationtransitionsinaspatialscenariowiththegiventopologicalencoding.WegivethedenitionsforBNCTG-AandBNCTG-BinDenition 32 Denition32. LetG=(V,E)beaundirectedgraphwhereVcontainsasetofnodesandEcontainsanumberofedgeslinkingthenodes.LetA,Bbetwovolumesinaspa-tialcongurationandletEbethe15-bittopologicalencodingforAandB.Werstiden-tifytheexistenceofthe19neighborhoodcongurations(includingthevariants)accord-ingtothe15-bitE.LetFxdenotetheagthatindicatestheexistenceofneighborhood 104

PAGE 105

congurationNCxwherex2f1,2,3,4,5,6,7,8,9,10,11a,11b,12a,12b,13a,13b,14a,14b,15g.Wehave: 81i10:Fi=E[i];810
PAGE 106

Encoding BNCTG-A BNCTG-B 111111101101001 VA=fNC6,NC7,NC9, VB=fNC5,NC7,NC10, NC12a,NC12b,NC15g NC12a,NC12b,NC15g 011100010100000 VA=fNC8g VB=fNC8,NC10g 111110001110000 VA=fNC9,NC11bg VB=fNC5,NC10,NC11bg Figure3-24. ExamplesofthetopologicalencodingswiththecorrespondingBNCTG-AandBNCTG-B. othertransitionsbetweenthesetwoneighborhoodcongurationsarepossible.Anotherobservationisthat,bothBNCTG-AandBNCTG-Bforthisencodingareconnectedgraph,thatis,eachneighborhoodcongurationpairinthegraphisconnected.Inotherwords,transitionispossiblebetweeneachneighborhoodcongurationpair.However,thisisnotthecaseforallencodings.ThesecondexampleinFigure 3-24 withtheencoding011100010100000showsdifferentBNCTG-AgraphandBNCTG-Bgraph.ThespatialcongurationdescribedbythisencodingconsistsofavolumeBwithacavityandavolumeAthatllsthecavityofB.ItsBNCTG-Agraphconsistsonlyonenode,whichmeansthatontheboundaryofA,onlyneighborhoodcongurationNC8exists.InitsBNCTG-Bgraph,whichconsistsoftwoisolatednodesNC8andNC10,noneighborhoodcongurationtransitionontheboundaryofBispossible.ThismeansthatyoucannotndapathLthatliesontheboundaryofBandconnectstwopointswiththeirneighborhoodcongurationsasNC8andNC10.ThethirdexampleshowninFigure 3-24 withtheencoding111110001110000,hasaconnectedBNCTG-AgraphbutadisconnectedBNCTG-Bgraph.InitsBNCTG-Bgraph,noconnectionexists 106

PAGE 107

betweenNC5andNC10andnoconnectionexistbetweenNC5andNC11b.TheexampleinFigure 3-22 Cdemonstratessuchrelationships.TheredoesnotexitapathlyingontheboundaryofBthatconnectspointpwithqnorsuchpaththatconnectspointpwithp0.Onlythepaththatconnectsp0withqexiststhatliesentirelyontheboundaryofB.ThisisconsistentwithwhatBNCTG-Bgraphdescribes. Finally,wecanpresentthelastconstraintfortwosimplevolumes,thatis,theencodingsthatgenerateeitherdisconnectedBNCTG-AordisconnectedBNCTG-Bdonotrepresenttopologicalrelationshipsbetweentwosimplevolumeobjects.WepresentthisconstraintinLemma 11 Lemma11. LetEbeatopologicalencodingfortwosimplevolumesAandB,theneachnodepairinitsBNCTG-AmustbeconnectedandeachnodepairinitsBNCTG-Bmustbeconnected. Proof. AssumethereexisttwonodesnxandnyinBNCTG-Athatarenotconnected.Letthepointsp,qdenotetwopointswhoseneighborhoodcongurationsarenxandny.ThentheredoesnotexistapathLthatconnectspandqsuchthatLliesontheboundaryofA.ThisisacontradictionagainstthepathconnectednesspropertyoftheboundaryofA.Thustheassumptionisinvalid.Similarly,wecanprovethatBNCTG-Bmustbeconnected. AccordingtoLemma 11 ,thesecondandthirdencodingsinFigure 3-24 donotqualifyforvalidtopologicalencodingsbetweentwosimplevolumes. Wehavedevelopedaprogramtocheckalltheconstraintsagainstthe697topologicalencodingsthatarevalidfortwocomplexvolumes,andwegetatotalof72encodingssurvivestheconstraints.Toprovethevalidityofallthe72encodingsfortwosimplevolumes,wecreateaspatialcongurationforeachencoding.Wepresentall72spatialcongurationdrawingstogetherwiththeircorrespondingtopologicalrelationshipencodingsandthecorresponding9IMmatricesinFigure A-4 toFigure A-6 107

PAGE 108

Finally,wecanconcludethatourNCMmodelisabletodistinguishatotalof72differenttopologicalrelationshipsbetweentwosimplevolumeobjectsinthe3Dspace. 3.2.1.5ComparisonoftheNCMwiththe9-IntersectionModel InSection 3.2.1.3 andSection 3.2.1.4 ,wehaveevaluatedourNCMmodelintermsofthenumberoftopologicalrelationshipsthatcanbedistinguishedbetweentwocomplexvolumesandbetweentwosimplevolumes.Wehaveprovedthatatotalof697topologicalrelationshipscanbedistinguishedbyourNCMbetweentwocomplexvolumesandatotalof72topologicalrelationshipscanbedistinguishedbetweentwosimplevolumes.Inthissection,wecompareourNCMmodelwiththemostpopularmodelingstrategyfortopologicalrelationships,the9-intersectionmatrixmodel(9IM),andshowthatfor3Dvolumes,ourNCMismorepowerfulthanthe9IM. Ourneighborhoodcongurationmodelandthe9-intersectionbasedmodelsshareanimportantbasis,whichispointsettheoryandpointsettopology.Thisbasisisimportantbecauseitenablesthemodelingstrategiestostayintheabstracttopologicalspacewhereonlypointsetsareusedandthediscreterepresentationofaspatialobjectisnotrelevant.Asaresult,modelsbasedonpointsetsaremoregeneralthanothermodelsthatleavetheabstracttopologicalspace.Nomatterwhatdatarepresentationofaspatialobjectisused,themodelsbasedonthepointsetswillalwayswork.Ontheotherhand,modelsbasedononeparticularrepresentationofspatialobjectsmaynotworkormayyieldsdifferentresultsonanotherrepresentationofthesamespatialobjects.Forexample,thedimensionalmodel[ 107 ](DM)isbasedonthedimensionalelementsofspatialobjects,whichdeterminesthecornerpointsofaregionobjectas0Delements.Ithighlydependsontherepresentationofaspatialobject,andityieldsdifferentresultsforacirclewithasmoothboundaryandacirclewithitsboundaryapproximatedwithasetofconnectedsegments. 108

PAGE 109

Therefore,inthissection,wecompareourNCMmodelwiththe9IMmodel,andshowthatwecandistinguishmoretopologicalrelationshipsbetweentwovolumeobjects. First,weshowtherelationshipbetweenthe9IMandourNCM.The9IMmodelisbasedontheninepossibleintersectionsoftheboundary(@A),interior(A),andexterior(A)]TJ /F1 11.955 Tf 7.09 -4.33 Td[()ofaspatialobjectAwiththecorrespondingcomponentsofanotherobjectB.A9elementmatrixisusedtorepresenttheemptyandnon-emptinessoftheintersectionsbetweenthecomponents.ThetopologicalrelationshipbetweentwospatialobjectsAandBcanbeexpressedbyevaluatingthematrixinFigure 2-1 .Bycomparingthe15neighborhoodcongurationswiththe9elementsina9IMmatrix,weobservethatthereexistcorrelationsbetweenthem.Letthefunction9IM(A,B)yieldthe9IMmatrixfortwospatialobjectsAandB,andletthefunctionNCM(A,B)yieldthetopologicalencodingforAandB,thenLemma 12 showsthecorrelationbetweenthem. Lemma12. LetA,Bbetwospatialobjects,letM=9IM(A,B)beamatrixwith9binaryelements,andletE=NCM(A,B)bea15bitbinaryencoding,thenwehave: M[0][0],E1_E5_E6_E7_E12_E13_E14_E15M[0][1],E5_E13_E14_E15M[0][2],E2_E5_E8_E9_E11_E13_E14_E15M[1][0],E6_E12_E14_E15M[1][1],E7_E8_E11_E12_E13_E14_E15M[1][2],E9_E11_E13_E15M[2][0],E3_E6_E8_E10_E11_E12_E14_E15M[2][1],E10_E11_E12_E15M[2][2],E4_E7_E9_E10_E11_E12_E13_E15 Proof. Duetospacelimit,weonlyprovetherstcorrespondence,andtheotherscanbeprovedinasimilarway.IfM[0][0]=1,whichindicatesthatA\B6=;,thenthereexistapointp2A\B.Thismeansthatp2Aandp2B,thenaccordingtothe 109

PAGE 110

9IM 0@0010011111A 0@0010111111A 0@1111111111A 0@1001101111A NCM (011100001100000) (011100011110000) (111111001100001) (101101100101000) 9IM 0@1001001111A 0@1110110011A 0@1110010011A 0@1000100011A NCM (101101000100000) (110110101000100) (110110001000000) (100100100000000) Figure3-25. The8topologicalrelationshipsbetweentwovolumesthatcanbedistinguishedwithboth9IMandNCM. denitionsoftheneighborhoodcongurations,NC1,NC5,NC6,NC7,NC12,NC13,NC14,andNC15aretheneighborhoodcongurationsthatcontainssuchpointp.Hence,oneoftheseneighborhoodcongurationsmustexist. AccordingtoLemma 12 ,givenatopologicalencodingEfortwospatialobjectsAandB,whichindicatestheexistenceofthe15neighborhoodcongurations,thecorresponding9IMmatrixMforAandBcanbederived,butnotviceversa.Forexample,giventheencoding111111101101001(seetherstexampleinFigure 3-24 ),wecanderiveaunique9IMmatrixMinwhicheveryelementhasvalue1(seethethirdexampleinFigure 3-26 ).However,ifwearegiventhematrixMwitheveryelementhavingvalue1,wewillnotbeabletodetermineauniqueencoding.SeveraltopologicalencodingsarepossibleforM,e.g.,111111011110011,111111011110001,111111101101001,111111111111001,etc.Asaresult,morethanonetopologicalencodingsmaptoone9IMmatrix,hence,ourNCMmodeliscapableofdistinguishingmoretopologicalrelationships. Accordingto[ 31 ],8topologicalrelationshipsaredistinguishedbetweentwosimple3Dvolumeobjects.Figure 3-25 showsthe8congurationsandtheircorresponding9IMmatrices.Todemonstratethatourmodelcanalsodistinguishthese8topologicalrelationships,wealsolistourtopologicalrelationshipencodingforeachconguration 110

PAGE 111

9IM 0@1111111111A 0@1111111111A 0@1111111111A 0@1111111111A NCM (111111011110011) (111111011110001) (111111101101001) (111111111111001) Figure3-26. The4topologicalrelationshipsthatcanbedistinguishedwithNCMbutnot9IM. inFigure 3-25 .Weobservethatforall8topologicalrelationshipsthetopologicalrelationshipencodingsarealsodifferent. Moreover,the9IMmodelonlypicksupthedominatingtopologicalrelationshipssuchasoverlap,andignoresothertopologicalrelationshipfactorsthatmayalsoexistatthesametime,e.g.meetataface.However,sincewestartwithaverysmallneighborhoodofeachpoint,weareabletocapturemorene-grainedtopologicalrelationships.InFigure 3-26 ,wehavelisted4topologicalrelationshipsthatcanbedistinguishedwithourNCMmodelbutareallidentiedsimplyasoverlapinthe9IMmodel.ApartfromtheoverlaprelationshipbetweenAandB,thetopologicalrelationshipslikeAmeetsBonafacefromtheoutside(rstandsecondscenarioinFigure 3-26 ),AmeetsBonafacefromtheinsideofB(thirdscenarioinFigure 3-26 ),andAhasacomponentinsideBandtouchesBonaface(fourthscenarioinFigure 3-26 )arealldistinguishedinourmodel. Therefore,wecanconcludethatourNCMmodelismorepowerfulthan9IMbasedmodelsintermsofdifferentiatingtopologicalrelationshipsbetweentwovolumeobjects,especiallycomplexvolumes. 3.2.23DCardinalDirectionRelationshipsModeling Anothersetofimportantspatialrelationshipsarecalledthecardinaldirectionalrelationshipsbetweenspatialobjects.Ithasalongresearchtraditioninspatialdatabases,GIS,anddisciplineslikecognitivescience,robotics,articialintelligence,andqualitativespatialreasoning.Cardinaldirectionsrepresentabsolutedirectional 111

PAGE 112

relationshipslikenorthandsouthwestwithrespecttoagivenreferencesystem.Inspatialdatabases,theyareusuallyintegratedintoquerylanguagesasselectionandjoinconditions.Sofar,mosteffortshavefocusedonmodelingcardinaldirectionsbetweenobjectsinthetwo-dimensional(2D)spacewhileeffortsinthe3Dspacehavebeenrare.Besidestheknown2Dcardinaldirections,thethirddimensionintroducesnewdirectioncomponentssuchasaboveandbelowthathavetobetakenintoaccountin3Dcardinaldirectionmodels.Wehavereviewedtheexisting3DmodelsforcardinaldirectionsinSection 2.4.2 ,mostofwhomsufferfromoneofthefollowingproblems.First,theydonotconsidertheshapesofthe3Dobjectsandeitherapproximatetheseobjectsassingle3Dpointsorasminimumboundingcubes.Hence,theylooseprecisionandsometimesleadtoincorrectresults.Second,insomemodelsthetwo3Doperandobjectsaretreatedinanunequalmanner,thusleadstotheviolationoftheprincipleofconverseness.Thatis,thecardinaldirectiondeterminedfortwo3DspatialobjectsAandBisnotalwaysequaltotheinverseofthecardinalrelationdeterminedforBandA.Third,somemodelsdonothaveacompletecoverageofallpossiblerelations.Thus,inSection 3.2.2.1 ,weproposeanewtwo-phasemodel,calledobjectinteractioncubematrix(OICM)modelthatsolvestheseproblems. Further,asadetourfromthe3Dproblems,weinvestigatetherepresentationofcardinaldirectiondevelopmentbetweentwomovingobjects.Recently,awiderangeofapplicationslikehurricaneresearch,remanagement,navigationsystems,andtransportation,tonameonlyafew,hasshownincreasinginterestinmanagingandanalyzingspaceandtime-referencedobjects,so-calledmovingobjects,thatcontinuouslychangetheirpositionsovertime.Inthesamewayasmovingobjectscanchangetheirlocationovertime,thecardinaldirectionsbetweenthemcanchangeovertime.Transferredtoaspatiotemporalcontext,thesimultaneouslocationchangeofdifferentmovingobjectscanimplyatemporalevolutionoftheirdirectionalrelationships,calleddevelopment.Itisanopen,interesting,andchallengingproblemtocapture 112

PAGE 113

thecardinaldirectiondevelopmentbetweenmovingobjects.Thus,fromamodelingperspective,wedenedthedevelopmentofcardinaldirectionsovertimeasasequenceoftemporallyorderedandenduringcardinaldirections.WepresentthemodelingstrategyinSection 3.2.2.2 3.2.2.1TheObjectsInteractionCubeMatrixfor3DComplexVolumes ThemainideaofournovelObjectsInteractionCubeMatrix(OICM)modelistocaptureandrepresenttheinteractionsbetweentwogeneral3DvolumesAandBwithpossiblydisconnectedcomponentsandcavitiesandtoderivethecardinaldirectionfromthisinformation.Ourmodelconsistsofarepresentationphaseandaninterpretationphase.Intherepresentationphase,wecreateankmn-ObjectsInteractionCube(OIC)(k,m,n2f1,2,3g)byintersectingtheirminimumboundingboxeswitheachothertocaptureallpossibleinteractionsbetweentwo3Dvolumeobjects.WeuseanObjectsInteractionCubeMatrix(OICM)tokeepwhichobjectintersectswhichsub-cube.Intheinterpretationphase,wedevelopatechniquetocomputethecardinaldirectionfromthematrixanddenethesemanticoftheresultobtained.Eachphasewillbedetailedintherestofthissection. Representinginteractionsofobjectsin3DSpacewiththeObjectsInteractionCubeMatrix(OICM) Thegeneralideaistorstsuperimposeacubecalledobjectsinteractioncubeonacongurationoftwo3Dspatialobjects(volumes)tocapturetheirinteractions.Suchacubeisconstructedfromatotaloftwelvepartitioningplanesderivedfrombothobjects.Partitioningplanesaretheinniteextensionsofthefacesoftheaxis-alignedminimumboundingboxaroundeachobject;eachpartitioningplaneisperpendiculartooneparticularcoordinateaxis.ThesixpartitioningplanesfromeachobjectcreateapartitionoftheEuclideanspaceR3into27mutuallyexclusivecellsfromwhichonlythecentralcellisboundedandtheother26cellsareunbounded.Theobjectitselfislocatedinthebounded,centralcell.ThisessentiallydescribesthetilingstrategyoftheTCDmodel. 113

PAGE 114

However,ourfundamentalimprovementisthatweemploythistillingstrategytobothobjects,thusobtaintwoseparatespacepartitions,andthenoverlaybothpartitions.Theoverlaycreatesanewsubdivisionofspace,andfurther,alsopartitionseachobjectintonon-overlappingcomponents,whereeachcomponentofoneobjectliesinadifferentboundedcell.Thisoverlayachievescoequalinteractionandsymmetrictreatmentofthetwoobjects.Inthemostgeneralcase,allpartitioningplanesaredifferentfromeachother,andtheoverlaycreates27non-overlappingboundedcellsandseveralunboundedcells.Sincethecomponentsoftheobjectsarealwayslocatedinsidetheboundedcells,wecanexcludeallunboundedcellsandonlyfocusontheboundedcellsthatarerelevanttotheobjects'interactions.Denition 33 formallydenestheobjectsinteractioncubespacethatcontainsallboundedcells. Denition33. LetA,B2volumewithA6=?andB6=?,andletminvx=minfxj(x,y,z)2vg,maxvx=maxfxj(x,y,z)2vg,minvy=minfyj(x,y,z)2vg,maxvy=maxfyj(x,y,z)2vg,minvz=minfzj(x,y,z)2vg,andmaxvz=maxfzj(x,y,z)2vgforv2fA,Bg.Thentheobjectsinteractioncubespace(OICS)ofAandBisgivenas OICS(A,B)=f(x,y,z)2R3jmin(minAx,minBx)xmax(maxAx,maxBx)^min(minAy,minBy)ymax(maxAy,maxBy)^min(minAz,minBz)zmax(maxAz,maxBz)g Denition 34 denespartitioningfacesaspartofthepartitioningplaneandsuperimposesthemontheobjectsinteractioncubespacetoobtaintheobjectsinteractioncube. Denition34. Letfvmin x,fvmax x,fvmin y,fvmax y,fvmin z,andfvmax zdenotethesixpartitioningfacesofvforv2fA,Bg,then 114

PAGE 115

fvmin x=f(x,y,z)2OICS(A,B)jx=minvxgfvmax x=f(x,y,z)2OICS(A,B)jx=maxvxgfvmin y=f(x,y,z)2OICS(A,B)jy=minvygfvmax y=f(x,y,z)2OICS(A,B)jy=maxvygfvmin z=f(x,y,z)2OICS(A,B)jz=minvzgfvmax z=f(x,y,z)2OICS(A,B)jz=maxvzg Next,letFx,FyandFzdenotethethreesetsthatcontainthepartitioningfacesperpendiculartothex-axis,they-axisandthez-axisrespectively.Weobtain Fx=ffAmin x,fAmax x,fBmin x,fBmax xgFy=ffAmin y,fAmax y,fBmin y,fBmax ygFz=ffAmin z,fAmax z,fBmin z,fBmax zg Finally,wegetthe(cellwallsofthe)objectsinteractioncube(OIC)forAandB(seeFigures 3-27 Aand 3-27 B)as OIC(A,B)=Fx[Fy[Fz ThisdenitioncomprisesallcasesforOICs.Ingeneral,weobtaina333OICifjFxj=jFyj=jFzj=4,meaningthatthereareatotalof12differentpartitioningfacesthatforms27boundedcells.SpecialcasesariseifatleastoneofthethreesetsFx,Fy,andFzcontainslessthanfourpartitioningfaces;thismeansthatatleasttwopartitioningfacesfromthetwoobjectscoincide.Thisresultsindifferentsizesofcubes.Denition 35 formallydescribesthesituation. Denition35. AnobjectsinteractioncubeOIC(A,B)isofsizekmn,withk,m,n2f1,2,3g,ifjFxj=k+1,jFyj=m+1,andjFzj=n+1. Theobjectsinteractioncubespaceispartitionedintoseveralcubiccellsbythepartitioningfaces(seeDenition 36 ). Denition36. Sinceeachpartitioningfaceisperpendiculartoaspeciccoordinateaxis,werstdeneanorderingofthepartitioningplanesthatareperpendiculartothesameaxis.Leth1,h22Frwithr2fx,y,zg,thenh1
PAGE 116

(A) (B) (C) Figure3-27. TheOICMmodelforAandB.ExamplesoftwovolumesAandB(A),theirOICrepresentation(B),andthelabelingoftheOICcubiccells(C). p22h2.Next,wedenethreeauxiliaryliststhatstorepartitioningfacesregardingtheorder<: listleft right=fhf1,...,fk0ijk0=jFxj,81igjglisttop down=fhh1,...,hn0ijn0=jFzj,81ihjg Further,forthepartitioningfacesf2Frwithr2fx,y,zg,letthefunctiongetr(f)returnthecommonvaluerofallpointsofthefacef.Anobjectsinteractioncubiccellc(i,j,l)with1ik,1jmand1lnisthendenedas: c(i,j,l)=f(x,y,z)2OIGS(A,B)jgetx(fi)xgetx(fi+1),gety(gj)ygety(gj+1),getz(hl)zgetz(hl+1)g Figure 3-27 Cshowsthevisualizationofthelabelingofcubiccellsina333OIC. TheobjectsinteractioncubefortwovolumeobjectsAandBprovidesuswiththevaluableinformationwhichvolumeobjectintersectswithcubiccell.Denition 37 providesthedenitionoftheinteractionbetweenA,B,andacubiccell. 116

PAGE 117

Denition37. GivenA,B2volumewithA6=?andB6=?,letbeafunctionthatencodestheinteractionofAandBwithacubiccellc(i,j,l),andcheckswhethernoobject,Aonly,Bonly,orbothobjectsintersectacubiccell.Wedenethisfunctionas (A,B,c(i,j,l))=8>>>>>>>>>><>>>>>>>>>>:0ifA\c(i,j,l)=?^B\c(i,j,l)=?1ifA\c(i,j,l)6=?^B\c(i,j,l)=?2ifA\c(i,j,l)=?^B\c(i,j,l)6=?3ifA\c(i,j,l)6=?^B\c(i,j,l)6=? Theoperatordenotesthepoint-settopologicalinterioroperatorandyieldsavolumewithoutitsboundary.ThefunctionencodestheinteractionbetweentwovolumesandacubiccelloftheirOIC.Inordertorepresentathreedimensionalkmncubewithatwodimensionalmatrix,weintroduceacubiccolumnvectorvi,j=hc(i,j,1),...,c(i,j,n)iwith1ikand1jm.Itrepresentsalistofcubiccellsthatareorderedalongthez-axisinatop-downfashion.Further,wedeneavariantofthefunction,0,thattakestheobjectsA,B,andthecubiccolumnvectorvi,jasinputs,andreturnsavectorofencodings.Sowehave0(A,B,vi,j)=h(A,B,c(i,j,1)),...,(A,B,c(i,j,n))i.Thusforeachcubiccolumnvector,westoretheencodedinteractioninformationinavectorelementofanobjectsinteractioncubematrix(OICM).Inthisway,weestablishamappingfromtheobjectsinteractioncube,whichisthegeometricrepresentationoftheobjects'interaction,tothematrixrepresentationoftheobjects'interactioninformation.Weobtain27possibleobjectsinteractioncubesofsizekmnsincek,m,n2f1,2,3g.Thesearemappedto27possibleobjectsinteractioncubematricesofsizekmwithvectorelementlengthn.Asanexample,weshowtheobjectsinteractioncubematrixOICM(A,B)foragiven333objectsinteractioncubeOIC(A,B): OICM(A,B)=0BBBB@0(A,B,v1,1)0(A,B,v1,2)0(A,B,v1,3)0(A,B,v2,1)0(A,B,v2,2)0(A,B,v2,3)0(A,B,v3,1)0(A,B,v3,2)0(A,B,v3,3)1CCCCA 117

PAGE 118

0@h0,0,0ih2,0,0ih0,0,0ih0,1,1ih2,3,1ih0,1,1ih0,1,1ih0,1,1ih0,1,1i1A0@h0,0,0ih2,0,0ih0,0,0ih0,1,1ih2,2,0ih0,0,0ih0,1,1ih0,1,1ih0,1,1i1A(A)(B) Figure3-28. TheOICMforthepreviousexample.TheOICMfortheexampleinFigure 2-3 B(A),andtheOICMfortheexampleinFigure 3-27 A(B). Theelementsinthematrixarevectorsthatstorethecodedinteractioninformation.Figure 3-28 showstwomatricescomputedfromtheexamplesinFigure 2-3 BandFigure 3-27 A. InterpretingdirectionrelationswiththeOICMmodel ThesecondphaseoftheOICMmodelistheinterpretationphase.Ittakesanobjectsinteractioncubematrixobtainedastheresultoftherepresentationphaseasinputandusesittogenerateasetofcardinaldirectionsasoutput.Anewcardinaldirectionsetwith27basiccardinaldirectionsisrstdened.ThentheinterpretationphasebasedonanOICMisdetailed. Aswehaveseen,foranytwocomplexvolumes,anOICwithkmnnon-overlappingcubiccellscanbegenerated,wherek,m,n2f1,2,3g.Anycubiccellc(i,j,l)(1ik,1jm,1ln)canbelocatedbyitsindextriplet(i,j,l).Takingthetripletsoftwocubiccells,weaimatderivingtheircardinaldirection.Forthis,weneedacardinaldirectionmodel.Wecoulduseapopularmodelinthe2Dspacewiththeninecardinaldirectionsnorth(N),northwest(NW),west(W),southwest(SW),south(S),southeast(SE),east(E),northeast(NE),andorigin(O)todenotethepossiblecardinaldirectionsbetweencubiccells.WecalltheelementsofthesetCD2D=fN,NW,W,SW,S,SE,E,NE,Ogbasic2Dcardinaldirections.However,thismodelignoresthedifferentheightsofspatialobjectstowardseachother.Theheightisrepresentedbythez-dimensionandinadditionenablesustodistinguishwhetheranobjectislocatedupper(u),atthesamelevel(s),orlower(l)thananotherobject.Takentogether,weobtaincardinaldirectionslikeSEu,SEsandSElwhichhavethemeaningof 118

PAGE 119

Table3-3. Interpretationtablefortheinterpretationfunction condition condition condition NWux1^y1^z1NWsx1^y1^z2NWlx1^y1^z3Nux1^y2^z1Nsx1^y2^z2Nlx1^y2^z3NEux1^y3^z1NEsx1^y3^z2NElx1^y3^z3Wux2^y1^z1Wsx2^y1^z2Wlx2^y1^z3Oux2^y2^z1Osx2^y2^z2Olx2^y2^z3Eux2^y3^z1Esx2^y3^z2Elx2^y3^z3SWux3^y1^z1SWsx3^y1^z2SWlx3^y1^z3Sux3^y2^z1Ssx3^y2^z2Slx3^y2^z3SEux3^y3^z1SEsx3^y3^z2SElx3^y3^z3 uppersoutheast,samelevelsoutheast,andlowersoutheast,respectively.Ingeneral,weobtainarenedversionofCD2DintothesetCD3D=fNu,Ns,Nl,NWu,NWs,NWl,...,NEu,NEs,NEl,Ou,Os,Olgof27jointlyexhaustiveandpairwisedisjointbasic3Dcardinaldirectionsbetweentwocubiccellsinanobjectsinteractioncube.Adifferentunderlyingsetofbasiccardinaldirectionswouldleadtoadifferentinterpretationofcubiccellpairs.Denition 38 givesaspecicationofthebasiccardinaldirectionsintermsofaninterpretationfunction. Denition38. LetA,B2volumewithA6=?andB6=?,andletc(i1,j1,l1)andc(i2,j2,l2)denotethetwocubiccellsinthekmnobjectsinteractioncubeOIC(A,B)withk,m,n2f1,2,3g,1i1,i2k,1j1,j2m,1l1,l2n.Thenwedenethefollowingequivalences: x1:,i1>i2x2:,i1=i2x3:,i1j2y2:,j1=j2y3:,j1l2z2:,l1=l2z3:,l1
PAGE 120

theirdirectionalrelationshipdbelongstothesetCD3D(d2CD3D).Forexample,inFigure 3-27 C,thecardinaldirectionfromcubiccellc(2,2,1)toc(3,1,2)isbydenition ((2,2,1),(3,1,2))=SWl,whichcanbeexpressedasthecubiccellc(3,1,2)istothelowersouthwestofthecubiccellc(2,2,1). Theobjectsinteractioncubesubdivideseachvolumeobjectintoasetofnon-overlappingcomponentsthatarelocatedindifferentcubiccells.Asaresult,thecardinaldirectionbetweenanytwocomponentsisequivalenttothecardinaldirectionbetweenthetwocubiccellsthatholdthem.ThisequivalenceensuresthecorrectnessofapplyingthesetCD3D,whichisfortwocubiccells,tosymbolizethepossiblecardinaldirectionsbetweenobjectcomponents. Asarststepoftheinterpretationphase,wedeneafunctionloc(seeDenition 39 )thatactsononeofthevolumeobjectsAorBandtheircommonobjectsinteractioncubematrixanddeterminesalllocationsofcomponentsofeachobjectinthematrix.LetMdenoteanobjectsinteractionmatrix,thenweuseanindextriplet(i,j,l)torepresentthelocationofthelthelementinthevectorelementMi,jandthusthelocationofanobjectcomponentintheobjectsinteractioncubematrixM. Denition39. LetMbethekm-objectsinteractioncubematrixoftwovolumeobjectsAandBwiththevectorelementlengthn.Thenthefunctionlocisdenedas: loc(A,M)=f(i,j,l)j1ik,1jm,1lnMi,j[l]=1_Mi,j[l]=3gloc(B,M)=f(i,j,l)j1ik,1jm,1lnMi,j[l]=2_Mi,j[l]=3g Oncethelocationofacomponentiscomputed,wecanapplytheinterpretationfunction ,whichtakesthelocationindextripletsoftwocomponentsandproducesthecardinaldirectionbetweenthem. Finally,wespecifythecardinaldirectionfunctionnameddirwhichdeterminesthecompositecardinaldirectionfortwovolumeobjectsAandB.Thisfunctionhasthesignaturedir:volumevolume!2CD3Dandyieldsasetofbasiccardinaldirectionsasitsresult.WenowspecifythecardinaldirectionfunctiondirinDenition 40 120

PAGE 121

Denition40. LetA,B2volume.Thenthecardinaldirectionfunctiondirisdenedas dir(A,B)=f ((i,j,l),(i0,j0,l0))j(i,j,l)2loc(A,OICM(A,B)),(i0,j0,l0)2loc(B,OICM(A,B))g. Functiondiryieldstheunionofthebasiccardinaldirectionsbetweenallcomponentpairsofbothobjects.Itdeterminesallcardinaldirectionsthatexistbetweentwovolumeobjects.Toillustratetheinterpretationphase,weuseourexampleinFigure 3-28 B.FromtheobjectsinteractioncubematrixOICM(A,B),wecanobtainloc(A,OICM(A,B))andloc(B,OICM(A,B))asfollows: loc(A,OICM(A,B))=f(2,1,2),(2,1,3),(3,1,2),(3,1,3),(3,2,2),(3,2,3),(3,3,2),(3,3,3)gloc(B,OICM(A,B))=f(1,2,1),(2,2,1),(2,2,2)g ThecardinaldirectionsbetweenthetwovolumeobjectsAandBcanthenbederivedwiththecardinaldirectionfunctiondir. dir(A,B)=f ((2,1,2),(1,2,1)), ((2,1,3),(1,2,1)),..., ((3,3,3),(2,2,2))g=fNs,Nu,Es,Eu,NEs,NEu,NWs,NWug Similarly,weobtaintheinversecardinaldirectionas: dir(B,A)=f ((1,2,1),(2,1,2)), ((2,2,1),(2,1,2)),..., ((2,2,1),(3,3,3))g=fSs,Sl,Ws,Wl,SWs,SWl,SEs,SElg FinallywecansayregardingFigure 3-28 BthatObjectBispartlysamelevelnorth,partlyuppernorth,partlysameleveleast,partlyuppereast,partlysamelevelnortheast,partlyuppernortheast,partlysamelevelnorthwest,andpartlyuppernorthwestofobjectAandthatObjectAispartlysamelevelsouth,partlylowersouth,partlysamelevelwest,partlylowerwest,partlysamelevelsouthwest,partlylowersouthwest,partlysamelevelsoutheast,andpartlylowersoutheastofobjectB,whichisconsistent. 3.2.2.2Detour:ModelingtheCardinalDirectionDevelopmentbetweenMovingPoints Wehavediscussedthecardinaldirectionsbetweentwostaticspatialobjects.Transferredtoaspatio-temporalcontext,thesimultaneouslocationchangeofdifferentmovingobjectscanimplyachangeoftheirdirectionalrelationships.Forexample,a 121

PAGE 122

shingboatthatissouthwestofastormmightbenorthofitsometimelater.Wecallthisacardinaldirectiondevelopment.Suchadevelopmentbetweentwomovingobjectsdescribesatemporallyorderedsequenceofcardinaldirectionswhereeachcardinaldirectionholdsforacertaintimeintervalduringtheirmovements.Adevelopmentreectstheimpactoftimeonthedirectionalrelationshipsbetweentwomovingobjects,andusuallyproceedscontinuouslyovertimeifthemovementsofthetwoobjectsarecontinuous.Inthissection,weformallydenethecardinaldirectiondevelopmentbetweentwomovingpoints.Westartwithareviewofthecardinaldirectionsbetweentwostaticpoints. Cardinaldirectionsbetweenstaticpoints TheapproachthatisusuallytakenfordeningcardinaldirectionsbetweentwostaticpointsintheEuclideanplaneistodividetheplaneintopartitionsusingthetwopoints.Onepopularpartitionmethodistheprojection-basedmethodthatuseslinesorthogonaltothex-andy-coordinateaxestomakepartitions[ 40 78 ].Thepointthatisusedtocreatethepartitionsiscalledthereferencepoint,andtheotherpointiscalledthetargetpoint.Thedirectionalrelationbetweentwopointsisthendeterminedbythepartitionthatthetargetobjectisin,withrespecttothereferenceobject.LetPointsdenotethesetofstaticpointobjects,andletp,q2Pointsbetwostaticpointobjects,wherepisthetargetpointandqisthereferencepoint.Atotalof9mutuallyexclusivecardinaldirectionsarepossiblebetweenpandq.LetCDdenotethesetof9cardinaldirections,thenCD=fnorthwest(NW),restrictednorth(N),northeast(NE),restrictedwest(W),sameposition(SP),restrictedeast(E),southwest(SW),restrictedsouth(S),southeast(SE)g.Further,letXandYbefunctionsthatreturnthexandycoordinateofapointobjectrespectively.Thecardinaldirectiondir(p,q)2CDbetweenpandqisthereforedenedas 122

PAGE 123

dir(p,q)=8>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>:NWifX(p)Y(q)NifX(p)=X(q)^Y(p)>Y(q)NEifX(p)>X(q)^Y(p)>Y(q)WifX(p)X(q)^Y(p)=Y(q)SWifX(p)X(q)^Y(p)
PAGE 124

(A)(B)(C)(D) Figure3-29. Anexampleoftwomovingpointswithchanged(A)andunchanged(B)cardinaldirectionsovertime.Thestatetransitiondiagramofallcardinaldirections(C),andanexampleofacardinaldirectiondevelopment(D) cardinaldirectionsbetweentwomovingpoints.InFigure 3-29 BtwomovingpointsAandBstartattimet1fromthelocationsA(t1)andB(t1)respectively.Attimet2,AreachesthelocationA(t2)andBreachesthelocationB(t2).OneobservationthatwecanobtainisthatalthoughthepositionsofAandBhavechanged,thecardinaldirectionbetweenAandBdoesnotchange.Inthiscase,AisalwaystothenorthwestofBbetweent1andt2.Inotherwords,thecardinaldirectionbetweentwomovingpointsholdsforacertainperiodoftimebeforeitchanges.Thus,wedeneapredicateholdsthatreturnstrueifacardinaldirectionholdsduringatimeintervalfortwomovingpointsAandB. Denition41. GiventwomovingpointsA,B2MPoint,atimeintervalI=[tb,te]withtb,te2timeandtbte,andthebasiccardinaldirectionsetCD.AssumebothAandBaredenedonI.Letholdsbethepredicatethatreturnstrueifd2CDholdsoverthetimeintervalIforAandB.Wedenethisfunctionas holds(A,B,I,d)=8>><>>:trueif8t2I:dir(A(t),B(t))=dfalseotherwise ForagiventimeintervalI,wemakethefollowingobservations:(i)ifthereexistsacardinaldirectiond2CDsuchthatholds(A,B,I,d)=true,thenwesayAandBhaveauniquecardinaldirectiononthetimeintervalI;(ii)ifbothAandBaredenedonI,andthepredicateholdsreturnsfalseforall9basiccardinaldirectionsinCD,thenwesaythatAandBhaveadevelopingcardinaldirectionrelationshipoverI;(iii)ifneitherA 124

PAGE 125

norBisdenedonI,wesaythecardinaldirectionbetweenAandBisnotdenedonI.Therefore,wecanonlydeterminecardinaldirectionsbetweenAandBduringintervalsonwhichtheyaredened.Foranintervalwherethereisnouniquebasiccardinaldirectionthatholdsovertheentireperiod,wesplititintoseveralsub-intervalssuchthatoneachsub-intervalonlyauniquecardinaldirectionholds. Further,ifweregarddifferentcardinaldirectionsthatholdoverdifferentsub-intervalsascardinaldirectionstates,thedevelopmentofthecardinaldirectionsreferstoasequenceoftransitionsbetweenthesestates.Forexample,AmovingfromNWtoWtoSWofBisadevelopmentofcardinaldirectionsbetweentwomovingpointsAandB.However,notalltransitionsarepossiblebetweenanytwostates.Figure 3-29 (C)showsallpossibletransitionsbetweendifferentstates.Forexample,ifthecardinaldirectionbetweentwomovingpointsAandBhasbeenNWsofar,theniftimechanges,thecardinaldirectionmightstaythesameasNW,orchangetoeitherN,W,orSP.ItisnotpossiblethatAmovesdirectlytothesouth(S)ofBwithoutcrossinganyotherdirections.Thisstatetransitiondiagramimpliesthatonlydevelopmentsthatinvolvevalidtransitionsarepossiblebetweentwomovingpoints,e.g,AmovesfromNWtoWtoSWofB.DevelopmentsthatinvolveinvalidtransitionslikeAmovingfromNWtoSofBarenotpossibleandthusnotallowed.LetthepredicateisValidTrans:CDCD!booltaketwocardinaldirectionsasinput,andyieldtrueifthetransitionbetweenthemisvalid.Then,forexample,isValidTrans(NW,W)=truewhileisValidTrans(NW,S)=false.NowwecandenethedevelopmentofthecardinaldirectionsbetweentwomovingpointsAandBonanygiventimeintervalIonwhichAandBarebothdened. Denition42. GiventwomovingpointsA,B2MPointsandatimeintervalIonwhichbothAandBaredened.AssumetheorderingofanytwointervalsI1=[tb1,te1]andI2=[tb2,te2]isdenedaste1tb2,I1I2.Letthesymbol.representthetransition 125

PAGE 126

fromonecardinaldirectionstatetoanother.ThenthedevelopmentofcardinaldirectionsbetweenAandBonintervalI,denotedasdev(A,B,I)canbedenedas: dev(A,B,I)=d1.d2.....dn ifthefollowingconditionshold: (i)n2N(ii)81in:di2CD(iii)81in)]TJ /F4 11.955 Tf 11.96 0 Td[(1:di6=di+1^isValidTrans(di,di+1)=true(iv)9I1,I2,...,In:(a)81in:Iiisatimeinterval,holds(A,B,Ii,di)=true(b)81in)]TJ /F4 11.955 Tf 11.96 0 Td[(1:IiIi+1,(c)n[i=1Ii=I InDenition 42 ,wesplitthegiventimeintervalintoasequenceofnon-overlappingsub-intervals.Thedevelopmentdevrepresentsthetransitionofcardinaldirectionsoverthesesub-intervals.Condition(iv)(a)ensuresthatauniquecardinaldirectionbetweenAandBholdsoneachsub-interval,andcondition(iv)(c)ensuresthatallsub-intervalstogetherformafulldecompositionofthegivenintervalI.Further,accordingtocondition(iii),onlyvalidtransitionsareallowedbetweentwocardinaldirectionsthatholdonadjacentsub-intervals.AnexampleofsuchadevelopmentcanbederivedfromFigure 3-29 (D),whereAmovesfromlocationa1tolocationa2andBdoesnotmoveduringthetimeintervalI=[t1,t2].ThedevelopmentofcardinaldirectionsbetweenAandBduringIisthereforedev(A,B,I)=NW.N.NE.N.NW.W.SW.Itdescribesthatfromtimet1totimet2,AstartsinNWofB,crossesNandreachesNEofB,thenitturnsaroundandcrossesNagain,andreturnstoNWofB.Finally,AcrossesWofBandendsupintheSWofB. Nowwearereadytodenecardinaldirectiondevelopmentsbetweentwomovingpointsduringtheirentirelifetime.Theideaistorstndouttheircommonlifetimeintervals,onwhichbothAandBaredened.ThenweapplythedevfunctiontodeterminethedevelopmentofcardinaldirectionsbetweenAandBduringeach 126

PAGE 127

commonlifetimeinterval.Finally,wecomposethecardinaldirectiondevelopmentsondifferentcommonlifetimeintervalsanddeneitasthedevelopmentofcardinaldirectionsbetweenthetwomovingpointsAandB.Werstndoutthecommonlifetimeintervalsfortwomovingpoints. Denition43. GiventwomovingpointsA,B2MPoints,letLTA=IA1,IA2,...,IAm,LTB=IB1,IB2,...,IBnbetwolifetimeintervalsequencesofAandBrespectivelysuchthatIAi
PAGE 128

CHAPTER4DISCRETETHREE-DIMENSIONALDATAMODELING InChapter 3 ,wehaveproposedaSpatialAlgebra3DattheAbstractLevel(SPAL3D-A)toprovideaformalspecicationforspatialobjectsinthe3Dspaceandasetofimportantoperationsandpredicatesonthem.TheimplementationofanabstractdatamodellikeSPAL3D-Arequiresthedesignofgeometricdatastructuresfortheabstractdatatypes,andthedesignofalgorithmsforoperationsandpredicates.Whendesigningthedatarepresentationsandthealgorithmsinadatabasecontextforqueryingandanalysis,morerequirementsneedtobeconsidered.First,therepresentationsmustbeabletorepresentcomplexspatialobjectslikevolumeswithcavities,volumeswithmultiplecomponents,andnon-manifoldsurfaces(expressiveness).Second,thedatastructuredesignedforaspatialobjectmustsupportefcientaccessofitscomponents,sothatpointqueryandwindowquerycanbeefcientlysupported(efciency).Third,thedatastructuredesignedforeachsinglecomplex3Dspatialdatatypemustbeasingle,general-purposedatastructurethatisuniversallyapplicabletoalargerangeof3Doperationssothatexpensivedatastructureconversionscanbeavoided(adaptability).Fourth,whendesigningalgorithmsforoperations,onlyexternalalgorithmsthatdonotrequiretheentireobjecttobeinmainmemoryshouldbeconsidered(scalability).Fifth,thealgorithmsshouldnotassumespecialpropertieslikeconvexityormonotonicityofaspatialobject(generality). Inthischapter,wedescribeadiscretemodel,calledtheSpatialAlgebra3DattheDiscreteLevel(SPAL3D-D),thatdealswiththedesignoftheniterepresentationsforspatialobjectsandthedesignofalgorithmsforoperationsandpredicates.Twodatarepresentationsareproposedinthischapter.InSection 4.1 ,werstintroduceaparadigmcalledslicerepresentationasageneraldatarepresentationmethodforall3Dspatialdatatypes.Wealsopresentintersectionalgorithmsbetweenapoint3Dobjectandasurfaceobject,andbetweenapoint3Dobjectandavolume 128

PAGE 129

object;hence,bothalgorithmsinvolveanargumentoftypepoint3D.Thereasonisthatalgorithmsinvolvingpoint3Dobjectsarethesimpleronesintheintersectionalgorithmsfamilybutarecomplexandsufcientenoughtodemonstratethebenetsoftheslicerepresentation.InSection 4.2 ,weintroduceasecondtetrahedralizationbasedcompactdatastructureforvolumeobjectsinparticular.Themotivationfortheseconddatarepresentationisthatvolumedataareavailableasacollectionoftetrahedraduetothedevelopmentoftechnologieslikelaserscanner.Althoughthetetrahedralizaion(TEN)basedapproachbringsalotofbenetslikeimprovingefciencyofspatialoperationsandreducingcomplexityinvolumevalidations,amajorissueistheexpensivestoragecostformaintainingthetopologicalrelationsamongtetrahedralmeshelements.WedemonstratethatourTENbaseddatastructureminimizesthestoragefortopologicalrelationswhilemaintainingtheoptimaltopologicalrelationaccessamongmeshelements.Further,wepresentefcientalgorithmsforspatialquerieslikepointqueryandwindowqueryandspatialoperationslikeintersectionoperationbasedonourproposeddatastructure.Finally,wemakeacomparisonbetweenthetworepresentationsinSection 4.3 .Further,asadetour,wedevelopalgorithmsforcomputingcardinaldirectionsbetweentwomovingpointsinSection 4.4 4.1ASlice-basedRepresentationof3DSpatialData Thedenitionsofthecomplex3Dspatialdatatypesattheabstractlevel[ 89 ]focusonclosure,consistency,semantics,andgenerality.Thesedatatypesexpressspatialobjectsasinnitepointsetsinthe3Dspace.Theconsequenceisthattheseobjectsarenotdirectlyrepresentableinacomputerrequiringniterepresentations.Therefore,inaso-calleddiscretemodel,weexplorediscretedatastructuresfortheseobjects.Forexample,a3Dlineobjectcanbeasmoothcurveintheabstractmodelbuttherepresentationinthediscretemodelisusuallyalinearapproximationasa3Dpolyline.Moreimportantly,anappropriatedatarepresentationatthediscretelevelmusthaveanexpressivenessthatcomesascloseaspossibletothesemanticsofthecorresponding 129

PAGE 130

(a)point3D(b)line3D(c)surface(d)volume Figure4-1. Slicerepresentationsofspatialobjects datatypeattheabstractlevel.Casessuchasvolumeswithcavitiesandsurfacesthatmeetatasinglepointontheirboundariesmustbehandledbythedatarepresentation.Further,moreissuesneedtobeconsideredwhenembeddingdatastructuresintodatabasesforqueryingandanalysis.3Ddatashouldbeorganizedinasequentialordertoenablefastretrievalandtosupportefcientalgorithms. 4.1.1SliceUnits Inthissubsection,weintroducenewprimitivescalledsliceunitsasthebasicconstructionunitsofour3Dspatialdatatypes.Inparticular,wespecifyfourkindsofsliceunitsnamed,spoint,sline3D,ssurface,andsvolume,i.e.,oneforeachspatialdatatype. Sinceourslicerepresentationisbasedonthelinearapproximationof3Dobjects,e.g.linebysegments,surfacebypolygonalfaces,every3Dobjectcontainssocalledvertices.Theverticesofalineobjectaretheendpointsofitssegments,andtheverticesofasurfaceobjectarethejointpointsofitsboundarysegments.Similarly,theverticesofavolumeobjectarethejointpointsofitspolygonalfaces.Theideaofslicerepresentationistodecomposeaspatialobjectintoasequenceofnoneoverlappingpieces,namelyslices,bycuttingtheobjectonitsnverticeswithn0planes(nn0),P1,P2,...,Pn0,thatareperpendiculartothez-axis.Eachoftheseplanescontainsatleastonevertexfromtheobject,andtheunionofn0planescontainsallnverticiesfromtheobject.AsliceisapiecelyinginbetweentwoadjacentcuttingplanesPiandPi+1.Therefore,eachslicecanbeattachedwithauniquez-intervalIz=f(zb,zt)jzb,zt2Real,zbztg,thatidentiesthelocationofthatsliceintheobject 130

PAGE 131

(a)anexampleofa(b)anexampleofathinslicethickslice Figure4-2. Twotypesofslices onzdirection.Asliceiscalledathinsliceifithasanemptyz-interval,i.e.zb=zt,otherwise,itiscalledathickslice.Anobjectdoesnothaveextentonz-dimensionifallpointsintheobjecthavethesamezcoordinate.Forexample,apolygonperpendiculartoz-axisdoesnothaveextentonz-dimension.Therefore,athinslicecontainsonlythepieceofaspatialobjectthatdoesnothaveextentonz-dimension.Todistinguishwithathinslice,wedeneathicksliceasaslicethatcontainsonlythepieceofaspatialobjectthathasextentonz-dimension.Figure 4-2 showsexamplesofthetwotypesofslices. Asimplepointin3Dspaceisrepresentedbyatripletwiththreecoordinates.LetPointdenotethesetofallsimplepointsin3Dspace,thenwehavePoint=f(x,y,z)jx,y,z2Realg.Avalueofthespatialdatatypepoint3Disasetofisolatedpointsin3Dspace,andwecallanobjectofthistypecomplexpoint.Sinceasimplepointin3Dspacedoesnothaveextent,asliceofasimplepointisthepointitself.Forasetofsimplepoints,aslicecontainsasubsetofpointsthatsharethesamez-coordinate.Therefore,asliceofapoint3Dtypeobjectisalwaysathinslicewithanemptyz-interval(i.e.Iz.zb=Iz.zt).Inthedatabasecontext,pointsareorderedsothatabinarysearchispossible.Sinceasliceofapoint3Dobjectcontainspointswiththesamez-coordinate,weorderthemina(x,y)-lexicographicorder.Soforanytwopointsp1,p22Point,wehavep1
PAGE 132

Thedatastructureisanarrayofanorderedsequencehp1,...,pnitogetherwithapointerposindicatingthecurrentpositionwithinthesequence,andaz-intervalitindicatingthelocationoftheslice. Aline3Dobjectisformallydenedintheabstractmodelastheunionoftheimagesofanitenumberofcontinuousmappingsfrom1Dspaceto3Dspace.Avalueofthistypeiscalledacomplexline.Atthediscretelevel,acomplexlineisapproximatedwithacollectionofsegmentsinthe3Dspace.Asliceofaline3Dobjectconsistsofasetofsegments.LetSegmentdenotethesetofallsegmentsin3Dspace,thenwehaveSegment=f(p,q)jp,q2Point,p
PAGE 133

themwithrespecttotheirdominatingpoints.Fortwohalfsegmentsh1=(s1,d1)andh2=(s2,d2),letdpbethefunctionwhichyieldsthedominatingpointofahalfsegment,andndpbethefunctionthatreturnstheendpointthatisnotadominatingpointofthehalfsegment.Thenwedenetheorderas:h1
PAGE 134

(a)segmentsinaslice(b)projectionsofsegmentsonthex-axish(s1,left),(s1,right),(s3,left),(s2,left),(s2,right),(s3,right)i(c)anorderedsequenceofhalfsegmentsinaslice Figure4-3. Anexampleofasliceofaline3Dobject Asdenedintheabstractmodel,asurfaceistheunionoftheimagesofanitenumberofcontinuousmappingsfrom2Dspaceto3Dspace.Avalueofthistypeiscalledcomplexsurface.Atthediscretelevel,acomplexsurfaceobjectisapproximatedwithasetofsimple3Dpolygonspossiblywithholes.Asimple3Dpolygonisasimplepolygonwithco-plannervertices.Asliceofasurfaceobjectconsistsofasetofsimple3Dpolygons.Sincethinslicesandthicksliceshavedifferentproperties,weintroducethedenitionsforthemseparately.Werstshowthatinathickslice,whereallsimplepolygonshaveextentonzdimension,asimplepolygondoesnothaveholes,andiseitheratriangleoratrapezoid. Lemma13. LetPdenotesasimplepolygonbelongingtoathickslicesiwithinaz-interval(zi,zi+1),wherezi
PAGE 135

belongstoathickslice.Therefore,KcontainsonlylessthanthreeverticesfromP.ThesamecanbeprovedforL.Asaresult,atotaloflessthanorequaltofourverticesareallowedforP,thisleadstotheconclusionthatPdoesnothaveanyholes,andiseitheratriangleoratrapezoid. Weusetfacetonameatriangleoratrapezoidwithinathickslice.Atfacewithinathicksliceisdenedas: tface=f(p1,p2,p3,p4)jp1,p2,p3,p42Point,p1,p2,p3andp4arecoplanar;(i):p1.z=p4.z,p2.z=p3.z,p1.z
PAGE 136

(a)tfacesinathickslice(b)projectionintervalsoftfacesonthex-axish(F1,left),(F2,left),(F1,right),(F2,right),(F3,left),(F3,right)i(c)anorderedsequenceofhalftfacesinaslice Figure4-4. Anexampleofathicksliceofasurfaceobject extremepointtobethedominatingextremepoint.LetHtfacedenoteahalftface,thenwehaveHtface=f(tf,d)jtf2tface,d2fleft,rightgg.Inthedenition,disaagindicatingthetypeofatface.Ifd=left(d=right),thenitisaleft(right)halftfacewiththeleft(right)extremepointasdominatingextremepoint.Letdepbethefunctionthatyieldsthedominatingextremepointofahalftface,andndepbethefunctionthatreturnsthenon-dominatingextremepoint.Further,wedenetheorderoftwohalftfaces.Lethf1,hf2betwohalftfaces,wehavehf1
PAGE 137

Theotherslicetypeofasurfaceisthethinslice.Athinslicecontains3Dpolygonsthatarecoplanarandperpendiculartothez-axis.Anysimple3Dpolygoninathinslicecanhaveholes.Infact,athinsliceisa2Dregionobjectwithazelevation.Asimplepolygonconsistsofanumberofsegmentcycles.Acycleisformedbysegmentslinkedincyclicorder,havingalwaystheinteriorofthepolygonattheirrightsidebyviewingfromthetop.Similartosliceunitsline3D,westorehalfsegmentsinathinsliceintheorderoftheirdominatingpointsforfastretrievalpurpose.Thus,inordertoreectthecyclicorderofsegmentsinathinslice,weaddanextraeldnsiforanysegmenthsicallednext in cycletoindicatethenextsegmentinacycle.Further,weaddtwoadditionalarraystostorethecyclesandfaces.Thecyclesarrayh(fs1,nc1),...,(fsm,ncm)ikeepsarecordforeachcycleCi(1im)inthethinslice,containingapointerfsitothersthalfsegmentinthecycleCiandapointerncitothenextcyclewithinthesamepolygon.Thefacesarrayhfc1,...,fcristoresonerecordperpolygon,withapointerfcj(1jr)totherstcycleinthepolygonPj.Letthin ssurfacedenotethethinsliceofasurfaceobject,wehave thin ssurface=f(pos,h(hs1,ns1),...,(hsn,nsn)i,h(fs1,nc1),...,(fsm,ncm)i,hfc1,...,fcri,it)jpos,n,m,r2Integer,0posn,0r
PAGE 138

Thevolumedatatypedenedintheabstractmodeldescribescomplexvolumesthatmaycontaindisjointcomponents,andeachcomponentmayhavecavities.Moreover,thevolumetypedenedintheabstractmodelallowsnone-manifold,e.g.twovolumesmeetatasinglepoint.Atthediscretelevel,avolumeobjectconsistsofoneorseveralsubsetsofthespaceenclosedbyitsboundary,whichisapproximatedwithasetofpolygonalfaces.Asliceofavolumeobjectisenclosedbyasliceofitssurface,whichisacollectionoftfaces.Further,avolumeslicecanonlybeathickslicesinceitalwayshaveextentonthezdimension.Avolumeslicecontainsoneorseveraldisconnectedsolids,whereaseachsolidconsistsofanumberoftfacecycles.Acycleisformedbyt-faceslinkedincyclicorder,havingalwaystheinteriorofthesolidattherightsidebyviewingfromthetop.Thus,similartosurfacesliceunit,westorehalftfacesintheorderoftheirdominatingextremepoints.However,inordertoreectthecyclicorderofthetfacesinavolumeslice,weaddanextraeldnsiforanyhalftfacehfinamelynext in cycletoindicatethenexthalftfaceinatfacecycle.Further,weaddtwoadditionalarraystostorethecyclesandsolids.Thecyclesarray<(1,nc1),...,(m,ncm)>keepsarecordforeachcycleTFi(1im)inthevolumeslice,containingapointeritothersthalftfaceinthecycleTFiandapointerncitothenextcyclewithinthesamesolid.Thesolidsarraystoresonerecordpersolid,withapointerfcj(1jr)totherstcycleinthesolidPj.Letsvolumedenotethesliceofavolumeobject,wehave svolume=f(pos,h(hf1,nf1),...,(hfn,nf1)i,h(1,nc1),...,(m,ncm)i,hfc1,...,fcri,it)jpos,n,m,r2Integer,0posn,0r
PAGE 139

Figure4-5. Anexampleofavolumeslice Thedatastructureforasliceofavolumeobjectconsistsofthreearrays.Inthedenition,nisthetotalnumberofhalftfacesinavolumeslice;misthenumberofcyclesformedbytfaces;risthenumberofsolidsinavolumeslice.Figure 4-5 showsanexampleofavolumeslice.Theslicecontains24halftfaces,3cycles(C1,C2,C3)and2polyhedra(P1,P2).P1consistsoftwocyclesC1andC2,andP2consistsofonecycleC3. 4.1.2SliceRepresentationof3DSpatialDataTypesandBasicOperators Aspatialobjectofanytypeconsistsofasequenceofsliceunits,wheresliceunitsareorderedaccordingtothez-intervals.Thus,werstgivethedenitionfortheorderingoftwoz-intervals.LetI1=fzb1,zt1g,I2=fzb2,zt2g,thenwehaveI1
PAGE 140

tomanipulatethedatastructures,severaloperationscanbeprovidedforretrievinginformationfromthedatastructures.Duetothespacelimitation,weprovideonlyafewbasicoperationswhichwillbeusedbythealgorithmsinthefollowingsections.Foralltheoperations,werstgivethesyntax,thenwedescribethesemanticsoftheoperations. h1,2,3,4i=hspoint,thin ssurface,thick ssurface,svolumeih1,2,3,4i=hpoint,HSegment,Htface,Htfaceih1,2,3i=hpoint3D,surface,volumei,h1,2,3i=hspoint,ssurface,svolumei8i2f1,2,3,4,5,6gget rst:i!iget next:i!iend of array:i!boolproj x:1!(Real):i!(Real,Real)(i6=1) get rst slice:i!iget next slice:i!iend of seq:i!boolis empty:i!boolinterval z:i!I z Theget rstoperationreturnstherstelementinthedataarrayofasliceprimitiveandsetthepospointerto1.Theget nextoperationreturnsthenextelementofcurrentpositioninthearray,andincrementsthepospointer.Thepredicateend of arrayyieldstrueifpos=n.Theoperationproj xprojectstheoperandonthex-axis,andreturnsanintervalonthex-axis. Theget rst sliceoperationreturnstherstsliceintheslicesequenceofaspatialobjectandsetthepospointerto1.Theget next sliceoperationreturnsthenextsliceofcurrentpositioninthesequence,andincrementsthepospointer.Thepredicateend of seqyieldstrueifpos=n,andthepredicateis emptyyieldstrueifn=0.Theoperationinterval zreturnsthez-intervaloftheoperandslice.AllaboveoperationshaveconstantcostO(1). 140

PAGE 141

Further,sinceourintersectionalgorithmsthatinvolveatleastoneoperandasapoint3Dobjectyieldsanewpoint3Dobject,weprovideafewfunctionsforcreatinganewpoint3Dobject.Thenew point3Dfunctioncreatesanewemptypoint3Dobjectwithanemptyslicesequencewheren=0,pos=0.Thenew point slicefunctioncreatesanewemptypointslicewithanemptypointarraywheren=0,pos=0,Iz=(0,0).Theothertwooperations,insert point sliceandinsert point,insertapointsliceandapointintodataarrayrespectively,andbothincreaseposandnby1. 4.1.3SelectedIntersectionAlgorithmsfor3DSpatialOperations Spatialoperationsareanotherimportantcomponentinaspatialdatabasesystem.Theyareintegratedintodatabasesystemsandusedastoolsformanipulatingspatialdata.Duetothespacelimitation,weonlyfocusonthegeometrysetoperationintersection.Accordingtothesignatureofintersectionoperationintheabstractmodel,anintersectionoperationinvolvestwooperandsandproducesaspatialobjectofadimensionlowerorequaltothelower-dimensionaloperand.Foranycombinationoftheoperands,acorrespondingalgorithmneedstobedesigned.Inthispaper,weintroducetwoalgorithmsfortheintersectionoperationbetweenapoint3Dobjectandasurface,andtheintersectionoperationbetweenapoint3Dobjectandavolume. intersection:surfacepoint3D!point3D:volumepoint3D!point3D Foranyoftheoperandcombination,weintroducealgorithmssp3D intersectandvp3D intersectseparately. Thealgorithmsp3D intersectcomputestheintersectionbetweenasurfaceobjectandapoint3Dobject.Therststepofthealgorithmistoperformaparallelscanonthetwoorderedslicesequencesfrombothobjects,andpossibleintersectingsliceunitsarepickedfortesting.Thentheproblembecomeshowtocomputetheintersectionbetweenasurfacesliceunitandapointsliceunit.Wetreatthetwotypesofsurfaceslices,the 141

PAGE 142

thinsurfaceslicethin ssurfaceandthethicksurfaceslicethick ssurface,separately.Athicksurfaceslicecontainshalftfaces,whichareeithertrianglesortrapezoids.Allhalftfacesareorderedfromlefttorightwithrespecttotheirdominatingextremepoints.Therefore,foranytwoslices,asurfaceslicessandapointslicesp,weapplyanalgorithmusingplanesweepparadigmtondoutallpossibletface-pointintersectingpairswithinthetwoslicesssandsp.Inthealgorithm,wemaintaintwolists,astaticeventpointslistandadynamicsweepstatuslist(SL).Averticalplaneparalleltothez-axissweepsthespacefromlefttorightatspecialpointscalledeventpointsstoredintheeventpointslist.Inourcase,thedominatingextremepointsofthehalftfacesinthesurfaceslicearemergedwiththepointsinthepointslice,andarestoredaseventpointsintheeventpointslist.Sincepointsinthepointsliceareorderedandthehalftfacesinthesurfacesliceareorderedaccordingtotheirdominatingextremepoints,thismergestepwouldonlytakeO(t+r)time,wheretisthenumberofhalftfacesinthesurfaceslicessandristhenumberofpointsinthepointslicesp.Whenthesweepingplanereachesadominatingpointofahalftface,thesweepstatuslistwillbeupdated.Ifthesweepingplaneencountersalefthalftface,whichmeansthatthesweepingplanejuststartstointersectatface,thenthecorrespondinghalftfaceisinsertedintothesweepstatuslist;ifthesweepingplaneencountersarighthalftface,thenitstwinlefthalftfaceisremovedfromthesweepstatuslist,meaningthatthesweepingplaneisleavingthattface.Asaresult,thesweepstatuslistkeepsalltfacesthatarecurrentlyintersectedbythesweepingplane.Further,whenthesweepingplanereachesapointobject,alltfaceswithinthesweepstatuslistaretestedagainstthepointforintersection.Weimplementthesweepstatuslistasahashtable,sothattheinsertionandremovaloperationcanbedonewithO(1)timeinmostcases.Further,letthepredicatepoint on tfacebethepredicatethatperformstheintersectiontestforatfaceandapoint,whichreturnstrueifthepointisonthetface.Sincethenumberofedgesofatfaceiseither3foratriangleor4foratrapezoid,therunningtimeofthepredicatepoint on tfaceisconstant.Therefore, 142

PAGE 143

methodsp3D sweep(ss,sp)(1) sc new point slice(2) SL newemptyhash(3) p get rst(sp)(4) hf get rst(ss)(5) while!end of array(sp)(6) and!end of array(ss)do(7) ifpdep(hf)then(8) ifhf.d==leftthen(9) inserthfintothe(10) hasharraySL(11) else(12) removethetwinofhf(13) fromthehasharraySL (14) endif (15) hf get next(ss) (16) else (17) fori=0tothenumberof (18) elementsinsweepstatuslist (19) ifpoint on tface(p,SL[i]) (20) thensc insert point(p,sc) (21) endif (22) endfor (23) endif (24) endwhile (25) returnsc end Figure4-6. Thesp3D sweepalgorithm. thesweepingalgorithmsp3D sweepforathicksurfaceslicessandapointslicespcanbedescribedinFigure 4-6 ThealgorithminFigure 4-6 computesintersectionbetweenathicksurfaceandapointslice.Figure 4-9 (a)givesanexampleofthesweepingalgorithmforathicksurfacesliceandapointslice.ThecurrenteventpointisPandthecurrentsweepstatuslistcontainsF2.Anintersectiontestisperformedforthepair(P,F2).However,forathinsurfaceslice,whichdoesnotcontaintfaces,thealgorithmforcomputingintersectionwithapointsliceisdifferent.Lettsdenoteathinsurfacesliceandspdenoteapointslice.Sincebothtsandsphaveemptyz-intervals,inordertobepickedandtestedinthesweepingphase,theymustbecoplanar,i.e.ts.it=sp.it.Asaresult,theproblembecomesa2Dproblem,thatndsintersectionbetweenpointsandregionsonaplaneperpendiculartothez-axis.Foranypointp,ifitdoesnotintersectaregionobjectthenaraystartingfrompshootingatanydirectionmustintersectevennumberofedgesfromtheregionobject.Therefore,foranypointpiinthepointslicesp,wecreatearaythatisparalleltothey-axisandshootsfrompitothe+1ofthey-axis.Bycountingthenumberofsegmentsintsthatintersectstheray,wecandetermineiftsintersectspi.Wemodifytheplanesweepalgorithmsp3D sweepandnamethenewalgorithm 143

PAGE 144

methodsp3D sweep0(ts,sp)(1) sc new point slice(2) SL newemptyhash(3) p get rst(sp)(4) hs get rst(ts)(5) while!end of array(sp)(6) and!end of array(ts)do(7) ifpdp(hs)then(8) ifhs.d==leftthen(9) inserthsintothe(10) hasharraySL(11) else(12) removethetwinofhs(13) fromthehasharraySL(14) endif(15) hs get next(ts)(16) else (17) ray newrayshootingfrom (18) pto+1ofy-axis (19) cnt 0 (20) fori=0tothenumberof (21) elementsinthesweepstatuslist (22) ifray\SL[i]then (23) cnt cnt+1 (24) endif (25) endfor (26) ifcntisanoddnumberthen (27) sc insert point(p,sc) (28) endif (29) endif (30) endwhile (31) returnsc end Figure4-7. Thesp3D sweep0algorithm. sp3D sweep0,whichtakesathinslicetsandapointslicespasoperands.ThealgorithmisdescribedinFigure 4-7 Sofar,wehavehandledboththinsurfaceslicesandthicksurfaceslices,thenwegivethealgorithmsp3D intersectforasurfaceobjectsandapoint3DobjectpinFigure 4-8 Wenowanalyzetherunningtimeofthesp3D intersectalgorithm.Letpandsdenoteapoint3Dobjectwithnpointsandasurfaceobjectwithmsegmentsrepresentingitsedgesrespectively,wherepconsistsofusliceswithrpointseachslice,andsconsistsofvsliceswitheitherttfacesforeachthicksliceorthalfsegmentsforeachthinslices.Thenwehaven=urandm=2vt.Theplanesweepalgorithmfortwoslicesscansthedataarraysofbothslicesonceandforallpointsencountered,itcostsO(K)intersectiontests,whereKisthesumoftface-pointpairs(orsegment-pointpairs)thathavetheirprojectionsonthex-axisintersect.Therunningtimeforthesp3D intersectalgorithmisu+v+min(v,u)(r+t+K)u+v+ur+vt+vK<2m+2n+vK=O(m+n+vK)),wherevKismuchlessthanminmostcases. 144

PAGE 145

methodsp3D intersect(s,p)(1) c new point3D(2) ifis empty(p)and!is empty(s)(3) thensp get rst slice(p)(4) ss get rst slice(s)(5) while!end of seq(sp)(6) and!end of seq(ss)do(7) ifinterval z(sp)(8) >interval z(ss)(9) then(10) ss get next slice(s)(11) elseifinterval z(sp)(12)
PAGE 146

(A)asurface-pointslicepair(B)avolume-pointslicepair Figure4-9. Sweepingalgorithmsonslices methodvp3D sweep(sv,sp)(1) sc new point slice(2) SL newemptyhash(3) p get rst(sp)(4) hf get rst(ss)(5) while!end of array(sp)(6) and!end of array(sv)do(7) ifpdep(hf)then(8) ifhf.d==leftthen(9) inserthfintothe(10) hasharraySL(11) else(12) removethetwinofhf(13) fromthehasharraySL(14) endif(15) hf get next(sv)(16) else (17) ray newrayshooting (18) frompto+1ofthey-axis (19) cnt 0 (20) fori=0tothenumberof (21) elementsinsweepstatuslist (22) ifray\SL[i]then (23) cnt cnt+1 (24) endif (25) endfor (26) ifcntisanoddnumberthen (27) sc insert point(p,sc) (28) endif (29) endif (30) endwhile (31) returnsc end Figure4-10. Thevp3D sweepalgorithm. theintersectingpairs.Thepointpintersectsthevolumeslicesvifcntisanoddnumber.Further,theintersectiontestbetweenatfaceandarayistrivialandtakesonlyconstanttime.Wegivethesweepingalgorithmvp3D sweepforthevolumeslicesvandthepointslicespinFigure 4-10 Abovealgorithmcomputestheintersectionbetweenavolumesliceandapointslice.Figure 4-9 Bgivesanexampleofthesweepingalgorithmforavolumesliceandapointslice.ThecurrenteventpointisPandthecurrentsweepstatuslistcontainsF1, 146

PAGE 147

methodvp3D intersect(v,p)(1) c new point3D(2) if!is empty(p)and!is empty(v)(3) thensp get rst slice(p)(4) sv get rst slice(v)(5) while!end of seq(sp)(6) and!end of seq(sv)do(7) ifinterval z(sp)>interval z(sv)(8) thensv get next slice(v)(9) elseifinterval z(sp)(10)
PAGE 148

Onemajordisadvantageoftheboundaryrepresentationsisthattheyignoretheinteriorandisnotsuitableforvolumebasedcomputations.Further,theconversionfromvolumerepresentationstoboundaryrepresentationsliketheslicerepresentationisratherexpensive.Thus,forthedatatypevolume,weemployadecompositionstrategyforitsinterior,calledtetrahedralization,thatdecomposesavolumeobjectintoacollectionofnon-overlappingtetrahedra. Atetrahedronisthesimplestvolumeobjectin3Dspacethatcanbeuniquelydeterminedbyfourvertices.Asaresult,operationsoncomplexvolumescanbeconvertedtocomposingresultsfromoperationsontetrahedra,whichreducesthecomplexityoftheoperations.Theobjectiveofthissectionistopresentacompactdatastructureforrepresentingandmanipulatingcomplexvolumeobjectsbasedonitstetrahedralization(TEN)embeddedinthe3DEuclideanspace.WerstreviewsomebackgroundinformationofthestorageandqueryprocessingfortetrahedralmeshesinSection 4.2.1 .InSection 4.2.2 ,weproposeanewdatastructure,thatwecalltheconnectivityencodedtetrahedralmesh(CETM),whichprovidesacompactstorageforcomplexvolumes,i.e.,volumespossiblywithnon-manifoldcomponentsorcavities,andwepresentitssupportofefcientnavigationoperatorsfortraversingelementsinthemeshinSection 4.2.3 .Finally,weevaluatethestoragecostofourCETMalgorithmicallyinSection 4.2.4 4.2.1Background Mostoftheexistingworkforrepresentingthree-dimensionalobjectsareboundarybasedrepresentations.Theboundaryofathree-dimensionalobjectiseitherdiscretizedaspolygonalmeshesortrianglemeshes.Datastructuresthataresuitableforpolygonal(triangle)meshesincludetheWinged-Edge[ 9 ],theHalf-Edge[ 67 ],theDCEL[ 73 ],andtheQuadedge[ 46 ].Thesedatastructuresshareincommonthattheymaintaintheassociationamongedges,boundingverticesandincidentfaces.Datastructuresthatsupportmoregeneralpolygonal(triangle)meshes,i.e.,non-manifold 148

PAGE 149

polygonalmeshesandnon-regularizedpolygonalmeshes,havebeenproposedinFacet-Edge[ 30 ]andHandle-Faces[ 64 ],whichareextensionsoftheQuad-EdgeandtheHalf-Edgerespectively. Allabovedatastructuresforpolygonal(triangle)meshesstoreconnectivityinformationamongmeshelements,e.g.vertices,edgesandfaces,thussupportefcientqueryandtraversaloperators.However,theyconsumelargestorage[ 56 ]whenthemeshgrows.Compactrepresentationsthatarecustomizedfortrianglemeshesareproposed.ExamplesaretheedgebasedrepresentationcalledDirectedEdges[ 17 ],theStar-Verticesrepresentation[ 56 ]thatstoresonlythesortedlistofreferencestoneighborsforeachvertex,andtheConnerTableapproach[ 54 ]thatrepresentsamanifoldtrianglemeshwithaconnertableandanoppositeconnertable.Althoughpolygonal(triangle)meshesaremoresuitableforvisualizationofthree-dimensionalobjects,theyarenotsuitableforoperationslikeray-tracing,intersection,andvolumecomputation.Therefore,volumebaseddatastructuresareneededforhandlingthesecomplexoperations. Tetrahedralmeshes,alsoknownasthree-dimensionalsimplicialcomplexes,isanotherpowerfultoolfordescribingarbitrarilyshapedthree-dimensionalobjects,andisabletosupportefcientvolumebasedqueriesandoperations.Severaldatastructureshavebeencustomizedfortetrahedralmeshes.ExtensionsoftheCornerTableapproachhavebeenproposedindependentlyintheVertexOppositeTable(VOT)[ 12 ]approachandtheCompactHalfFaces(CHF)[ 60 ]approachtorepresenttetrahedralmeshes.TheVOTrequires8referencespertetrahedral,4forvertexreferencesand4foroppositecorners.Twocornersareoppositeiftheybelongtotwoadjacenttetrahedraandarenotonthesharedtriangleface.Referencestotheoppositecornersareusedtoprovideconstantcostaccesstoadjacenttetrahedraandtheirboundingcells.AnimprovedversionoftheVOTapproachcalledtheSortedOTable(SOT)isintroducedin[ 49 ]whichreducesthestoragerequirementstoonly4referencesand9servicebits 149

PAGE 150

pertetrahedron.TheimprovementofstoragecostisachievedbyeliminatingtheVtableintheVOTentirely.ThevaluesintheremovedVtablecanbeinferredfromtheinformationstoredintheOtableandtheservicebits.TheSOTapproachprovidescompactstorageandsupportstheefcienttraversaloperators.However,itdoesnotsupportnon-manifoldtetrahedralmeshes,thusarenotsuitableforcomplexvolumeobjects.Othercompressionstrategiesexistfortetrahedralmesh[ 19 47 96 ]toreducethestoragecost.However,randomaccessandtraversaloperatorsonthemesharenotsupportedintheseapproaches.Arecentapproach[]utilizesaspatialindexOctreeforstoringtetrahedralmeshesandallowslocalreconstructionoftopologicalrelationsatruntime.Itcombinesthetopologicaldatastructurewiththespatialindexsothatitofferstheexibilityofusingthedatastructureforbothspatialandtopologicalqueries.Althoughitsexperimentalstudyshowsthecostofreconstructinglocaltopologicaldatastructureisamortizedovermultipleaccessestoelementswithinthesameleafnode,therandomaccesstoanyarbitrarytopologicalrelationisstillcostly.Therefore,ittradesthetopologicalrelationsaccesstimeforstorageefciencyandexibility.Asaresult,itdoesnotsupportoptimalincidentrelationsretrievalevenformanifoldtetrahedralmeshes,whichiscrucialtomostvisualizationapplications. Dimension-independentdatastructuresthatstoresn-dimensionalcomplexeshavebeenproposedinIndexeddatastructurewithAdjacencies(IA)[ 75 77 ],then-GeneralizedMaps[ 62 ],theSimpliedIncidentGraph[ 27 ],andtheNon-ManifoldIndexedwithAdjacencies(NMIA)[ 28 ].Allthedatastructuresthataredesignedforn-dimensionalcomplexesarealsosuitableforrepresentingtetrahedralmeshes.Agoodreviewaboutthesedatastructuresandthecomparisonsamongthemcanbefoundin[ 55 ]and[ 29 ].Aproblemwiththeseapproachesisthatsincetheyarethedimensionindependentapproaches,thegeneralizationton-dimensionalcomplexesintroducesmoreoverhead.Thus,theyresultinmorestoragecost[ 56 ]. 150

PAGE 151

Thereisverylittleworkintheliteratureontechniquesforperformingspatialqueriesontetrehedralmeshes.Mainlytherearetwostrategiesforimprovingthequeryefciency.TherstistoextendmultidimensionalspatialindexeslikeR-TreeandOctreetospeedupthesearchonmeshelements.Anexcellentsurveyonthistopicisavailablein[ 43 ].R-Treebasedindexesapproximatesobjectsbytheirminimumboundingboxes(MBBs)andindextheminahierarchicaltreestructure[ 50 ].VariantsliketheHilbert-packedR-Tree[ 57 ],thePriorityR-Tree[ 4 ]andothers[ 10 ]attempttoimprovetheorganizationofdatasetsinR-Treeforbetterperformance.However,tetrahedralmeshesareachallengingapplicationforR-Treesbecausethetetrahedrainamesharemostlyadjacentorincident,whichresultsinasignicantamountofoverlappingboundingboxes.Thishasalargeimpactontheefciencyofthesearchqueriesonsuchindexes.Non-overlappingR-Treevariant,theR+-Tree[ 90 ],solvesthisproblembygeneratingdisjointMBBsandreplicatingtheobjectsthatcrossMBBboundaries.However,thisapproachsignicantlyincreasesstoragerequirements,whichalsoaffectsthequeryperformance. AnotherindexapproachistoextendOctreesorkd-treesfortetrahedralmeshes.TheyarebasedontherecursivesubdivisionofaninitialcubicdomainthroughplanespassingthroughthecenteroftheblockintoeightorintotwoblocksforOctreesandkd-tressrespectively[ 86 ].Basedondifferentsubdivisioncriteriaanddifferentcontentintheleafnodes,theOctreesandkd-treescanbeextendedtodifferentspatialindexesfortetraheralmeshes.AgoodreviewandcomparisonamongdifferentOctreeandkd-treebasedspatialindexesfortetrahedralmeshescanbefoundin[ 36 ].Thepointqueriesandwindowqueriesgaintheirefciencypurelybasedonthespatiallocalityinformationofthetetrahedralmeshelementsstoredintheindexes.However,weobservethatthetopologicalrelationsamongtetrahedralmeshelementsarealsohelpfulforthesespatialqueries,andcanevenreducethestoragecostoftheseindexstructures. 151

PAGE 152

Incontrastwiththetreeindexstrategythatimprovesthequeryefciencybyindexingthespatiallocalityinformationofmeshelements,theotherapproachistodirectlymakeuseofthetopologicalrelationsamongmesheselementsforefcientqueryprocessing.TheDirectedLocalSearch(DLS)approachin[ 79 ]appliestheHilbertcurvetoobtainaninitialapproximationsolution,whichisrenedthroughlocalsearchalgorithmsthatcollectresultsbysearchingthroughadjacentneighborsoftheapproximatedsolution.Thisapproachavoidsthecomplexitiesinvolvedintryingtocapturethegeometryofthemesh,byutilizingthetopologicalrelationsamongmeshelements.Althoughitisalight-weightedapproachthatdoesnotrequiremuchstorageoverhead,itsuffersfromthefollowingproblems:rst,whenthemeshrepresentsaskewedvolume,aconcavevolume,oravolumewithlargecavities,DLSfailstondcorrectresults;second,whenthequeryresultsareemptywhichcanbeimmediatelydetectedbytreeindexapproaches,DLSwillyieldalotofunnecessarychecks. 4.2.2TheConnectivityEncodedTetrahedralMesh(CETM) Avarietyofdatastructureshavebeenproposedforstoringatetrahedralmeshanditsconnectivityinformationwhichsimpliesandacceleratescommonqueriesandtraversaloperatorsneededtosupportapplications.Suchqueriesandoperationsinvolvingconnectivityinformationarefundamentalformanytaskswhichrequirelocalnavigationonthemeshelements.Examplesarevisibilityoperations,meshanalysisandrepair,raytracingandboundaryreconstruction.However,theproblemriseswhenthethenumberoftetrahedragrowsfastinamesh.Insomeapplications,ameshcaneasilycontainmillionsoftetrahedra,whichresultsinanevenlargerstorageforconnectivityinformation.Therefore,astorageefcientdatastructureisdesiredforapplicationswithmeshes.Tetrahedralmeshescompressionschemeshavebeenproposedforthispurpose.Butunfortunately,thecompressedformatsarenotsuitableforefcienttraversaloperators.Thus,adatastructurethatprovidescompactstoragefortetrahedral 152

PAGE 153

meshwhilepreservingthesupportforefcientrandomaccessoperatorsandtraversaloperatorsarehighlydemanded. Inthispaper,weproposeoursolutionaimingatthefollowinggoals:1)beabletodescribemostcomplexvolumeobjects(expressiveness);2)toreducestoragecost(compactness);3)tosupportefcientretrievalofincidenceandadjacencyrelationsamongelementsinthemesh(efciency).Ourconnectivityencodedtetrahedralmesh(CETM)storesalistofallverticesinthemesh,andforeachtetrahedra,westore4referencestotheverticesthatareitsconnerpoints.Inadditiontothat,weintroduceanoptimalencodingstrategyfortheconnectivityinformationbetweenatetrahedrapair.Toreducestorage,weonlystoreaminimalsetofconnectivityencodings,calledspanningconnectivityencodings,thataresufcientforefcienttraversaloperators.Algorithmsforidentifyingsuchaset,aswellasthealgorithmsforthetraversaloperatorsbasedontheconnectivityencodingsarealsopresented. Inthissection,wedescribeindetailsourapproachforrepresentinggeneraltetrahedralmeshesthatarepossiblywithnon-manifoldelements,theconnectivityencodedtetrahedralmesh(CETM).Incontrasttootherapproachesthatmaintainconnectivityinformationamongdifferentmeshelementslikevertices,edges,trianglesandtetrahedra,whichusuallyresultsinredundantstorage,weexploreallpossibleconnectivityinteractionsbetweentetrahedra,encodethemwithfourbits,andonlystoretheseconnectivityencodingsbetweentetrahedra.Wefurtheroptimizethestorageoftheconnectivityencodingsbyidentifyingthespanningconnectivityencodings,whichareaminimalsetofconnectivityencodingsthatarenecessaryforderivingallpossibleconnectivityinformationinthetetrahedralmesh,andwestoreonlythissetofencodings.Weprovethattheconnectivityinformationthatisstoredisalsoenoughforderivingtherelationsamongothermeshelementslikevertex-edge,edge-triangle,etc. 153

PAGE 154

V:[v0,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10]TV:[0,1,2,5,2,3,4,5,3,4,5,6,5,6,7,8,5,6,8,9,5,6,9,10]""""""t0t1t2t3t4t5 Figure4-12. Anexampleofatetrahedralmeshanditsrepresentation(assumevi
PAGE 155

Thisrepresentationallowsrandomaccesstoithtetrahedroninthemeshinconstanttime.Italsoallowstheaccesstoatetrahedron'svertices,edges,andtrianglefacesinconstanttime.Belowwelisttheaccessoperatorsandtheirimplementationsonthisrepresentation: getPoint(i):=V[i];getTetra(t):=hTV[4t],TV[4t+1],TV[4t+2],TV[4t+3]i;getV(t,i):=TV[4t+i];getE(t,i,j):=hgetV(t,i),getV(t,j)i;getF(t,i):=hgetV(t,(i+1)%4),getV(t,(i+2)%4),getV(i,(i+3)%4)i; Theimplementationsoftheoperatorsaretrivial.ThegetPoint(i)functionreturnstheithpointinthevertexVarray.ThegetTetra(t)returnsthetthtetrahedrainthemeshintermsofalistofthereferencestoitsfourconnerpoints.ThegetV(t,i),getE(t,u,j)andgetF(t,i)operatorsreturnstheithvertexinthetthtetrahedron,theedgewithithandjthverticesasendpointsinthetthtetrahedron,andthefacethatisinfrontoftheithvertex,thatis,thefacethatdoesnotincidentontheithvertex,inthetthtetrahedronrespectively.Forexample,inthetetrahedralmeshinFigure 4-12 ,wecanaccessthetrianglefacehv4,v5,v6ioftetrahedront2bycallinggetF(2,0)whichreturnsalistofreferencesh4,5,6i.Further,ifwewanttogettheactualvertices,wecanusethegetPointoperatorsothathgetPoint(4),getPoint(5),getPoint(6)i=hv4,v5,v6i. 4.2.2.2EncodingConnectivityInformationinaTetrahedralMesh Thedatastructureforthevertices(theVarray)andthetetrahedron-vertexrelations(theTVarray)enablesthestorageofatetrahedralmesh.However,theaccessoftherelationsamongthemeshelementssuchaslocatingalltetrahedrathatareincidentatagivenvertexandlocatingalltrianglefacesthataresharingagivenedgeisnotefcientwithoutadditionalconnectivityinformationbeingstored.Thus,alotofapproachesexplicitlystoreconnectivityinformationlikevertex-edgerelationsandvertex-facerelations,whichincreasesstoragedramatically.Therefore,weproposeourapproach 155

PAGE 156

thatencodesallpossibleconnectivitythatcanhappenbetweentwotetrahedronandstoresonlytheencodedconnectivityatthetetrahedronlevel.WeprovelaterthatourencodingstrategyleadstocompactstoragebycomparingwithotherapproachesinSection 4.2.4.2 ,andweshowthatitstillmaintainstheefciencyfortraversaloperatorsinSection 4.2.3 Inthissection,weintroducetheconnectivityencodingsthatdescribeshowtwoterahedraareconnected,atavertex,anedge,oratriangle,andfurtherwhichvertex,edge,ortriangle.WerstdenetheconnectivityencodingfunctionbetweentwotetrahedrainatetrahedralmeshinDenition 45 Denition45. Letti,tjbetheithandjthtetrahedrainatetrahedralmeshstoredintheTVarray,andlet(i,j,k)denotethefunctionthatcheckswhethertiandtjsharethekthvertexpointintheVarray,thenwehave: (i,j,k)=8>><>>:1if90,<4:getV(i,)=getV(j,)=k0otherwise Now,letthefunctionCE(i,j)denotethefunctionthatgeneratestheconnectivityencodingbetweentiandtjwithrespecttoti,thenwehave: CE(i,j):=(i,j,getV(i,0))(i,j,getV(i,1))(i,j,getV(i,2))(i,j,getV(i,3)) Denition 45 providesanencodingstrategythatencodestheconnectivitybetweentwotetrahedronusingonlyfourbits.PleasenotethattheconnectivityencodingfunctionCE(i,j)isanasymmetricfunctionthattakestiasthereferencetetrahedronandencodestheconnectivityinteractionwiththetargettetrahedrontjwithrespecttotheverticesofthereferencetetrahedronti.Asaresult,CE(i,j)andCE(j,i)maybedifferent.Thetypeofconnectivities,i.e.vertexsharing,edgesharing,ortrianglefacesharing,canbedeterminedbythenumberof1sintheencoding,andthepositionof1sindicatestheindexofthesharedvertexinatetrahedron.Figure 4-13 showsatotalof14possibleneighborhoodconnectivitiesandtheircorresponding 156

PAGE 157

0111 1110 1101 1011 0101 0110 1100 1010 0011 1001 1000 0100 0010 0001 s Figure4-13. Atotalof14possibleconnectivityinteractionsandtheircorrespondingencodingsforatetrahedronhv0,v1,v2,v3i(v0
PAGE 158

Therefore,storingallconnectivityencodingscanberatherstoragecostlyandisunnecessary.Forexample,inFigure 4-12 ,eachtetrahedronhas5connectedneighbors.Thusifwestoreallconnectivityencodings,atotalof30connectivityencodingswillbestoredfortheentiretetrahedralmesh.InSection 4.2.2.3 ,weproposeanoptimizationstrategyaimingatndingaminimalnumberofencodingsthatneedstobestored,whilenotaffectingtheefciencyoftraversaloperators. 4.2.2.3OptimizingtheNumberofStoredConnectivityEncodings Theencodingintroducedintheprevioussectiondescribeshowtwotetrahedraareconnectedbyusingonlyfourbits,thusisacompactrepresentationforconnectivityinformationinatetrahedralmesh.Theproblemisthatwecannotaffordthestoragetostoretheconnectivityencodingbetweenanytetrahedronpairinthetetrahedralmesh.Moreimportantly,itisnotnecessary. Theconnectivityinteractionsamongdifferenttetrahedronpairsarenotmutuallyexclusiveinthesensethatsomecanbederivedfromothers.Forexample,letcij=CE(i,j)denotetheconnectivityencodingbetweentheithandjthtetrahedra,thenall30connectivityencodingsinFigure 4-12 arelistedinFigure 4-14 A.However,theencodingc45=1101andc43=1110indicatethatt5sharestrianglehv5,v6,v9iwitht4,andt3sharestrianglehv5,v6,v8iwitht4.Itisnotdifculttoconcludethatt5connectst3onedgehv5,v6i,whichleadstothevaluesoftwootherencodingsc53andc35.Therefore,wecalltheconnectivityencodingslikec53andc35thederivableencodingsfromc45andc43.WeformallydenesuchencodingsinDenition 46 Denition46. LetCES=0i,j
PAGE 159

cij t0 t1 t2 t3 t4 t5 t0 0011 0001 0001 0001 0001 t1 1001 0111 0001 0001 0001 t2 0010 1110 0011 0011 0011 t3 1000 1000 1100 1101 1100 t4 1000 1000 1100 1110 1101 t5 1000 1000 1100 1100 1110 cij t0 t1 t2 t3 t4 t5 t0 0011 t1 1001 0111 t2 1110 0011 t3 1100 1101 t4 1110 1101 t5 1110 (A)(B) Figure4-14. Thecompletesetofconnectivityencodingsbetweenithtetrahedron(therowheaders)andthejthtetrahedron(thecolumnheaders)in(A)andthespanningconnectivityencodingsin(B). der(i,j,C)=8>>>>>>>>>><>>>>>>>>>>:trueifcij2C_(90k
PAGE 160

algorithmFindSpanConEncoding(CES)(1)spanlist newnnbooleanarray(2)fori=0ton(3)forj=0ton(4)spanlist[i][j]=true(5)endfor(6)endfor(7)fori=0ton(8)forj=i+1ton(9)ifisDerivable(i,j,CES,spanlist)(10)spanlist[i][j]=false(11)spanlist[j][i]=false(12)endif(13)endfor(14)endfor(15)returnspanlist algorithmisDerivable(i,j,CES,spanlist)(1)spanlist[i][j]=false,spanlist[j][i]=false(2)result=false(3)fork=0ton(4)ifCES[i][k]&CES[i][j]=CES[i][j](5)andCES[j][k]&CES[j][i]=CES[j][i](6)andspanlist[i][k]then(7)ifspanlist[j][k]then(8)result=true(9)else(10)spanlist[i][k]=false(11)spanlist[k][i]=false(12)ifisDerivable(j,k,CES,spanlist)(13)result=true(14)endif(15)spanlist[i][k]=true(16)spanlist[k][i]=true(17)endif(18)ifresultthenreturntrue(19)endif(20)endif(21)endfor(22)spanlist[i][j]=true,spanlist[j][i]=true(23)returnresult Figure4-15. TheFindSpanConEncodingalgorithmandtheisDerivablealgorithms. (Condition1),andatthesametime,itisguaranteedtocontainaminimalnumberofconnectivityencodingssincetheremovalofanyencodingfromthesetcausestheremovedencodingtobenotderivablefromtheremainingoftheset(Condition2).Further,sincetheconnectivityencodingisasymmetric,thethirdconditionensuresthattheconnectivityinformationisstoredforbothtetrahedra.Nowtheproblemishowsuchaspanningconnectivityencodingssetcanbefoundgivenacompletesetofconnectivityencodingsofatetrahedralmeshfromthealgorithmicperspective.Weproposeanalgorithm,FindSpanConEncoding,inFigure 4-15 thatidentiesacollectionofconnectivityencodingsthatsatisestherequirementofaspanningconnectivityencodingsset.ThealgorithmtakesatwodimensionalnnarrayCESasinput,inwhicheachelementCES[i][j]storesa4bitconnectivityencodingfortheithtetrahedronand 160

PAGE 161

V:[v0,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10]TV:[0,1,2,5,2,3,4,5,3,4,5,6,5,6,7,8,5,6,8,9,5,6,9,10]""""""t0t1t2t3t4t5TE:[0,1,3,5,7,9]E:[0011,1001,0111,1110,0011,1100,1101,1110,1101,1110]ET:[1,0,2,1,3,2,4,3,5,4] Figure4-16. ThedatastructureforthetetrahedralmeshinFigure 4-12 (assumevi
PAGE 162

encodingoutofagroupofencodingsthatarederivablefromeachother.Oneofourfutureworkistodevelopanoptimizedalgorithmforndingoutthespanningconnectivityencodingset.However,inthispaper,thisisbeyondourscope. Inordertoholdsuchspanningconnectivityencodingsforatetrahedralmesh,weintroduceextradatastructures.InadditiontothetwodataarraysVandTVthatholdsallverticesinthemeshandalltetrahedrainthemeshrespectively,weusethreemorearrays,theTEarray,theEarray,andtheETarray.TheEarraystoresthe4bitspanningconnectivityencodingsforeachtetrahedron,andthespanningconnectivityencodings(ci)thatbelongtothesametetrahedron(theithtetrahedron)arestoredconsecutively.TheTEarraystoresforeachtetrahedrathepositionofitsrstspanningconnectivityencodingintheEarray.Finally,fortheencodingcijbetweentheithandjthtetrahedra,ifwecalltheithtetrahedronthereferencetetrahedronandthejthtetrahedronthetargettetrahedron,thentheETarraystoresforeachencodingtheindexofitstargettetrahedron.Basedonthesenewarrays,foranyithtetrahedron,wecanreachthespanningconnectivityencodingsciinconstanttime.ThecompletedatastructureforthetetrahedralmeshdescribedinFigure 4-12 ispresentedinFigure 4-16 .Inthisexample,theconnectivityencodingsfort2arestoredinE[TE[2]]andE[TE[2]+1].WecanfurtherretrievethecorrespondingtargettetrahedronindexfromET[TE[2]](t1)andET[TE[2]+1](t5).Belowwelisttheaccessoperatorsfortheconnectivityinformationstoredandtheirimplementationsbasedonthisrepresentation: countEncoding(t):=TE[t+1])]TJ /F7 11.955 Tf 11.95 0 Td[(TE[t];getEncoding(i,t):=8>><>>:E[TE[t]+i]ifi><>>:ET[TE[t]+i]ifi
PAGE 163

tetrahedron,andtheoperatorgetETetraretrievesthecorrespondingtargettetrahedronfortheithencodingofthetthetetrahedron. 4.2.3OperatorsforRetrievingTopologicalRelations Oneoftheimportanttasksthatisusuallyperformedonatetrahedralmeshistotraversethemeshandtoaccessthevariouselements(vetices,faces,andtetrahedra).Theefciencyofthesetasksarecrucialtosomeapplications.Forexample,the3Draytracingapplicationsrequirestheefcientretrievaloftheadjacenttetrahedra,thevolumesimplicationalgorithmswhicharebasedontheedgecollapsestrategyrequiretheefcienttraversalamongadjacentedgesinatetrahedralmesh,andsomemulti-resolution3Dvisualizationtoolsrequirestheefcientidenticationofadjacentverticessothattheycanbemergedforalowerresolutiondisplay.Therefore,itisimportantthatthedatastructuresthatstoretetrahedralmeshessupportstheefcientaccessoftheserelationsamongdifferentelements.InSection 4.2.3.1 ,werstpresentthedenitionsofacompletesetoftopologicalrelationsamongthetetrahedralelements.WethenshowinSection 4.2.3.2 howthetopologicalrelationsamongtheelementscanberetriedinoptimaltimefromourcompactCETMdatastructure. 4.2.3.1Topologicalrelationsamongtetrahedralmeshelements Atetrahedralmeshcontainsfourtypesofelements,vertices,edges,trianglefaces,andtetrahedra.Thetopologicalrelationshipsrefertotherelationshipslikeadjacency,boundary,andco-boundaryamongthesameordifferenttypesofelements.Arathercompletesummaryofallthetopologicalrelationsamongmeshelementsispresentedin[ 29 37 ].Theydescribethetopologicalrelationsinamoregeneralmeshcalledsimplicialcomplexeswhichcanbeusedtodescribeobjectsinanydimensionalspace.Inthispaper,weareonlyinterestedinthe3Dtetrahedralmesh,thuswereviewtherelevantconceptsinathree-dimensionalspace. Inthetetrahedralmesh,avertex,anedge,atriangleface,andatetrahedronare0-dimensional,1-dimensional,2-dimensionaland3-dimensionalelementrespectively. 163

PAGE 164

Letp,qdenotethedimensionalityofanelementinatetrahedralmesh(0p,q3)andletsdenoteap-dimensionalelementinthetetrahedralmeshT.ThenthetopologicalrelationfunctionRpq(s)isdenedasaretrievalfunctionthatreturnstheq-dimensionalelementsofthetetrahedralmeshTthatarenotdisjointfromthep-dimensionalelements.Inparticular: Forpq,Rpq(s)retrievesallq-dimensionalelementsontheboundaryoftheq-dimensionalelements,e.g.,R30(s)retrievesallvertexpointsofthetetrahedrons. Forp>0,Rpp(s)retrievesallp-dimensionalelementsinthemeshthatsharesap)]TJ /F4 11.955 Tf 12.11 0 Td[(1-dimensionalelementwiththeq-dimensionalelements,e.g.,R33(s)retrievesalltetrahedrathatshareatrianglefacewiththetetrahedrons. R00(v),wherevisavertex,retrievesthesetofverticeswsuchthatfv,wgisanedgeelementinthetetrahedralmesh. TherelationRpqiscalledaboundaryrelationifp>q,aco-boundaryrelationifp
PAGE 165

4.2.3.2RetrievingtopologicalrelationsbasedonourCETM WehavegiventhenotionsforthetopologicalrelationsinSection 4.2.3.1 ,wenowpresenttheimplementationsofthesefunctionsandwedemonstratetheefciencyoftheimplementationsbasedonourproposedCETMdatastructurebyanalyzingtheirtimecomplexity. Firstofall,theimplementationsfortheboundaryrelationsRpqwherep>qbasedonourCETMaretrivial.WehaveshownsomebasicoperatorsinSection 4.2.2.1 thatcanbeusedtoretrievetheboundaryrelations.Therefore,inthissection,wefocusmoreontheretrievalofco-boundaryrelationsandadjacencyrelations. Theco-boundaryrelationsretrievalfunctionsareR01,R02,R03,R12,R13,andR23.Theseretrievalfunctionsarealsocalledthestaroperations.Inprinciple,wecancategorizethesestaroperationsintothreecategories,thevertexstaroperations,theedgestaroperations,andthefacestaroperations.Thevertexstaroperations,denotedasR0,aretheonesthatretrieveedges,facesortetrahedrasharingatagivenvertexpoint.Theedgestaroperations,denotedasR1,aretheonesthatretrievefacesandtetrahedrasharingatagivenedge.Thefacestaroperations,denotedasR2,aretheonethatretrievesthetetrahedrasharingatagivenface.Wenowrstdescribetheimplementationdetailsforthevertexstaroperations. TheimplementationsofthevertexstaroperationsR01andR02aretrivialiftheR03operationissupported.OnejustneedstousetheR03operationtoretrievethetetrahedrasharingatagivenvertexpoint,andforeachtetrahedronretrieved,edgeswiththegivenvertexasanendpointandfaceswiththegivenvertexpointasoneofitsthreeconnerpointscanberetrievedinconstanttime.SoweonlyneedtoproposeanefcientimplementationstrategyfortheR03operation.Werstdeneafunctionthatwillbeusedinouralgorithm.LetthefunctiongetPos(t,v)denoteafunctionthattakestthtetrahedraandavertexpointvasinput,andreturnsthepositionofthevertexinthetetrahedrat.Forexample,inourexample(Figure 4-12 ),getPos(1,3)retrievesthepositionofthe 165

PAGE 166

vertexv3intetrahedront1,andreturns1asresultmeaningthatthepositionofv3int1is1.Now,wegivethealgorithmforretrievingtheR03relationsinFigure 4-17 .TheR03algorithmtakestheithvertexofthetthtetrahedronastheinputvertexandstorestheresultingtetrahedrainthelisttlist.Inaddition,abooleantagarrayisusedtokeeptrackoftheinsertedtetrahderaandisinitializedwith0values.Thealgorithmrstcheckswhetherthecurrenttetrahedraisinthelist.Ifitisthenstopsearching(line1-3),otherwise,thecurrenttetrahedronisappendedtotheresultlisttlistsincethecurrenttthtetrahedronalwayscontainsitsithvertex(line4).Next,wechecktheconnectivityencodingsthatareexplicitlystoredforthecurrenttthtetrahedron.Forthoseencodingsthatinvolvetheithvertex,weretrievethecorrespondingtargettetrahedra,andforeachtargettetrahedron,werecursivelylookforthetetrahedrathatsharethesamevertexwiththem(line8-13).Eventually,alltetrahedrathatshareatthegivenvertexwillbestoredinthelisttlist.Thisalgorithmworksbecausetheconnectivityinformationstoredareabletoderiveallotherconnectivityinformationthatarenotexplicitlystored(Section 4.2.2.3 ).ThisalgorithmhasaO(m)timecomplexitywheremisthenumberoftetrahedrasharingatagivenvertex. Similarly,theimplementationoftheedgestaroperationR12reliesonthealgorithmfortheedgestaroperationR13.ThusweonlyneedtodesignthealgorithmforretrievingR13relationsforagivenedge.WepresentthealgorithmR13fortheR13relationinFigure 4-17 .TheinputofthisalgorithmisthesameasthealgorithmR03exceptthat,insteadofgiventheithvertexofthetthtetrahedron,itgivesanedgehi,jiasinput.Thisalgorithmlooksforthestoredencodingsthatinvolvethegivenedgeandrecursivelysearchesforthetetrahdrathatsharethesameedge(line8-15).SimilartotheR03operation,thisoperationalsohasaO(m)timecomplexitywheremisthenumberoftetrahedrasharingatagivenedge. Thelastoperationthatbelongstotheco-boundaryrelationretrievaloperationsfamilyistheR23thatretrievesthetetrahedrathatshareagivenface.The 166

PAGE 167

algorithmR03(t,i,tags,tlist)(1)iftags[t]==1then(2)return(3)endif(4)tlist.append(t)(5)tags=1(6)numOfEncoding=countEncoding(t)(7)fork=0tonumOfEncoding(8)ifvthbitoftheencoding(9)getEncoding(k,t)is1then(10)t0 getETetra(k,t)(11)v getV(t,i)(12)i0 getPos(t0,v)(13)R03(t0,i0,tags,tList)(14)endif(15)endfor(16)return algorithmR13(t,hi,ji,tags,tlist)(1)iftags[t]==1then(2)return(3)endif(4)tlist.append(t)(5)tags=1(6)numOfEncoding=countEncoding(t)(7)fork=0tonumOfEncoding(8)ifithandjthbitsoftheencoding(9)getEncoding(k,t)are1sthen(10)t0 getETetra(k,t)(11)hu,vi getE(t,i,j)(12)i0 getPos(t0,u)(13)j0 getPos(t0,v)(14)R03(t0,hi0,j0i,tags,tList)(15)endif(16)endfor(17)return algorithmR23(t,i,tlist)(1)tlist.append(t)(2)numOfEncoding=countEncoding(t)(3)fork=0tonumOfEncoding(4)iftheencodinggetEncoding(k,t)are(5)all1sexceptfortheithbitthen(6)tlist.append(getETetra(k,t))(7)endif(8)endfor(9)return Figure4-17. ThealgorithmfortheR03operationandthealgorithmfortheR13operation. implementationforthisoperationistrivialbecauseeveryfaceisonlysharedbytwotetrahedraandaccordingtoourdenitionforthespanningconnectivityencodings,allencodingsthatinvolveafaceareexplicitlystored.WepresenttheimplementationoftheoperationR23inFigure 4-17 Sofar,wehaveintroducedthealgorithmsforretrievingtheco-boundaryrelationswithO(m)timecomplexity.Theotheroperations,R00,R11,R22,andR33,belongtotheadjacencyrelationsfamily.Eachoftheseoperationscanbeimplementedbasedonthecorrespondingco-boundaryrelationsretrievaloperations.Forexample,toretrievethe 167

PAGE 168

verticesthatareconnectedthroughanedgeelementtoagivenvertex(R00),oneonlyneedstoretrievealledgessharingthegivenvertexbycallingtheR01operation,andtheotherendvertexpointsoftheretrievededgesaretheresultingvertices. TheimplementationoftheR11operationisalsobasedontheR01.First,givenanedgeelementhu,vi,wecanretrievealledgesinthemeshthatsharethevertexuandstoretheminalistelist1,andretrievealledgesinthemeshthatsharethevertexvandstoretheminalistelist2byusingtheoperationR01.Then,theunionofthetwolistsistheresultofR11.Similarly,wecanimplementtheR22operationbasedontheR12operation.Foreachedgeeiofagivenfaceelement,weretrieveallfacessharingeibycallingR12operation,andwestoretheminalististi.Thentheunionofallistigivesthenalresult.ToimplementtheR33operation,wecanretrievealltetrahdrathatshareafacewiththegiventetrahedronbyusingtheoperationR23togettheresultingtetrahedraforeveryfaceelementofthegiventetrahedron. ThetimecomplexityoftheadjacencyrelationretrievaloperationsareallO(m)wheremisthenumberofresultingelements. 4.2.4TheEvaluationandExperimentalStudyoftheConnectivityEncodedTetrahedralMesh Inthissection,weevaluateourCETMdatastructurefromboththealgorithmicperspectiveandtheexperimentalperspective.Werstanalyzethestoragecomplexityofourdatastructureandthetimecomplexityoftopologicalretrievaloperatorsonourdatastructure,andcomparethemwiththeotherexistingdatastructuresinSection 4.2.4.1 andSection 4.2.4.2 ThenwepresentsomeexperimentalstudyinSection 4.2.4.3 basedonrealdatasetstodemonstratetheefciencyofourCETMdatastructureinrealworldapplications. 168

PAGE 169

4.2.4.1TheEvaluationoftheStorageCostofourCETMDataStructure Sofar,wehaveintroducedourconnectivityencodedtetrahedralmesh(CETM)datastructure(Section 4.2.2 ),andtheimplementationofacompletesetoftopologicalrelationsretrievaloperations(Section 4.2.3 ).Wehavealsoshownthatthetimecomplexityoftheretrievaloperationsarelineartothenumberofelementsretrieved,whichisoptimal.Inthissection,weanalyzethestoragecostofourproposedCETMdatastructure. Inourdatastructure,atotalofvesequentialarrays,whicharethevertexarrayV,thetetrahedron-vertexarrayTV,thespanningconnectivityencodingsarrayE,thetetrahedron-encodingarrayTE,andtheencoding-targettetrahedronarrayET,areused(seeFigure 4-16 foranexample).Letntandnvdenotethenumberoftetrahedrainthemeshandthenumberofverticesinthemeshrespectively.Further,weassumeeveryvertexpointisrepresentedwith3doublevaluesforx,yandzcoordinates,andeveryreferencethatpointstoavertex,anencoding,oratetrahedroncostsoneinteger.Then,theVarraythatrecordsallverticesinthetetrahedralmeshcosts3nvdoubles,theTVarraythatrecordsthereferencestothefourconnerpointsforeachtetrahedroncosts4ntintegers,andtheTEarraythatrecordsthereferencestotheencodingsforeachtetrahedroncostsntintegers.LetmdenotethenumberofspanningconnectivityencodingsthatarestoredintheEarray,thentheEarraythatstoresfourbitencodingscosts4mbitsandtheETarraythatstoresthereferencetothetargettetrahedronforeachencodingcostsmintegers.Therefore,atotalof3nvdoublesplus5nt+mintegersplus4mbitsarestoredforatetrahedralmesh. Now,thequestionishowbigthemis.Sincethemisthenumberofspanningconnectivityencodingsandthespanningconnectivityencodingsareaminimalsetofencodings,misexpectedtobearelativesmallvalue.Byinvestigatingthenatureofthespanningconnectivityencodings,weobservethatthevalueofmrelatestothenumberofsharedfaces,thenumberofnon-manifoldedgesandthenumberofnon-manifold 169

PAGE 170

vertices.wecanactuallycomputetheprecisevalueofmgivenatetrahedralmesh.Weexplainthisindetailsintherestofthissection. Ingeneral,therearethreetypesofconnectivityencodingsforthetopologicalrelationsbetweentwoconnectedtetrahedrainatetrahedralmesh,theencodingswiththree1sindicatingthesharingofatriangleface(adjacency),theencodingswithtwo1sindicatingthesharingofanedge(incident),andtheencodingsofone1indicatingthesharingofavertex(incident).Allencodingsbelongtooneofthethreetypes.Soweinvestigatethenumberofspanningconnectivityencodingsforeachofthesetypes. Therstobservationisthatallfacesharingconnectivityencodingsarespanningconnectivityencodings,thusneedtobephysicallystored.Theproofofthisobservationissimple.Accordingtothedenitionofderivable,allconnectivityencodingswiththree1scannotbederivedfromothers.Thisisbecausethatforanyencodingcijthathasthree1s,theredoesnotexistaciksuchthatcik&cij=cij.Otherwise,ifthereshouldexistsuchacik,theneithercik=cij,whichmeansthekthtetrahedronsharesasamefaceoftheithtetrahedronwiththejthtetrahedron,orcikhasfour1s.Bothcasesarenotrealistic.Asaresult,allencodingswiththree1smustbeincludedinthespanningconnectivityencodingsset.Forexample,inFigure 4-18 A,theencodingsthatdescribetheadjacentrelationshipbetweent1andt2,andtheadjacentrelationshipbetweent2andt3needtobestoredasspanningconnectivityencodings. Thesecondobservationisbasedontheinvestigationoftheedgesharingbasedconnectivityencodings.Foranyedgew=hu,viinthetetrahedralmesh,wecanusetheedgestaroperationR13toretrievealltetrahedraincidentattheedgew.Wecalltwotetrahedratsandtd2-connectedatwifthereexistsa2-connectedpathts,t1,t2,...,tk,tdsuchthat1)ts,tdareadjacenttot1,tkrespectively,2)tiisadjacenttoti+1for1i
PAGE 171

(A)(B) Figure4-18. Examplesofamanifoldedgeemandanon-manifoldedgeenin(A)and(B)respectively. nda2-connectedpath,thenwecallwanon-manifoldedge.Figure 4-18 AgivesanexampleofamanifoldedgeemandFigure 4-18 Bgivesanexampleofanon-manifoldedgeen.Itistrivialtoprovethatallconnectivityencodingsthatinvolveamanifoldedgearenotspanningconnectivityencodingssincetheycanalwaysbederivedfromthefacesharingconnectivityencodings.Forexample,inFigure 4-18 A,emisamanifoldedge,andtheconnectivityencodingc13betweent1andt3thatdescribesthesharingoftheedgeisnotstoredasaspanningconnectivityencoding.Accordingtothedenitionofderivable,c13canbederivedfromc12andc32,wherec12isthefacesharingencodingbetweent1andt2,andc32isthefacesharingencodingbetweent3andt2. Hence,weonlyneedtondouthowmanyconnectivityencodingsarestoredforanon-manifoldedge.Foralltetrahedrathatareincidentatanon-manifoldedgew,wecangroupthemintoclusterssothatanypairoftetrahedrabelongingtothesameclusterare2-connectedatw,andanypairoftetrahedrabelongingtodifferentclustersarenot2-connectedatw.Forexample,inFigure 4-18 B,enisanon-manifoldedgesincenotalltetrahedrapairthatareincidentatenare2-connected.Moreover,tetrahedraincidentatencanbegroupedinto3clusterscl1,cl2andcl3,eachcontainsoneormoretetrahedra.Asaresult,foranon-manifoldedgewthathasclusterscl1,cl2,...,clk,weonlyneedtopicktherepresentativetetrahedrat1,t2,...,tk,eachfromonecluster,andstorethespanningconnectivityencodingsamongthesetetrahedra.Wedonotneedtostorethe 171

PAGE 172

encodingsamongtetrahedrawithinasameclustersincetheycanbederivedfromthefacesharingconnectivityencodings.Sincet1,t2,...,tkarefromdifferentclustersandareincidentatasameedgew,thenumberofthespanningconnectivityencodingsamongthemmustbek)]TJ /F4 11.955 Tf 12.33 0 Td[(1,nomoreandnoless.WecanprovethisbyconstructingagraphGinwhichthenodesrepresentthetetrahedrat1,t2,...,tk.WecreateanedgeinGthatconnectsthenodestiandtjiftheencodingcijbetweentiandtjiscountedasaspanningconnectivityencoding.Therefore,ifwehavelessthank)]TJ /F4 11.955 Tf 12.47 0 Td[(1edgesingraphG,thentheremustexisttwonodesinGthatarenotconnected,whichmeansthattheencodingbetweenthetwocorrespondingtetrahedraisnotinthespanningconnectivityencodingssetandisnotderivablefromthecurrentspanningconnectivityencodingsset.Ifwehavemorethank)]TJ /F4 11.955 Tf 12.23 0 Td[(1edges,thentheremustexistaloopinthegraph,whichmeansthatforanytwodirectlyconnectednodesintheloop,theyarealsoconnectedthroughothernodes.Inotherwords,thespanningconnectivityencodingisderivablefromotherencodings.Boththesetwocasesviolatetherequirementsofspanningconnectivityencodingsset.Sowecanconcludethatforanymanifoldedgewm,noneoftheencodingsonwmneedstobestored,andforanynon-manifoldedgewn,westoreatotalof2(k)]TJ /F4 11.955 Tf 12.18 0 Td[(1)encodingsasspanningconnectivityencodings.Wemultiplyk)]TJ /F4 11.955 Tf 12.17 0 Td[(1by2becauseaccordingtothedenitionofspanningconnectivityencodings,ifcijisinthespanningconnectivityencodingsset,thencjiisalsointheset.Figure 4-18 Bshowsanexamplewhereonly4spanningencodingsneedtobestored. Thethirdobservationisbasedontheinvestigationofvertexsharingbasedencodings.Similartotheedgesharingcase,wealsodistinguishverticesinatetrahedralmeshasmanifoldverticesandnon-manifoldvertices.Avertexvisamanifoldvertexifalltetrahedraincidentatvare1-connectedatv,meaningthatbetweenanytetrahedrapairtdandtsthereexistsa1-connectedpathts,t1,t2,...,tk,tdsuchthat1)ts,tdareadjacentto,orareincidentatanedgeto,t1,tkrespectively,2)tiisadjacentto,orincidentatanedgeto,ti+1for1i
PAGE 173

(A)(B) Figure4-19. Examplesofamanifoldvertexvmandanon-manifoldvertexvnin(A)and(B)respectively. ts,t1,t2,...,tk,tdareincidentatthevertexv.Otherwise,thevertexvisanon-manifoldvertex.Figure 4-19 Ashowsanexampleofamanifoldvertex,andFigure 4-19 Bshowsanexampleofanon-manifoldvertex.Thesameclusterconceptcanalsobeappliedhereforalltetrahedrathatareincidentatavertexv.Inthiscase,thenanytetrhaderapairinasameclusterare1-connectedatv,andtwotetrahedrafromdifferentclustersarenot1-connectedatv.Asamestrategycanbeappliedtoprovethefollowingconclusionthatforanymanifoldedgewm,noneoftheencodingsonwmneedstobestored,andforanynon-manifoldvertexvn,westoreatotalof2(k)]TJ /F4 11.955 Tf 12.32 0 Td[(1)encodingsasspanningconnectivityencodings.IntheexampleinFigure 4-19 B,tetrahedrathatareincidentatvertexvncanbegroupedinto3clusterscl1,cl2andcl3.Atotalof4spanningencodingsneedstobestoredinthisexample. Finally,wecancomputethevalueform,whichisthenumberofspanningconnectivityencodingsstoredforatetrahedralmesh.LetCeandCvdenotethetotalnumberofclustersaroundnon-mandifoldedgesandthetotalnumberofclustersaroundnon-manifoldverticesrespectively.Letsdenotethenumberofsharedfaces.Thenm=2(s+Ce+Cv).SothetotalstoragecostofourCETMisabout5nt+2(s+Ce+Cv)integers,3nvdoubles,and8(s+Ce+Cv)bits. 173

PAGE 174

4.2.4.2TheComparisonsofourCETMDataStructurewithOthers Inthissection,wecompareourapproachwithotherexistingworkfromboththestoragecostandoperationefciencyperspectives.Inordertobefair,weonlychoosethedatastructuresthatatleastofferoptimaltopologicalrelationsretrievalformanifoldtetrahedralmeshes.Datastructuresthatmayrequirelessstoragebutdonotsupportdirectandrandomaccesstotopologicalrelationsarenotconsideredinthiscomparison.Examplesarethecompressionstrategiesin[ 19 47 96 ],andthespatialindexstrategyin[]. WerstpresentdatastructuresthatarecalledtheVertexOppositeTable(VOT)[ 12 ],theSortedOppositeTable(SOT)[ 49 ],theSimpliedIncidentGraph(SIG)LDA04ACMSIGGRAPH,theIndexedDataStructurewithAdjacencies(IA)[ 75 77 ],andtheNon-manifoldIndexeddatastructurewithAdjacencies(NMIA)[ 28 ].Thecomparisonamongthelastthreedatastructuresispresentedindetailsin[ 29 ].Inthispaper,webrieyintroducethesedatastructuresandshowtheirstoragerequirements.Wedenethefollowingnotionsthatareusedlater.Letnt,nf,ne,nvdenotethenumberoftetrahedra,faces,edges,andverticesinthetetrahedralmeshrespectively.LetCeandCvdenotethetotalnumberofclustersfornon-manifoldedgesandnon-manifoldverticesrespectively.Letsdenotethenumberofsharedfaces.Further,weassumethesizeofareferenceisthesameasanintegervalue. TheideabehindtheVertexOppositeTable(VOT)datastructureistostoretheadjacentrelationshipsamongtetrahedrabystoringonlyoneoppositevertexforeachcornerofatetrahedron.Therefore,theVOTdatastructurerequiresthestorageofallverticesplus8referencespertetrahedronthatincludes4referencestotheverticesofeachtetrahedronand4referencestotheoppositeverticesofthefourconnerpointsofatetrahedron.Basedonthisdatastructure,theretrievalofadjacenttetrahedrahasconstantcost.However,sinceVOTonlymaintainstheadjacentrelationshipsamongtetrahedrabyusingoppositevertices,itdoesnotsupporttheretrievaloperationson 174

PAGE 175

tetrahedralmeshthathasnon-manifoldedgesornon-manifoldvertices.Forexample,VOTcanretrievealltetrahedraincidentatedgeeminFigure 4-18 A,butitfailstoretrievealltetrahedraincidentatedgeeninFigure 4-18 B.Asaresult,itrequiresthestorageof3nvdoublesplus8ntintegers. AnextensiontoVOT,calledtheSortedOppositeTable(SOT),hasbeenproposedin[ 49 ],whichdesignsanevenmorecompactdatastructureforholdingtetrahedralmesh.Bysortingthevertexlistandbyreplacingthereferencestotheverticesofeachtetrahedronbyafewservicesbits,itrequiresonly4referencesand9servicebitspertetrahedron.However,thetradeoffistheincreaseofthecomputationalcostofaccessingneighboringcellsproportionaltothevalenceofacommonvertex.Moreover,sinceitisstillbasedontheconceptofstoringadjacentrelationsbystoringoppositevertices,italsodoesnotsupporttheretrievalofincidentrelationsonanon-manifoldedgeoranon-manifoldvertex.Thetotalstoragerequiredforthisdatastructureis3nvdoubles,4ntintegersand9ntservicebits. Thesimpliedincidentgraphdatastructurestoresthecoordinatesofeachvertexinthemesh(thereforerequires3nvdoubleswherenvisthenumberofverticesinthemesh).Italsostoresadditionaltopologicalrelationsamongtetrahedralmeshelements.Followingrelationsarestored:1)relationR32thatstoresfourfacesontheboundaryofeachtetrahedron(4ntreferences);2)relationR21thatstoresthreeedgesforeachface(3nfreferences);3)relationR10thatstorestwoverticesforeachedge(2nereferences);4)relationR23thatstoresadjacentrelations(facesharingrelations)foreachtetrahedron(4ntreferences);5)relationR12thatstoresonerepresentativefacefromeachclusterincidentateachnon-manifoldedge(Ce+ne)]TJ /F7 11.955 Tf 12.73 0 Td[(kreferences,wherekisthenumberofnon-manifoldedges);6)relationR01thatstoresonerepresentativeedgefromeachclusterincidentateachnon-manifoldvertex(Cvreferences);Withalargeamountofrelationsexplicitlystored,thisdatastructureisoptimalinretrievalanytopological 175

PAGE 176

relations.Asaresult,atotalof3nvdoublesplus(8nt+3nf+3ne+Ce+Cv)]TJ /F26 11.955 Tf 13.75 0 Td[(k)integers. Theindexeddatastructurewithadjacenciesisamorecompactdatastructurefortetrahedralmeshes.Apartfromstoringthecoordinatesofverticesinthemesh,itonlystorestheR30relationwhichstoresfourverticesontheboundaryofeachtetrahedron(4ntreferences),andtheR33relationthatforeachtetrahedronstoresreferencestoallitsadjacenttetrahedra(2sreferences).Similartothevertexoppositetable(VOT)datastructure,itdoesnotsupporttheaccesstoincidentelementsatanon-manifoldedgeoranon-manifoldvertex.Thetotalstoragecostofthisdatastructureis3nvdoublesplus(4nt+2s)integers. Thenon-manifoldindexeddatastructurewithadjacenciesisanextensiontotheabovedatastructure.Ithandlesnotonlyageneraltetrahedralmesh,butalsoanyarbitrarilyshapedobjectsthatmayevenhavetanglingfacesandtangleedges.Thetradeisthentheneedofadditionalstorage.Inthispaper,weonlyinvestigateitsstoragerequirementsforageneraltetrahedralmesh.Ingeneral,itstoresvertices,tetrahdravetexreferences,andarestrictedsetoftopologicalrelations.Tobespecic,thereareatotaloffourtopologicalrelationsexplicitlystored,whichare1)R30relationthatstoresreferencestothefourconnerverticesforeachtetrahedron(4ntreferences);2)R33relationthatstores2ntbitsforags(whichindicatethenumberofadjacenttetrahedraforeachtetrahedron)+(2s)integersforstoringalladjacencyrelations+ntreferencestotheadjacentrelations;3)R3,clustersrelationsthatstoresclusterinformationforeachofthesixedgesofatetrahedron(24ntbits+2Cereferences)andthereferencestotheclusterarrays(nt);4)R0,clustersrelationsthatstore2Cvbitsforags+Cvreferencesfortheclusterarraysstoringclusterrepresentatives+nvreferenceskeepingtrackofthelengthofeachclusterarray+nvreferencestothearray.Moredetaileddescriptioncanbefoundin[ 28 ].Thisdatastructuresupportsoptimalretrievaloperationsforalltopologicalrelations.Thetotalstoragecostforageneral 176

PAGE 177

tetrahedralmeshpossiblywithnon-manifoldedgesandnon-manifoldverticesis3nvdoubles,(6nt+2s+2nv+2Ce+Cv)integers,and(26nt+2Cv)bits. WecompareourCEMTdatastructurewiththesevedatastructuresinFigure 4-20 .Thecomparisontabledescribesthestoragecostofallthedatastructuresforbothmanifoldtetrahedralmeshandnon-manifoldtetrahedralmesh.Formanifolds,thenumberofclustersatnon-manifoldedges(Ce)andthenumberofnon-manifoldclustersatnon-manifoldvertices(Cv)arezeros.ThetablealsodescribeshowthedatastructuressupporttheincidentrelationsretrievaloperationsRpqwherep
PAGE 178

non-manifolds manifolds StorageCost Rpq StorageCost Rpq (p
PAGE 179

Table4-1. ThestoragecostofCETMdatastructureforselected3DshapesinthePrincetonShapeBenchmarkrepository. m500m471m58m531m67 Vertices3552,3292,14914,219103,910Tetrahedra1,1097,3358,45553,817464,736BoundaryFaces6124,3983,01623,100111,526NM-Edges1921,1961,4548,93281,410NM-Vertices341903622,13218,586CE4,05026,32832,620203,2321,847,414CETMSize(byte)48,925321,072367,4662,332,14020,101,923.ele,.node,and.neigh93,817621,935676,7704,570,36840,701,143Size(byte).meshSize(byte)127,180814,715897,6985,776,76446,939,479.oSize(byte)74,392497,701515,7653,536,66129,752,403 tetrahedralmeshes.Thetoolgeneratesconstraineddelaunaytetrahedralization(CDT)byimplementingalgorithmspresentedin[ 92 93 ]. InordertoevaluatethestoragecostoftheCETMdatastructure,weselectthe3Dshapeswiththenumberoftetrahedraintherangefrom1,109to464,736.Table 4-1 presentsthestoragecostofCETMfortheselected3DshapesinthePrincetonShapeBenchmarkrepository. InTable 4-1 ,m500,m471,m58,m531andm67aretheidsofthe3Dtetrahedralmeshesthataregeneratedfromthecorresponding3DshapesinthePrincetonShapeBenchmarkrepositorybytheTetGentool.Wehavelistedthenumberofvertices,thenumberoftetrahedra,thenumberofboundaryfaces(thetrianglefacesthatarenotshared),thenumberofnon-manifoldedges(NM-Edges),thenumberofnon-manifoldvertices(NM-Vertices)ofagiventetrahedralmeshinthegureforalldatasamples.WealsoshowthenumberofconnectivityencodingsthatarestoredinourCETMdatastructureandthesizeofthenalCETMdatastructureinbytesforeachdatasample.Inaddition,wecompareourCETMdatastructurewiththreeleformatsthatarewildlyusedforstoringtetrahedralmeshesandstoringgeneralpolyhedra.The.nodeleandthe.eleleareusedtostorealistofvertexcoordinatesandalistoftetrahedra 179

PAGE 180

Table4-2. Thecostofretrievingtetrahedrasharingthe3rdvertexofthe100thtetrahedroninCETM. R03(100,3)m500m471m58m531m67 TetrahedraVisited111226149Tetrahedraretrieved111226149ExecutionTime(ms)0.0270.0320.0670.0520.032 Table4-3. Thecostofretrievingtetrahedrasharingthe2ndand3rdverticesofthe100thtetrahedroninCETM. R03(100,2,3)m500m471m58m531m67 TetrahedraVisited25636Tetrahedraretrieved25636ExecutionTime(ms)0.0040.0060.0130.0060.009 respectively.Severalresearchapplications,suchastheStellarprogram[ 59 ]andtheTetGentool[ 68 ],aredevelopedbasedonthisformat.The.neighlestoresthetopologicalrelationshipsamongmeshelementssothatthetopologicalrelationcanberetrievedefciently.The.meshlesareusedbyMedit,aFrenchprogramforvisualizingscienticmodels.Theprogramdisplayscomputationresultsofmechanicsrelatedtosolids,uids,thermics,electromagnetism,etc.Westorethesametetrahedralmeshindifferentrepresentations,andasaresult,wecanobservethatourCETMdatastructuresconsumestheleaststorage. Further,weperformexperimentsthatretrievesthetopologicalrelationsfromatetrahedralmesh.Allotherleformatsdonotsupportsuchoperationsexceptforthecombinationof.ele,.node,and.neighles.Asexamples,weshowtheexperimentalresultsinTable 4-2 andTable 4-3 Werstretrievealltetrahedrathatsharethe3rdvertexwiththe100thtetrahedrainthemesh.Table 4-2 showsthatthenumberofvisitedtetrahedraandthenumberoftetrahedraretrievedasresultlistarethesame,andthetimeforretrievingtheresultislineartothenumberofretrievedtetrahedrawhileisnotaffectedbythesizeofthetetrahedralmeshatall.ThismeansthatinCETMthevertexstartretrievaloperation 180

PAGE 181

isoptimal.ThesamecanbeobservedinTable 4-3 fortheedgestartrelationretrievaloperation. 4.3AComparisonbetweenTheTwoApproaches Theslicerepresentationintroducedpresentsaparadigmofdesigningdatastructuresforspatialdatatypes.Itprovidesacleananduniformdatastructuredesignandservesasthebasisofefcientalgorithms.Forvolumeobjects,theslicerepresentationbelongstotheboundarybasedvolumerepresentationapproaches,whichapproximatethesurfaceofavolumeobjectwithconnectedpolygonalfacesthatenclosesasubsetof3Dspace. Ontheotherhand,theTEN-basedrepresentationisoneofthevolumebasedrepresentationsthatdecomposesavolumeobjectintosmallerandsimpler3Delements,whicharetetrahedra.Weencodetheinteractionsamongtetrahedraandstorethemexplicitlyforefcientoperations.Anadditionalobjectindexstructureisalsoembeddedinthevolumerepresentationforefcientdataaccess.Thevolumeintersectionalgorithmisgiventoshowthebenetofourvolumerepresentation.Inthefuture,wewillexploremoreimportantoperationswhich,forexample,yieldnumericalvalues,orarepredicates.Althoughdifferentoperationsrequiredifferentalgorithms,acommonparadigmexistsfordevelopingsolutionsbasedonourvolumerepresentation,thatistoreducethecomplexvolumeproblemstosimpletetrahedraproblems. Bothrepresentationsareabletohandlecomplexspatialobjectslikevolumeswithmultiplecomponents,andinbothrepresentationscomponentsarewellorganizedsothatefcientaccessispossible.However,sincetheslicerepresentationaimsatageneralparadigmforallspatialdatatypes,itismoresuitableforcrossdatatypesoperationslikeintersectionbetweenlinesandvolumes.Thus,theTEN-basedrepresentationisdesignedspecicallyforvolumetypesothatthevolumecentricoperationslikevolumecomputationandintersectionbetweentwovolumescanbemoreefcient.Further,theTEN-basedmodelingstrategyiswidelyappliedineldslikeGISfor 181

PAGE 182

visualizingirregularobjectsliketerrains,thus,3Dvolumedataintheformofacollectionoftetrahedraisdirectlyavailable.Asaresult,wedesignaTEN-basedhierarchicalvolumerepresentationinadatabasecontextforefcientqueryingandanalysispurpose. 4.4Detour:ComputingtheCardinalDirectionDevelopmentbetweenMovingPoints Asadetourfromthecardinaldirectionsbetween3Dspatialobjects,wehaveproposedamodelingstrategyforcardinaldirectiondevelopmentsinSection 3.2.2.2 ,inwhichwehavedenedthedevelopmentofcardinaldirectionsovertimeasasequenceoftemporallyorderedandenduringcardinaldirections.Inthissection,weproposeoursolutionforcomputingsuchacardinaldirectiondevelopmentbetweentwomovingpointsfromanalgorithmicperspective.Webaseoursolutionontheslicerepresentationofmovingpoints,whichrepresentsthetemporaldevelopmentofapointwithasequenceoftimelyorderedunitscalledslices.Weproposeathree-phasesolutionfordeterminingthedevelopmentsofthedirectionalrelationshipsbetweentwomovingpoints.Inatime-synchronizedintervalrenementphase,twomovingpointsarerenedbysynchronizingtheirtimeintervals.Asaresult,eachsliceunitoftherenedslicerepresentationoftherstmovingpointhasamatchingsliceunitintherenedslicerepresentationofthesecondmovingpointwiththetimeinterval.Inthesecondphase,thesliceunitdirectionevaluationphase,wepresentastrategyofcomputingcardinaldirectionsbetweentwosliceunitsfrombothmovingpoints.Finally,inthedirectioncompositionphase,thedevelopmentofthecardinaldirectionisdeterminedbycomposingcardinaldirectionscomputedfromallslicespairsfrombothmovingpoints. TheconceptwehaveintroducedinSection 3.2.2.2 servesasaspecicationfordescribingthechangingcardinaldirectionsbetweentwomovingpoints.However,issueslikehowtondcommonlifetimeintervalsandhowtosplitthemareleftopen.Inthissection,weovercometheissuesfromanalgorithmicperspective.Werstintroducetheunderlyingdatastructure,calledslicerepresentation,forrepresenting 182

PAGE 183

movingpoints.Thenweproposeathreephasestrategyincludingthetime-synchronizedintervalrenementphase,thesliceunitdirectionevaluationphase,andthedirectioncompositionphase. 4.4.1TheSliceRepresentationforMovingPoints Sincewetakethespecicationofthemovingpointdatatypein[ 34 39 ]asourbasis,werstreviewtherepresentationofthemovingpointdatatype.Accordingtothedenition,themovingpointdatetypedescribesthetemporaldevelopmentofacomplexpointobjectwhichmaybeapointcloud.However,wehereonlyconsiderthesimplemovingpointthatinvolvesexactlyonesinglepoint.Aslicerepresentationtechniqueisemployedtorepresentamovingpointobject.Thebasicideaistodecomposeitstemporaldevelopmentintofragmentscalledslices,wherewithineachslicethisdevelopmentisdescribedbyasimplelinearfunction.Asliceofasinglemovingpointiscalledaupoint,whichisapairofvalues(interval,unit-function).Theintervalvaluedenesthetimeintervalforwhichtheunitisvalid;theunit-functionvaluecontainsarecord(x0,x1,y0,y1)ofcoefcientsrepresentingthelinearfunctionf(t)=(x0+x1t,y0+y1t),wheretisatimevariable.Suchfunctionsdescribealinearlymovingpoint.Thetimeintervalsofanytwodistinctsliceunitsaredisjoint;henceunitscanbetotallyorderedbytime.Moreformally,letAbeasinglemovingpointrepresentation,interval=timetime,real4=realrealrealreal,andupoint=intervalreal4.ThenAcanberepresentedasanarrayofsliceunitsorderedbytime,thatis,A=h(I1,c1),(I2,c2),...,(In,cn)iwherefor1inholdsthatIi2intervalandci2real4containsthecoefcientsofalinearunitfunctionfi.Further,werequirethatIi
PAGE 184

(A)(B) Figure4-21. AnexampleoftheslicerepresentationsoftwosinglemovingpointsAandB(A),andthetime-synchronizedslicerepresentationoftwomovingpointsAandB(B) coefcientscA2describethemovementofAintheintervalsIA1andIA2respectively.ThenAisrepresentedasA=(IA1,cA1),(IA2,cA2).ThesnapshotsfA1(t2)andfA1(t4)ofthemovingpointAatthetimest2andt4arethestartandendpointsoftherstslice,andfA2(t4)andfA2(t6)arethestartandendpointsofthesecondslice.Similarly,themovingpointBcanberepresentedasB=(IB1,cB1),(IB2,cB2),(IB3,cB3)wherecB1,cB2,andcB3containthecoefcientsofthethreelinearfunctionsfB1,fB2,andfB3thatdescribethelinearmovementofBinitsthreesliceunits.IfthefunctionfAiorfBithatinasliceunitmapsatimeinstantttoapointvalueinAorBisnotimportant,weallowthenotationsA(t)andB(t)respectivelytoretrievethelocationofamovingpointAorBatthetimeinstantt. Further,weintroduceafewbasicoperationsforretrievinginformationfromtheslicerepresentation,whichwillbeusedbyouralgorithmlaterforcomputingcardinaldirectionsbetweenmovingpoints. Therstsetofoperationsisprovidedformanipulatingmovingpoints.Theget rst sliceoperationretrievestherstsliceunitinaslicesequenceofamovingpoint,andsetsthecurrentpositionto1.Theget next sliceoperationreturnsthenextsliceunitofthecurrentpositioninthesequenceandincrementsthecurrentposition.Thepredicateend of sequenceyieldstrueifthecurrentpositionexceedstheendoftheslicesequence.Theoperationcreate newcreatesanemptyMPointobjectwithan 184

PAGE 185

emptyslicesequence.Finally,theoperationadd sliceaddsasliceunittotheendoftheslicesequenceofamovingpoint. Thesecondsetofoperationsisprovidedforaccessingelementsinasliceunit.Theoperationget intervalreturnsthetimeintervalofasliceunit.Theoperationget unit functionreturnsarecordthatrepresentsthelinearfunctionofasliceunit.Thecreate sliceoperationcreatesasliceunitbasedontheprovidedtimeintervalandthelinearfunction. Basedontheslicerepresentationandthebasicoperations,wearenowreadytodescribeourstrategyforcomputingthecardinaldirectionsbetweentwomovingpoints. 4.4.2TheTime-synchronizedIntervalRenementPhase Sinceasliceisthesmallestunitintheslicerepresentationofmovingpoints,werstconsidertheproblemofcomputingcardinaldirectionsbetweentwomovingpointslices.Accordingtoourdenitionsin[ 21 ]thecardinaldirectionsonlymakesensewhenthesametimeintervalsareconsideredforbothmovingpoints.However,matching,i.e.,equal,sliceintervalscanusuallynotbefoundinbothmovingpoints.Forexample,inFigure 4-21 ,thesliceintervalIA1=[t2,t4]ofAdoesnotmatchanyofthesliceintervalsofB.AlthoughthesliceintervalIB1=[t1,t3]ofBoverlapswithIA1,italsocoversasub-interval[t1,t2]thatisnotpartofIA1,whichmakesthetwoslicesdenedinIA1andIB1incomparable.Thus,inordertocomputethecardinaldirectionsbetweentwomovingpointslices,atime-synchronizedintervalrenementforbothmovingpointsisnecessary. Weintroducealinearalgorithminterval syncforsynchronizingtheintervalsofbothmovingpoints.Theinputofthealgorithmconsistsoftwoslicesequencesmp1andmp2thatrepresentthetwooriginalmovingpoints,andtwoemptylistsnmp1andnmp2thatareusedtostorethetwonewintervalrenedmovingpoints.Thealgorithmperformsaparallelscanofthetwooriginalslicesequences,andcomputestheintersectionsbetweenthetimeintervalsfromtwomovingpoints.Onceanintervalintersectioniscaptured,twonewslicesassociatedwiththeintervalintersectionarecreatedfor 185

PAGE 186

bothmovingpointsandareaddedtothenewslicesequencesofthetwomovingpoints.LetI=[t1,t2]andI0=[t01,t02]denotetwotimeintervals,andletlower thandenotethepredicatethatcheckstherelationshipbetweentwointervals.Thenwehavelower than(I,I0)=trueifandonlyift2
PAGE 187

methodinterval sync(mp1,mp2,nmp1,nmp2)s1 get rst slice(mp1)s2 get rst slice(mp2)while!end of sequence(mp1)and!end of sequence(mp2)doi1 get interval(s1)i2 get interval(s2)i intersection(i1,i2)ifi6=;thenf1 get unit function(s1)f2 get unit function(s2)ns1 create slice(i,f1)ns2 create slice(i,f2)add slice(nmp1,ns1)add slice(nmp2,ns2)endififlower than(i1,i2)thens1 get next slice(mp1)elses2 get next slice(mp2)endifendwhileend 1 methodcompute dir dev(sl1,sl2)2 dev list emptylist3 s1 get rst slice(sl1)4 s2 get rst slice(sl2)5 slice dir list compute slice dir(s1,s2)6 append(dev list,slice dir list)7 whilenotend of sequence(sl1)8 andnotend of sequence(sl2)do9 (b,e) get interval(s1)10 s1 get next slice(sl1)11 s2 get next slice(sl2)12 (b new,e new) get interval(s1)13 ife
PAGE 188

Thedifcultyofcomputingcardinaldirectionsbetweentwosliceunitscomesfromthefactthatthepositionsofthemovingpointschangecontinuouslyinbothsliceunits.Amuchsimplerscenarioisthatonlyonesliceunitconsistsofamovingpoint,whereastheothersliceunitinvolvesnomovement.Inthissimplercase,thecardinaldirectionscanbeeasilydetermined.Thus,thegoalistondamappingthatmapstwosliceunitssuaandsubtotwonewsliceunitssu0aandsu0bthatsatisfythefollowingtwoconditions:(i)su0aandsu0bhavethesamecardinaldirectionsasunitssuaandsub,thatis,themappingisacardinaldirectionpreservingmapping;(ii)eithersu0aorsu0bdoesnotinvolvemovement. Inordertondsuchamappingfortwosliceunits,werstintroduceasimplecardinaldirectionpreservingmappingforstaticpoints.Letpandqdenotetwopointswithcoordinates(xp,yp)and(xq,yq).LetX(r)andY(r)denotethefunctionsthatreturnthex-coordinateandy-coordinateofapointr.WeestablishasimpletranslationmappingM(r)=(X(r))]TJ /F7 11.955 Tf 12.85 0 Td[(x0,Y(r))]TJ /F7 11.955 Tf 12.85 0 Td[(y0),wherex0andy0aretwoconstantvalues.Weshowthatthecardinaldirectionbetweenpandqispreservedbyapplyingsuchamapping. Lemma14. Givenp=(xp,yp),q=(xq,yq),themappingM(r)=(X(r))]TJ /F7 11.955 Tf 12.24 0 Td[(x0,Y(r))]TJ /F7 11.955 Tf 12.23 0 Td[(y0),whererisapointandx0andy0aretwoconstantvalues,andp0=M(p)andq0=M(q),wehavedir(p,q)=dir(p0,q0) Proof.AccordingtothedenitioninSection 3.2.2.2 ,thecardinaldirectiondir(p,q)betweentwopointspandqisbasedonthevalueofX(p))]TJ /F7 11.955 Tf 12.9 0 Td[(X(q)andthevalueofY(p))]TJ /F7 11.955 Tf 12.83 0 Td[(Y(q).SincewehaveX(p0))]TJ /F7 11.955 Tf 12.84 0 Td[(X(q0)=X(p))]TJ /F7 11.955 Tf 12.84 0 Td[(X(q)andY(p0))]TJ /F7 11.955 Tf 12.83 0 Td[(Y(q0)=Y(p))]TJ /F7 11.955 Tf 11.96 0 Td[(Y(q),weobtaindir(p,q)=dir(p0,q0).2 InFigure 4-23 A,twopointspandqaremappedtop0andq0,andthecardinaldirectionispreservedafterthemapping,i.e.,dir(p,q)=dir(p0,q0)=NW. Nowwearereadytodeneacardinaldirectionpreservingmappingfortwosliceunits.LetsuAandsuBdenotetwosliceunits(upointvalues)fromthetime-synchronizedmovingpointsAandBwheresuA=(I,cA)andsuB=(I,cB)withI2intervaland 188

PAGE 189

cA,cB2real4.LetfAandfBbethetwocorrespondinglinearunitfunctionswiththecoefcientsfromcAandcBrespectively.WeestablishthefollowingmappingMforaunitfunctionf2ffA,fBg:M(f)=f)]TJ /F7 11.955 Tf 11.96 0 Td[(fB WeshowinLemma 15 thatbymappingtheunitfunctionsoftheslicessuAandsuBtotwonewunitfunctions,thecardinaldirectionsbetweenthesliceunitssuAandsuBarestillpreserved. Lemma15. LetsuA=(I,cA)2upointandsuB=(I,cB)2upoint,andletfAandfBbethecorrespondinglinearunitfunctionswiththecoefcientsfromcA=(xA0,xA1,yA0,yA1)andcB=(xB0,xB1,yB0,yB1)respectively.WeconsiderthemappingM(f)=f)]TJ /F7 11.955 Tf 12.84 0 Td[(fB,wherefisalinearunitfunction,andthetranslatedupointvaluessuAt=(I,cAt)andsuBt=(I,cBt)wherecAtandcBtcontainthecoefcientsofM(fA)andM(fB)respectively.Then,thecardinaldirectionsbetweenthesliceunitssuAtandsuBtarethesameasthecardinaldirectionsbetweenthesliceunitssuAandsuB. Proof.LetI=[t1,t2],fA(t)=(xA0+xA1t,yA0+yA1t),andfB(t)=(xB0+xB1t,yB0+yB1t).ThenwehaveM(fA)=(xA0)]TJ /F7 11.955 Tf 12.43 0 Td[(xB0+(xA1)]TJ /F7 11.955 Tf 12.44 0 Td[(xB1)t,yA0)]TJ /F7 11.955 Tf 12.44 0 Td[(yB0+(yA1)]TJ /F7 11.955 Tf 12.43 0 Td[(yB1)t)andM(fB)=(0,0).Assumethereexistsatimet0(t1t0t2)suchthatdir(fA(t0),fB(t0))6=dir(M(fA)(t0),M(fB)(t0)).LetxB=xB0+xB1t0andyB=yB0+yB1t0denotetwoconstantvalues.SinceM(fA)(t0)=(xA0)]TJ /F7 11.955 Tf 12.48 0 Td[(xB0+(xA1)]TJ /F7 11.955 Tf 12.48 0 Td[(xB1)t0,yA0)]TJ /F7 11.955 Tf 12.48 0 Td[(yB0+(yA1)]TJ /F7 11.955 Tf 12.48 0 Td[(yB1)t0)andM(fB)(t0)=(0,0),wehaveM(fA)(t0)=(X(fA(t0)))]TJ /F7 11.955 Tf 12.48 0 Td[(xB,Y(fA(t0)))]TJ /F7 11.955 Tf 12.48 0 Td[(yB)andM(fB)(t0)=(X(fB(t0)))]TJ /F7 11.955 Tf 12.63 0 Td[(xB,Y(fB(t0)))]TJ /F7 11.955 Tf 12.62 0 Td[(yB).ThismatchesthecardinaldirectionpreservingmappingfunctionM(r)=(X(r))]TJ /F7 11.955 Tf 12.73 0 Td[(x0,Y(r))]TJ /F7 11.955 Tf 12.73 0 Td[(y0).Thus,theassumptiondir(fA(t0),fB(t0))6=dir(M(fA)(t0),M(fB)(t0))contradictstoLemma 14 .2 AfterapplyingthecardinaldirectionpreservingmappingM(f)tobothunitfunctionsfAandfB,wenowobtaintwonewunitfunctionsf0aandf0basfollows: gA(t)=M(fA)(t)=(xA0)]TJ /F7 11.955 Tf 11.95 0 Td[(xB0+(xA1)]TJ /F7 11.955 Tf 11.95 0 Td[(xB1)t,yA0)]TJ /F7 11.955 Tf 11.95 0 Td[(yB0+(yA1)]TJ /F7 11.955 Tf 11.95 0 Td[(yB1)t)gB(t)=M(fB)(t)=(0,0) 189

PAGE 190

(A)(B)(C) Figure4-23. Asimplecardinaldirectionpreservingmappingfromp,qtop0,q0(A),andacardinaldirectionpreservingmappingfromsliceunitA,B(B)toA0,B0(C). TheunitfunctiongAdescribesalinearmovementintheunitinterval,whiletheunitfunctiongBdescribesastaticpointthatholdsitspositionduringtheentireunitinterval.Inotherwords,suAismappedtoanewsliceunitsuAtwhichhasalinearmovement,andsuBismappedtoanewsliceunitsuBtthathasnomovementduringtheunitinterval.Figure 4-23 showsanexampleofmappingthesliceunitsAandBtosliceunitsA0andB0.Inthisexample,A=[I,cA]andB=[I,cB]whereI=[1,2],cAandcBcontainthecoefcientsofthetwounitfunctionsfAandfBrespectively,fA(t)=()]TJ /F4 11.955 Tf 9.29 0 Td[(5+6t,2+t)andfB(t)=()]TJ /F4 11.955 Tf 9.3 0 Td[(1+3t,)]TJ /F4 11.955 Tf 9.3 0 Td[(1+3t).Thus,A(t1)=fA(1)=(1,3),A(t2)=fA(2)=(7,4),B(t1)=fB(1)=(2,2),andB(t2)=fB(2)=(5,5).Afterapplyingthemapping,weobtaingA(t)=()]TJ /F4 11.955 Tf 9.3 0 Td[(4+3t,3)]TJ /F4 11.955 Tf 12.41 0 Td[(2t)andgB(t)=(0,0).Thus,A0(t1)=gA(1)=()]TJ /F4 11.955 Tf 9.3 0 Td[(1,1),A0(t2)=gA(2)=(2,)]TJ /F4 11.955 Tf 9.3 0 Td[(1),andB0(t1)=B0(t2)=(0,0). Sofar,wehavemanagedtoreducetheproblemofcomputingthecardinaldirectionsbetweentwomovingsliceunitstotheproblemofcomputingthecardinaldirectionsbetweenonemovingsliceunitandonestaticsliceunit.ThesecondstepistocomputethecardinaldirectionsbetweensuAtandsuBt. SincesuBtislocatedconstantlyat(0,0)duringthetimeintervalandsincethetrajectoryofsuAtisalinearfunctionwithrespecttotimet,weapplytheprojectionbasedapproachtodeterminingthecardinaldirections.TheideaistotakesuBtasthereferencepointandtocreatepartitionsbyusingthex-andy-coordinateaxes.ThenweprojectthesliceunitsuAttothexy-plane,andthecardinaldirectionsaredeterminedbythepartitions 190

PAGE 191

thatitstrajectoryintersects.Finally,thecardinaldirectionsareorderedaccordingtothetimewhentheyoccurredandarestoredintoalist.Forexample,thecardinaldirectionsbetweenA0andB0inFigure 4-23 BareNW,N,NE,E,andSE. 4.4.4TheDirectionCompositionPhase Finally,inthedirectioncompositionphase,weiteratethroughallsliceunits,composeallcardinaldirectionsthathavebeendetectedinsliceunits,andformacompletecardinaldirectionlistinthetemporalorder.Further,weremoveduplicatesbetweenconsecutivecardinaldirections. Weintroducethelinearalgorithmcompute dir devinFigure 4-22 forcomputingthenalcardinaldirectiondevelopment(line24)betweentwosynchronizedmovingpoints.Theinputofthealgorithmconsistsoftwolistsofslicessl1andsl2(line1)thatstemfromthetime-synchronizedintervalrenementphase.Sincethetwoslicelistsareguaranteedtohavethesamelength,thealgorithmtakesaslicefromeachlist(lines3,4,10and11),determinesthecardinaldirectionsforeachpairofslices(lines5and16),whichhavethesameunitinterval,andtraversesbothlistsinparallel(lines7and8).Fortwoconsecutivepairsofslices,wehavetocheckwhetherthesliceintervalsareadjacent(lines9,12,and13).Ifthisisnotthecase,weaddthelistwiththesingleelement?tothegloballistdev listinordertoindicatethatthecardinaldirectiondevelopmentisundenedbetweentwoconsecutivesliceintervals(lines13to15). Foreachpairofslices,thefunctioncompute slice dirdeterminestheircardinaldirectionsaccordingtothestrategydiscussedinSection 4.4.3 (lines5and16).Wemaintainalistslice dir listtokeepthesenewlycomputedcardinaldirectionsfromthecurrentslicepairandcompareitsrstcardinaldirectionwiththelastcardinaldirectionthathasbeencomputedfromthelastslicepairandisstoredinthegloballistdev list(lines17to19).Ifbothcardinaldirectionsarethesame,therstcardinaldirectionfromthelistslice dir listisremovedinordertoavoidduplicates(lines19to21).Thenewly 191

PAGE 192

computedcardinaldirectionsinthelistslice dir listareaddedtothegloballistdev list(lines6and22). Thealgorithmcompute dir devdeploysanumberofauxiliarylistfunctions.Thefunctionget rst in listreturnstherstelementinalist.Thefunctionget last in listreturnsthelastelementinalist.Thefunctionappendaddsalistgivenasitssecondargumenttotheendofanotherlistgivenasitsrstargument.Thefunctionremove rstremovestherstelementfromalist. Nowweanalyzethecomplexityofthealgorithmforfunctioncompute dir dev.Assumethattherstmovingpointmp1consistsofmslices,andthesecondmovingpointmp2consistsofnslices.Theinputsofthefunctioncompute dir devaretwolistsofslicesgeneratedfromthetime-synchronizedintervalrenementphase,thuseachlistcontainsatmostm+nslices.Thefunctioncompute dir deviteratethroughallslicesinbothlistandcomposethecardinaldirectionscomputed.SothetimecomplexityisO(m+n). 192

PAGE 193

CHAPTER5INTEGRATIONANDIMPLEMENTATIONOFTHREE-DIMENSIONALDATAINDATABASES Finally,withtheSpatialAlgebra3DattheAbstractLevel(SPAL3D-A)introducedinChapter 3 ,andtheSpatialAlgebra3DattheDiscreteLevel(SPAL3D-D)introducedinChapter 4 ,wenowexploreindetailshowour3Ddatamodelcanbeintegratedindatabases.Therearetwomaintasksinvolvedintheintegrationprocess,theintegrationof3DdataindatabasetablesandtheintegrationofoperationsandpredicatesinSQLlanguage. Thedatarepresentationsfor3Dobjectsareusuallystructuredandcomplex,andtheysupportsoperationslikeinsert,update,andsearchonitscomponents.Traditionaldatabasemanagementsystemsstoreandmanageeithersimplealphanumericaldataorunstructuredbyteleveldata,thusarenotdirectlysuitableforstoring3Ddata.Tobridgethisgap,inthischapter,weproposeagenericlowlevelframeworkforhandlinglarge,structured,complexobjectslike3Dvolumesinadatabasecontext,andshowthatitsupportsallrequiredoperationslikeinsert,updateandsearchatthecomponentlevel.Itisnecessarytoemphasisthatthegoalisnottodesignitonlyfor3Dspatialtypes,buttodesignitasagenericframeworkthatisbenecialtotheimplementationofalldatatypesthatdealwithlarge,structuredandcomplexobjects,examplesotherthan3Dvolumesarethe2Dregionsandmovinghurricanes. Thesecondtaskistoproperlydesignacollectionof3Doperationsand3Dpredicates,andintegratethemintotheSQLlanguagesothattheybecomeavailabletotheuserthroughthewellknowtextualSQLlanguage. 5.1Integrationof3DSpatialDataTypesinDatabases Manyeldsincomputerscienceareincreasinglyconfrontedwiththeproblemofhandlinglarge,variable-length,highlystructured,complexapplicationobjectsandenablingtheirstorage,retrieval,andupdatebyapplicationprogramsinauser-friendly,efcient,andhigh-levelmanner.Examplesofsuchobjectsincludebiologicalsequence 193

PAGE 194

data,spatialdata,spatiotemporaldata,multimediadata,andimagedata,justtonameafew.Traditionaldatabasemanagementsystems(DBMS)arewellsuitedtostoreandmanagelarge,unstructuredalphanumericdata.However,storingandmanipulatinglarge,structuredapplicationobjectsatthelowbytelevelaswellasprovidingoperationsonthemarehardlysupported.Binarylargeobjects(BLOBs)aretheonlymeanstostoresuchobjects.However,BLOBsrepresentthemaslow-level,binarystringsanddonotpreservetheirstructure.Asaresult,thisdatabasesolutionturnsouttobeunsatisfactory.Thus,weproposeanoveltwo-stepsolutiontomanageandqueryapplicationobjectswithindatabases. Section 5.1.1 describesrelevantresearchrelatedtothestorageandmanagementofstructuredobjects.InSection 5.1.2 ,wedescribetheapplicationsthatinvolvelargestructuredapplicationobjects,theexistingapproachestohandlingthem,andourapproachtodealingwithstructuredobjectsinadatabasecontext.InSection 5.1.3 ,weintroducetheconceptoftypestructurespecicationandtheiBLOBframework.Finally,weevaluatetheiBLOBperformancebasedonrealdatasets. 5.1.1ExistingApproachesforHandlingStructuredObjects Theneedforextensibilityindatabases,ingeneral,andfornewdatatypesindatabases[ 95 ],inparticular,hasbeenthetopicofextensiveresearchfromthelateeighties.Inthissection,wereviewworkrelatedtothestorageandmanagementofstructuredlargeapplicationobjects.Thefourmainapproachescanbesubdividedintospecializedleformats,newDBMSprototypes,traditionalrelationalDBMS,andobject-orientedextensibilitymechanismsinDBMS. Thespecializedleformatscanbefurthercategorizedintotextformatsandbinaryformats[ 69 ].TextformatsorganizedataasastreamofUnicodecharacterswhereasbinaryformatsstorenumbersinnativeformats.XML[ 15 ]isauniversalstandardtextdataformatprimarilymeantfordataexchange.Acriticalissuewithalltextdataformatsisthattheymakethedatastructurevisibleandthatonecannotrandomlyaccessspecic 194

PAGE 195

subcomponentdatainthemiddleofthele.ThewholeXMLlehastobeloadedintothemainmemorytoextractthedataportionofinterest.Moreover,themethodsusedtodenethelegalstructureforaXMLdocumentsuchasDocumentTypeDenition(DTD)andXMLSchemaDenition(XSD)haveseveralshortcomings.DTDlackssupportfordatatypesandinheritance,whileXSDisreallyover-verboseandunintuitivewhendeningcomplexhierarchicalobjects.Ontheotherhand,binarydataformatslikeNetCDF[ 69 85 ]andHDF[ 1 69 ]supportrandomaccessofsubcomponentdata.Butupdatinganexistingstructureisnotexplicitlysupportedinbothformats.Further,sinceHDFstoresalargeamountofinternalstructuralspecications,thesizeofaHDFleisconsiderablylargerthanaatstorageformat.Further,theseleformatsdonotbenetfromDBMSpropertiessuchastransactions,concurrencycontrol,andrecovery. ThesecondapproachtostoringlargeobjectsisthedevelopmentofnewDBMSprototypesasstandalonedatamanagementsolutions.TheseincludesystemssuchasBSSS[ 53 ],DASDBS,[ 87 ],EOS[ 11 ],Exodus[ 18 ],Genesis[ 7 ],andStarburst[ 51 ].Thesesystemsoperateonvariable-length,uninterpretedbytesequencesandofferlow-levelbyterangeoperationsforinsertion,deletion,andmodication.However,thesesystemsdonotmanagestructuralinformationoflargeapplicationobjectsandarehenceunabletoproviderandomaccesstoobjectcomponents. ThethirdapproachtakentostorelargeobjectsistheuseoftablesandBLOBsintraditionalobject-relationaldatabasemanagementsystems.Anyhierarchicalstructurewithinanobjectcanbeincorporatedintablesusingaseparateattributecolumnthatcross-referencestupleswiththeirprimarykeys.SomedatabasesuchasOracleevensupporthierarchicalSQLqueriesonsuchtables.However,thedrawbackofthismethodisthatthequeryingbecomesunintuitiveandhastobesupportedbycomplexprocedurallanguagefunctionsinsidethedatabase.Further,thesequeriesareslowbecauseoftheneedofmultiplejoinsbetweentables.BinaryLargeOBjects(BLOBs)provideanothermeanstostorelargeobjectsindatabases.However,thisisamechanismforstoring 195

PAGE 196

Figure5-1. Aregionobjectasanexampleofacomplex,structuredapplicationobject.ItcontainsthefacesF1,F2,andF3,whichconsistofthecyclesC1andC2forF1,C3forF2,andC4forF3. unstructured,binarydata.Hence,theentireBLOBhastobeloadedintomainmemoryeachtimeforprocessingpurposes. Thefourthapproachtostoringlargeobjectsistheuseofobject-orientedextensionmechanismsindatabases.MostpopularDBMSsupporttheCREATETYPEconstructtocreateuser-deneddatatypes.However,thetypeconstructorsprovided(likearrayconstructors)donotallowtocreatelargeandvariable-lengthapplicationobjects. 5.1.2ProblemswithHandlingStructuredObjectsinDatabasesandOurAp-proach ApplicationobjectslikeDNAstructures,3Dbuildings,andspatialregionsarecomplex,highlystructured,andofvariablerepresentationlength.Thedesiredoperationsontheapplicationobjectsusuallyinvolvehighcomplexity,longexecutiontimeandlargememory.Forexample,regionobjectsarecomplexapplicationobjectsthatarefrequentlyusedinGISapplications.AsshowninFigure 5-1 ,aregionobjectconsistsofcomponentscalledfaces,andfacesareenclosedbycycles.Eachcycleisaclosedsequenceofconnectedsegments.Applicationsthatdealwithregionsmightbeinterestedinnumericoperationsthatcomputethearea,theperimeterandthenumberoffacesofaregion.Theymightalsobeinterestedingeometricoperationsthatcomputetheintersection,union,anddifferenceoftworegions.Manymoreoperationsonregionsarerelevanttoapplicationsthatworkwithmapsandimages.Inanycase,theimplementationofanoperationrequireseasyaccesstocomponentsofstructured 196

PAGE 197

(A)(B)(C) Figure5-2. Threemodelingarchitectures.Thelayeredarchitecture(A),theintegratedarchitecture(B)andoursolution(C). objects(e.g.,segments,cycles,andfacesofaregion)thatuseslessmemoryandrunsinlesstime. Sincedatabasesystemsprovidebuilt-inadvancedfeaturesliketheSQLquerylanguage,transactioncontrol,andsecurity,handlingcomplexobjectsinadatabasecontextisanexpedientstrategy.Mostapproachesarebuiltupontwoimportantarchitecturesthatenabledatabasesupportforapplicationsinvolvingcomplexapplicationobjects. EarlyapproachesapplyalayeredarchitectureasshowninFigure 5-2 A,inwhichamiddlewarethathandlescomplexapplicationobjectsisclearlyseparatedfromtheapplicationfront-endthatprovidesservicesandanalysismethodstoitsusers.Inthisarchitecture,onlytheunderlyingprimitivedataarephysicallystoredintraditionalRDBMStables.Theknowledgeaboutthestructureofcomplexobjectsismaintainedinthemiddleware.Itistheresponsibilityofthemiddlewaretoloadtheprimitivedatafromtheunderlyingdatabasetables,toreconstructcomplexobjectsfromtheprimitivedata,andtoprovideoperationsoncomplexobjects.TheunderlyingDBMSinthelayeredarchitecturedoesnotunderstandthesemanticsofthecomplexdatastored.Inthissense,thedatabaseisoflimitedvalue,andtheburdenisontheapplicationdeveloperto 197

PAGE 198

implementamiddlewareforhandlingcomplexobjects.Thiscomplicatesandslowsdowntheapplicationdevelopmentprocess. Alargelyacceptedapproachistomodelandimplementcomplexdataasabstractdatatypes(ADTs)inatypesystem,oralgebra,whichisthenembededintoanextensibleDBMSanditsquerylanguage.Thisapproachemploysanintegratedarchitecture(Figure 5-2 B),wheretheapplicationsdirectlyinteractwiththeextendeddatabasesystem,andusetheADTsasattributedatatypesinadatabaseschema.SomecommercialdatabasevendorslikeOracleandPostgreshaveincludedsomeADTslikespatialdatatypesasbuilt-indatatypesintheirdatabaseproducts.ExtensibleDBMSprovidesuserstheinterfacesforimplementingtheirownADTsothatalltypesofapplicationscanbesupported.SincetheonlyavailabledatastructureforstoringcomplexobjectswithvariablelengthisBLOB,theimplementationsofADTsforcomplexobjectsaregenerallybasedonBLOBs.Theimplementationofanabstractdatatypeinvolvesthreetasks,thedesignofbinaryrepresentation,theimplementationofcomponentretrievalandupdate,andtheimplementationofhighleveloperationsandpredicates. Theintegratedarchitecturehasobviousadvantages.Ittransferstheburdenofhandlingcomplexobjectsfromtheapplicationdevelopertodatabases.Onceabstractdatatypesaredesignedandintegratedintoadatabasecontext,applicationsthatdealwithcomplexobjectsbecomestandarddatabaseapplications,whichrequirenospecialtreatment.Thissimpliesandspeedsupthedevelopmentprocessforcomplexapplications.However,thedrawbackofthisapproachisthatADTsforstructuredapplicationobjectsrelyontheunstructuredBLOBtype,whichprovidesonlybyteleveloperationsthatcomplicate,orevenfoil,theimplementationofcomponentretrievalandupdate.Bytemanipulationisaredundantandtedioustaskfortypesystemimplementerswhowanttoimplementahigh-leveltypesystembecausetheywanttofocusonthedesignofthedatatypesandthealgorithmsforthehigh-leveloperationsandpredicates. 198

PAGE 199

Inthispaper,weproposeanewconceptthatextendstheintegratedarchitectureapproach,providesthetypesystemimplementerswithahighlevelaccesstocomplexobjects,andiscapableofhandlinganystructuredapplicationobjects.Inourconcept,weapplytheintegratedarchitectureapproachandextenditwithageneralizedframework(Figure 5-2 C)thatconsistsoftwocomponents,thetypestructurespecication(Section 5.1.3.1 )andtheintelligentBLOBconcept(Section 5.1.3.2 ).Thetypestructurespecicationconsistsofalgebraicexpressionsthatareusedbytypesystemimplementerstospecifytheinternalhierarchyoftheabstractdatatype.ItislaterusedasthemetadatafortheintelligentBLOBtoidentifythesemanticmeaningofeachstructurecomponent.Further,aspartofthetypestructurespecicationweprovideasetofhigh-levelfunctionsasinterfacesfortypesystemimplementerstocreate,access,ormanipulatedataatthecomponentlevel.Tosupportthecorrespondinginterfaces,weproposeagenericstoragemethodcalledintelligentBLOB(iBLOB),whichisabinaryarraywhoseimplementationisbasedontheBLOBtypeandwhichmaintainshierarchicalinformation.Itisintelligentbecause,unlikeBLOBs,itunderstandsthestructureoftheobjectstoredandsupportsfastaccess,insertionandupdatetocomponentsatanylevelintheobjecthierarchy. Thetypestructurespecicationintheframeworkprovidesanabstractviewoftheapplicationobjectwhichhidestheimplementationdetailsoftheunderlyingdatastructure.TheunderlyingintelligentBLOBsensureagenericstoragesolutionforanykindsofstructuredapplicationobjects,andenabletheimplementationofthehigh-levelinterfacesprovidedbythetypestructurespecication.Therefore,thetypestructurespecicationandtheconceptofintelligentBLOBstogetherenableaneasyimplementationforabstractdatatypes.typesystemimplementerscanbereleasedfromthetaskofinterpretingthelogicalsemanticsofbinaryunstructureddata,andthecomponentlevelaccessisnativelysupportedbytheunderlyingiBLOB. 199

PAGE 200

5.1.3iBlob:ABlob-basedGenericTypeSystemImplementation Inthissection,wepresentanovel,genericmodelforcomplexobjectmanagementthatfocusesonprovidingtherequiredfunctionalitytoaddressthedatamanagement,generality,abstraction,andupdateproblems.Werstproposeageneralizedmethod,namedtypestructurespecication,forrepresentingandinterpretingthestructureofapplicationobjects.ThisspecicationprovidesaninterfacefortheADTimplementertodescribethestructureofcomplexobjectsattheconceptuallevel.Basedonthisspecication,weemployageneralizedframework,calledintelligentbinarylargeobjects(iBLOBs),fortheefcientandhigh-levelstorage,retrieval,andupdateofhierarchicallystructuredcomplexobjectsindatabases.iBLOBsstorecomplexobjectsbyutilizingtheunstructuredstoragecapabilitiesofDBMSandprovidecomponent-wiseaccesstothem.Inthissense,theyserveasacommunicationbridgebetweenthehigh-levelabstracttypesystemandthelow-levelbinarystorage.Thisframeworkisbasedontwoorthogonalconceptscalledstructuredindexandsequenceindex.AstructuredindexfacilitatesthepreservationofthestructuralcompositionofapplicationobjectsinunstructuredBLOBstorage.AsequenceindexisamechanismthatpermitsfullsupportofrandomupdatesinaBLOBenvironment. 5.1.3.1TypeStructureSpecications Thestructuresofdifferentapplicationobjectscanvary.Examplesarethestructureofaregion(Figure 5-1 )andthestructureofabook.Weaimatdevelopingagenericplatformthataccommodatesallkindsofhierarchicalstructures.Thus,therststepistoexploreandextractthecommonpropertiesofallstructuredobjects.Unsurprisingly,thehierarchyofastructuredobjectcanalwaysberepresentedasatree.Figure 5-3 Ashowsthetreestructureofaregionobject.Inthegure,face[],holeCycle[],andsegment[]representalistoffaces,alistofholecyclesandalistofsegmentsrespectively.Inthetreerepresentation,therootnoderepresentsthestructuredobjectitself,andeachchildnoderepresentsacomponentnamedsub-object.Asub-objectcanfurtherhave 200

PAGE 201

(A)(B) Figure5-3. Thehierarchicalstructureofaregionobjectandthehierarchicalstructureofabookobject. astructure,whichisrepresentedinasub-treerootedwiththatsub-objectnode.Forexample,aregionobjectinFigure 5-3 Aconsistsofalabelcomponentandalistoffacecomponents.Eachfaceinthefacelistisalsoastructuredobjectthatcontainsafacelabel,anoutercycle,andalistofholecycles,whereboththeoutercycleandtheholecyclesareformedbysegmentslists.Similarly,thestructureofabookcanalsoberepresentedasatree(Figure 5-3 B). Further,weobservethattwotypesofsub-objectscanbedistinguishedcalledstructuredobjectsandbaseobjects.Structuredobjectsconsistofsub-objects,andbaseobjectsarethesmallestunitsthathavenofurtherinnerstructure.Inatreerepresentation,eachleafnodeisabaseobjectwhileinternalnodesrepresentstructuredobjects. Atreerepresentationisausefultooltodescribehierarchicalinformationataconceptuallevel.However,togiveamoreprecisedescriptionandtomakeitunderstandabletocomputers,aformalspecicationwouldbemoreappropriate.Therefore,weproposeagenerictypestructurespecicationasanalternativeofthetreerepresentationfordescribingthehierarchicalstructureofapplicationobjects. Werstintroducetheconceptofstructureexpressions.Structureexpressionsdenethehierarchyofastructuredobject.Astructureexpressioniscomposedofstructuretags(TAGs)andstructuretaglists(TAGLISTs).Astructuretag(TAG)providesthedeclarationforasinglecomponentofastructuredobject,whereasastructuretag 201

PAGE 202

list(TAGLIST)providesthedeclarationforalistofcomponentsthathavethesamestructure.ThedeclarationofaTAG,namedtagdeclaration,ishNAME:TYPEi,whereNAMEistheidentierofthetagandthevalueofTYPEiseitherSO,whichisaagthatindicatesastructuredobject,orBO,whichisaagthatindicatesabaseobject.Anexampleofastructuredobjecttagishregion:SOi,andhsegment:BOiisanexampleofabaseobjecttag.Werstdeneasetofterminalsthatwillbeusedinstructureexpressionsasconstants.Then,weshowthesyntaxofstructureexpressions. TerminalSetS=f:=,h,i,j,[,],SO,BO,:g Expression::=TAG:=hTAGjTAGLISTi+;TAGLIST::=TAG[]TAG::=hNAME:TYPEiTYPE::=hSOjBOiNAME::=IDENTIFIER Intheregionexample,wecandenethestructureofaregionobjectwiththefollowingexpression:hregion:SOi:=hregionLabel:BOihface:SOi[].Intheexpression,theleftsideof:=givesthetagdeclarationofaregionobjectandtherightsideof:=givesthetagdeclarationsofitscomponents,inthiscase,theregionlabelandthefacelist.Thus,wesaytheregionobjectisdenedbythisstructureexpression. Withstructureexpressions,thetypesystemimplementercanrecursivelydenethestructureofstructuredsub-objectsuntilnostructuredsub-objectsareleftundened.Alistofstructureexpressionsthenformsaspecication.Wecallaspecicationthatconsistsofstructureexpressionsandisorganizedfollowingsomerulesatypestructurespecication(TSS)foranabstractdatatype.Threerulesaredesignedtoensurethecorrectnessandcompletenessofatypestructurespecicationwhenwritingstructureexpressions:(1)therststructureexpressioninaTSSmustbetheexpressionthatdenestheabstractdatatypeitself(correctness);(2)everystructuredobjectinaTSShastobedenedwithoneandonlyonestructureexpression(completenessand 202

PAGE 203

uniqueness);(3)noneofthebaseobjectsinaTSSisdened(correctness).Byfollowingtheserules,thetypesystemimplementercanwriteonetypestructurespecicationforeachabstractdatatype.Further,itisnotdifculttoobservethattheconversionbetweenatreerepresentationandatypestructurespecicationissimple.TherootnodeinatreemapstotherststructureexpressionintheTSS.Sinceallinternalnodesarestructuredsub-objectsandleafnodesarebasesub-objects,eachinternalnodehasexactlyonecorrespondingstructureexpressionintheTSS,andleafnodesrequirenostructureexpressions.ThetypestructurespecicationoftheabstractdatatyperegioncorrespondingtothetreestructureinFigure 5-3 Aisasfollows: hregion:SOi:=hregionLabel:BOihface:SOi[];hface:SOi:=hfaceLabel:BOihouterCycle:SOihholeCycle:SOi[];houterCycle:SOi:=hsegment:BOi[];hholeCycle:SOi:=hsegment:BOi[]; Thenextstepafterspecifyingthestructureistocreateandstoretheapplicationobjectintothedatabase.TheTSSprovidesaworkableinterfaceforthetypesystemimplementertocreate,accessandnavigatethroughtheobject.Thishigher-levelinterfaceistheabstractionoftheiBLOBinterface.Thisabstractionalongwiththespecication,freesthetypesystemimplementerfromunderstandingtheunderlyingdatatypeiBLOBthatisusedfornallyrepresentingtheapplicationobjectinthedatabase.Navigatingthroughthestructureoftheobjectisdonebyspecifyingapathfromtheroottothenodebyastringusingthedot-notation.Forexample,topointtotherstsegmentoftheoutercycleofthethirdfaceofaregionobjectcanbespeciedbythestringregion.face[3].outerCycle.segment[1].Acomponentnumber(e.g.,rstsegment,thirdface)isdeterminedbythetemporalorderwhenacomponentwasinserted.Animportantpointtomentionisthatthestructuralvalidityofapath(e.g.,whetheranoutercycleisasubcomponentofaface)canbeveriedbyparsingtheTSS.However,the 203

PAGE 204

existenceofathirdfacecanonlybedetectedduringruntime.Thesetofoperatorswhicharedenedbytheinterfacearegivenbelow: create:!SOget:path!BO[]set:path!boolset:pathchar!boolbaseObjectCount:path!intsubObjectCount:path!int Anapplicationobjectcanbecreatedbytheoperatorcreate()whichgeneratesanemptyapplicationobject.Theoperatorget(p)returnsallbaseobjectsatleafnodesunderthenodespeciedbyanyvalidpathp.Sincenodatatypesaredenedforthestructuredobjectsinintermediatenodes,theseobjectsarenotaccessible,andpathstothemareundened.Hence,pathstointermediatenodesareinterpreteddifferentlyinthesensethattheoperatorget(p)recursivelyidentiesandreturnsallbaseobjectsunderp.Theoperatorset(p)createsanintermediatecomponent.Theoperatorset(p,s)insertsabaseobjectgivenasacharacterstringsatthelocationspeciedbythepathp.ThelasttwooperatorsbaseObjectCount(p)andsubObjectCount(p)returnthenumberofbaseobjectsandthenumberofsub-objectsunderanodespeciedbythepathp.Asanexample,foraregionobjectwithonefacethatcontainsanoutercyclewiththreesegments,thecorrespondingcodeforcreatingtheregionobjectisgivenbelow: regionr=create();r.set(region.regionLabel,"MyRegion");r.set(region.face[1]);r.set(region.face[1].faceLabel,"Face1");r.set(region.face[1].outerCycle);r.set(region.face[1].outerCycle.segment[1],seg1);r.set(region.face[1].outerCycle.segment[2],seg2);r.set(region.face[1].outerCycle.segment[2],seg3); Therstlineofthecodeshowshowthetypesystemimplementercancreatearegionobjectbasedonthespeciedtypestructurespecication.Thesecondline 204

PAGE 205

Figure5-4. IllustrationofaniBLOBobjectconsistingofastructureindexandasequenceindex. createstherstfaceandthethirdlineitsoutercycleasintermediatecomponents.Thefollowingthreelinesstorethethreesegmentsseg1,seg2,seg3ascomponentsoftheoutercycle. 5.1.3.2IntelligentBinaryLargeObjects(iBLOB) Inthissection,wepresenttheconceptualframeworkforanewdatabasedatatypecallediBLOBforIntelligentBinaryLargeObjects.Thistypeenhancesthefunctionalityoftraditionalbinarylargeobjects(BLOBs)indatabasesystems.BLOBsservecurrentlyastheonlymeanstostorelargeobjectsinDBMS.However,theydonotpreservethestructureofapplicationobjectsanddonotprovideaccess,updateandqueryfunctionalityforthesub-componentsoflargeobjects.iBLOBshelptosmartlyextendtraditionalBLOBsbypreservingtheobjectstructureinternallyandprovidingapplication-friendlyaccessinterfacestotheobjectcomponents.Allthisisachievedwhilemaintaininglowlevelaccesstodataandextendingexistingdatabasesystemsusingobject-orientedconstructsandabstractdatatypes(ADTs). TheiBLOBframeworkconsistsoftwomainsectionscalledthestructureindexandthesequenceindex(Figure 5-4 ).Therstsectioncontainsthestructureindexwhichhelpsusrepresenttheobjectstructureaswellasthebasedata.Thesecondsectioncontainsthesequenceindexthatdictatesthesequentialorganizationofobjectfragmentsandpreservesitunderupdates.SincetheunderlyingstoragestructureofaniBLOBisprovidedthroughaBLOB,whichisavailableinmostDBMSs,theiBLOBdatatypecanberegisteredasauser-deneddatatypeandbeusedinSQL. iBLOBstructureindex:preservingstructureinunstructuredstorage 205

PAGE 206

Astructureindexisamechanismthatallowsanarbitraryhierarchicalstructuretoberepresentedandstoredinanunstructuredstoragemedium.Itconsistsoftwocomponentsfor,rst,therepresentationofthestructureofthedataand,second,theactualdatathemselves.Thestructuralcomponentisusedasareferencetoaccessthedata'sstructuralhierarchy.Themechanismisnotintendedtoenforceconstraintsonthedatawithinit;thus,ithasnoknowledgeofthesemanticsofthedatauponwhichitisimposed.Thisconceptconsidershierarchicallystructuredobjectsasconsistingofanumberofvariable-lengthsub-objectswhereeachsub-objectcaneitherbeastructuredobjectorabaseobject.Withineachstructuredobject,itssub-objectsresideinsequentiallynumberedslots.Theleavesofthestructurehierarchycontainbaseobjects. Toillustratetheconceptofastructureindex,weshowanexamplehowtostoreaspatialregionobjectwithaspecicstructureinadatabase.AregiondatatypemaybedescribedbyahierarchicalstructureasshowninFigure 5-3 A.Consideraregionmadeupofseveralfaces.Ifweneededtoaccessthe50thfaceofaregionobjectusingatraditionalBLOBstoragemechanism,onewouldhavetoloadandsequentiallytraversetheentireBLOBuntilthedesiredfacewouldbefound.Further,sincethefaceobjectscanbeofvariablelength,thelocationofthe50thfacecannotbeeasilycomputedwithoutextrasupportbuiltintotheBLOB.InordertoavoidanundesirablesequentialtraversaloftheBLOB,weintroducethenotionofoffsetstodescribestructure.EachhierarchicallevelofastructureinastructureindexstoredinaBLOBismadeupoftwocomponents(correspondingtothetwocomponentsofthegeneralstructureindexdescribedabove).Therstcomponentcontainsoffsetsthatrepresentthelocationofspecicsub-objects.Thesecondcomponentrepresentsthesub-objectsthemselves.Wedeneoffsetstohaveaxedsize;thus,thelocationoftheithfacecanbedirectlydeterminedbyrstcalculatingthelocationoftheithoffsetandthenreadingtheoffsettondthelocationoftheface.Figure 5-5 showsastructuredobjectwithinternaloffsets. 206

PAGE 207

Figure5-5. Astructuredobjectconsistingofnsub-objectsandninternaloffsets Figure5-6. Astructuredobjectconsistingofabaseobjectandstructuredsub-objects Therecursivenatureofhierarchicalstructuresallowsustogeneralizetheabovedescription.Eachsub-objectcanitselfhaveastructureliketheregiondescribedabove.Objectsatthesamelevelarenotrequiredtohavethesamestructure;thus,atanygivenlevelitispossibletondbothstructuredsub-objectsandbaseobjects(rawdata).Forexample,wecanextendthestructureofaregionobjectsothatitismadeupofacollectionoffaceseachofwhichcontainsanoutercycleandzeroormoreholecycles,whichinturnaremadeupofacollectionofsegments.Segmentscanbeimplementedasapairof(x,y)-coordinatevalues.ThisexampleisillustratedintermsofstructuredandbaseobjectsinFigure 5-6 wherethetoplevelobjectrepresentsaregionwithaninformationpart,alabel,andoneofitsfacesub-objects. Ingeneral,aspecicstructureindeximplementationmustbedenedwithrespecttotheunderlyingunstructuredstoragemedium.BecausewehavetouseBLOBsastheonlyalternativeinadatabasecontext,weareforcedtoembedboththestructureindexandthedataintoaBLOB.Thus,usinganoffsetstructureembeddedwithinthedataitselfisanappropriatesolution.However,thismaynotbeidealinallcases.Forinstance,onecouldimplementastructureindexfordatastoredinatles.Inthiscase,thestructureindexandthedatacouldberepresentedinseperateles.Ingeneral,the 207

PAGE 208

Figure5-7. Anout-of-ordersetofdatablocksandtheircorrespondingsequenceindex structureindexconceptmustbeadaptedtothecapabilitiesoftheuser'sdesiredstoragemediumforimplementation. iBLOBsequenceindex:trackingdataorderforupdates DifferentDBMSsprovidedifferentimplementationsoftheBLOBtypewithvariedfunctionalities.However,mostadvancedBLOBimplementationssupportthreeoperationsatthebytelevel,namely,randomreadandappend(writebytesatendofBLOB),truncate(deletebytesatend)andoverwrite(replacebyteswithanotherblockofbytesofthesameorsmallerlength). Structuredlargeobjectsrequiretheabilitytoupdatesub-objectswithinastructure.Specically,theyrequirerandomupdateswhichincludeinsertion,deletionandtheabilitytoreplacedatawithnewdataofarbitrarysize.Examplesarethereplacementofasegmentbyseveralsegmentsinacycleofaregionobject,oraddinganewface.Givenalargeregionobject,updatingitentirelyforeachchangeinaface,cycleorsegmentbecomesverycostlywhenstoredinBLOBs(updateproblem).Thus,itisdesirabletoupdateonlythepartofthestructurethatneedsupdating.Forthispurpose,wepresentanovelsequenceindexconceptthatisbasedontherandomreadanddataappendoperationssupportedbyBLOBsExtracapabilitiesprovidedbyhigherlevelBLOBsareafurtherimprovementandserveforoptimizationpurposes.ThesequenceindexconceptisbasedontheideaofphysicallystoringnewdataattheendofaBLOBandprovidinganindexthatpreservesthelogicallycorrectorderofdata. Consequently,datawillhaveinternalfragmentationandwillbephysicallystoredout-of-order,asillustratedinFigure 5-7 .Inthisgure,thedatablocks(withstartandendbyteaddressesrepresentedbylettersundereachboundary)representingfacesshould 208

PAGE 209

Figure5-8. Theinitialin-orderanddefragmenteddataandsequenceindex. bereadintheorder1,2,3,4,eventhoughphysicallytheyarestoredout-of-orderintheBLOB(wewillstudythepossiblereasonsshortly).Byusinganorderedlistofphysicalbyteaddressranges,thesequenceindexspeciestheorderinwhichthedatashouldbereadforsequentialaccess.ThesequenceindexfromFigure 5-7 indicatesthattheblock[i...j]mustbereadrst,followedbytheblock[l...m],etc. Basedonthegeneraldescriptionofthesequenceindexgivenabove,wenowshowhowtoapplyitasasolutiontotheupdateproblem.AssumethatthedataforagivenstructuredobjectisinitiallystoredsequentiallyinaBLOB,asshowninFigure 5-8 .Supposefurtherthattheuserthenmakesaninsertionatpositionkinthemiddleoftheobject.InsteadofshiftingdataafterpositionkwithintheBLOBtomakeroomforthenewdata,weappendittotheBLOBasblock[j...l],asshowninFigure 5-9 .Bymodifyingthesequenceindextoreecttheinsertion,weareabletolocatethenewdataatitslogicalpositionintheobject. Figure 5-10 illustratesthebehaviorofthesequenceindexwhenablockisintendedtobedeletedfromthestructuredobject.EventhoughthereisnonewdatatoappendtotheBLOB,thesequenceindexmustbeupdatedtoreectthenewlogicalsequence.BecausetheBLOBdoesnotactuallyallowforthedeletionofdata,thesequenceindexismodiedinordertopreventaccesstothedeletedblock[m...n]ofdata.ThiscanresultininternalfragmentationofdataintheiBLOBwhichcanbemanagedusingaspecialresequenceoperationshownlaterintheiBLOBinterface. Figure5-9. Asequenceindexafterinsertingblock[j...l]atpositionk. 209

PAGE 210

Figure5-10. Asequenceindexafterdeletingblock[m...n]. Finally,Figure 5-11 illustratesthecaseofanupdatewherethevaluesofablockofdata[o...p]asaportionofblock[j...l]arereplacedwithvaluesfromanewblock[l...q].Forthiskindofupdate,itispossibleforthenewsetofvaluestogenerateablocksizedifferentfromthatoftheoriginalblockbeingreplaced. Figure5-11. Asequenceindexafterreplacingblock[o...p]byblock[l...q]. iBLOBsenhanceBLOBsbyprovidingsupportfortruncateandoverwriteoperationsatthehighercomponentlevelofanapplicationobject'sstructure.ThetruncateoperationinBLOB(deletebytesatend)isenhancediniBLOBwitharemovefunctionwhichcanperformdeletionofcomponentsatanylocation(beginning,middleorattheendofstructure)asshowninFigure 5-10 .TheoverwriteoperationinBLOB(replacebytearraywithanotherofsamelength)isenhancediniBLOBwithacombinationofremoveandinsertfunctionsandsequenceindexadjustments,toperformtheoverwriteofcomponentswithothercomponentsofdifferentsizesasshowninFigure 5-10 TheiBLOBinterface Inthissection,wepresentagenericinterfaceforconstructing,retrievingandmanipulatingiBLOBs.WithinthisiBLOBinterface,weassumetheexistenceofthefollowingdatatypes:theprimitivetypeIntforrepresentingintegers,Storageasastoragestructurehandletype(i.e.,blobhandle,ledescriptor,etc.),LocatorasareferencetypeforaniBLOBoranyofitssub-objects,StreamasanoutputchannelforreadingbyteblocksofarbitrarysizefromaniBLOBobjectoranyofitssub-objects,and 210

PAGE 211

create:!iBLOB (5)create:Storage!iBLOB (5)create:iBLOB!iBLOB (5)copy:iBLOBiBLOB!iBLOB (5)locateiBLOB:iBLOB!Locator (5)locate:iBLOBLocatorInt!Locator (5)getStream:iBLOBLocator!Stream (5)insert:iBLOBdataIntLocatorInt!iBLOB (5) insert:iBLOBiBLOBLocatorInt!iBLOB (5)remove:iBLOBLocatorInt!iBLOB (5)append:iBLOBdataIntLocator!iBLOB (5)append:iBLOBiBLOBLocator!iBLOB (5)length:iBLOBLocator!Int (5)count:iBLOBLocator!Int (5)resequence:iBLOB!iBLOB (5) Figure5-12. ThestandardizediBLOBinterface dataasarepresentationofabaseobject.Figure 5-12 liststheoperationsofferedbytheinterface.Weusetheterml-referencedobjecttoindicatetheobjectthatisreferredtobyagivenlocatorl.Thefollowingdescriptionsfortheseoperationsareorganizedbytheirfunctionality: ConstructionandDuplication:AniBLOBobjectcanbeconstructedinthreedifferentways.Therstconstructorcreate()( 5 )createsanemptyiBLOBobject.Thesecondconstructorcreate(sh)( 5 )constructsaniBLOBobjectfromaspecicstoragestructurehandleshsuchasaBLOBobjecthandleoraledescriptor.Thethirdconstructorcreate(s)( 5 )isacopyconstructorandbuildsanewiBLOBobjectfromanexistingiBLOBobjects.Similarly,aniBLOBobjects2canalsobecopiedintoanotheriBLOBobjects1byusingthecopy(s1,s2)operator( 5 ). InternalReference:Inordertoprovideaccesstoaninternalsub-objectofaniBLOBobject,weneedawaytoobtainthereferenceofsuchasub-object.Thesub-objectreferencingprocessmuststartfromthetopmosthierarchicalleveloftheiBLOBobjectswhoselocatorlisprovidedbytheoperatorlocateiBLOB(s)( 5 ).Fromthislocatorl,anextlevelsub-objectcanbereferencedbyitsslotiintheoperatorlocate(s,l,i)( 5 ). 211

PAGE 212

ReadandWrite:SinceiBLOBssupportlargeobjectswhichmaynottintomainmemory,weprovideastreambasedmechanismthroughtheoperatorgetStream(s,l)( 5 )toconsecutivelyreadarbitrarysizedatafromanyl-referencedobject.Thestreamobtainedfromthisoperatorbehavessimilarlytoacommonleoutputstream.Otherthanreadingdata,theinterfaceallowsinsertionofeitherabaseobjectdofspeciedsizezthroughtheoperatorinsert(s,d,z,l,i)( 5 )oranentireiBLOBobjects1throughtheoperatorinsert(s,s1,l,i)( 5 )intoanyl-referencedobjectataspeciedsloti.Abaseobjectdsuchasintheoperatorappend(s,d,z,l)( 5 )oraiBLOBobjects1suchasinoperatorappend(s,s1,l)( 5 )canbeappendedtoanl-referencedobject.Thisiseffectivelythesameasinsertingtheinputasthelastsub-objectofthereferencedobject.Theoperatorremove(s,l,i)( 5 )removesthesub-objectatslotifromtheparentcomponentwithLocatorl. PropertiesandMaintenance:Theactualsizeofanl-referencedobjectisobtainedbyusingtheoperatorlength(s,l)( 5 )whilethenumberofsub-objectsoftheobjectisprovidedbytheoperatorcount(s,l)( 5 ).Finally,theoperatorresequence(s)( 5 )reorganizesanddefragmentstheiBLOBobjectscollapsingitssequenceindexsuchthatitcontainsasinglerange.ThisoperationeffectivelysynchronizesthephysicalandlogicalrepresentationsoftheiBLOBobjectandminimizesthestoragespace. TotestthefunctionalitywehaveimplementedtheiBLOBdatatypeinOracleusingobjectorientedextensionsandprogrammingAPIoftheDBMS.Duetospaceconstraints,wehaveomittedtheiBLOBimplementationdetailsinthisarticle. EachoperatorintheTSSinterfacecanbeimplementedusingthecorrespondingiBLOBinterfaceoperator.Fore.g.,toimplementget(region.face[1].outerCycle.segment[1]),werstuselocateiBLOB( 5 )togetaLocatortotheiBLOB,thenuselocate()( 5 )repeatedlytomoveacrosslevelsandnavigatetotherequiredcomponent(i.e.,rstsegment),andnally,getStream()( 5 )toretrievetherstsegmentoftheouterCycleinfthface.OtherTSSinterfacefunctionslikeset,baseObjectCountandsubObjectCountcanalsobeimplementedinasimilarmanner. weprovideanovelsolutiontostoreandmanagecomplexapplicationobjects(i.e.,variablelength,structured,hierarchicaldata)byintroducinganewmechanismforhandlingstructuredobjectsinsideDBMSs.Thecombinationoftypestructure 212

PAGE 213

specicationandiBLOBsprovidesthenecessarytoolstoeasilyimplementtypesystemsindatabases. 5.1.4EvaluationoftheiBLOBapproach TheiBLOBapproachistherstattempttosolvetheproblemofstoringlargestructuredobjectsinadatabasecontextusingtheobjectorientedparadigm.ByredesigningthewayofstoringdatainBLOBs,wehaveextendedaverylowlevelbinarystoragetoamuchsmarterandhigherlevelstoragethatismoresuitableforapplicationswithlargestructuredobjects.Todemonstratethatwedonotonlysavethetypesystemimplementerfromtediousserializationanddeserializationtasks,butalsoprovidethemwithmoreefcientaccessandupdateoperationsfordatastorediniBLOBs,weevaluationouriBLOBfromboththestorageandperformanceperspective. WehaveimplementedouriBLOBdatatypeinOracle11gbasedonthestandarddatatype(SDT)BLOB.WeselecttheUSstatemapsfromUSCensusBureau(http://www.census.gov/)asourtestingsubjects.Wehavedownloaded56mapsthatareatthestatelayerfromthe2010TIGER/LineShapeles.Themapsarestoredintheformatofshaples(.shp),whichisaverypopularleformatforstoring2Dshapes,andisusedinalargenumberofwellknownapplicationssuchastheArcGISfromESRIandtheTIGERShapelesfromUSCensusBureau.Shapelesspatiallydescribegeometries:points,polylines,andpolygons.These,forexample,couldrepresentwaterwells,rivers,andlakes,respectively.UnlikeothershaperepresentationlesliketheKMLlessupportedbyGooglemapswhicharehumanreadable,thecontentofashapeleisinabinrayformthusisnotvisibletousers,andmustbeaccessedfromprogramlibrariesorsoftwareslikeArcGIS.Thedetailedspecicationofshapelesisavailablein[ 35 ].SinceweusethedatasetfromtheTIGERShapelesasourtestingdata,whichcontainsonly2Dregionobjects,weonlybrieydescribehowregionsarestoredinshapelesinthissection. 213

PAGE 214

Figure5-13. Thestructuredrepresentationofapolygontypeinshapeles. Apolygonshapeinashapelehastheattributesoftheshapetype,theentitycount,theboundingbox,andtheentitylist.Ashapetypeisaintegervaluethatindicatesthetype(e.g.5forpolygon).Theentitycountindicatesthenumberofentitiesincludedinthisshapelewhereentitiesaredisjointindependentpolygonshapes.Forexample,acountrycanhavemultipleislandswhereeachislandisapolygonentity.Theboundingboxofashapeleisapairofpointsthatcanbeusedtocomputetheminimumboundingboxofashape.Finally,ashapeleconsistsofalistofentitieswhichhavefurtherstructuresinside.Eachentityisapolygonthatconsistsofoneormorerings.Aringisaconnectedsequenceoffourormorepointsthatformaclosed,non-self-intersectingloop.Apolygonmaycontainmultipleouterrings.Theorderofverticesororientationforaringindicateswhichsideoftheringistheinteriorofthepolygon.Theneighborhoodtotherightofanobserverwalkingalongtheringinvertexorderistheneighborhoodinsidethepolygon.Verticesofringsdeningholesinpolygonsareinacounterclockwisedirection.Verticesforasingle,ringedpolygonare,therefore,alwaysinclockwiseorder.Theringsofapolygonarereferredtoasitsparts.Figure 5-13 presentsahierarchicaltreerepresentationthatdescribesapolygonshapele. 214

PAGE 215

Figure5-14. ThestoragecomparisonbetweeniBLOBandnBLOBfor56TIGERshapeles. InordertoevaluatetheperformanceoftheiBLOBunderrealdatasetswithdifferentsizes,weparsetheTIGERshapelesandstorethepolygonshapesinouriBLOBs.SincetheoriginalTIGERshapelesrangefrom9KBto9MB,wehaveagooddiversityintermsofstoragesizeforiBLOBswhichallowsustochecktheperformanceofiBLOBsunderdifferentscales.Further,tocomparewithiBLOBs,weevaluateanotherapproachwhichistheonlyalternativeoptionforstoringobjectslikeshapelesinadatabasecontext.WeevaluatethetraditionalBLOBapproach.AstraightforwardandsimplesolutionforstoringlargeobjectsindatabaseslikeOracleistostorethelesdirectlyinBLOBs.ThisallowsSQLqueriestoloadtheentirelefromaBLOBandparseitinmainmemory,whichrequiresaserializationforwritingdatatoBLOBsandadeserializationforreadingdatafromBLOBs.Wehaveimplementedthisstrategyandhavetesteditbasedonthesamedatasets.LetuscalltheBLOBapproachthenBLOBapproachtodistinguishfromouriBLOBapproach.Wecomparethetwoapproachesfromfourperspectives,storage,randomreads,randominserts,andrandomdeletes. Figure 5-14 comparestheperformanceofthethreeapproachesfromthestorageperspective.Wecanobservethatthestorageofallthreeapproacheslinearlyincrease.ThestoragecostofaniBLOBishigherthanthenBLOBapproachandislowerthantheXMLTypeapproach.ThisisreasonablebecausetheiBLOBintroducesoverheadwhen 215

PAGE 216

Figure5-15. TherandomsinglereadtimecomparisonbetweeniBLOBandnBLOBfor56TIGERshapeles. Figure5-16. TherandomsingleinserttimecomparisonbetweeniBLOBandnBLOBfor56TIGERshapeles. preservingthestructureofobjectsinside.Ontheotherhand,sinceiBLOBmaintainsstructureinabinaryfashionwhichisnotreadabletohumanbeing,thusithaslowercostthantheXMLType,whichrevealstheinternalstructurebydescribingthestructureusingtext. Figure 5-15 showsthecomparisonbetweeniBLOBandnBLOBapproachesfortherandomsinglereadoperation.Therandomsinglereadoperationrstgeneratesalistofrandomnumbersthatareusedtoaccessarandomvertexofarandomentityinthepolygonshape.Thenthevertexisreadandprinted.ItshowstwodifferenttrendswithrespecttotheincreaseofstoragesizeforthereadoperationinFigure 5-15 .The 216

PAGE 217

Figure5-17. TherandomsingledeletetimecomparisonbetweeniBLOBandnBLOBfor56TIGERshapeles. timeconsumedbythesinglereadoperationinthenBLOBapproachincreaselinearlywhilethereadontheiBLOBstaysalmostconstant.ThereasonforthisisthattheonlyfactsthatmayeffecttheperformanceofreadoperationsinaniBLOBarethenumberofreadsperformedandthesizeofeachreadoperation.Ontheotherhand,thenBLOBapproachonlyprovidesastorageforshapes,andeveryreadrequiresthedeserializationoftheentireobjecttomainmemoryrst.However,whenthesizeoftheobjectstoredisrelativelysmall,thedeserializationhaslessimpactonthereadoperation,thusthenBLOBapproachmaybesuperiorthantheiBLOBapproach.ItisbecausetheiBLOBapproachwillissuemorethanoneI/Oreadsinordertogettotheparticularvertex,whilenBLOBonlyneedstoreadonce.Whenobjectsizeisnotbig,thenthenumberofI/Odominantsthereadoperation.Similarly,weobservethesametrendintherandomsingleinsertoperationandrandomsingledeleteoperationforbothapproachesinFigure 5-16 andFigure 5-17 Therefore,wecanconcludefromthecomparisonsbetweenthetwoapproachesthattheoperationslikeread,insertanddeleteoniBLOBsaremuchmorescalablethantheonesonethesimpleBLOBapproach. 217

PAGE 218

Figure5-18. ThetreerepresentationofCETM. 5.1.5IntegrationoftheCETMinDatabasesBasedoniBLOBs Wehaveproposedasolutionforrepresenting3DvolumeswithacompacttetrhadralizationbaseddatastructureinSection 4.2 .WeshowinthissectionhowtheCETMdatastructurecanbeintegratedintoadatabasecontextbasedonouriBLOBs.ThereexistsonlytwooptionsforstoringtheTheCETMdatastructureindatabases.EitherstoringitusingtherawBLOBapproachorapplyingournewlydesignediBLOBapproach.Inthissection,weshowtheresultsofapplyingbothapproachesandcomparetheperformanceonboth. StoringCETMdatastructuretoaniBLOBisratherstraightforward.WerstmaptheCETMdatastructureintoahierarchicaltreestructureasdescribedinFigure 5-18 ,thenwecreateaprogramtoinserttheinternalnodesofthetreeasthestructuredobjectsinaniBLOB,andtheleafnodesasthebaseobjectsinaniBLOB,byusingtheinsertAPIfromtheiBLOBinterface.AlthoughstoringdatatoiBLOBsintroducesaddtionalstorageoverhead,theyareallhandledbytheiBLOBsanddonotrequireadditionalserializationanddeserializationprocedures. WhenstoringCETMdatastructuretoarawBLOBstorage,weneedtorstcarefullydesigntheserializationanddeserializationprocedurestoconvertthein-memorydatastructurestosequentialbinaryrepresentations.Additionalstorageisalsointroduced(althoughnotasmuchastheiBLOBapproach)intheserializationprocedure.Theaccessoperationslikereadandwriteneedtobeimplementedtoretrievedatafromthe 218

PAGE 219

Table5-1. ThestoragecostandthetopologicalrelationretrievalperformanceofCETMdatastructureimplementedbasedontheiBLOBandtheBLOB. m500m471m58m531m67 CETMsize(byte)48,925321,072367,4662,332,14020,101,923iBlobsize(byte)51,086334,372383,9122,433,89221,025,766Blobsize(byte)51,086334,372383,9122,433,89221,025,766R03(100,3)TetetrahedraVisited111226149iBlobAccessTime(ms)33.67238.12254.089120.51841.435BlobAccessTime(ms)9.36713.1912.77640.603123.913R13(100,2,3)TetetrahedraVisited25636iBlobAccessTime(ms)20.12449.43289.38326.90640.123BlobAccessTime(ms)8.33611.28513.06432.455109.225 BLOBstorage,whichusuallyrequiresdeserializingtheentireobjectfromBLOBtoamainmemorydatastructureandreadorwrite. Table 5-1 showsacomparisonbetweenthetwoapproachesforstoringCETMdatastructureindatabases.WecanobservethattheBLOBbasedapproachhasabetterperformanceoversmallsizedatathatisthan3MB.Butwhenthedatascaleexceeds5MB,theiBLOBapproachoutperformstheBLOBapproach.ThismatcheswhatwehaveobservedintheexperimentalstudyoftheiBLOBsinSection 5.1.4 ,thattheiBLOBapproachismorestableandscalablethantherawBLOBapproach. 5.2Integrationof3DSpatialOperationsandPredicatesinSQL 5.2.1IntegrationoftheTopologicalPredicatesinSQLBasedontheNCMModel UsingtheNeighborhoodCongurationModel(NCM)withitstopologicalencodingsdescribedinSection 3.2.1.2 ,wecanidentifythetopologicalrelationshipsbetweenanytwogivencomplexvolumeobjectsintheformofa15bitbinaryencoding.However,tointegratetopologicalrelationshipsintospatialdatabasesasselectionandjoinconditionsinspatialqueries,topologicalpredicateswiththesignaturevolumevolume!boolareneededandhavetobeformallydened.Forexample,aquerylikeFindallbuildingsthatmeetthePhysicsbuildingrequiresatopologicalpredicateslikemeetasaselectionconditionofaspatialjoin.Assumingarelationbuildingswithattributesbnameoftype 219

PAGE 220

stringandshapeoftypevolume,wecanexpressthequeryinaSQL-likestyleasfollows: SELECTb2.pnameFROMbuildingsb1,buildingsb2WHEREb1.bname='Physics'andb1.shapemeetb2.shape The15bittopologicalencodings,whichrepresenttopologicalrelationshipsbetweenvolumes,describesatotalof697topologicalrelationshipsbetweentwocomplexvolumesandatotalof72topologicalrelationshipsbetweentwosimplevolumes.Therefore,amaximumof697topologicalpredicatescanbedenedtoprovideanexclusiveandcompletecoverageofallpossibletopologicalrelationships.However,userswillnotbeinterestedinsuchalarge,overwhelming,andpredenedcollectionofdetailedpredicatessincetheywillnditdifculttodistinguish,remember,andhandlethem[ 25 ].Instead,areducedandmanageablesetofpredicateswillbepreferred.Suchasetshouldbeuser-denedand/orapplicationspecicsincedifferentapplicationsmayhavedifferentcriteriaforthedistinctionofdirectionalrelationships.Forexample,oneapplicationcouldrequireacleardistinctionbetweenthetopologicalrelationshipsonly meet on face,only meet at point,only overlap,exist overlap and meet on facewhereasanotherapplicationcouldabandonadistinctionbetweenthefourpredicatesandregardthemallasoverlap.Thus,exibilityisneededtoenableuserstodenetheirownsetoftopologicalpredicatesandselecttheirownnamesforthesepredicates.Aclusteringstrategyhasbeenintroducedin[ 88 ]tousetopologicalpredicateclusterstoproduceareducedsetoftopologicalpredicatesfortwo2Dspatialobjects.Inthisapproach,asetofconstraintrulescalledclusteringrulesisgiventodenethereducedsetofpredicateswhicharemutuallyexclusiveandcoverallthepredicatesenumeratedfromthe9-intersectionmatrix.Inthispaper,inordertooffertheusermoreexibilityofdeningtopologicalpredicates,wetakeadifferentapproach.Weprovidetwolevelsoftopologicalpredicates.Level1comprisesso-calledexistentialtopologicalpredicates,andLevel2containsso-calledderiveddirectionalpredicates.Thepredicatesofthe 220

PAGE 221

higherlevelarederivedandbuiltfromthepredicatesofthelowerlevel.Allpredicateseasethetaskofformulatingcomplextopologicalqueries. InourNCMmodel,weidentifythetopologicalrelationshipbetweentwogivencomplexvolumeobjectsbycheckingtheexistenceofthe15neighborhoodcongurations.Eachofthe15neighborhoodcongurationscharacterizesoneuniquetopologicalinteractionbetweentwovolumeobjects.Hence,insteadofdening697mutuallyexclusivetopologicalpredicatestocoverall697possibletopologicalrelationships,wedeneexistentialtopologicalpredicatesforidentifyingtheexistenceofthetopologicalfeatures. Level1comprises14predenedexistentialtopologicalpredicatesthatwespecifyinDenition 48 andthatensuretheexistenceofaparticularbasictopologicalinteractionbetweenatleastonepartofavolumeobjectAandatleastonepartofavolumeobjectB.Eachexistentialtopologicalpredicatescorrespondstothevalueofonebitintheencoding.Thereasonthatweonlyneedtodene14existentialtopologicalpredicatesisthat,accordingtoLemma 1 ,thefourthbitofatopologicalencodingsisalways1.ThesepredicatesprovideaninterfaceforuserstodenetheirownderivedtopologicalpredicatesatLevel2.Therefore,weassumethattheimplementationofthe15existentialtopologicalpredicatesisprovidedinaspatialtypesystem(spatialalgebra,spatialextensionpackage)andthatthesepredicatescanbeembeddedintospatialSQLqueries. Denition48. LetA,BbetwocomplexvolumesandletNCM(A,B)denotethefunctionthatcomputesthetopologicalencodingE(E=NCM(A,B))betweenvolumeAandB.PleasenotethatthefunctionNCMisanasymmetricfunction,sothatNCM(A,B)6=NCM(B,A).Thentheexistentialtopologicalpredicatesaredenedas: 221

PAGE 222

Ashare interior withB,E1=1^E=NCM(A,B)Ahas interior outsideB,E2=1^E=NCM(A,B)Adoes not contain all interior ofB,E3=1^E=NCM(A,B)Acontains boundary ofB,E5=1^E=NCM(A,B)Ahas boundary insideB,E6=1^E=NCM(A,B)Ameets from insideB,E7=1^E=NCM(A,B)Ameets from outsideB,E8=1^E=NCM(A,B)Ahas boundary outsideB,E9=1^E=NCM(A,B)Adoes not contain all boundary ofB,E10=1^E=NCM(A,B)Acontact from outsideB,E11=1^E=NCM(A,B)Acontact from insideB,E12=1^E=NCM(A,B)Ais contacted from inside byB,E13=1^E=NCM(A,B)Asecretly contactsB,E14=1^E=NCM(A,B)AcrossesB,E15=1^E=NCM(A,B) Forexample,Ashare interior withBreturnstrueifapartoftheinteriorofAissharedwithapartoftheinteriorofB;thisdoesnotexcludetheexistenceofotherbasictopologicalpredicatesbetweenotherpartsofAandB,e.g.,Ahas interior outsideB=true.Hence,wehaveanexistentialviewpoint.ThepredicateAsecretly contactsBdescribesascenariowherethecontactingpointbetweenAandBisnotvisibletotheoutside.Itistrivialtoprovethatbyusingtheexistentialtopologicalpredicatesandthelogicaloperators:,_,and^,wecanobtainacompletecoverageandmutualdistinctionofallpossible697topologicalrelationshipsfromtheNCMmodel.Thiswillenableuserstodeneanysetofcompositetopologicalpredicatesfortheirownneedsandapplications.Forexample,thetopologicalrelationshipbetweenAandBthatisidentiedbythetopologicalencoding111111011110011(seeFigure 3-26 )canbeexpressedbythefollowinguniqueBooleanexpression: 222

PAGE 223

Ashare interior withB^Ahas interior outsideB^Adoes not contain all interior ofB^Acontains boundary ofB^Ahas boundary insideB^:(Ameets from insideB)^Ameets from outsideB^Ahas boundary outsideB^Adoes not contain all boundary ofB^Acontact from outsideB^:(Acontact from insideB)^:(Ais contacted from inside byB)^Asecretly contactsB^AcrossesB BasedonthenineexistentialpredicatesfromLevel1,userscanspecifytheirownderivedtopologicalpredicatesatLevel2.Derivedtopologicalpredicatesarecompositetopologicalpredicatesthatarebuiltusingoneormoreoftheexistentialtopologicalpredicatesandotheralreadydenedderivedtopologicalpredicates.Asexamples,weconstructthetraditional8topologicalpredicatesthataremutuallyexclusiveandcoversall697topologicalrelationships.The8topologicalpredicatesaredisjoint,meets,inside,contains,coveredby,covers,equalsandoverlaps.Thesepredicatesareconsistentwiththeonesdenedinthe2Dspace[ 88 ].Denition 49 showsthespecicationofthesepredicates. Denition49. LetA,Bbetwocomplexvolumes,thenthetopologicalpredicatesdisjoint,meets,inside,contains,coveredby,covers,equalsandoverlapsaredenedas: 223

PAGE 224

AdisjointB,:(Ashare interior withB)^:(Ameets from outsideB)^Ahas boundary outsideB^:(Acontact from outsideB)^Adoes not contain all boundary ofBAmeetsB,:(Ashare interior withB)^(Ameets from outsideB_Acontact from outsideB)AinsideB,:(Ahas interior outsideB)^Ahas boundary insideB^:(Ameets from insideB)^:(Acontact from insideB)^Adoes not contain all boundary ofBAcontainsB,:(Adoes not contain all interior ofB)^Acontains boundary ofB^:(Ameets from insideB)^Ahas boundary outsideB^:(Ais contacted from inside byB)AcoveredbyB,:(Ahas interior outsideB)^(((Ahas boundary insideB_Adoes not contain all boundary ofB)^Ameets from insideB)_Acontact from insideB)AcoversB,:(Adoes not contain all interior ofB)^(((Acontains boundary ofB_Ahas boundary outsideB)^Ameets from insideB)_Ais contacted from inside byB)AequalsB,:(Ahas interior outsideB)^Ameets from insideB^:(Adoes not contain all interior ofB) 224

PAGE 225

Table5-2. Thenumberoftopologicalrelationshipsassignedtoeachofthe8traditionaltopologicalpredicates. disjointmeetsinsidecontainscoveredbycoversequalsoverlaps 1711771672 AoverlapsB,AcrossesB_Asecretly contactsB_((Acontains boundary ofB_Ais contacted from inside byB)^(Ahas boundary insideB_Ameets from outsideB_Acontact from insideB))_Adoes not contain all boundary ofB_((Ameets from outsideB_Acontact from outsideB)^(Ahas boundary insideB_Ameets from insideB_Acontact from insideB))_(Ahas boundary outsideB^(Ahas boundary insideB_Acontact from insideB_(Ameets from insideB^Adoes not contain all boundary ofB))) Inordertoprovethemutualexclusionoftheobtainedtopologicalpredicatesaswellasthecompletecoverageofallbasictopologicalrelationshipsbythem,wehavedevelopedaprogramtocheckall697topologicalencodings.Wemarkeachencodingwiththenamesofthecorrespondingpredicatesthatyieldtruefortheencoding.Asaresult,weobservethatallencodingsaremarkedwithonlyonepredicatename(mutualexclusion),andtheredoesnotexistanyencodingthatisnotmarked(completecoverage).Table 5-2 showsthenumberofencodingsthatmakeseachcorrespondingpredicatetrue. Aswehaveseen,allderivedtopologicalpredicatesaredenedonthebasisoftheexistentialtopologicalpredicatesgiveninDenition 48 .Wehaveproposedthederivedtopologicalpredicateshereonlyasexamples.Itisuptotheuserstodenetheirownpredicatesandtoselecttheirownpredicatenamesaccordingtotheirneeds 225

PAGE 226

Q1result:p2,p4Q2result:p1,p2,p4Q3result:p1(a)(b) Figure5-19. Anengineandseveralparts(a)andtheresultsofthequeriesQ1,Q2,andQ3(b). andtheirapplications.Butforthispurpose,theyneeddatadenitionlanguage(DDL)suportinSQLinordertobeabletospecifytheirowntopologicalpredicatesandthentousetheminSQLqueries.WeproposeanewCREATETPREDclausethatenablesuserstosyntacticallyspecifyderivedtopologicalpredicatesinaneasymanner.ForcreatingBooleanexpressionsweprovidethelogicaloperators&for^,jfor_,andfor:.Alternatively,wecouldusethelogicaloperatorsAND,OR,andNOTbuiltintoSQL,butthiscouldalsoleadtoaconfusionwiththeirnormalusage.Sincealldirectionalpredicatesarebinarypredicates,wehaveomittedtheirargumentsforreasonsofsimplicityandbetterreadability.AsexampleweshowtheSQLspecicationofthetopologicalpredicatesmeetsandequals. CREATETPREDmeets(~share_interior_with&(meets_from_outside|contact_from_outside))CREATETPREDequals(~has_interior_outside&meets_from_inside&~does_not_contain_all_interior_of) TheuseofthetopologicalpredicatesinSQLqueriesisquitestandardandthereforefamiliartotheuser.However,thesemanticsthatcanbeexpressedbythesepredicatescanbequitedifferentandpowerful.Forexample,assumingthefollowingtworelations: parts(pname:string,body:volume);machines(mid:string,type:string,body:volume); 226

PAGE 227

Wecanposethefollowingqueries: Q1: Determinethepartsthatattachbutnotpenetratetheenginebody. SELECTp.pnameFROMpartsp,machinemWHEREm.type='engine'andp.bodymeetsm.body Q2: Determinethepartsthatareattachedtothesurfaceoftheenginebody. SELECTp.pnameFROMpartsp,machinemWHEREm.type='engine'and(p.bodymeets_from_insidem.bodyorp.bodymeets_from_outsidem.body) Q3: Determinethepartsthatbothattachtothesurfaceoftheenginebodyfromoutsideandpenetratetheenginebody. SELECTp.pnameFROMpartsp,machinemWHEREm.type='engine'andp.bodymeets_from_outsidem.bodyandp.bodyoverlapsm.body Theabovethreequeriesreturndifferentresults,whichareillustratedinFigure 5-19 5.2.2Detour:IntegrationoftheSpatio-temporalDirectionalPredicatesinSQL Inthissection,wediscusshowcardinaldirectiondevelopmentscanbeintegratedintospatio-temporaldatabasesandquerylanguages.Thisrequirestheformaldenitionofcardinaldirectiondevelopmentsasbinarypredicatessinceitwillmakethequeryprocessingeasierwhenusingpre-denedpredicatesasselectionconditions.Inthefollowingpart,wedenesomeimportantpredicateswhichwillbesufcientformostqueriesoncardinaldirectiondevelopmentsbetweenmovingobjects. Firstofall,wegivethedenitionofexistentialdirectionpredicates.Thistypeofpredicatesndsoutwhetheraspeciccardinaldirectionexistedduringtheevolutionofmovingobjects.Forexample,aquerylikeFindallshipsthatappearednorthofshipFantasybelongstothiscategory.Itrequiresapredicatenamedexists northasaselectionconditionofajoin.Thispredicatecanbedenedasfollows, 227

PAGE 228

Denition50. GiventwomovingpointsA,B2MPoints,theircardinaldirectiondevelopmentDEV(A,B)=d1.d2.....dnwithn2Nanddi2CDordi=?forall1in.Thenwedenetheexistentialdirectionpredicateexists northas exists north(A,B)=truedef,91in:di=N Denition 50 indicatesthatthepredicateexists northistrueifthedirectionnorthexistsinthesequenceofthecardinaldirectiondevelopment.Itcanhelpusdenetheabovequery.Assumethatwehavethefollowingrelationschemaforships ships(id:integer,name:string,route:mpoint) ThequerycanbeexpressedusinganSQL-likequerylanguageasfollows: SELECTs1.nameFROMshipss1,shipss2WHEREs2.name=`Fantasy'ANDexists_north(s1.route,s2.route); Theotherexistentialcardinaldirectionpredicatesexists south,exists east,ex-ists west,exists sameposition,exists northeast,exists southeast,exists northwest,andexists southwestaredenedinasimilarway. Anotherimportantcategoryofpredicatesexpressesthatonemovingobjectkeepsthesamedirectionwithrespecttoanothermovingobject.Forexample,assumethatthereisagroupofshipstravelingfromnorthtosouthandeachshipfollowstheshipinfrontofthegroup.Nowtheleaderofthegroupwantstoknowwhichshipsbelongtothegroup.Theproblemistondoutwhichshipsarekeepinganorthernpositionwithrespecttotheleadingship. Denition51. GiventwomovingpointsA,B2MPoints.Thepredicatekeeps northisdenedas keeps north(A,B)=exists north(A,B)^:exists south(A,B)^:exists southeast(A,B)^:exists east(A,B)^:exists sameposition(A,B)^:exists northwest(A,B)^:exists northeast(A,B)^:exists southwest(A,B)^:exists west(A,B) 228

PAGE 229

Denition 51 showsthattherelationshipkeeps northbetweentwomovingobjectsimpliesthattheonlyexistentialdirectionpredicateinthecardinaldirectiondevelopmentofthesemovingobjectsisexists northwithoutanyotherexistentialdirectionpredicates.Inotherwords,wehaveDEV(A,B)=N. Weconsidertheaboveexampleandassumethattheidentieroftheleadershipis1001.ThenthequeryFindallshipskeepingapositionnorthoftheleadership1001canbeexpressedas SELECTs1.idFROMshipss1,shipss2WHEREs2.id=`1001'ANDkeeps_north(s1.route,s2.route); Theotherpredicatesthatexpressthatonemovingobjectremainsinthesamedirectionwithrespecttoanothermovingobjectarekeeps south,keeps east,keeps west,keeps sameposition,keeps northeast,keeps southeast,keeps northwest,andkeeps southwest. Anotherusefulpredicatechecksforthetransitionbetweentwocardinaldirectionsinacardinaldirectiondevelopment.Thetransitioncanbeeitheradirectchangeoranindirectchangethroughasetofintermediatedirections.Wenamethispredicateasfrom to.Forexample,thequeryFindallshipsthathavetraveledfromthesouthtothenorthoftheshipFantasycanbeansweredbyusingthispredicate. Denition52. GiventwomovingpointsA,B2MPoints,theircardinaldirectiondevelopmentDEV(A,B)=d1.d2.....dnsuchthatdi2CDordi=?forall1in,andtwocardinaldirectionsd0,d002CD.Wedenethepredicatefrom toasfollows: from to(A,B,d0,d00)=truedef,d06=?^d006=?^91i
PAGE 230

Finally,wedenethepredicatecross northwhichcheckswhetheramovingpointtraversesalargeextentoftheregioninthenorthofanothermovingpoint. Denition53. GiventwomovingpointsA,B2MPointsandtheircardinaldirectiondevelopmentDEV(A,B)=d1.d2.....dnsuchthatdi2CDordi=?forall1in.Wedenethepredicatecrosses northasfollows: crosses north(A,B)=truedef,n3^92in)]TJ /F4 11.955 Tf 11.95 0 Td[(1:(di)]TJ /F5 7.97 Tf 6.58 0 Td[(1=NW^di=N^di+1=NE)_(di)]TJ /F5 7.97 Tf 6.58 0 Td[(1=NE^di=N^di+1=NW) ThequeryFindalltheshipsthathavecrossedthenorthofshipFantasycanbeexpressedasfollows: SELECTs1.idFROMshipss1,shipss2WHEREs2.name=`Fantasy'ANDcrosses_north(s1.route,s2.route); Theotherpredicatescross south,cross east,andcross westcanbedenedinasimilarway. Inthissection,wehavepresentedathree-phasesolutionforcomputingthecardinaldirectionsbetweentwomovingpointsfromanalgorithmicperspective.Weshowthemappingofcardinaldirectiondevelopmentsbetweenmovingpointsintospatio-temporaldirectionalpredicatesandtheintegrationofthesepredicatesintothespatio-temporalquerylanguageofamovingobjectsdatabase. 230

PAGE 231

CHAPTER6CONCLUSIONS Thepurposeofthisresearchistobuildandintegrateacomprehensivecomponentinextensibledatabasemanagementsystems,whichconsistsofatypesystemforcomplexthree-dimensionaldatalikesurfacesandvolumes,andquerylanguageextensionswithmostimportantoperationsandpredicatesliketheintersectionoperation,thetopologicalpredicates,andthedirectionalpredicatesforqueryingthree-dimensionaldata.Toachievethisgoal,wehavedevelopedsolutionsatthreemainlevelsofabstrac-tion. Westartedwithanabstractlevel,whereweproposedtherigorous,mathematicaldenitionofacomprehensivetypesystem(algebra)for3Dspatialdataincludingvolumes,surfaces,and3Dlines.Theconceptwasrstproposedinthepublishedwork[ 89 ],anditisdescribedindetailsandlargelyextendedinthisarticle.Wealsoexploretwomostimportantqualitativespatialrelationships,whicharetopologicalrelationshipsandcardinaldirectionrelationships,betweentwo3Dspatialobjects.Werstdesignedanovelmodelcalledtheobjectsinteractionmatrix(OIM)formodelingcardinaldirectionsbetweentwocomplexregions,whichisrstproposedin[ 100 ]andlaterextendedin[ 66 ].Thenweextendedtheconcepttothe3Dspace,andproposedtheobjectsinteractioncubematrixfor3Dcomplexvolumeobjects[ 23 ].Further,wetookadetourandconsideredthecardinaldirectionsbetweentwomovingpointswhicharespecial3Dpointswithz-dimensionastime.Wehavedevelopedthemodeltorepresentthedevelopmentofthecardinaldirectionrelationshipsbetweentwomovingpoints[ 21 ]andthealgorithmforcomputingsuchadevelopment[ 22 ]. Toexplorethetopologicalrelationshipsbetweentwospatialobjectsinthe3Dspace,wedevelopedtheneighborhoodcongurationmodel(NCM),whichisbasedonthepointsettheoryandpointsettopology.Thefoundationofthismodelisproposedin[ 99 ]andislargelyextendedandformallyvalidatedinthisarticle.Wehaveevaluated 231

PAGE 232

theneighborhoodcongurationmodel(NCM)byexploringallpotentialtopologicalrelationshipsthatcanbedistinguishedbyNCMandcomparetheresultwithotherexistingapproaches. Secondly,atthediscretelevel,wehavedesignedthegeometricdatarepresentationsforthe3Dspatialdatatypes,whichtthecompactstorageinadatabasecontextandsupportefcientgeometricalgorithmsfor3Doperationsandpredicates.Wehaveintroducedaparadigmcalledslicerepresentationasageneraldatarepresentationmethodforall3Dspatialdatatypes.Theworkispublishedin[ 98 ].Inthiswork,wehavealsopresentedtwointersectionalgorithmstodemonstratethebenetofthedatastructures.Further,fortetrahedralizedvolumes,whichisapopularrepresentationineldslikecomputergraphicsandGIS,wehavedesignedamoreefcientdatastructure,theconnectivityencodedtetrahedralmesh(CETM),forstoringatetrahedralizedvolumeobject.Inthisarticle,weshowthatourdatastructureiscompactinstorageandisoptimalinretrievingtopologicalrelationsamongmeshelementsforbothmanifoldvolumesandnon-manifoldvolumes.Achallengingfuturework,istodesignalgorithmsforthedeterminationandevaluationofthetopologicalpredicatesforspatialobjectsin3Dspace,aswellasthealgorithmsforevaluatingcardinaldirectionsbetweenthem. Thethirdleveliscalledtheimplementationlevel,atwhichweintegratethedatarepresentationsandtheoperationsandpredicatesintodatabasetypesystemsandtheSQLquerylanguage.Wetakeanobjectorientedapproachandtakethebinarylargeobject(BLOB)asthebasisforourintegration.In[ 97 ],Wehaveintroducedanoveldatatypecalledtheintelligentbinarylargeobject(iBLOB)thatleveragesthetraditionalBLOBtypeindatabases,preservesthestructureofapplicationobjects,andprovidessmartqueryandupdatecapabilities.TheiBLOBframeworkgeneratesatypestructurespecicapplicationprogramminginterface(API)thatallowsapplicationstoeasilyaccessthecomponentsofcomplexapplicationobjects.Thisgreatlysimpliestheeasewithwhich 232

PAGE 233

newtypesystemscanbeimplementedinsidetraditionalDBMS.WehaveimplementedtheiBLOBpackageinthedatabasecontextandhavebuiltour3Dspatialdatatypesbasedonit. 233

PAGE 234

APPENDIX:DRAWINGSOF50UNITTOPOLOGICALRELATIONSHIPENCODINGSANDALL72TOPOLOGICALRELATIONSHIPENCODINGS 234

PAGE 235

ID 1 2 3 4 9IM 0@0010011111A 0@0010111111A 0@0010101111A 0@0010111111A NCM (011100001100000) (011100001110000) (011100010100000) (011100010110000) ID 5 6 9 10 9IM 0@0010111011A 0@0010111111A 0@1000100011A 0@1000101111A NCM (011100011000000) (011100011010000) (100100100000000) (101100100100000) ID 11 12 13 14 9IM 0@1001101111A 0@1001001111A 0@1001101111A 0@1001101011A NCM (101100100101000) (101101000100000) (101101000101000) (101101100000000) ID 15 18 19 20 9IM 0@1001101111A 0@1010110011A 0@1110110011A 0@1110010011A NCM (101101100001000) (110100101000000) (110100101000100) (110110001000000) ID 17 18 19 20 9IM 0@1110110011A 0@1110100011A 0@1110110011A 0@1111111111A NCM (110110001000100) (110110100000000) (110110100000100) (111100101100001) FigureA-1. 1-20outof50topologicalrelationshipsunitfortwocomplexvolumes. 235

PAGE 236

ID 43 51 75 83 9IM 0@1111111111A 0@1111111111A 0@1111111111A 0@1111111111A NCM (111100110100001) (111100111000001) (111101001100001) (111101010100001) ID 84 98 99 100 9IM 0@1111101111A 0@1011111011A 0@1111111111A 0@1111111011A NCM (111101010100010) (111101011000000) (111101011000001) (111101011000010) ID 123 146 147 148 9IM 0@1111111111A 0@1011101011A 0@1111111111A 0@1111101011A NCM (111101101000001) (111101110000000) (111101110000001) (111101110000010) ID 235 242 243 244 9IM 0@1111111111A 0@1110101111A 0@1111111111A 0@1111101111A NCM (111110001100001) (111110010100000) (111110010100001) (111110010100010) ID 251 252 283 306 9IM 0@1111111111A 0@1111111011A 0@1111111111A 0@1110101011A NCM (111110011000001) (111110011000010) (111110100100001) (111110110000000) FigureA-2. 21-40outof50topologicalrelationshipsunitsfortwocomplexvolumes 236

PAGE 237

ID 307 308 394 395 9IM 0@1111111111A 0@1111101011A 0@1111001111A 0@1111111111A NCM (111110110000001) (111110110000010) (111111000100000) (111111000100001) ID 396 402 403 404 9IM 0@1111101111A 0@1111011011A 0@1111111111A 0@1111111011A NCM (111111000100010) (111111001000000) (111111001000001) (111111001000010) ID 507 508 9IM 0@1111111111A 0@1111101011A NCM (111111100000001) (111111100000010) FigureA-3. 41-50outof50topologicalrelationshipsunitsfortwocomplexvolumes 237

PAGE 238

ID 1 2 8 9 9IM 0@0010011111A 0@0010111111A 0@0010111111A 0@1000100011A NCM (011100001100000) (011100001110000) (011100011110000) (100100100000000) ID 12 13 17 20 9IM 0@1001001111A 0@1001101111A 0@1001101111A 0@1110010011A NCM (101101000100000) (101101000101000) (101101100101000) (110110001000000) ID 21 25 411 413 9IM 0@1110110011A 0@1110110011A 0@1111111111A 0@1111111111A NCM (110110001000100) (110110101000100) (111111001100001) (111111001100011) ID 415 417 419 421 9IM 0@1111111111A 0@1111111111A 0@1111111111A 0@1111111111A NCM (111111001100101) (111111001100111) (111111001101001) (111111001101011) ID 423 425 427 429 9IM 0@1111111111A 0@1111111111A 0@1111111111A 0@1111111111A NCM (111111001101101) (111111001101111) (111111001110001) (111111001110011) FigureA-4. 1-20outof72topologicalrelationshipsthatcanbedistinguishedwithNCMbetweentwosimplevolumes. 238

PAGE 239

ID 431 433 435 437 9IM 0@1111111111A 0@1111111111A 0@1111111111A 0@1111111111A NCM (111111001110101) (111111001110111) (111111001111001) (111111001111011) ID 439 441 477 481 9IM 0@1111111111A 0@1111111111A 0@1111111111A 0@1111111111A NCM (111111001111101) (111111001111111) (111111011100011) (111111011100111) ID 485 489 491 492 9IM 0@1111111111A 0@1111111111A 0@1111111111A 0@1111111111A NCM (111111011101011) (111111011101111) (111111011110001) (111111011110010) ID 493 495 496 497 9IM 0@1111111111A 0@1111111111A 0@1111111111A 0@1111111111A NCM (111111011110011) (111111011110101) (111111011110110) (111111011110111) ID 499 500 501 503 9IM 0@1111111111A 0@1111111111A 0@1111111111A 0@1111111111A NCM (111111011111001) (111111011111010) (111111011111011) (111111011111101) FigureA-5. 21-40outof72topologicalrelationshipsthatcanbedistinguishedwithNCMbetweentwosimplevolumes. 239

PAGE 240

ID 504 505 559 561 9IM 0@1111111111A 0@1111111111A 0@1111111111A 0@1111111111A NCM (111111011111110) (111111011111111) (111111101100101) (111111101100111) ID 563 565 566 567 9IM 0@1111111111A 0@1111111111A 0@1111111111A 0@1111111111A NCM (111111101101001) (111111101101011) (111111101101100) (111111101101101) ID 568 569 575 577 9IM 0@1111111111A 0@1111111111A 0@1111111111A 0@1111111111A NCM (111111101101110) (111111101101111) (111111101110101) (111111101110111) ID 579 581 582 583 9IM 0@1111111111A 0@1111111111A 0@1111111111A 0@1111111111A NCM (111111101111001) (111111101111011) (111111101111100) (111111101111101) ID 584 585 673 677 9IM 0@1111111111A 0@1111111111A 0@1111111111A 0@1111111111A NCM (111111101111110) (111111101111111) (111111111100111) (111111111101011) FigureA-6. 41-60outof72topologicalrelationshipsthatcanbedistinguishedwithNCMbetweentwosimplevolumes. 240

PAGE 241

ID 680 681 687 688 9IM 0@1111111111A 0@1111111111A 0@1111111111A 0@1111111111A NCM (111111111101110) (111111111101111) (111111111110101) (111111111110110) ID 689 691 692 693 9IM 0@1111111111A 0@1111111111A 0@1111111111A 0@1111111111A NCM (111111111110111) (111111111111001) (111111111111010) (111111111111011) ID 694 695 696 697 9IM 0@1111111111A 0@1111111111A 0@1111111111A 0@1111111111A NCM (111111111111100) (111111111111101) (111111111111110) (111111111111111) FigureA-7. 61-72outof72topologicalrelationshipsthatcanbedistinguishedwithNCMbetweentwosimplevolumes. 241

PAGE 242

REFERENCES [1] Hdf-hierarchicaldataformat. http://www.hdfgroup.org/ [2] A.Abdul-RahmanandM.Pilouk.SpatialDataModellingfor3DGIS.Springer,2007. [3] CArens,J.Stoter,andP.vanOosterom.Modeling3DSpatialObjectsinaGeo-DBMSUsinga3DPrimitive.Computer&Geosciences,31:165,2005. [4] LarsArge,MarkdeBerg,HermanJ.Haverkort,andKeYi.Thepriorityr-tree:apracticallyefcientandworst-caseoptimalr-tree.InProceedingsofthe2004ACMSIGMODinternationalconferenceonManagementofdata,SIGMOD'04,pages347,2004. [5] D.Ayala,P.Brunet,R.Juan,andI.Navazo.Objectrepresentationbymeansofnonminimaldivisionquadtreesandoctrees. [6] O.Balovnev,T.Bode,M.Breunig,A.B.Cremers,W.Muller,G.Pogodaev,S.Shumilov,J.Siebeck,A.Siehl,andA.Thomsen.TheStoryoftheGeotoolkitAnObject-orientedGeodatabaseKernelSystem.GeoInformatica,8:5,2004. [7] D.S.Batory,J.R.Barnett,J.F.Garza,K.P.Smith,K.Tsukuda,B.C.Twichell,andT.E.Wise.Genesis:Anextensibledatabasemanagementsystem.IEEETrans.onSoftwareEngineering,14:1711,1988. [8] B.G.Baumgart.Wingededgepolyhedronrepresentation.InNationalComputerConference,1975. [9] BruceG.Baumgart.Wingededgepolyhedronrepresentation.Technicalreport,StanfordUniversity,1972. [10] JochenVandenBercken,BernhardSeeger,andPeterWidmayer.Agenericapproachtobulkloadingmultidimensionalindexstructures.InProceedingsofthe23rdInternationalConferenceonVeryLargeDataBases,VLDB'97,pages406,1997. [11] A.Biliris.ThePerformanceofThreeDatabaseStorageStructuresforManagingLargeObjects.InACMSIGMODInt.Conf.onManagementofData,pages276,1992. [12] UrsBischoffandJarekRossignac.Tetstreamer:Compressedback-to-fronttransmissionofdelaunaytetrahedrameshes.InProceedingsoftheDataCom-pressionConference,pages93,2005. [13] I.Boada.Anoctree-basedmultiresolutionhybridframework.FutureGener.Comput.Syst.,20(8):1275,2004. 242

PAGE 243

[14] A.Borrmann,C.vanTreeck,andE.Rank.Towardsa3DSpatialQueryLanguageforBuildingInformationModels.InProceedingsoftheJointInternationalCon-ferenceforComputingandDecisionMakinginCivilandBuildingEngineering,2006. [15] T.Bray,J.Paoli,C.M.Sperberg-McQueen,E.Maler,andF.Yergeau.ExtensibleMarkupLanguage(XML)1.0.W3Crecommendation,6,2000. [16] S.F.BucheleandR.H.Crawford.Three-dimensionalhalfspaceconstructivesolidgeometrytreeconstructionfromimplicitboundaryrepresentations.InSymposiumonSolidModelingandApplications,pages135,2003. [17] SwenCampagna,LeifKobbelt,andHans-PeterSeidel.Directededgesascalablerepresentationfortrianglemeshes.J.Graph.Tools,3:1,1998. [18] M.J.Carey,D.J.DeWitt,andS.L.Vandenberg.ADataModelandQueryLanguageforExodus.ACMSIGMODRecord,17:413423,1988. [19] DanChen,Yi-JenChiang,NasirMemon,andXiaolinWu.Geometrycompressionoftetrahedralmeshesusingoptimizedprediction.InINPROC.EUROPEANCONFERENCEONSIGNALPROCESSING,2005. [20] J.Chen,D.Liu,H.Jia,andC.Zhang.CardinalDirectionRelationsin3DSpace.InInt.Conf.onKnowledgeScience,EngineeringandManagement,pages623,2007. [21] T.Chen,H.Liu,andM.Schneider.EvaluationofCardinalDirectionDevelopmentsbetweenMovingPoints.InACMSymp.onGeographicInformationSystems(ACMGIS),pages430,2010. [22] T.Chen,H.Liu,andM.Schneider.ComputingtheCardinalDirectionDevelopmentbetweenMovingPointsinSpatio-temporalDatabases.InTheInternationalSymp.onSpatialandTemporalDatabases(SSTD)(Accepted),2011. [23] T.ChenandM.Schneider.ModelingCardinalDirectionsinthe3DSpacewiththeObjectsInteractionCubeMatrix.InACMSymp.onAppliedComputing(ACMSAC),pages906,2010. [24] PaoloCignoni,LeilaDeFloriani,PaolaMagillo,EnricoPuppo,andRobertoScopigno.Selectiverenementqueriesforvolumevisualizationofunstructuredtetrahedralmeshes.IEEETransactionsonVisualizationandComputerGraphics,10:29,2004. [25] E.Clementini,P.D.Felice,andP.Oosterom.ASmallSetofFormalTopologicalRelationshipsSuitableforEnd-userInteraction.In3thInt.Symp.onAdvancesinSpatialDatabases,pages277,1993. [26] B.deCambrayandTs.Yeh.AMultidimensional(2D,2.5D,and3D)GeographicalDataModel.In6thInternationalConferenceonManagementofData,1994. 243

PAGE 244

[27] LeilaDeFloriani,DavidGreeneldboyce,andAnnieHui.Adatastructurefornon-manifoldsimpliciald-complexes.InProceedingsoftheEurographics/ACMSIGGRAPHsymposiumonGeometryprocessing,pages83,2004. [28] LeilaDeFlorianiandAnnieHui.Ascalabledatastructureforthree-dimensionalnon-manifoldobjects.InProceedingsoftheEurographics/ACMSIGGRAPHsymposiumonGeometryprocessing,pages72,2003. [29] LeilaDeFlorianiandAnnieHui.Datastructuresforsimplicialcomplexes:ananalysisandacomparison.InProceedingsofthe3rdEurographicssymposiumonGeometryprocessing,2005. [30] LaszloM.DobkinD.Primitivesforthemanipulationofthree-dimensionalsubdivisions.Algorithmica,5:3,1989. [31] M.J.Egenhofer.TopologicalRelationsin3D.Technicalreport,1995. [32] M.J.EgenhoferandJ.Herring.AMathematicalFrameworkfortheDenitionofTopologicalRelationships.InInt.Symp.onSpatialDataHandling,pages803,1990. [33] M.J.EgenhoferandJ.Herring.CategorizingBinaryTopologicalRelationsbetweenRegions,LinesandPointsinGeographicDatabases.TechnicalReportTechnicalReport,1990. [34] M.Erwig,R.HartmutGuting,M.Schneider,andM.Vazirgiannis.Spatio-temporalDataTypes:anApproachToModelingandQueryingMovingObjectsinDatabases.GeoInformatica,3(3):269,1999. [35] ESRI.Esrishapeletechnicaldescription,1998. http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf [36] L.DeFloriani,R.Fellegara,andP.Magillo.Design,AnalysisandComparisonofSpatialIndexesforTetrahedralMeshes.Technicalreport,2010. [37] L.DeFlorianiandA.Hui.AScalableDataStructureforThree-dimensionalNon-manifoldObjects.InEurographicsSymposiumonGeometryProcessing,pages72,2003. [38] J.D.Foley,A.vanDam,S.Feiner,andJ.Hughes.Computergraphics,principlesandpractice.Addison-Wesley,1990. [39] L.Forlizzi,R.Guting,E.Nardelli,andM.Schneider.ADataModelandDataStructuresforMovingObjectsDatabases.InACMSIGMODInt.Conf.onManagementofData,pages319,2000. [40] A.Frank.QualitativeSpatialReasoning:CardinalDirectionsAsanExample.InternationalJournalofGeographicalInformationScience,10(3):269,1996. 244

PAGE 245

[41] S.Gaal.PointSetTopology.AcademicPress,1964. [42] S.Gaal.PointSetTopology.AcademicPress,1964. [43] VolkerGaedeandOliverGunther.Multidimensionalaccessmethods.ACMComput.Surv.,30:170,1998. [44] R.GoyalandM.Egenhofer.CardinalDirectionsbetweenExtendedSpatialObjects.Unpublishedmanuscript,2000. [45] L.GuibasandJ.Stol.Primitivesforthemanipulationofgeneralsubdivisionsandthecomputationofvoronoi.ACMTrans.onGraphics,4:74,1985. [46] LeonidasGuibasandJorgeStol.Primitivesforthemanipulationofgeneralsubdivisionsandthecomputationofvoronoi.ACMTrans.Graph.,4:74,1985. [47] StefanGumhold,StefanGuthe,andWolfgangStraber.Tetrahedralmeshcompressionwiththecut-bordermachine.InProceedingsoftheconferenceonVisualization,pages51,1999. [48] W.Guo,P.Zhan,andJ.Chen.TopologicalDataModelingfor3DGIS.Int.ArchivesofPhotogrammetryandRemoteSensing,32(4):657,1998. [49] ToprajGurungandJarekRossignac.Sot:compactrepresentationfortetrahedralmeshes.InSIAM/ACMJointConferenceonGeometricandPhysicalModeling,pages79,2009. [50] AntoninGuttman.R-trees:adynamicindexstructureforspatialsearching.SIGMODRec.,14:47,1984. [51] L.M.Haas,W.Chang,G.M.Lohman,J.McPherson,P.F.Wilms,G.Lapis,B.G.Lindsay,H.Pirahesh,M.J.Carey,andE.J.Shekita.Starburstmid-ight:Asthedustclears.IEEETrans.onKnowledgeandDataEngineering(TKDE),2:143,1990. [52] J.nHuerta,M.Chover,J.Ribelles,andR.Quiros.Multiresolutionmodelingusingbinaryspacepartitioningtrees.ComputerNetworks,30(20-21):1941,1998. [53] B.Hwang,I.Jung,andS.Moon.Efcientstoragemanagementforlargedynamicobjects.InEUROMICRO94.SystemArchitectureandIntegration20thEUROMI-CROConference.,pages37,Sep1994. [54] A.SafonovaJ.RossignacandA.Szymczak.Edgebreakeronacornertable:Asimpletechniqueforrepresentingandcompressingtriangulatedsurfaces.InHierarchicalandGeometricalMethodsinScienticVisualization,pages41,2003. 245

PAGE 246

[55] J.LegakisK.I.JoyandR.MacCracken.Datastructuresformultiresolutionrepresentationofunstructuredmeshes.InHierarchicalApproximationandGeometricMethodsforScienticVisualization,2002. [56] MarceloKallmannandDanielThalmann.Star-vertices:Acompactrepresentationforplanarmesheswithadjacencyinformation.J.Graph.Tools,6:7,2002. [57] IbrahimKamelandChristosFaloutsos.Onpackingr-trees.InProceedingsofthesecondinternationalconferenceonInformationandknowledgemanagement,CIKM'93,pages490,1993. [58] C.TetKhuan,A.Abdul-Rahman,andS.Zlatanova.3DSolidsandTheirManagementinDBMS.InAdvancesin3DGeoinformationSystems,pages279,2008. [59] BryanMatthewKlingner,DepartmentofElectricalEngineeringJonathanRichardShewchuk,andBerkeleyComputerSciencesUniversityofCalifornia.Stellar:Atetrahedralmeshimprovementprogram,2009. http://www.cs.berkeley.edu/~jrs/stellar/ [60] MarcosLage,ThomasLewiner,HelioLopes,andLuizVelho.Chf:Ascalabletopologicaldatastructurefortetrahedralmeshes.InInProceedingsoftheXVIIIBrazilianSymposiumonComputerGraphicsandImageProcessing,pages349,2005. [61] J.Lee.Comparisonofexistingmethodsforbuildingtriangularirregularnetworkmodelsofterrainfromgriddigitalelevationmodels.InternationalJournalofGeographicalInformationSystems,5(3):267,1991. [62] PascalLienhardt.Topologicalmodelsforboundaryrepresentation:acomparisonwithn-dimensionalgeneralizedmaps.Computer-AidedDesign,23:59,1991. [63] X.Liu,W.Liu,andC.Li.QualitativeRepresentationandReasoningofCombinedDirectionandDistanceRelationshipsinThree-dimensionalGIS.InProceedingsoftheInternationalConferenceonComputerScienceandSoftwareEngineering,pages119,2008. [64] HelioLopesandGeovanTavares.Structuraloperatorsformodeling3-manifolds.InProceedingsofthe4thACMSymposiumonSolidModelingandApplications,pages10,1997. [65] PiloukM.IntegratedModellingfor3DGIS.PhDthesis,C.T.deWitGraduateSchoolProductionEcology,theNetherlands,1996. [66] M.Schneider,T.Chen,G.ViswanathanandW.Yuan.CardinalDirectionsbetweenComplexRegions.ACMTransactionsonDatabaseSystems(TODS)(submitted),Inpress,2011. 246

PAGE 247

[67] MarttiMantyla.AnIntroductiontoSolidModeling.ComputerSciencePress,Inc.,NewYork,NY,USA,1987.ISBN0-88175-108-1. [68] ResearchGroup:NumericalMathematics,ScienticComputingWeierstrassInstituteforAppliedAnalysis,andStochastics(WIAS).Tetgen,2011. http://tetgen.org [69] R.E.McGrath.Xmlandscienticleformats.InTheGeologicalSocietyofAmerica,2003. [70] A.E.Middleditch,C.M.P.Reade,andA.J.Gomes.Point-setsandcellstructuresrelevanttocomputeraideddesign.Int.JournalofShapeModeling,6(2):175,2000. [71] M.Molenaar.AFormalDataStructureforTheThreeDimensionalVectorMaps.InInternationalSymposiumonSpatialDataHandling,pages830,1990. [72] M.Molenaar.AQueryOrientedImplementationofATopologicDataStructurefor3DVectorMaps.InInternationalJournalofGeographicalInformationSystems,pages243,1994. [73] PreparataF.P.MullerD.E.Findingtheintersectionoftwoconvexpolyhedra.TheoreticalComputerScience,7:217,1978. [74] B.Naylor.Binaryspacepartitioningtreesasanalternativerepresentationofpolytopes.Computer-AidedDesign,22(4):250,1990. [75] GregoryM.Nielson.Toolsfortriangulationsandtetrahedrizations.InScienticVisualization,Overviews,Methodologies,andTechniques,pages429,1997. [76] UniversityofMinnesota.Geomview,1998. http://www.geomview.org/ [77] A.Paoluzzi,F.Bernardini,C.Cattani,andV.Ferrucci.Dimension-independentmodelingwithsimplicialcomplexes.ACMTransactionsonGraphics(TOG),12:56,1993. [78] D.Papadias,Y.Theodoridis,andT.Sellis.TheRetrievalofDirectionRelationsUsingR-trees.InInt.Conf.onDatabaseandExpertSystemsApplications(DEXA),pages173,1994. [79] StratosPapadomanolakis,AnastassiaAilamaki,JulioC.Lopez,TiankaiTu,DavidR.O'Hallaron,andGerdHeber.Efcientqueryprocessingonunstructuredtetrahedralmeshes.InProceedingsofthe2006ACMSIGMODinternationalconferenceonManagementofdata,SIGMOD'06,pages551,2006. [80] F.PenningaandP.VanOosterom.ASimplicialComplex-basedDBMSApproachto3DTopographicDataModelling.Int.J.Geogr.Inf.Sci.,22(7):751,2008. 247

PAGE 248

[81] F.PenningaandP.vanOosterom.FirstImplementationResultsandOpenIssuesonthePoincare-tenDataStructure.InAdvancesin3DGeoinformationSystems,pages177,2008. [82] S.Pigot.TopologicalModelsfor3DSpatialInformationSystems.InInternationalConferenceonComputerAssistedCartography(Auto-Carto),pages368,1991. [83] J.F.RaperandD.J.Maguire.Designmodelsandfunctionalityingis.Comput.Geosci.,18(4):387,1992. [84] PrincetonShapeRetrievalandAnalysisGroup.Theprincetonshapebenchmark,2005. http://shape.cs.princeton.edu/benchmark/ [85] R.K.Rew,B.UCAR,andEJHartnett.Mergingnetcdfandhdf5.In20thInt.Conf.onInteractiveInformationandProcessingSystems,2004. [86] HananSamet.FoundationsofMultidimensionalandMetricDataStructures(TheMorganKaufmannSeriesinComputerGraphicsandGeometricModeling).MorganKaufmannPublishersInc.,SanFrancisco,CA,USA,2005.ISBN0123694469. [87] H.-J.Schek,H.-B.Paul,M.H.Scholl,andG.Weikum.TheDASDBSProject:Objectives,Experiences,andFutureProspects.IEEETrans.onKnowledgeandDataEngineering(TKDE),2(1):25,1990. [88] M.SchneiderandT.Behr.TopologicalRelationshipsbetweenComplexSpatialObjects.ACMTrans.onDatabaseSystems(TODS),31(1):39,2006. [89] M.SchneiderandB.E.Weinrich.AnAbstractModelofThree-DimensionalSpatialDataTypes.In12thACMSymp.onGeographicInformationSystems(ACMGIS),pages67,2004. [90] TimosK.Sellis,NickRoussopoulos,andChristosFaloutsos.Ther+-tree:Adynamicindexformulti-dimensionalobjects.InProceedingsofthe13thInternationalConferenceonVeryLargeDataBases,VLDB'87,pages507,1987. [91] S.Shekhar,X.Liu,andS.Chawla.AnObjectModelofDirectionandItsImplications.GeoInformatica,3(4):357,1999. [92] JonathanRichardShewchuk.Tetrahedralmeshgenerationbydelaunayrenement.InProceedingsofthe14thannualsymposiumonComputationalgeometry,pages86,1998. [93] HangSiandKlausGartner.Meshingpiecewiselinearcomplexesbyconstraineddelaunaytetrahedralizations.InInProceedingsofthe14thInternationalMeshingRoundtable,pages147.Springer,2005. 248

PAGE 249

[94] N.Stewart,G.Leach,andS.John.Animprovedz-buffercsgrenderingalgorithm.InHWWS'98:ProceedingsoftheACMSIGGRAPH/EUROGRAPHICSworkshoponGraphicshardware,pages25,1998. [95] M.Stonebraker.Inclusionofnewtypesinrelationaldatabasesystems.InInt.Conf.onDataEngineeringConference(ICDE),pages262,1986. [96] AndrzejSzymczakandJarekRossignac.Grow&fold:compressionoftetrahedralmeshes.InProceedingsofthe5thACMSymposiumonSolidModelingandApplications,pages54,1999. [97] T.Chen,A.Khan,M.SchneiderandG.Viswanathan.iBLOB:ComplexObjectManagementinDatabasesThroughIntelligentBinaryLargeObjects.In3rdProceedingsoftheinternationalconferenceonObjectsanddatabases,pages85,2010. [98] T.ChenandM.Schneider.DataStructuresandIntersectionAlgorithmsfor3DSpatialDataTypes.In17thACMSymp.onGeographicInformationSystems(ACMGIS),pages148,2009. [99] T.ChenandM.Schneider.TheNeighborhoodClassicationModel:aNewFrameworkToDistinguishTopologicalRelationshipsbetweenComplexVolumes.InProceedingsofthe30thinternationalconferenceonAdvancesinconceptualmodeling:recentdevelopmentsandnewdirections,ER'11,pages251,2011. [100] T.Chen,M.Schneider,G.ViswanathanandW.Yuan.TheObjectsInteractionMatrixforModelingCardinalDirectionsinSpatialDatabases.InInternationalConferenceonDatabaseSystemsforAdvancedApplications,pages218,2010. [101] R.B.Tilove.SetMembershipClassication:aUniedApproachToGeometricIntersectionProblems.IEEETransactionsonComputers,29:874,1980. [102] R.O.C.TseandC.M.Gold.Tinmeetscad-extendingthetinconceptingis.InICCS'02:ProceedingsoftheInternationalConferenceonComputationalScience-PartIII,pages135,2002. [103] P.vanOosterom,W.Vertegaal,M.vanHekken,andT.Vijlbrief.Integrated3DModelingWithinaGIS.InInt.WorkshoponAdvancedGeographicDataModelling,pages80,1994. [104] R.WeibelandM.Heller.Digitalterrainmodelling.GeographicalInformationSystems,1:269,1991. [105] K.Zeitouni,B.DeCambray,andT.Delpy.TopologicalModellingfor3DGIS.In4thInt.Conf.onComputersinUrbanPlanningandUrbanManagement,1995. [106] S.Zlatanova.On3DTopologicalRelationships.InInt.Conf.onDatabaseandExpertSystemsApplications(DEXA),page913,2000. 249

PAGE 250

[107] S.Zlatanova,P.Mathonet,andF.Boniver.TheDimensionalModel:AFrameworkToDistinguishSpatialRelationships.InInt.Symp.onAdvancesinSpatialDatabases,pages285,2002. [108] S.Zlatanova,A.A.Rahman,andW.Shi.TopologicalModelsandFrameworksfor3DSpatialObjects.JournalofComputers,30:419,2004. 250

PAGE 251

BIOGRAPHICALSKETCH TaoChenhasreceivedhisB.S.fromNanjingUniversityinChinain2006.HestartedhisstudyintheUniversityofFloridain2006.Hisresearchfocusesonspatialdatabasemodeling,especiallyonthedesignofdatastructuresandalgorithmsfor3Ddatamanagementindatabases.HereceivedhisPh.D.fromtheUniversityofFloridainthesummerof2012. 251