<%BANNER%>

Designing, Querying, Implementing, and Integrating Spatial Networks in Spatial Databases

Permanent Link: http://ufdc.ufl.edu/UFE0044911/00001

Material Information

Title: Designing, Querying, Implementing, and Integrating Spatial Networks in Spatial Databases
Physical Description: 1 online resource (152 p.)
Language: english
Creator: Kanjilal, Virupaksha
Publisher: University of Florida
Place of Publication: Gainesville, Fla.
Publication Date: 2012

Subjects

Subjects / Keywords: database -- gis -- implement -- network -- querying -- represent -- spatial
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 networks like road networks, pipeline networks, transportation networks, and power network are being increasingly used in the fields of route planning, land use planning, city planning, traffic forecasting thus promising the generation of vast amounts of spatial networks data. While in order to efficiently handle, represent, store, query, and manipulate large spatial networks database support is a must, database support for spatial networks is rare. Our project aims to provide a conceptual, abstract, and formal model of spatial networks, called Spatial Network Algebra \emph{(SNA)}, that includes types, operations, and predicates and can serve as a specification for their later implementation in spatial database systems and GIS. Based on this abstract model of spatial networks, we will create an implementation of a spatial network data type which we will incorporate in a spatial database. In the context of spatial databases retrieval and handling of spatial networks through querying becomes critical to exploiting the functionality of database. Thus query mechanisms which are able to handle the complexity of spatial networks data becomes essential. Consequently, we show how our spatial network concepts can be embedded into an SQL-like query language.
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 Virupaksha Kanjilal.
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-12-31

Record Information

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

Permanent Link: http://ufdc.ufl.edu/UFE0044911/00001

Material Information

Title: Designing, Querying, Implementing, and Integrating Spatial Networks in Spatial Databases
Physical Description: 1 online resource (152 p.)
Language: english
Creator: Kanjilal, Virupaksha
Publisher: University of Florida
Place of Publication: Gainesville, Fla.
Publication Date: 2012

Subjects

Subjects / Keywords: database -- gis -- implement -- network -- querying -- represent -- spatial
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 networks like road networks, pipeline networks, transportation networks, and power network are being increasingly used in the fields of route planning, land use planning, city planning, traffic forecasting thus promising the generation of vast amounts of spatial networks data. While in order to efficiently handle, represent, store, query, and manipulate large spatial networks database support is a must, database support for spatial networks is rare. Our project aims to provide a conceptual, abstract, and formal model of spatial networks, called Spatial Network Algebra \emph{(SNA)}, that includes types, operations, and predicates and can serve as a specification for their later implementation in spatial database systems and GIS. Based on this abstract model of spatial networks, we will create an implementation of a spatial network data type which we will incorporate in a spatial database. In the context of spatial databases retrieval and handling of spatial networks through querying becomes critical to exploiting the functionality of database. Thus query mechanisms which are able to handle the complexity of spatial networks data becomes essential. Consequently, we show how our spatial network concepts can be embedded into an SQL-like query language.
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 Virupaksha Kanjilal.
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-12-31

Record Information

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


This item has the following downloads:


Full Text

PAGE 1

DESIGNING,QUERYING,IMPLEMENTING,ANDINTEGRATINGSPATIALNETWORKSINSPATIALDATABASESByVIRUPAKSHAKANJILALADISSERTATIONPRESENTEDTOTHEGRADUATESCHOOLOFTHEUNIVERSITYOFFLORIDAINPARTIALFULFILLMENTOFTHEREQUIREMENTSFORTHEDEGREEOFDOCTOROFPHILOSOPHYUNIVERSITYOFFLORIDA2012

PAGE 2

c2012VirupakshaKanjilal 2

PAGE 3

Idedicatethisthesistomyparentsandmysister. 3

PAGE 4

ACKNOWLEDGMENTS IwouldliketothankmyadvisorDr.MarkusSchneider,whoinfectedmewithhisloveofcreativeargumentandthisworkwouldnotbepossiblewithouthisguidanceandsupport.Iwouldalsoliketothankmycommitteemember,Dr.SubrataRoy,whotranscendedtheroleofaprofessortobecomeafriend.IamgratefultotheDepartmentofComputer&InformationSciences&Engineering(CISE),UniversityofFloridaandmyfriendsforsupportingmethroughoutmystudies.Gainesvillewasafunplacetostaybecauseofthem.Finally,Iwouldliketothankmyfamily,whosecontinuedencouragementhasmadethiseffortpossible. 4

PAGE 5

TABLEOFCONTENTS page ACKNOWLEDGMENTS .................................. 4 LISTOFTABLES ...................................... 7 LISTOFFIGURES ..................................... 8 ABSTRACT ......................................... 9 CHAPTER 1INTRODUCTION ................................... 10 2RELATEDWORKANDCOMPARATIVESTUDYOFEXISTINGAPPROACHES 15 2.1DesignRequirementsforSpatialNetworkModel .............. 15 2.2EvaluationofExistingSpatialNetworkModels ............... 20 2.2.1GraphBasedModels .......................... 20 2.2.2PartialGeometricModels ....................... 21 2.2.3PureNetworkModel .......................... 23 2.2.4CommercialImplementations ..................... 26 2.3SummaryofRelatedWorkandNovelContributions ............ 28 2.4HandlingLargeandComplexApplicationObjects .............. 29 3DESIGNANDFORMALDEFINITIONOFANABSTRACTMODELOFSPATIALNETWORKS ..................................... 34 3.1TheSpatialNetworkModel .......................... 34 3.1.1WhatareSpatialNetworks? ...................... 34 3.1.2DenitionofSpatialNetworks ..................... 38 3.1.3RepresentingSpatialNetworksUsingaQueryLanguage ..... 46 3.2OperationsonSpatialNetworks ........................ 49 3.2.1Notations ................................ 50 3.2.2Intra-NetworkOperations ....................... 51 3.2.3Inter-NetworkOperations ....................... 75 3.2.4UseofOperationsinSpatialNetworkQueryLanguage ....... 84 3.3PredicatesonSpatialNetworks ........................ 89 3.3.1Intra-NetworkPredicates ........................ 89 3.3.2Inter-NetworkPredicates ........................ 91 4ANIMPLEMENTATIONCONCEPTFORCOMPLEXUSERDEFINEDTYPES 99 4.1IssuesinRepresentingComplexApplicationObjects ............ 100 4.2TSSUsage ................................... 103 4.3TheConceptofTypeSystemSpecicationFramework ........... 105 4.3.1TSSGrammar ............................. 105 5

PAGE 6

4.3.2PathConcept .............................. 109 4.3.3ADTPackage .............................. 110 4.4AdditionalFunctionalityofTSS ........................ 120 4.5PerformanceStudies .............................. 122 4.6Summary .................................... 124 5DESIGNANDIMPLEMENTATIONOFSPATIALNETWORKSINDATABASESYSTEM ....................................... 126 5.1TheSpatialNetworkImplementation ..................... 126 5.2IncorporatingSpatialNetworkinDatabases ................. 132 5.3UsingSnetandPerformanceEvaluation ................... 136 6CONCLUSION .................................... 140 APPENDIX:TSSINTERFACE .............................. 142 A.1Constructors .................................. 142 A.2PathCreation .................................. 142 A.3SetFunctions .................................. 144 A.4ReadFunctions ................................. 145 A.5AppendFunctions ............................... 145 A.6Deletion ..................................... 146 A.7AuxiliaryFunctions ............................... 146 A.8ObjectAllocationFunctions .......................... 147 LISTOFREFERENCES .................................. 148 BIOGRAPHICALSKETCH ................................ 152 6

PAGE 7

LISTOFTABLES Table page 2-1Comparisonofnetworkfeatures .......................... 29 2-2Comparisonofoperations .............................. 30 3-1Listofspatialnetworkoperations .......................... 88 4-1Pathfunctionsignatures ............................... 110 5-1Evaluationofsnetdatatypeperformance ..................... 137 A-1TSSfunctionsignatures ............................... 143 7

PAGE 8

LISTOFFIGURES Figure page 1-1Architecturechangeofspatialnetworksdatabase ................ 12 3-1Spatialnetworkdiagram ............................... 36 3-2Spatialnetworksindifferentgranularity ...................... 45 3-3Selfintersectionofchannels ............................ 45 3-4Asectionofachannelinaspatialnetwork ..................... 47 3-5Routesoperationexample .............................. 53 3-6ResultsofGetGeometryoperation ......................... 56 3-7TheresultofexecutinggetGraph() ........................ 62 3-8Networkretrievaloperations ............................. 66 3-9Inter-networkoperations ............................... 77 3-10Inter-networkroutesoperation ........................... 77 3-11Networkintersectionoperation ........................... 81 3-12Inter-networkdifferenceoperation ......................... 83 4-1Thelevelsofcomplexdatausageandmanagement ............... 103 4-2Thecomponentsoftheregiondatatype ...................... 107 4-3Theclasshierarchyforcomplexuserdeneddatatypes ............. 112 4-4TheclasshierarchyforObjLoc ........................... 118 4-5Anexamplematrix .................................. 120 4-6Thehierarchicalstructureofamatrix ........................ 121 4-7ThecomponentsoftheregiondatatypeincludingIndex ............. 122 4-8ComparisonoftimerequiredtowriteSegmentsusingTSSandiBLOBAPI .. 123 4-9ComparisonoftimerequiredtoreadSegmentsusingTSSandiBLOBAPI ... 124 5-1TheinternalrepresentationofSnetdatatype ................... 129 5-2Performanceevaluation1 .............................. 138 5-3Performanceevaluation2 .............................. 139 8

PAGE 9

AbstractofDissertationPresentedtotheGraduateSchooloftheUniversityofFloridainPartialFulllmentoftheRequirementsfortheDegreeofDoctorofPhilosophyDESIGNING,QUERYING,IMPLEMENTING,ANDINTEGRATINGSPATIALNETWORKSINSPATIALDATABASESByVirupakshaKanjilalDecember2012Chair:MarkusSchneiderMajor:ComputerEngineeringSpatialnetworkslikeroadnetworks,pipelinenetworks,transportationnetworks,andpowernetworkarebeingincreasinglyusedintheeldsofrouteplanning,landuseplanning,cityplanning,trafcforecastingthuspromisingthegenerationofvastamountsofspatialnetworksdata.Whileinordertoefcientlyhandle,represent,store,query,andmanipulatelargespatialnetworksdatabasesupportisamust,databasesupportforspatialnetworksisrare.Ourprojectaimstoprovideaconceptual,abstract,andformalmodelofspatialnetworks,calledSpatialNetworkAlgebra(SNA),thatincludestypes,operations,andpredicatesandcanserveasaspecicationfortheirlaterimplementationinspatialdatabasesystemsandGIS.Basedonthisabstractmodelofspatialnetworks,wewillcreateanimplementationofaspatialnetworkdatatypewhichwewillincorporateinaspatialdatabase.Inthecontextofspatialdatabasesretrievalandhandlingofspatialnetworksthroughqueryingbecomescriticaltoexploitingthefunctionalityofdatabase.Thusquerymechanismswhichareabletohandlethecomplexityofspatialnetworksdatabecomesessential.Consequently,weshowhowourspatialnetworkconceptscanbeembeddedintoanSQL-likequerylanguage. 9

PAGE 10

CHAPTER1INTRODUCTIONAnynetworkwhichischaracterizedbyaspatialembeddingisknownasspa-tialnetwork.Roadnetworksconnectingcities,railwaynetworksconnectingrailwaystations,pipelinenetworkscarryingoilorwaterarefewexamplesofspatialnetworksweencounterinourdailylife.Spatialnetworksarespatiallyembeddedgraphscreatedbytheinterconnectionofspatialelementslikespatiallinesandspatialpoints.Spatialnetworksplayafundamentalroleindisciplineslikegeographyandcartography.Geographerscommonlyencounterproblemsinvolvingowsinconstrainedenvironmentlikenetworks.Forexample,aphysicalgeographerstudiesstreamsofwaterinariverdrainagesystemorahumangeographerstudiesinter-regionalstreamsofmigrants.Bothareexamplesofacommonfundamentalpropertywhichisaowofsomecommoditytakesplacethroughaconstrainednetworkenvironment.Spatialnetworksalsondapplicationintransportandnavigationassistancesystems.Roadnetworksbeingatypeofspatialnetwork,GPSdevicessuggestmovementwhichareconstrainedinanetwork.Trafcforecastingmodelsusespatialnetworksatitsbase.Spatialnetworksandspatialnetworkanalysisisimportantinlanduseplanningandcityplanningforestablishingwaterways,powergridsandplanningtransportsystems.Theincreasinguseofspatialnetworkshasledtoahugeincreaseinthegenerationofspatialnetworksdata.DatabasessupportisessentialtostorethehugevolumesofspatialnetworkdataandtoutilizetheminvariousGISapplicationsinanefcientway.Spatialdatabases,whichformthedatastoragefoundationofgeographicalandGISapplicationsareonlyawareofprimitivespatialdatatypeslikespatialpoints,spatiallines,andspatialregions.Consequentlycurrentspatialsystemswhichmakeuseofspatialnetworkshaveathreelayeredarchitecture-adatalayer,amiddlewareorprocessinglayerandauserinterfaceasshowninFigure 1-1 .Thedatalayerwhichistypicallyimplementedasspatialdatabasesstoresthebasiccomponentsofanetworkin 10

PAGE 11

termsofpointsandlines.Themiddlewarelayerperformsoperationsandcomputationsnotprovidedbythedatalayer.Itessentiallycreatesanin-memorygraphdatastructuretorepresentaspatialnetworkasacollectionofnodesandlinks.Operationsareperformedinthislayerandtheresultsarefeedtotheuserinterfaceorvisualizationlayeratthetop.Thisapproachspreadsthespatialcomponentsofanetworklikepointsandlinesovervarioustablesinthedatabase.Storinganetworkscatteredovervarioustablesallowausertoinadvertentlymakemodicationswhichcanintroduceinconsistencyinthedatabase.MoreovertherearenoSQLconstructswhichcanquerymorethanonetableatatimesoanumberofusefuloperations(forexample,doestwonetworkintersect)cannotbeimplementedifthenetworkisscattered.Thereiscurrentlynomethodtointegrateaspatialnetworkdatatypeintoadatabaselayerofaspatialsystem.Soaspatialnetworkisnottherstclasscitizensofadatabase.Thegeneralgoalofthisprojectistodesign,dene,andimplementadatamodelforspatialnetworksandincorporateitinadatabasecontextsothataquerylanguagecanbeembeddedinittohandlespatialnetwork.Storingaspatialnetworkinadatabaseasaspatialdatatypewhichconsistsofbothdataandoperationsoverthedatawouldallowadatabasetomanipulatespatialnetworksdirectly(Figure 1-1 B).Inotherwords,spatialnetworkwouldbecomerstclasscitizensinthedatabaseallowingSQLqueriestorunonspatialnetworkandtakeadvantageofthespatialnetworkoperationsandpredicates.ThisstrategywillnotonlyresultinanincreasedperformancebutalsoallowGISapplicationstotakeadvantageofthefeaturesprovidedbythedatabasesystemslikeconcurrencycontrols,transactionprocessing,queryingetc.Themajorreasonforthelackofaspatialnetworkdatatypeinspatialdatabasesisthatithasnotbeenformalizedduetotheinherentcomplexnatureofspatialnetworks.Thelackofmodelforspatialnetworkhasledtothedevelopmentofonlyaverysmallnumberofoperationsonthem.Sotheoverallgoalofthisprojectistodenespatial 11

PAGE 12

A B Figure1-1. Currentarchitectureofspatialnetworksdatabase(A)andproposedarchitecture(B) networks,describeitsproperties,describeanddenethesemanticsofoperationsonit.Sincetheintentionistoincorporatethespatialnetworkdatatypeinadatabase,wehavetocreateanefcientimplementationconceptofspatialnetworksandincorporateitinsidethedatabase.WealsoexplorewaysofqueryingthespatialnetworkusingaSQL-likelanguage.Thestrategyforcreatingaspatialnetworksdatabasetypecanbeseparatedintothreestepseachonedependentontheearlier.First,wecreateandabstractmodelofspatialnetworkswithoutanyregardtoimplementationdetails.Thisstepinvolvesprovidingaformaldenitionofspatialnetworksbasedonmathematicalconceptsinsteadofanintuitivedescription.Theexistenceofaformaldenitionofspatialnetworkthatpreciselydescribestheirpropertiesisessentialfordeningoperationsandpredicatesandensuringclosurepropertyofspatialnetwork.Weprovidesemantic 12

PAGE 13

descriptionofcurrentlyexistingspatialnetworkoperationsandproposenewoperationswhichareusefulinvariousscenarios.Topologicalanddirectionalpredicateshasalsobeenformalizedusingtheformalmodel.Sinceourultimateaimistocreateadatabaseimplementationofspatialnetworks,wedevelopanSQL-likequerylanguagecalledSpatialNetworkQueryLanguage(SNQL)atthisstagetoshowpossiblemechanismstoqueryaspatialnetworksdatabase.ThiswillbeacompletemodelofspatiallyembeddedgraphcalledtheSpatialNetworksAlgebra(SNA).Theabstractdatamodeldescribedhereisbasedoninnitepointsetsandhasbeendescribedusingpurelymathematicalconcepts.Allthethreeaspectsofspatialnetwork:itsgeometry,itsconnectivityanditssemanticsiscapturedandrepresentedbythisdatamodelanditisexpectedthatthismodelwillactasaspecicationfortheeventualimplementationofspatialnetworkindatabase.WeassociateeachandeverypointoftheEuclideanplanewiththematicvalues.Thethematicvalueofthepointsdistinguishescomponentsofthenetwork.Allthepointswithsimilarthematicvaluesarepartofthesamecomponentofthenetwork.Interiorandexteriorofthenetworkcanbedistinguishedbasedonthesethematicvaluesitself.Inparticular,thisapproachenablesustoconsiderattributesofsinglepointsinthenetworkwhichiscalledthespacebasedviewbutalsoprovidesaccesstocollectionofpointshavingequalattributes,theobjectbasedview.Basedontheabstractspecicationofspatialnetworks,wethenshowhowanuserwillviewthespatialnetworkdatatypeonceitisimplementedincomputerdatabasesystems.Thishasbeenillustratedusingasingledataobjectoftypesnetwhichrepresentsanentirespatialnetwork.Theobjectsofsnetdatatypewillbeshownintheformofanabstractdatatype.Anabstractdatatypehidesitsinternaldatastructure.Retrievalandmanipulationofitsvaluescanonlybeperformedbyhigh-leveloperationsthatconcealhowtasksareaccomplished.Thisstrategyhelpsusprovideanuserinterfaceforthespatialnetworkdatastructureswithoutspecifyingtheinternalstructure.Thealgorithmsoftheoperationsandpredicatesonthesnetdataobjectareformulated 13

PAGE 14

atthisstageusinglanguageindependentpseudo-codefromafairlyhighlevelofabstraction.Next,acomprehensivepackageiscreatedtodesign,implement,andusegenericcomplexdatatypesystemsinaveryabstract,user-friendly,andapplicationdomain-orientedmannercalledtheTypeSystemSpecication(TSS)framework.Spatialnetworksbeingacomplexapplicationdatatype,wecreateanimplementationofthespatialdatatypebasedontheTSSframework.Theimplementationofspatialnetworksfollowstheabstractmodelofspatialnetworks.Theabstractmodelillustratesaspatialnetworksdatatypeandsemanticsofrelatedoperationsonthem.Ascomputerscanonlyallowdiscreterepresentation,theabstractmodelcannotbedirectlyimplementedoncomputersystems.Theimplementationofthesnetdatatypeisthenincorporatedintothedatabasesystem.VariousattemptstomodelspatialnetworkandincorporatetheminsidedatabasesystemshavebeentakeninthepastandSection 2 discussesthem.Section 3 givestheabstractdatamodelofthespatialnetworks.Thissectionpresentstheoperationsandpredicatesonspatialnetworkalongwithaquerylanguagewhichdemonstratestheusefulnessofthedatamodelinadatabasecontext.TheTSSframeworktodesignandimplementcomplexdatatypeshavebeengiveninSection 4 .Section 5 providestheimplementationdetailsofthesnetdatatypebasedontheTSSframework.Finally,weconcludeinSection 6 14

PAGE 15

CHAPTER2RELATEDWORKANDCOMPARATIVESTUDYOFEXISTINGAPPROACHESInthissection,werstexplainthefeaturesandcharacteristicsofanidealnetworkdatamodel(Section 2.1 ).NextwecomparethemostrelevantonesinSection 2.2 .InSection 2.3 wecomparethefeaturespresentintheexistingmodelsusingatable.Wealsolistthenovelcontributionsofthiswork.Ourworkalsoconsistofcreatingamechanismofhandlingcomplexapplicationobjectstohandlethespatialnetworkobjectimplementation.ThisapproachiscomparedwithexistingapproachestohandlecomplexapplicationobjectsinSection 2.4 2.1DesignRequirementsforSpatialNetworkModelWenowidentifyasetofdesigncriteriaforspatialnetworksandprovidereasonsforitsneed.Thesesetofrequirementsareconcernedwiththemodelingofspatialnetworks,thefeaturesandcharacteristicsincorporatedintoit. Universality.Aspatialnetworkmodelshouldbeabletorepresentanytypeofspatialnetwork.Thisisagenericmodel,whichmeansitcanrepresentanyspatialnetworkirrespectiveofwhetheritisatransportationnetworkorgravityfednetworklikepipelinenetworkorrivernetwork.Tocreateagenericnetworkthemostfundamentalcomponentsandfeaturesofallspatialnetworkshavetobedistilleddown.Ifrequired,thenetworkcanbeeasilyconvertedintoamulti-modalnetwork,thatis,itcanrepresenttwonetworksasasingleentity(eg,transportationnetworkconsistofbusnetworkandtrainnetwork).Thismodelshouldhaveaformaldenitionbasedonmathematicalconcepts.Thisisimportantsothatthemodelcanbeusedasaspecicationforlaterimplementationofspatialnetworks. Capabilitytospecialize.Thegenericnetworkmodelshouldhaveamechanismtocreatespecializationofthegenericnetworkforspecialtypeofnetworkforexample,roadnetworkorpowerlinenetworketc.andcanbecustomizedtohandleandrepresentnewfeaturesandcharacteristicsthatarepartofdifferentnetworks. 15

PAGE 16

Spaceandthemeaccommodation.Aspatialnetworkconsistsoftwofundamentalaspects:geometryandsemanticallyrelevantthematicattributesandamodelshouldbeabletocapturebothofthem.Fromamodelingperspective,aspatialnetworkcanbeseenasaspatiallyembeddedandlabeledgraph.Aspatiallyembeddedgraphisagraphwhoseverticesaremappedtopointsinspaceandwhoseedgesaremappedtoarcswhichhaveendpointsthatareimagesoftwovertices[ 14 ].Geometricaspectsofanetworkcomprisejunctions,channels,boundarypoints,andcrossoverpointsthatareembeddedinspaceandcharacterizedbypreciselocations.Theconnectionsandthegeometryhelpusanswerquerieslikeshortestpathorperformintersectionoperation.Havingonlythegeometryinamodelpreventstheusersfromposingrelevantquerieslikewhatisthediameterofapipe?inapipelinenetworkorthevoltageofapowerlinenetwork.Themodelshouldbeexibleenoughtoaccommodateanynumberandtypeofthematicattributes.Thespatialembeddingandthethematicattributesshouldbecleanlymappedandcorrelated. Tunablegranularity.Thelevelofdetailofthenetworkrepresentationshouldbecontrolledbytheapplicationdependingonitsrequirements.Themodelshouldbeabletohandledifferentlevelsofgranularity.Forexample,aroadinanetworkcanberepresentedasasingleunitorasasetoflanes.Thisfeaturewillhaveeffectontheamountofthesizeofspatialnetworksandamountofstoragespacerequiredtostorethem. ThreeDimensionality.Spatialnetworksarethreedimensionalinrealityandatwodimensionalmodelofaspatialnetworkcompletelylosestheheightinformation.Anumberofgravityfednetworksrelyontheslopeofthenetworktodetermineowdirections.Similarly,quickestpathcomputationsneedtotakeintoaccounttheslopeapartfromthelengthofthepath.Consequentlyaccuraterepresentationofheightandgradienthastobeaninherentpartofthemodel.Thiscannotberepresentedbyz-levelmethod.ThethreedimensionalnetworkallowquerieslikeReturntheshortestpath 16

PAGE 17

usingonlythenetworkpartwhichisabove100feetfromthesealevel.Itisimportanttomodelaspatialnetworkasathreedimensionalentityotherwiseimportantcomponentsofanetworklikecrossoverpointsaredifculttomodel.Inatwodimensionalnetworkmodelitimpossibletodeneanumberofoperationsonit.Forexample,anetworkunionoperationmergestwoormorenetworksandcreatesasingleresultingnetwork.Thepartswherechannelsfromeithernetworkintersectgivesrisetoajunctionintheresultingnetwork.Sinceatwodimensionaldatamodeldonotstoretheheightsofthechannels,wecannotaccuratelystatewhethertheinteractingchannelsfromdifferentnetworkswereatthesameheightsoitcannotbeconclusivelyprovedwhethertheyformajunctionpointoracrossoveratthepointinquestion.Ithastobenotedthatanoperationwhichcanbeperformedinthetwodimensionalmodelcanbeperformedinathreedimensionalmodelalsosincethethreedimensionalmodelcanbetransformedintoatwodimensionalmodelusingaattenoperation.Athreedimensionalmodelofspatialnetworkcreatesamoreaccuraterepresentationofthenetworkandallowscreationofpowerfuloperatorsandpredicatesonit. DistinguishTopologicalConditions.Varioustopologicalfeatureslikeaccesspoints,transferpoints,andcrossoverpointsarefoundinrealityandtheircorrectrepresentationhasconsequenceinspatialnetworkoperations.Bridgesareexamplesofcrossoversandtheyformwhenoneroadcrossesoveranother.Crossoverpointsaredifferentfromjunctionpointswherethereisapossibilityoftransferofmaterialfromoneroadtoanother.Itisessentialtomodelcrossoverpointsexplicitlyinanetworkmodelbecausetheyimpactshortestpathandroutendingalgorithms.Accesspointsareformedwherematerialcanenterandexitanetwork.Forexamplearailwaystationoraoutletisanaccesspointforrailwaynetworkandpipelinenetworkrespectively.Whenaccesspointsfromtwonetworkappearatthesameposition,itmayleadtoatransferpointandcanbeusedtocomputetheshortestpathwhichencompassesmultiple 17

PAGE 18

networks.Forexample,atrainstationmaybeco-locatedwithabusstationallowingcommuterstotransferfromtraintobusandviceversa. Intra-networkOperations.Anydatamodelshouldhaveanumberofoperationsdenedonthem.Thismakesthenetworkmodelveryusefulinpostingqueriesandtomanipulateit.Theintra-networkoperationsworkonasinglenetworkatatime.Eachoftheoperationsarefundamental,andeventhoughtheyareusefulinitself,theideaistochainmultipleofthemtogethertocreatepowerfulandcomplexuserdenedoperations.Anumberofoperationclasseshavebeenidentiedandtheyareconstructionoperations,analysisoperations,andeditoperations.Theconstructionoperationsareasetofoperationstocreateandappendnewcomponentstoanetworkobject.Theeditoperationsallowanalreadycreatednetworktobemodied.Theanalysisoperationsareimportantoperationstoextractinformationformanetwork.Thesehavebeenfurtherclassiedintobasicoperationslikeshortestpath,connectedcomponents,disconnectedcomponentsetc.whicharerelatedtothestructureofthenetwork.Next,therearetraceoperationswhichndspathsorroutesinanetworkbasedoncertaincriteriaforexample,routesupstream,orroutesdownstream,ndloopsinapathetc.Anotherimportantclassofanalysisoperationsarenetworkselectionoperation.Thesesetofoperationsselectspartofanetworkbasedonacriteria,forexamplepartofthenetworkwhichisabovethan200mofsealevel.Theserviceareaclassofoperationsincludeaccessibilitybasedoperations,vehiclerouting,andTSPtypeofoperations.Finally,metricoperationsareaclassofoperationswhichreturnanumericresult.Theseincludegraphcharacteristicoperationslikeglobalefciency,degreecentralityetc. Inter-networkOperations.Inter-networkoperationsworkontwoormoreoperationsatatime.Thisclassofoperationsincludemulti-modalrouteoperations.ItalsoincludesGeometricSetOperationswhichconsistofoperationslikeunion, 18

PAGE 19

intersection,anddifferenceinanetworkcontext.Theseoperationsareusefulincombiningorcomparingnetworks. NetworkPredicates.Themodelshouldbeabletocomputenetworkpredicates.Thetopologicalpredicatesarethemostimportantclassofinter-networkpredicatesandtheycharacterizethespatialcongurationandarrangementofonenetworkwithrespecttoanotherone.FromadatabaseandGISperspective,theyareusedaslterconditionsforspatialselectionsandspatialjoinsinspatialquerylanguages. ADTView.ADTstandsforAbstractDataTypewhichisawaytodeneadatatypewithoutexposingtheinternalimplementationdetails.Abstractionistheabilitytoengagewithaconceptwhilesafelyignoringsomeofitsdetails-handlingdifferentdetailsatdifferentlevels.Similarly,ADTviewofthenetworkispreferredsinceithidesalltheinternalcomponentsandpreventsthesystemfrombecomingoverlycomplexandintellectuallyhardtomanage.Theuserwillaccessthenetworkdatausingonlytheoperationsprovidedbythemodelwithoutanyknowledgeabouttheimplementationunderneath.Thiswillnotonlymakethemodelmoreelegantbutalsoeasiertoconceptuallyunderstandthemodel. CleanlyImplementable.DatabasessupportisessentialtostorethetheincreasinglyhugevolumesofspatialnetworkdataandtoutilizetheminvariousGISapplicationsinanefcientway.Databasemanagementsystemsaredesignedtohandlelargeamountsofdataveryefcientlyandenablequeryingonthem.Databasealsoperformslogging,recoverycontrol,transactionprocessingandwithanetworkdatamodelincorporatedinsideadatabase,thesefeaturesofadatabasecanbedirectlymadeuseofwithoutexpendingextraeffortinre-implementingthem.Thusitisessentialtorealiseaspatialnetworkmodelwhichiscleanlyimplementableandincorporatedinsideadatabase.Itisadvantageoustostorethenetworkasasingleobjectinthedatabase.Thispreventstheadditionalstepofcombiningallthecomponentsofanetworkintoasingleobjectbeforeanycomputationcanbeperformedinit.Thisisopposedtothestrategyofkeepingan 19

PAGE 20

instanceofasinglenetworkscatteredoveranumberofrelationsthusexposingtheinternalsofanetworktotheuserandcreatingthepossibilityofaccidentalmodication.Thetraditionalissuewithhavingasinglenetworkspreadacrossanumberoftables,consistencyandintegrityofthenetworkhastobeenforcedfromoutsidetheobject.Forexample,allthejunctionsareassociatedwithoneormoreroutes.Ifalltheroutesassociatedwithajunctionareremoved,theparticularjunctionalsohastoberemoved.Adifferentiatednetworkmakeshandingtheobjectsverycomplex.Moreoveritisdifculttoviewthenetworkasasingleobjectandtreatitlikeanyregularin-builtdatatype.AdditionallystoringasinglenetworkinacompletetablemakesittedioustocompareorrunoperationsontwonetworkssimultaneouslyasitwouldrequireSQLtoreadandoperateonmultiplenetworksatatime.Besidesalackofanetworkidentity,thisleadstoseriousperformanceproblemssincealldatahavetobeloadedintothemainmemoryrst. 2.2EvaluationofExistingSpatialNetworkModelsInthissectionweevaluateexistingspatialnetworkmodelsbasedonthedesigncriterialaidintheearliersection.Datamodelsforspatialnetworkcanbebroadlyclassiedintothreecategories:thegraphbasedmodels,thepartialgeometricmodels,andthepurenetworkmodels. 2.2.1GraphBasedModelsThegraphbaseddatamodelsfornetworksinGISarebuiltaroundtwoentities,namelynodeswhicharezero-dimensionalentitiesandarcswhichareone-dimensionalentities.Theplanarembeddingofthenode-arcdatamodelensurestopologicalconsistencyinthenetwork.Sincenodesandarcscorrespondtotheverticesandedgesofagraph,itmakessensetoviewandmodelaspatialnetworkasadirectedgraphG=(V,E)whereVisasetofnodesandEVVisasetofedges.Graphmodelsarepopularastheycancapturethestructureandconnectivityofspatialnetworksbuttheycannotcapturethethematicattributesorthethegeometryofthe 20

PAGE 21

network.Queriesliketheshortestpathqueryorthemaximumowquerycanbedirectlymappedtowellknowngraphproblemsforwhichalgorithmsexist.Forexample,theshortestpathproblemmaybesolvedbyDijkstra'salgorithm,andthemaximumowproblemcanbesolvedbytheFordFulkersonalgorithm.Thegraphviewofspatialnetworkshas,forexample,beenusedin[ 3 15 18 20 23 40 ].Theauthorsin[ 22 ]pointoutthatthegraphmodelingofaspatialnetworkisnotappropriateasitdoesnotpresentarealisticrepresentationofthecomplexityofsuchanetworkintherealworld.Aslightlymodiedgraphmodelhavebeenstudiedin[ 7 21 30 ].Theseapproachesaimatseparatingthespatialandthematicdataintodifferentdatamodels.Alogicalspatialdatamodelencodesthenodesandarcsandmaintainsthegeometrywhiletheassociatedthematicinformationisstoredinrelationaldatabasetables.Theconnectionbetweentherecordsintherelationaltablesandthespatialobjectsisachievedbyemployinguniqueidentiers.Thishybriddatamanagementstrategyhasbeendevelopedtotakeadvantageofarelationaldatabasemanagementsysteminordertostoreandmanipulatethematicattributeinformation[ 29 ].Thissolutiondoesnotallowthatrelationshipsbetweenaspatialobjectandthethematicdatatohavetheirownattributes[ 16 ].Thougheffective,ithasbeenshownthatthissolutionisneitherelegantnorrobust[ 34 ].Theimplementationofgraphmodelsrequireamiddlewarelayer.Sincetheydonothaveanyattributesupport,itisalmostimpossibletoextendittohandlespecicfeaturesofaparticularnetwork.Theydonotsatisfyalmostallthedesigncriteriaslikequeryingsupportandimplementionasasingleunit. 2.2.2PartialGeometricModelsThoughgraphmodelingofspatialnetworkscancapturetheirstructureandconnectivity,theyareunabletorepresentthespatialembeddingofanetwork.Thepartialnetworkbasedmodelisanalternatemodelingapproachistohaveagraphrepresentationinwhicheachvertexisassociatedwithaspatialembeddingcalledpar-tiallyembeddedgraph[ 31 35 ].Themodelofamultimodaltransportnetworkhasbeen 21

PAGE 22

developedin[ 31 ]usingthismethod.ItrepresentsthenetworkasadirectedgraphinwhichtheverticesareassociatedwithaspatiallocationcharacterizedbygeographiccoordinatesintheEuclideanplane.Thegeometriesoftheedgesarenotstoredineitherofthemodelsbutaresimplyspeciedbyapairof(initialandnal)vertices.Theworkin[ 36 ]modelsroadnetworksaspartiallyembeddedgraphsanddenesroadcomponentsbasedontheirpropertiesandthepotentialactionstheymayperform.Theauthorstermthisasanaffordance-basedtheoryofnetworks.Theseapproachesareunabletodistinguishbetweencrossoverpointslikeatunnelbeneatharoadoranoverpassoveraroadandmayleadtowrongresultsinshortestroutecalculations.Acombinationofmultiplerepresentationsoftwo-dimensionaltransportnetworksstoredinmultirepresen-tationaldatabases(MRDB)hasbeenprovidedin[ 41 43 ].Theframeworkincludesasemanticallyrichtwo-dimensionalrepresentationofatransportationnetwork,aweightedmulti-graphrepresentationofatransportationnetwork,andamappingofinstancesoftheformertoinstancesofthelatter.Thismappingdemonstrateshowitispossibletorepresentcomplextransportationnetworkbysemanticallysimplegraphs.Thegraphmodelandmappingarebuilttocapturethetypologiesoftransportationnetworksandtoalsoserveasafoundationforqueryprocessing.Thisisanexampleofnetworknotwhichisnotrepresentedbyasingleobjectbutbyannumberofcomponents.Everyoperationneedsanadditionalco-relationstepwherevariousrepresentionsarecorrelatedtoeachother.Thismodelserveswellfortransportnetworkswhichhaveaxedsetoffeaturesliketurns,roundabouts,free-ways,etc.Differenttypesofnetworkshaveawidevarietyofpropertiesandattributeswhichmaynotberepresentedeasilyinthismodel.Multi-representationofanetworkmakesitdifculttostoreanetworkinadatabasebecausefrequentlyitleadstostoringanetworkinanumberoftablesscatteredinthedatabase.Indoingsothecompleteviewofthenetworkislostansweringsimplequeriesleadtoperformingcomputationallyexpensivejoins.Thedata 22

PAGE 23

modelproposedinthispaperisaself-containeddatamodelforspatialnetworkswhichcanbestoredinadatabaseasasingeentity.Anumberofdatamodelsforspatialnetworkexistswhicharegearedtowardsaspecicnetworkapplicationscenario.[ 11 ]aimstocomputetheshortestpathforanambulancetotravel.Ittakesthemodelofagraphwitharcsforstreetsandnodesforintersections.Weightsareattachedonthearcstoindicateimpedance.Asimilargraphbasedapproachtomodelspatialnetworkhasbeentakenin[ 8 ].Identifyingcriticallocationslikeintersectionsorroadsegmentswhichwhendisconnectedimpactalargeareainaspatialnetworkisameasureofthereliabilityandrobustnessofanetwork.Thisproblemhasbeentackledby[ 10 ]andtheirapproachisbasedongraphtheoryandusesthetopologyofthenetwork(i.e.howthesegmentsinthenetworkareconnectedtoeachother)inordertoidentifyproblematicelements.Thegeometryofthenetworkelements(meaningtheactualspatiallocationofthestreets)hasbeenusedforvisualisationpurposesonly,butthemethoddoesnotuseanyattributeinformation.Themethodcombinesdualgraphmodelingwithconnectivityanalysisandtwotopologicalgraphmeasures:betweennessandclusteringcoefcient.Thesegraphbasedapproachescompletelylosesthegeometricinformationinthespatialnetworksandonlymaintainsthetopologyofthenetwork.Moreoverthissolutiondoesnotallowthespatialnetworkstohaveattributesoftheirown.Thougheffective,ithasbeenshownthatthismethodofmodelingaspatialnetworkisneitherelegantnorrobust[ 34 ]. 2.2.3PureNetworkModelThenetworkdatamodelisonewhichisapurelygeometrybasedmodelforspatialnetworks.Sinceweaimtocreateanetworkmodelourselves,thesearetheoneswhichmostcloselyresembleourmodeltheSpatialNetworkAlgebraorSNA.Amongthesemodels,themostwellknownis[ 19 ]whichcreatesanexplicitnetworkdatamodeltobeusedspecicallyforimplementationofmovingobjectinanetwork.Positionsofmovingobjectscanbebetterexpressedrelativetothenetwork.Thismodeltakespaths 23

PAGE 24

orroutesofanetworkasthebasisfordescribinganetwork.Sincetheintentofthisnetworkistomodelmovingobject,itisheavilybiasedtowardsroadnetworkwithspecialbuiltinroadfeaturesforexample,todistinguishbetweensimpleanddual(divided)roadsandthuscannotbeacceptedasagenericnetworkmodel.Thenetworkdatatypeisavailablethoughadatatypecallednetwork.Alongwiththenetworkdatatype,therearetwoadditionaldatatypescalledgpointandglinetorepresentapositioninthenetworkandapartofthenetworkrespectively.Someoftheoperationsreturnaglineinsteadofanetworkdatatypeeventhoughthestructureissemanticallythesameasanetwork.Thismakeschainingoperationsdifcult.Forexample,ifwewanttondtheportionofthehighwaynetworkwhichiseffectedbyfogandiswithinthecitylimitsofGainesville,wecannotwritethefollowing:in network(in network(highwayNetwork,FogRegion),GNVRegion)Thisisbecausethein networkfunction[1]takesanetworkobjectandaregionobjectandreturnsaglineobject.ThisisopposedtotheSNAmodel,wheresub-networksandroutesofanetworkarealsoobjectsofnetworkdatatypethusmakingsuchchainingpossible.Moreover,sincealargenumberofoperationsaredenedonglinesandgpointinsteadofnetworkdatatypein[1],thenetworkobjecthastobepassedthroughaconversion/extractionfunctiontoessentiallyconverttotheappropriatedatatypebeforetheoperationcanbeapplied.Forexample,gline()functiontoconvertanetworktoaglineobject.Insteadofusinganobjectorientedapproachofmodelinganetworkasasingleself-containedobject,thismodeltakesarelationalapproach.ThenetworkdatatypeismoldedtowardsarelationalrepresentationtobeeasilyincorporatedinaRDBMS.Allthecomponentsofthismodel(network,gpoint,glinejunction,routes,etc)areassociatedwitharelationschemaconsistingofstandarddatabasedatatypes.Themodelincorporatesanumberofoperationswhichallowconstructionandconversionof 24

PAGE 25

valuesoftheabstractdatatypesnetwork(thenetwork:relationXrelation!networkconstructorforexample),glineandgpointononehandandrelationsandvaluesofstandarddatabasetypesonanotherhand.Thisstrategytorepresentanetworkmakesiteasiertottherelationaldatamodelusedinpopulardatabasemanagementsystemsbutsincethestoragemodelisdifferentfromthenetworkmodel,networksneedanextraconstructionstepfromtworelations(junctionsandroutes)beforeanyoperationcanbeexecuted.Anumberofoperationsresultinrelationsrepresentingroutes,junctionsorothernetworkcomponentsinsteadofasingleobject.Thismakeshandingtheobjectsverycomplex.Moreoveritisdifculttoviewthenetworkasasingleobjectandtreatitlikeanyregularin-builtdatatype.Aninstanceofasinglenetworkmaybescatteredoveranumberofrelationsthusexposingtheinternalsofanetworktotheuserandcreatingthepossibilityofaccidentalmodication.Thetraditionalissuewithhavingasinglenetworkspreadacrossanumberoftables,consistencyandintegrityofthenetworkhastobeenforcedfromoutsidetheobject.Forexample,allthejunctionsareassociatedwithoneormoreroutes.Ifalltheroutesassociatedwithajunctionareremoved,theparticularjunctionalsohastoberemoved.StoringasinglenetworkinacompletetablemakesittedioustocompareorrunoperationsontwonetworkssimultaneouslyasitwouldrequireSQLtoreadandoperateonmultiplenetworksatatime.Besidesalackofanetworkidentity,thisleadstoseriousperformanceproblemssincealldatahavetobeloadedintothemainmemoryrst.Ifadatabasemanagementsystemcannativelystorenetworksasarstclasscitizenasatableattribute,wecanpostSQLqueriestointersectalltheroadnetworksandtherailnetworksdirectlyinthefollowingformat:Selectintersect(rail.network,road.network)FromRailNetworksasrail,HighwayNetworkasroad 25

PAGE 26

Thisqueryisdifculttoperformwhenthenetworkisnotstoredasatableattributebutasinglenetworkstoredacrossanumberoftables.Weneedtoknowallthetableswhicharepresentandthenrstcreatethenetworkdatatypefromthembeforeanyoperationcanbeperformed.Inordertoovercomethesedisadvantages,ourpapertakesasingleentityviewofthenetwork,whichmeansalltheprimitivecomponentsandrepresentationsofaspatialnetworkarecombinedintoasingledatatype.Thisallowsaspatialnetworktobestoredasasingleentityinadatabaseasarstclasscitizenandallthefeaturesofthedatabasecanbetakenadvantageof.Ouremphasisinthispaperisonanincreaseoffunctionalityandeleganceatthelogicallevel,thepropagationoftheabstractdatatypeapproachinadatabasecontext,andthepossibilityofquerysupport.ThismodelhasbeenimplementedintheSECONDOsystem. 2.2.4CommercialImplementationsInthissectionwediscusstwowidelyusedcommercialimplementationsofspatialnetwork.TheyincludeESRI'sArcGISandOracle'snetworkdatamodelinsideOracleSpatial.ESRIdoesnothaveasingledatamodelforspatialnetworkbutinsteadhavenetworkdatasetfortransportationnetworksandgeometricnetworkwhichofferawaytomodelcommonnetworksandinfrastructuresfoundintherealworld.Waterdistribution,electricallines,gaspipelines,telephoneservices,andwaterowinastreamareallexamplesofresourceowsthatcanbemodeledandanalyzedusingageometricnetwork.Whenageometricnetworkiscreated,ArcGISalsocreatesacorrespondinglogicalnetwork,whichisusedtorepresentandmodelconnectivityrelationshipsbetweenfeatures.Thelogicalnetworkistheconnectivitygraphusedfortracingandowcalculations.Insteadofrelyingontraditionalarcnodetopology,geometricnetworkprovidesasetofnetworkfeatures:simplejunctions,simpleedges,complexjunctions,andcomplexedges.ThegeometryforthesenetworkfeaturesaremodeledusingEdgetables,Junctiontables,andconnectingbothofthemisanother 26

PAGE 27

tablecalledtheConnectivitytable.Basedonthenetworkdatasetandthegeometricnetworkmodelsanumberofspecializedindustry-specicdatamodels[ 13 ]havebeendeveloped.Anetworkdatasetiscreatedfromthefeaturesourceorsourcesthatparticipateinthenetwork.Itincorporatesanadvancedconnectivitymodelthatcanrepresentcomplexscenarios,suchasmultimodaltransportationnetworks.Italsopossessesanetworkattributemodelthathelpsmodelimpedances,restrictions,andhierarchyforthenetwork.Apartfromedgefeaturesandjunctionfeatures,networkdatasetalsohasturnfeatures.Geometricnetworkfeatureclassescannotparticipateasnetworkdatasetsourcesbecausetheyareactivelylinkedtoageometricnetwork.Duetothelackofagenericdatamodelforspatialnetworks,itisdifculttoincorporatetheminsideadatabase.Asdifferentdatamodelsareusedforeachnetworktype,unionormergelikeoperationswillnotbeclosed.AlltheESRIdatamodelsaredesignedforimplementationasESRI'sgeodatabase.Ageodatabase[ 32 ]isamiddlewarelayerlikeobject-relationalconstructformanaginggeographicdataasfeatureswithinanindustry-standardrelationaldatabasemanagementsystem(RDBMS).GeodatabaseneedthesupportofacommercialRDBMSfordatastoragewhileititselfformingthemiddlelayerandexposingasetofabstractdatatypesandcorrespondingoperations.Themiddlewarelayerperformsanadditionalstepofinterrelatingthevariousrepresentationswhichmeansthatthereneedstobetheabilitytotranslateamongthedifferentexternalinfrastructurerepresentations.Asthemiddlewarelayerisoutsidethedatabase,allthefeaturesofthedatabase,forexample,transactionprocessing,concurrencycontrol,querying,etc.arelost.WhileitisnotclearhowthedataisactuallystoredinthebackendRDBMSes,thetaskofmaintainingthespatialandreferentialdataintegritylaysonthegeodatabase.OracleSpatialinOracleDatabase10g[ 28 ]hasanetworkdatamodelthatmodelsandanalyzesnetworks.Thisnetworkdatamodelconsistsoftwocomponents:anetworkdatabaseschemaandaJavaAPI.Thenetworkschemacontainsnetwork 27

PAGE 28

metadata,tablesfornode,link,andpathmetadata,andaPL/SQLpackage.TheJavaAPIenablesnetworkrepresentationandnetworkanalysis.Inthismodel,theactualdataarestoredintables.Networkfeaturesaremappedtonodes,links,andpathsandeachnetworkhasfourassociatedtables-thenodetable,thelinktable,theoptionalpathtable,andapathandlinktable.Networkintegritycontraintslikeexistanceofendnodesforeachlinksetcareenforcedbycreatingreferentialconstraintsonthetables.Apartfromthesetables,themeta-dataofanetworkarestoredinaseparatetable.TheJavaAPIactsasthemiddlewarelayerandprovidesthefunctionstoaccessandmanagethenetworkdata.Italsoprovidesasetofnetworkoperationsonspatialnetworks.Eventhoughthismodelisgenericandcanstoreanytypeofspatialnetworks,itscattersthenetworkdataovermanytablesandthussufferfromanumberofdisadvantagesdiscussedabove. 2.3SummaryofRelatedWorkandNovelContributionsBasedonthedesigncriteriaofconceptualandimplementationrequirementsandourdiscussiononexistingapproaches,Table 2-1 comparesthefeaturesandcharacteristicsoftheimplementedmodelsofspatialnetworkalongwithourmodeltheSNA.Thetablesuggestthatthecurrentimplementationexhibitshortcomingswithrespecttothedesigncriterias.Ourmodelproposedinthispaper,SNA,promisestofullalmostallthedesigncriteriawithgoodlevelofsupportforallofthem.Ournovelcontributionspresentedinthisworkissummarisedasfollows: 1. Formaldenitionofagenericabstractspatialnetworkwhichcanbeeasilyextended,usingthematicattributes,tomodelanyparticularfeatureorcharacteristicofaspecicnetwork. 2. IncorporategeometryandtopologyinasinglenetworkobjectandprovideanelegantADTviewofthenetworkwhichcanbemanipulatedusingtheoperationsprovided 3. A3-dimensionalnetworkwhichcansupportalloperationsdenedontwodimensionalnetworkmodelsbutalsoincorporatenewoneswhichinvolvetheheightofnetworklocations. 28

PAGE 29

4. Explicitlymodelcrossoverpointswhichcanbeusedtodistinguishfromjunctionpointsandhasanimpactontheshortestpathcalculations. 5. Networktopologicalpredicateshavenotbeenconsideredinanypreviouswork.Theymaybeusedinlteringqueriesandforspatialjoins 6. Nomiddlewarelayerisrequiredtouseourimplementationstrategysincethenetworkdataisstoredassingleobjects.ThisalsohelpsprovideastandardizedSQL-likequeryingsupport.Table 2-1 comparesthefeaturesoftheESRI'snetworkmodel,Oracle'snetworkmodel,SECONDO'snetworkmodelwiththeSNAnetworkmodel.TheavailablenetworkanalysisoperationsforthesamedatamodelshavebeencomparedinTable 2-2 Table2-1. Comparisonofnetworkfeatures FeatureSNAESRIOracleSECONDO 1.UniversalityYYYY2.ADTviewYYY3.TunablegranularityY4.ExplicitlycrossoversY5.InbuiltstandardQueryingSupportYY6.3DmodelY7.ArbitraryThematicAttributesYY8.Multi-modalNetworkY9.ImplementedassingleobjectY10.OperatorYYYY11.PredicatesY 2.4HandlingLargeandComplexApplicationObjectsOurspatialnetworkobjectconsistofanumberofsubcomponentswhichareofvaryingsizesanddatatypes.Applicationobjectsshowingthesecharacteristicsareknownascomplexapplicationobjects.Implementingdatatypeshavinginternalcomponentsandsubcomponents(complexapplicationobjects)aredifcultasthereisnointegratedwayofrepresentingthemasasingleobject.ExtensibleMarkupLanguage(XML)ispopularmechanismtostorecomplexapplicationobjects.XMLisamajorsimplicationrelativetowhatitaspiredtoreplaceStandardGeneralizedMarkupLanguage[ 6 ].XMLisamarkuplanguagethatdenesasetofrulesforencodingdocumentsinatextualformatthatisbothhuman-readableandmachine-readable. 29

PAGE 30

Table2-2. Comparisonofoperations OperationClassOperationnameSNAESRIGeometricESRINetworkOracleSECONDONetworkDataSet BasicOperationShortestPathYYYYYConnectedComponentsYDisconnectedComponentsYYlength/distanceYYYCurvatureYYGradient/FlowDirectionYYFindNetworkElementsYYYYTraceOperationsFindPath/RouteYYYYYFindUpstreamYYFindDownstreamYYFindUpstreamAccumulationYFindDownstreamAccumulationYFindLoopsYSelectNetworkWindow/ClippingYDisableAcomponentYYYPutWeightsonEdgeYSelectNetworkonacriteriaYYYYSelectpartofChannelYNearestNeighborYYAccessibilityBasedontimeYBasedondistanceYYYBasedoncostyyVehicleRoutingYLocationAllocationYTSPYGeometricSetOperationsNetworkIntersectionYYYNetworkUnionYNetworkDifferenceYMetricOperationNodeDegreeYYCharacteristicPathLengthYGlobalEfciencyYDegreeCentralityY ItisdenedintheXML1.0Specication[ 46 ]producedbytheW3C,andseveralotherrelatedspecicationsprovidedundertheW3CDocumentLicense.AnumberoflanguageshavebeenbasedonXMLforexample,RSS,Atom,Soapetc.XMLrepresentationanditsextensionsarecomplexhavingaprocessor,markupwhichitselfconsistoftags,elements,andattributes.XMLalsorestrictssomecontrolcharactersfromappearingintheXMLdocument.XMLlesincludethestructureofthedataalongwiththedata.Anyautomatedsystems.forexample,automatedpublishingrequiresthatthestructureofthecontentisxedandstandardized.AsXMLallowsanytypeofstructureinitscontent,itisdifculttoenforceit[ 2 ].Additionally,XMLhasnoinherent 30

PAGE 31

mechanismtohandleoptionalitemsorrequireditemsinthecontent.ThelargenumberofconstructsmaketheXMLextremelyverbose[ 1 ].ThehighverbosityalsoresultsfromthefactthatXMLrepresentationpurportstorepresentasmuchinformationaspossible.AreoccurringremarkaboutXMListhatdocumentarenotoptimizedforsize.Includingtagsastextelementsintodocumentspillsbandwidthandaugmentstransmissionlimits[ 44 ].MappingthebasictreemodelofXMLtotypesystemsofprogramminglanguagesordatabasescanbedifcult,especiallywhenXMLisusedforexchanginghighlystructureddatabetweenapplications,whichwasnotitsprimarydesigngoal.OthercriticismsattempttorefutetheclaimthatXMLisaself-describinglanguage[ 4 ].TheTypeSystemSpecication(TSS)frameworkwhichhasbeendevelopedasapartofthisprojectandisusedtodene,implement,andusenewcomplexdatatypesinanabstractmannerallowstheuserofthedatatodenethestructureofthedataonceandthenusethedatamultipletimes.Thismechanismseparatesthedatafromthemetadataandmakesthedatamorecompact.MoreovertheTSSframeworkenforcesexplicitdatatypesforitscomponentdatawhichallowsthedatatobestoredinabinaryformatunlikeXMLavoidsstoringthedatainstringformwhichisnotonlyslowtoprocessbutalsotakesupmorestoragespace.ApplicationprogramminginterfaceshavebeenindependentlydevelopedtouseandmanipulateXML.XMLismajorlycriticizedforitsabilitytoonlyrepresentthestructureofthedatabutnotanymeaningtothedocument[ 42 ].Thereareanumberofeffortsunderwaytointegrateontologies,knowledgerepresentationintoXMLwhichareturningouttobecumbersome.XMLisconsideredincompatiblewithrelationdatamodel[ 33 ].ThearticleexplainsthatthecommonimportandexportfunctionsofbigdatadonotresembleXMLsoalargeamountofeffortisrequiredtomakeXMLdatatindatabases.Thistimeisspentinserializing,parsing,andtransmitting.XML'sexpansivenessimposesmemory,storage,andCPUcostswhicharepresentevenwhenthecontentiscompressedinadatabase. 31

PAGE 32

MoreoverXML'scomplexityimposescostswhichoutweighthebenets.Thearticlearguesthatthein-linetagginginXMLisredundantasitdoesnotfullyconveythedatatypesofthedata.Separatingthestructureofthedataseparatelyfromthedataisamoreefcientwaytorepresentthedata.ThesedisadvantagesmakeXMLslowindatabases[ 25 ]andpreventsitsuseinbigdata.SQL/XMLstandardareprocessorsforXMLdesignedtouseXMLinconjunctionwithSQL.ThespecicationdenesfunctionsforworkingwithXML,includingelementconstruction,mappingdatafromrelationaltables,combiningXMLfragments,andembeddingXQueryexpressionsinSQLstatementsandsupportrelationalprocessing.Thearticle[ 9 ]explainstheissuesinhandlingtheXMLdataindatabases.TheSQL/XMLvendorsolutionsareproprietaryandincompatiblewitheachotherresultinginallvendorssharingthelowestcommondenominatorapproachandatteningtheXMLhierarchydataintorelationaltables.ThismethodcanintroducedatalossandinaccuracyinXMLresults.ThecurrentSQL/XMLstandarddoesnotusethefullhierarchicalprocessingsupportedbySQL.ThereisnoW3orANSIstandardorevenabestpracticesdocumentonhowtospecifycorrecthierarchicalprocessing.XQueryandtheSQL/XMLstandardrelyontheusertospecifythehierarchicalprocessinglogictogetavalidmeaningfulresult.HierarchicalstructuresandtheirprocessinghaveverypreciseprincipleswhichneedtobefollowedforXMLresultstobecorrect.XMLprocessingisdoneinalinearprocessingfashion.InordertoimproveontheperformanceandstoragecharacteristicsofXML,GoogledevelopedProtocolBufferwhichisanextensiblewayofserializingstructureddataforuseincommunicationprotocolsanddatastoragepurposes[ 17 ].ProtocolBufferallowthedenitionofthestructureofthedatausinga.protolewhichisclosetostandardprogramminglanguageslikeC++orJava.Afterthestructureofthedataisspecied,theProtocolBuffergeneratesimpleaccessorsforeacheldaswellasmethodstoserializeandparsethewholestructuretoandfromrawbyterepresentation.Thismechanism 32

PAGE 33

claimstobearoundtentimessmallerandaroundahundredtimesfasterthanXML[ 17 ].ThismethodofrepresentationofcomplexdataismuchclosertotheTSSframeworkbecausethepackageprovidesasemanticmethodforaccessingandmanipulatingthedatausingasemanticmethod.Theprotocolbuffershavetoperformexpensiveexplicitserializationandde-serializationbeforethedatacanberead.TheTSSframeworkontheotherhandcandirectlyreadthedatafromthebyterepresentationwithoutanyneedforde-serialization.Similarly,theTSScanwritethedatatothestoragemediumwithoutanyneedforexplicitserialization.OneofthedrawbacksofprotocolbuffersisthattheydonothaveaconceptofreferenceobjectsasprovidedbytheTSSframework.Thereferenceobjectallowsthecreationofexibleindexesonthedata.MoreoverProtocolBuffercreatesseparatefunctionsforaccessingtheinternaldataitems.Protocolbuffersmakeaseparatetreatmentforlistsandaspecialdatatypehastobeusedforaccessingthem.ThisisopposedtothestrategyfollowedbytheTSSframeworkwhichcreatesapathtothecomponentinquestionandthenmanipulatestheminauniformmannerthroughasmallsetoffunctionswhichmaybeusedonallsubcomponentsaswell.ThereisnodifferenceinaccessingandmanipulatinglistsorsinglecomponentsinTSSframework.Thismakestheaccessandmanipulationofthedatamuchsimplerandintuitive.Additionally,theTSSdecouplesthestoragemechanismforanobjectandmakestheimplementationcompletelyagnostictohowthestorageofthecomplexobjectisdone.Theconsequenceisonlyasingleimplementationisrequiredirrespectiveofhowthedataisstoredorwhereitisaccessedfrom.TheProtocolBuffersserviceabstractionhasbeencriticizedforbeingveryleaky.Itdoesntprovideanyexceptionsoranywaysofdealingwithfailureexceptahuman-readablestring[ 45 ]. 33

PAGE 34

CHAPTER3DESIGNANDFORMALDEFINITIONOFANABSTRACTMODELOFSPATIALNETWORKSThissectionprovidesthecompleteabstractleveldatamodelforspatialnetworks.Itstartsoffwithanintuitivedescriptionofspatialnetworks,itscharacteristicsanditsproperties(Section 3.1 ).TheoperationsonspatialnetworksaredescribedintuitivelyandthenmathematicallydenedinSection 3.2 .PredicatesonspatialnetworksarepresentedinSection 3.3 3.1TheSpatialNetworkModelInthissectionweintroduceourmodelofspatialnetworks.WebeginbyprovidinganintuitivedescriptionofspatialnetworksinSection 3.1.1 .InSection 3.1.2 wegivetheprecisemathematicaldenitionsofspatialnetworkcomponentsandthespatialnetworkitself. 3.1.1WhatareSpatialNetworks?Spatialnetworksareaubiquitousspatialconcept.Weusetransportationnetworkslikeroadnetworksforcars,buses,andtaxisorrailwaynetworksfortrainsandmetroeveryday.Waterpipelinesandpowernetworkssupplyourhouseswithvaluableresources.Ifweabstractfromtheseparticularkindsofnetworks,wecansaythattheprimarypurposeofspatialnetworksistoprovideaspatiallyconstrainedandratherstaticenvironmentformaterials(inthebroadestsense)todynamicallymoveorowthroughthem.Fromamodelingperspective,aspatialnetworkcanbeseenasaspatiallyembeddedandlabeledgraph.Alabeledobjectmeansthataspatialnetworkhasgeometricandthematicaspects.Aspatiallyembeddedgraphisagraphwhoseverticesaremappedtopointsinspaceandwhoseedgesaremappedtoarcswhichhaveendpointsthatareimagesoftwovertices[ 14 ].Geometricaspectsofanetworkcomprisejunctions,channels,boundarypoints,andcrossoverpointsthatareembeddedinspaceandcharacterizedbypreciselocations.Thematicaspectsspecifythesemantics(likenames,functions,orproperties)ofgeometriccomponentsandareattachedtothem 34

PAGE 35

intermsofannotationsorlabels.Figure 3-1 Ashowsamapdepictinganetworkofroads.Figure 3-1 Bisoursimpliedrepresentationofthesameroadnetwork.SomeimportantroadsfromFigure 3-1 Ahavebeenabstractedascurveswhichformtheedgesofthegraph.Therearevariouspointsofinterestonthenetworkwhichareanalogoustonodesinagraph.Wetermthesepointsasinteractionpoints;theyhavebeenmarkedbylledandunlledcirclesandrectanglesinFigure 3-1 B.Interactionpointsincludejunctionpoints,crossoverpoints,andboundarypoints.Junctionpointsarenetworkcomponentswhichmarklocationswheretwo(ormore)roadsintersect.Thepointj1inFigure 3-1 BisajunctionpointbecauseatthispointtheroadsWNewberryRoad(shownasl1inFigure 3-1 B)andSW75thstreet(shownasl6inFigure 3-1 B)intersect.Carscanswitchfromoneroadtoanotheronlyatjunctionpoints.JunctionpointsaremarkedwithlledcirclesinFigure 3-1 B.Thisisincontrasttocrossoverpointswheretworoadsinteractbutoneroadformsabridgeovertheother.Forexample,pointsc1,c2,andc3inFigure 3-1 Barecrossoverpointsbecauseatthesepoints,theInterstate75(shownasl5inFigure 3-1 B)formsabridgeoverWNewberryRoad,SW20Avenue,andSWArcherRoad(representedasl1,l3andl4respectivelyinFigure 3-1 B).Carscannotswitchdirectlyfromoneroadtoanotheratcrossoverpointsastheinteractingroadsareseparatedbyaverticalgap.CrossoverpointsaredepictedaslledrectanglesinFigure 3-1 B.Whileothermodelsignorecrossoverpoints,ourmodelconsidersthemsinceoperationsliketheshortestpathoperationleadtowrongresultsifcrossoverpointsareignoredandtreatedasintersectionpoints.Junctionpointsandcrossoverpointsarenotmutuallyexclusive;bothmayexistatthesamepoint.Asanexample,threeroadsmayinteractatthesamepoint,butonlytwoofthemactuallyintersectformingajunction,whilethethirdonemayformabridgeoverit.pointsareanotherkindofinteractionpointswhosenodedegreeisequaltoone.Thepointsb1,...,b11inFigure 3-1 Bareboundarypointsastheyformthelimitingpoints(extremities)ofthenetwork;theyaredrawnasunlledcirclesinFigure 3-1 B. 35

PAGE 36

A B Figure3-1. Anexampleofaspatialnetwork(B)extractedfromamap(A) Thejunctionpointsandboundarypointsinaspatialnetworkareconnectedtoeachotherbywhatwetermaschannels;theyarethepassagesthroughwhichmaterialistransported.Anitesequenceofconsecutivelyconnectededgesinaspatiallyembeddedgraphformsasinglechannel.InFigure 3-1 A,theroadsrepresentthechannels.Thepipesinapipelinenetworkandthetracksinarailwaynetworkareexamplesofchannels.Achannelhasexactlytwoendpoints.Anendpointofachannelmaybeajunctionpointandthuslinkatleasttwodifferentchannels,oritformsanextremityofthenetworkandisthusaboundarypoint.Asanexample,oneoftheendpointsofchannell3connectstochannell7atthejunctionpointj6.Ontheotherhand,ifanendpointdoesnotlinkatleasttwodifferentchannels,itrepresentsanextremityofanetworkandishenceaboundarypoint.AllthepointsmarkedbyhollowcirclesinFigure 3-1 Bareboundarypointsofthenetwork.Therearepointsinthenetworkwherematerialsowinginthenetworkareallowedtogetinandoutofit.Wecallthemaccesspoint.Arailwaystationisanexampleofanaccesspointasitallowspeopletogetinandoutoftherailwaynetwork;'exits'inahighwaynetworksystemarealsoexamplesofaccesspointsasvehiclescanenterandleavethenetworkatthesepointsonly.Whentwonetworksappearsidebyside 36

PAGE 37

itmayhappen(byaccidentorbydesign)thattheaccesspointsofboththenetworkappearatthesamepointintheplane.Forexample,abusstation(whichisanaccesspointforthebusnetwork)maybeco-locatedwitharailwaystation(accesspointfortherailwaynetwork).Thissituationallowsmaterialtoowfromonenetworktoanotheraspeoplemaygetoffatthebusstationandthengointotherailwaynetwork.Wheneveraccesspointsfromtwoormorenetworkareco-located,wecallthesituationatransferpoint.Transferpointscometoplaywhencalculatingtheshortestpathbetweentwopointsinthesameordifferentnetwork.Whencalculatingtheshortestpathbetweentwonetworks,itmightmulti-hoppedwhichpartsoftheroutepassingoveradifferentnetwork.Thiscanonlyhappenifthetwonetworksaresituatedsidebysideandhaveatransferpointbetweenthem.Channelsinaspatialnetworkarenotonlyspeciedbythegeometriesoftheiredgesalone.Inaddition,theyaredenedbynamesattachedtotheirgeometries.Forexample,highwayI75cannotbeidentiedinanetworkbyitsgeometryalone.Toidentifyit,wehavetolocateandgatherallthepointsintheEuclideanplanewhichhavethenameI75.Inourspatialnetworkmodel,weassignthematicattributevaluestoallpointsofachannel.Theseattributevaluescanbeusedtoidentifynetworkcomponentslikechannelsandinteractionpoints.Wecallthesevalueslabels,andeachpointintheEuclideanplaneismappedtoasetoflabels.Anylabelisatupleoftheform(id attr,access pt,passable,theme attr).Theid attrpartofalabelisthechannelidentieranduniquelyrepresentsaparticularchannelinanetwork.Thiscanbeachannelname(forexample,I75)orachannelnumber(forexample,pipeno.6).AllpointsintheEuclideanplanehavingthesamechannelidentier(id attrpart)intheirlabelsarepartofthesamechannel.Theid attrpartisalwaysattherstpositionofalabel.Thelevelofdetailofthespatialnetworkrepresentedcanbecontrolledbytheuserusingtheid attrattribute.Ordinarilyonlyasinglechannelwouldrepresentaparticularroad,butiftheintentionistomodelandrepresentthelanesintheroad, 37

PAGE 38

theneachlanehastoberepresentedbyachannel.Theaccess ptisabooleaneldandavalueoftrueforthiseldindicatesthattheparticularpointisanaccesspointotherwiseitisafalse.Sometimespartofanetworkmaybeblocked.Forexample,duetomaintenancereasonsaparticularroadcanbeblocked,orpartsofalanemaybemadeunavailableforusebytrafc.Thesepartsareimpassableandcanbeappropriatelyhandledusingtheattributecalledpassable.Thisisabooleanvariableandafalsevalueindicatesthatthepartofthechannelisnotavailableforuse.Thishasimmenseimplicationwhilecomputingshortestpathsandotheroperations.Thetheme attrpartofalabelmodelsthethematicattributesofapointinthespace.Atheme attrvaluemayhaveasimpletypesuchasintegerorstring,oritmayhaveacomplextypewhosevaluesrepresentcombinationsofnvalues,forexample.Examplesofthematicattributesrangefromspeedlimitsofaroadtothecapacityofanoilpipe.Hence,wecanmodel,forexample,thatthesameroadhasdifferentspeedlimitsindifferentsectionsofthisroad.Wecallatypethatcontainslabelsofthesamekindaslabeltype.WeassumethateachlabeltypeAcontainsanelement?Athatrepresentstheundenedvaluevalue.Itiscalledtheexteriorlabel,andtheoutsideareaofanetworkislabeledbyit.FortheCartesianproductoftwolabeltypesAandBwelet?AB=(?A,?B),andfortheunionofAandBweequate?A,?B,and?A[B(thatis,wetakethecoalescedsum).Ifnoambiguitiescanarise,wesometimesomitthetypeindexandsimplyuse?.Inallnetworkvisualizationtools,coloringandmarkingsdifferentiatechannels.Thisissimilartoourassignmentoflabelstopointsinaspatialnetwork. 3.1.2DenitionofSpatialNetworksAspatialnetworkisathreedimensionalspatiallyembeddedandlabelledgraph.Itisimportanttomodelaspatialnetworkasathreedimensionalentityotherwiseimportantcomponentsofanetworklikecrossoverpointsaredifculttomodel.Atwodimensionalmodelofaspatialnetwork[ 26 27 ]completelylosestheheightinformationwhichmakesitimpossibletodeneanumberofoperationsonit.Forexample,anetwork 38

PAGE 39

unionoperationmergestwoormorenetworksandcreatesasingleresultingnetwork.Thepartswherechannelsfromeithernetworkintersectgivesrisetoajunctionintheresultingnetwork.Sinceatwodimensionaldatamodeldonotstoretheheightsofthechannels,wecannotaccuratelystatewhethertheinteractingchannelsfromdifferentnetworkswereatthesameheightsoitcannotbeconclusivelyprovedwhethertheyformajunctionpointoracrossoveratthepointinquestion.Thespatialnetworkdatamodeldescribedinthispapercreatesathreedimensionalmodel.Allthepointsinathreedimensionalspacearelexicographicallyordered.Assumingpointsp1,p22R3,wesay,p1
PAGE 40

onelabel,thecorrespondingpointbelongsonlytoasinglechannelwithoutajunctioninvolved.Hence,itisaninterior,non-sharedpointoraboundarypointofachannel.Acrossoversituationsmeansthattwoormorechannelsinteractbuttheydonotgeometricallyjoin.Thoughcrossoversareimportantsinceoperationsliketheshortestpathleadtowrongresultsifcrossoverpointsareinterpretedasjunctionpoints.Inthethreedimensionalmodelofspatialnetwork,weinherentlystoretheheightofeachnetworkpointsoacrossoversdoesnotneedspecialmodeling.Anytwopointsinaspatialnetwork(fromthesamechannelordifferentchannels)whichlieinthesameverticallineformsacrossoversituation.Mathematicallyitcanbesaidthatthetwopointsformingthecrossoversituationhaveidenticalxco-ordinateandyco-ordinatevaluesbutdifferinthevalueofthezco-ordinate.Note,wecannotcallitancrossoverpointasthereisnosinglepointwherethecrossoverhappens.Thesearetwoseparatepoints,unlikeajunctionpointwheretwochannelsactuallyintersect.Insummary,weseethatapointofachannelthatisneitherajunctionpointnoracrossoverpointcanbemodeledasanelementofalabelsetA;anexampleislA,3.Themodelingofajunctionrequiresasetoflabelsindicatingtheparticipatingchannels,thatis,anelementof2A,forexample,flA,1,lA,2g.Acrossoversituationdonotdemandanyspecialhandling,neitherdoesthepresenceoftwojunctionpointsatthesameverticallineasthesearetwoseparatepointsinspace.InordertoobtainauniquespatialmappingofallthepointsoftheEuclideanplane,wetakethemostgeneralcaseandmakethespatialmappingafunctionfromR3to2A.Thedenitionofaspatialmappingisasfollows:LetAbealabeltype.AspatialmappingoftypeAisatotalmapping:R3!2A.ThesetofallspatialmappingsoftypeAisdenotedby[A],thatis,[A]=R3!2A.WhenappliedtoasetX,thefunctionisiterativelyappliedtoalltheelementsofX,thatis,(X)=f(p)jp2Xg.Theconceptofspatialmappingsistoogeneralforspatialnetworks.Inotherwords,noteveryspatialmappingrepresentsaspatialnetwork.Wehavetoimposecertainrestrictionsonspatial 40

PAGE 41

mappingsasdescribedinthefollowing.Theideaistoinferanddistinguishchannels,junctions,andcrossoversfromthelabelinformation.Pointswhichhavealabelotherthanf?gbelongtoachannel.Acrossoverpointsaredetectedatpointsofthenetworkwhichsharethesamexandycoordinatesbuthavedifferentzcoordinates.Toidentifyjunctionpoints,welookintoeachsetoflabels.Ifanyoneofthesetshasmorethanonechannellabel,itmeansthatthechannelswhichbelongtothoselabelsformajunction.Wenowprovidethedenitionforidentifyingchannelsandjunctionpointsinaspatialmapping.LetbeaspatialmappingoftypeA.Then (i)L()=fpjp2R3^(p)6=f?gg(channels)(ii)J()=fpjp2R3^j(p)j>1)g(junctions)L()containsallthepointsintheEuclideanspacewhicharepartofachannel.Individualchannelscanbeidentiedbythelabelinformation,asthechannelidentiergivenbytheid attrpartofthelabeluniquelyidentiesachannel.Allthepointsofthesamechannelhavethesamechannelidentierintheirlabel.Thus,eachchannelmaybedistinguishedbygroupingthepointsinL()bytheid attrpartofthelabel.Thisnecessitatesalookintothelabelsandanextractionofpartsfromthem.WecanassumethatanelementofthelabeltypeAisasequenceoflabelattributevaluesandthateachsuchvalueisofa(possiblydifferent)setAi.Thatis,A=ki=1Ai=A1...Ak.ThedomainofanAiisdenotedas(Ai)anditisassumedthat(Ai)isalwaysatomic,thatis,itisnotcomposedofacombinationofdomains.LetI=f1,...,kg,S=fj1,...,jng,andSI.Toextractselectedattributevaluesfromalabel,wedeneaprojectionoperatorasfollows: S:i2IAi!j2SAjwithS(a1,...,ak)=(aj1,...,ajn).NextwedeneafunctioncalledId Attrtoextractalltheid attrlabelparts(channelidentiers)actuallypresentinaspatialmapping.IttakesasargumentaspatialmappingoftypeAandcomputesthesetofallid attrvaluesbyusingtheprojectionoperator 41

PAGE 42

.Astheid attrattributeisassumedtobealwaystherstattributea1inalabel,weusef1gtoextractitsvalue.Consequently,A1isthelabeltypeoftheid attrattribute.Further,wegeneralizefunctionapplicationsfromelementstosetsofelements.Letf:X!Ybeafunction,andletBX.Thenweallowtousethenotationf(B)whichisgivenasf(B)=ff(x)jx2Bg.Thisishereappliedtoaspatialmapping.ThefunctionId Attrisnowdenedfor2[A]as: Id Attr()=ff1g(l)js2(L()),l2sgEachchannelhasauniqueid attrvalue;thus,allpointswhichbelongtothesamechannelhavethesameid attrvalueintheirlabels.ThetwofunctionsChannelandChannelsidentifyallchannelsinaspatialmapping.ThefunctionChannelgetsanid attrvalueasinputanddeterminesallpointsintheEuclideanplanethathavethisvalueintheirlabelsandthusformaparticularchannel.ThefunctionChannelsgetsaspatialmappingasinputandcollectsallchannelsbyiteratingoverallofitsid attrvaluesPointsrepresentingjunctionpointsorcrossoverpointsarepartofinteractingchannels;hence,theyappearinmorethanonechannel.LetbeaspatialmappingoftypeA,andletl2Id Attr().Then (i)Channel(,l)=fpjp2L()^9s2(p)s:f1g(s)=lg(ii)Channels()=[l2Id Attr()Channel(,l)Forthedenitionofaspatialnetwork,wehavetoconsideritsunderlyingline-shapedgeometricstructuresinthreedimensionalspace.Thisrequirestheconceptofacurves[ 38 ].Curvesaresingle-component,non-intersecting3Dlines.Thesetcurvesofallsingle-component,non-intersecting3DlinesintheEuclideanspaceisdenedas: curve=fLR3j(i)9f:[0,1]!R3:L=f([0,1])(ii)fisacontinuousmapping(iii)jf([0,1])j>1(iv)8a,b2(0,1),a6=b:f(a)6=f(b)g 42

PAGE 43

Conditions(i)and(ii)requiretheexistenceofacontinuousfunctionthatgeneratesthesimple3Dline.Condition(iii)avoidstheanomalythatallelementsoftheunitintervalaremappedtothesamepoint.Condition(iv)statesthatacurveisnotallowedtobeself-intersectingbuttheymaybeself-touching(endpointsmayintersect).Basedonthedenitionofcurveswedeneorderedcurveswhicharecurveswiththeadditionalconstraintthatthecurvehasdistinctstartingandendingpointsandthestartingpointislexicographicallysmallerthantheendingpoint.Thedenitionoforderedcurveisgivenas: orderedcurve=fLcurvej(i)9f:[0,1]!R3:L=f([0,1])(ii)f(0)
PAGE 44

channelsof.ThesetS()E()ofthosepointsthataresharedbymorethanonechannelisgivenas S()=fp2E()jcard(ffLij1in^fLi(0)=pg)+card(ffLij1in^fLi(1)=pg)6=1gThentheboundarypoints()aregivenas()=E())]TJ /F4 11.955 Tf 11.96 0 Td[(S(). Modelinglanesofroads.Thechannelconceptisdynamicandallowstheusertodecidethelevelofgranularityofrepresentationofaspatialnetwork.Thisisknownasmapgeneralizationanditmaybedenedastheselectionandsimpliedrepresentationofdetailappropriatetothescaleand/orpurposeofamap.InthespatialnetworkshowninFigure 3-2 A,theinterstateisrepresentedbyachannel.Similarly,eachroadisrepresentedbyachannel.Thisgranularityisnotdetailedenoughtorepresentlanes.Foralanelevelgranularity,individuallaneshavetobemodeledaschannels.Figure 3-2 BshowstheboxedpartofFigure 3-2 Abutwithgreaterlevelofdetails.WecanseethatI75isrepresentedbysixchannels-oneforeachlane.Thelocalroadsarealsomodeledinthelevelofthelanes.Theid attrofthechannelsareappropriatelynamedthatthattheyaredistinguishable.TheexitsinFigure 3-2 Balsomodeledinagreaterlevelofdetail.Inthiscase,theexitsareseparatechannels(le1,le2,le3,andle4)withoneendformingajunctionwiththeslowlaneoftheinterstateandtheotherendformsajunctionwiththelocalroads(shownaslledcircles),thusconnectingtheinterstatewiththelocalroads. IntersectingChannelsandClosedLoops.Ourmodelexplicitlydisallowsselfintersectingchannels.Whichmeans,wecannothaveroadswhichintersectwithitself.Examplesofsomeself-intersectingchannelaregivenintheFigure 3-3 .Thishasbeendonetomaintainconsistencywiththeideaofjunctionswheretwodifferentchannelsintersect.Ifthesamechannelwouldbeallowedtointersectatapoint,thenthiswouldleadtoajunctionpointwhichhasbeencreatedbytheintersectionofthesamechannel. 44

PAGE 45

A B Figure3-2. Anexampleofaspatialnetwork(A)andthesamenetworkwithlanelevelgranularity(B) InthecaseofFigure 3-3 A,thepointj1formsajunctionbytheintersectionofthesamechannell1.Sothispointhastobelabelledasfl1,l1gwhichreducestoofl1g.So,thereisnotwayofdistinguishingthisfromanyothernon-junctionpointinthechannell1.Semantically,ifsomeoneisstandingatpointj1andhewantstoproceedtowardschannell1,thereisnowayoftellwhichofthefourcurvesheshouldproceedtoo.Thiswouldleadtoissuesinway-ndingorroutenavigationsystems. A B C Figure3-3. Exampleofdisallowedselfintersectingchannels(A),(B)andaloop(C) Closedloopsareobservedfrequentlyinroadnetworksandourmodelcanhandletheminspiteoftherestrictiondiscussedearlier.Inaclosedloopchannel,theendpointsintersectbutitdoesnotcreateajunctionpointsinceajunctionpointtoform,twodifferentchannelshavetointersect.IntheclosedloopchannelshowninFigure 3-3 C, 45

PAGE 46

theendpointsofthechannell1aree1ande2.Thepointe1intersectswiththepointe2,andtheyarelabelledasfl1,l1gwhichisequivalenttofl1gthusbecomingaregularnon-junctionchannelpoint. 3.1.3RepresentingSpatialNetworksUsingaQueryLanguageThemainideabehindthespatialnetworksmodelistoincorporateitinsidethedatabase.Oncethedatamodelisincorporatedinthedatabase,aquerylanguageisrequiredtoeffectivelyaccessandmanagethespatialnetworkdata.Inthissection,wediscussanewquerylanguagecalledtheSpatialNetworkQueryLanguage.Weassumetheexistenceofadatabasewhichiscapableofnativelystoringaspatialnetworkasanobjectofthesnetdatatype.Wetreatasnetobjectasanabstractdatatypeobjectimplyingthatwemakenoassumptionsabouthowitisimplemented,inordertoexplaintheSNQL,welaydownsomeconstraintsonhowthethematicinformationofaspatialnetworkisstored.Thethematicinformationofanychannelinanetworkiscontainedinalabelassociatedwiththechannel.TheCREATELABELTYPEstatementisusedtocreatelabeltypesinthefollowingmanner:CREATELABELTYPEL(a1b1,a2b2,...,anbn)whereallaiisanetworklabelattributeandbi2D,thesetofallbasicSQLdatatypes.Thisstatementcreatesanewnet label typeL.Asanexample,thelabeltypefortheroadnetworkcontainingthespeedlimitsandthenumberoflanesmaybecreatedasfollows:CREATELABELTYPEroadLabel(id attr:string,speed limit:real,lanecount:integer).Thisstatementcreatesanewnet label typecalled`roadLabel'containingthreenetworklabelattributes:theid attroftypeString,speedlimitoftypeReal,andlaneCountoftypeInteger.InordertocreatespatialnetworksofthenewlycreatedtyperoadLabeltheCREATESNEThNetworkNamei()statementisused.Thestatementiswritteninthefollowingmanner:CREATESNETroad(roadLabel).Thisstatementcreatesan 46

PAGE 47

emptynetworkcalled`road'whichisoftype`roadLabel'.The`road'networkhastobepopulatedwithchannelsandthecorrespondinglabelinformationusingtheADDstatement.TheADDstatementisusedtoaddchannelstoanalreadycreatedsnetobject.BeforewediscusstheADDstatement,weneedtheconceptofchannelchunks.Eachchannelinanetworkisconceptuallysubdividedintoelementarypartscalledchannel-chunks.Channel-chunksarecontiguouspartsofchannelswhereallthepointsofthechannelhaveidenticalvaluesforallthethematicattributes.Itmaybeviewedascollectingcontiguouspointsofachannelforwhichthethematicdataareexactlythesame.Forexample,considerastreetrepresentedasachannelC1.Thatislabeledwithtwoattributesspeed limitandlaneCount.Figure 3-4 showshowthevaluesoftheseattributeschangeoverthechannel.Thusthischannelconsistof4channel-chunks:s1(speed limit=40,laneCount=2),s2(speed limit=50,laneCount=2)s3(speed limit=50,laneCount=3)ands4(speed limit=40,laneCount=3) A Figure3-4. Asectionofachannelinaspatialnetwork AllthesechannelchunkshavetobeinsertedintoanemptysnetobjectindividuallyusingtheADDstatement.Letusassumethattherearetworoadsinaroadnetworkcalled`13thStreet'and`UniversityAvenue'.Dependingonthespeedlimit,thStreetconsistsoftwochannelchunkswhosegeometryisrepresentedbythetwospatiallineobjectsl1andl2havingspeedlimits35mphand45mphrespectively.Similarly,on 47

PAGE 48

UniversityAvethespeedlimitsvaryfrom35mphand45mphatvariousportions.Theseportionsarechannelchunksandarerepresentedbythetwospatiallineobjectsl3andl4.Boththesestreetshavealanecountof4.TheADDstatementtakesanetworkinwhichtoaddthechannelchunk,andalabelconsistingofthelabelvalues.Inthiscasethelabelattributeisatuple(id attr,speedlimit,lanecount).WeusetheADDstatementstoaddtheseroadsinthenetworkinthefollowingmanner: ADD(road,l1,(`13thStreet',35,4))ADD(road,l2,(`13thStreet',45,4))ADD(road,l3,(`UniversityAve',35,4))ADD(road,l4,(`UniversityAve',45,4))TherecanbeoneormoreADDstatementswiththesamechannelname(id attr)indicatingthatallthechannelchunksarefromthesamechannel.Achannelasdenedbytheabstractmodelisacontinuouslinearfeaturewithoutanybreaksorbranches.Inordertomaintainconsistencywiththeabstractdenitionofchannels,thegeometryofthechannelchunksofthesamechannelhastobeacontinuoussequence.Thisisknownasthegeometricintegrityconstraintwhichstatesthatchannelsarecontinuousandcannothavebranches.ThisisensuredbytheSNQL'sgeometricintegritycheckwhichensuresthatchannelsareconsistentandpreventstheuserfromenteringinconsistentdata.WheneveranewchannelchunkisaddedusingtheADDstatement,theSNQLinternallycheckstoseewhetherchunksofthesameid attrhavealreadybeenadded.Ifthereexistschannelchunkswiththesameid attr,thenthegeometricintegritycheckisperformed.Thecheckinvolvesthefollowing:rst,thegeometryofthenewlyaddedchunkshouldmeetwiththegeometryofsomeotherchunkwiththesameid attr.Meetisatopologicalpredicatewhichassertsthatonlytheboundarypointsortheendsofthespatiallinesintersect.Second,morethantwochannelchunksofthesameid attrshouldnotmeetatthesamepointtopreventbranchesinachannel.Ifanyone 48

PAGE 49

oftheintegritycheckfails,thegeometricintegrityconstraintdoesnotholdandtheADDstatementresultsinafailure.Inordertodemonstratesomequeryexamples,weconsideratableRoadNet-works(RoadType:string,roadNet:snet,AdministeredBy:String)consistingofthefollowingrecords, (Interstate,interstate hwy,`Federal')(CountryRoads',cr road,`State')(LimitedAccessHighway,laHwys,`Federal')(SingleCarriageWay,sig way,`State')(WinterRoads',win roads,`State')Afteraspatialnetworkobjecthasbeenpopulated,wemayinsertitinadatabasetableusingtheregularSQLINSERTstatement.Assumingaspatialnetworkcalled`interstate hwy'alreadycreated,wecaninsertitintotheRoadNetworkstableinthefollowingmanner:INSERTINTORoadNetworksVALUES(`Interstate',interstate hwy,`Federal').Similarly,alltheotherrecordshavetobeinsertedinthetable. 3.2OperationsonSpatialNetworksAnumberofinterestingoperationshasbeendesignedonspatialnetwork.Theseoperationsassistinposingqueriesonspatialnetworks.Weprovidethesemanticsandformaldenitionoftheseoperations.Theformaldenitioncanbeusedasspecicationforthedesignofalgorithmstoimplementtheoperations.Theoperationsarebroadlyclassiedintointra-networkoperationsandinter-networkoperations.Theintra-networkoperationsareoperationswhichworkonasinglenetwork,thatis,thisclassofoperationtakesasinglenetworkasargument.Theinter-networkoperationsontheotherhandtakestwoormorenetworksasarguments.BoththeseclassesofoperationshavebeenfurtherdividedintoBasicoperations,whicharefundamentaloperationsandareusedforthedenitionofthemainoperationsonspatialnetworks,Auxilliaryoperations,whicharemadeupofbasicoperationsandhelpdeneotheroperations,Retrievaloperations, 49

PAGE 50

whichreturnpartsofspatialnetworkdependingononeormorecriteria,Networkstructureoperations,whichareconcernedwiththegeometricalstructureofthenetwork,Metricoperations,whichreturnnumericresultsonly,andnally,Networksetoperations,aresetoperationslikeintersection,unionanddifferenceinthecontextofaspatialnetwork.ThisclassicationhasbeenshownindetailsinTable 3-1 below.Thecolumnsareforintra-networkandinter-networkoperations.Therowsarefordifferentclassesofoperations.Anemptycellindicatesthattherearenooperationforthatcategory.Thisdoesnotmeanthattheremaynotbeanypossiblefutureoperationsforit.Section 3.2.1 laysdownsomenotationsusedthroughoutthissection.TheintranetworkoperationsaredescribedinSection 3.2.2 .TheinternetworkoperationsareprovidedinSection 3.2.3 3.2.1NotationsWebeginthissectionbydescribingasetofnotationsusedthroughoutthissection.Theseincludethesub-networknotationandthedotnotationtoaccessspecicco-ordinatevalues. Sub-network.Intuitively,anysub-networkofanetworkiscalledthesubsetofthebiggernetworkandindicatesacontainmentrelation.Thesubsetrelationisdenotedbythesymbolandifthespatialnetwork'isasubsetofnetwork,thenwewrite'.Allthepointsofthesub-network'shouldbelongtothepointsoftheoriginalnetwork,alsothejunctionsofthesub-networkshouldbethejunctionsintheoriginalnetwork.Thelabelsatallthepointsinthesubnetworkshouldbethesubsetofthelabelsfromtheoriginalnetwork.Anetworkisthesubsetofitself.Consideringtwospatialnetworks:[A]and',andassumingL()givesallthechannelpointsofthenetworkandJ()givesallthejunctionpointsfromthenetwork,weformallydenethesubsetrelationas: 50

PAGE 51

Subset(,')=(i)'2[A]isaspatialnetwork^(ii)L(')L()^(iii)J(')J()^(iv)8p2':'(p)(p)Thesupernetworkrelationshipisthecorollaryofthesub-networkrelationshipandif',itmeansthatisthesuper-networkof'.Thesupernetworkrelationshipisindicatedbythesymbolandwesay'. Co-ordinateswithinapoint.A3Dpointismadeupofthreeco-ordinates(x,y,z).Inordertoaccessanyoneoftheco-ordinatevalues,weusethedotnotationwiththeco-ordinates.Forexample,letp2point3d.Thexco-ordinatevalueofthepointpisaccessedbyp.x,similarlytheyco-ordinateisaccessedbyp.y,andthezco-ordinateisaccessedbyp.z. 3.2.2Intra-NetworkOperationsTheIntra-Networkoperationsareoperationswhichworkonasinglenetwork.Theintra-networkoperationshavebeenclassiedintobasicoperations,auxillaryoperations,networkretrivaloperations,operationsbasedonnetworkstructure,andmetricoperations.BasicOperations Theseoperationsarefundamentaloperation,thatis,theydonotneedthesupportofotheroperationsfortheirdenition.Theseoperationsareusefulontheirownadditionally,theyareusedtocreatenewoperationsonspatialnetworks.BasicoperationsincludeLength,Routes,Flattenoperationsetc. Length.ThefunctionLengthisanimportant(overloaded)operatorwhichcalculatesthelengthofachannel.Ityieldsarealvalueasaresult.TheLengthoperatorhasthesignature[A1]!R.Initssimplestform,thisoperatortakesachannelasaninputparameter.Afunctiondescribingachannelmustbeintegrableandbounded.Thisisalwaysthecaseasthedenitionofchannelsrequiresthatitsdescribingfunctionis 51

PAGE 52

continuousandboundedtotheinterval[0,1].Tocalculatethelength,wedividetheentirechannelintoinnitesimallysmallchordapproximationsandintegratethem.LetusconsiderachannelL2Channels()withadescribingfunctionfLandthepointsetfL([0,1]).TheLengthoperatorisdenedas Length(L)=ZfL(1)fL(0)p 1+(@fL(x)=@x)2@xThismethodmayalsobeusedtocalculatethelengthbetweenanytwopointsinthesamechannel.Hereweintegratefromtherstpointinthechanneltothesecondpointinthechannel.ConsideragainachannelLasdescribedabove,andthetwopointsp=fL(a)andq=fL(b)witha,b2[0,1].WedeneamodiedLengthoperatorwiththesignatureLength:A1[0,1][0,1]!Ras Length(L,a,b)=ZfL(b)fL(a)p 1+(@fL(x)=@x)2@xAnothervariationoftheLengthoperatorisanextensionoftherstversionwiththesamesignatureLength:[A]!R.Butinthiscase,thisoperatortakesacompletespatialnetwork2[A]asargumentandsumsupthelengthsofallthechannelsinthespatialnetwork.Itisdenedas Length()=XL2Channels()Length(L) Routes.Arouteisacourse(way,path,connection)onecantakeinordertoreachasecondlocationfromarstlocation.Givenaspatialnetwork,arouteconnectstwopointsofthenetworkthroughanalternatingsequenceofchannelsandjunctionsofthesamenetwork.AroutebetweenthetwocitiesAtlantaandGainesvilleisanexample.Findingroutesisanimportantfeatureofspatialnetworkapplicationsasthelocationsofmovingobjectsinanetworkarestoredwithrespecttoaparticularroute.Therecanbepossiblyalargenumberofroutesbetweentwopointsinanetwork.Weconsiderroutestobespatialnetworkswithcertainconstraints.Asarouteconnectstwopointspandq,theroutestartsatpandendsatq;thatis,pandqaretheboundarypointsofthespatialnetworkwhichrepresentsaroute.Topreventanydiscontinuityintheroute,itcanonlyhaveexactlytwoboundarypoints.Additionally,allthepointsinthenewnetworkshould 52

PAGE 53

bepassable.ThisischeckedbytheisPassablepredicatewhichreturnstrueifthepointinquestionhastheisPassablelabelmarkedastrue,indicatingthatthepointcanbeusedtomovethroughit.Assumingaspatialnetwork:[A]andapointinthenetworkp2,theisPassablepredicateisdenedas: isPassable:[A]R3!BisPassable(,p)=3((p))ThisoperationsimpleprojectsthevalueoftheisPassablelabelusingtheprojectionoperator. A B C Figure3-5. TheroutesreturnedbyexecutingRoutes(,j2,j6)onthespatialnetworkshowninFigure 3-1 B Inourmodel,wedeneanoperatorcalledRouteswhichtakestwopointsinsideaspatialnetworkandcreatesthesetofallpossibleconnectionsbetweenthem.Notethatthisisaconceptualconsiderationandnotanalgorithmicimplementationstrategy.ThesignatureoftheRoutesoperatorisRoutes:[A]R3R3!2[A].Thisoperatorreturnsthesetofallspatialsubnetworksrepresentingroutesbetweentwoselectedpointsoveragivenspatialnetwork.Allpointsofeachreturnedspatialnetwork,thatis,route,areasubsetofthepointsoftheoriginalnetwork.Figure 3-5 showstheresultingrouteswhentheoperationRoutes(,j2,j6)isperformedonthenetworkdepictedinFigure 3-1 Btocalculatethepathsfromj2toj6.Givenaspatialnetwork2[A]andtwopointsp,q2L(),wedenetheRoutesoperatoras 53

PAGE 54

Routes(,p,q)=f'j(i)'2[A]isaspatialnetwork(ii)L(')L()(iii)8l2'(J(')):jlj=2(iv)p,q2(')(v)j(')j=2(vi)8l2':isPassable(l)gCondition(i)statesthateveryrouteisaspatialnetwork.Condition(ii)ensuresthateveryroute'isasubnetworkof.Condition(iii)requiresthateachjunctionofaroutemusthaveadegreeofexactlytwo.Condition(iv)statesthatpandqareboundarypointsoftheroute'.Condition(v)ensuresthatpandqaretheonlyboundarypointsof'.Also,allthepointsintheroutehavetobepassable(Condition(vi)). Flattenoperationofapoint.Eventhoughaspatialnetworkisathreedimensionalstructure,sometimesitisnecessarytoconsidertheattenedstructureofthenetwork.Flatteninga3Dpointmeanstoconvertitintoa2Drepresentationbyignoringthezco-ordinateofthepoint.Flatteninganetworkmeansonlythexandyco-ordinatesofthestructureismaintainedwhilethezcoordinatesofeachpointisignored.Thisisusefulforexamplewhenndingthepartofaroadnetworkwithinacity.Thecityisrepresentedasa2Dregionandthentheintersectionofthenetworkisdonewiththeregion(WindowoperationinSection 3.2.2 ).TheFlattenoperationdoesexactlythisandreturnsa2Dpointfroma3Dpointbyignoringthezcoordinate.ThesignatureoftheFlattenoperationis:Flatten:point3D!point2D.InordertoformallydenetheFlattenoperationweintroduceanotationfor3Dpoints.Considera3Dpointp,theformaldenitionoftheoperationisgivenby, Flatten(p)=fp'2point2Djp'.x=p.x^p'.y=p.ygFurther,wegeneralizefunctionapplicationsfromelementstosetsofelements.Letf:X!Ybeafunction,andletBX.Thenweallowtousethenotationf(B)whichisgivenasf(B)=ff(x)jx2Bg.Thisishereappliedtoaspatialmapping. 54

PAGE 55

Flatten()=fFlatten(p)jp2L()g Getgeometry.ThegetGeometryoperatorextractsselectedpartsofthegeometryofaspatialnetworkbysuppressingitsthematicinformationanditsconnectivityinformation.Itreturnsthesegeometricpartsintheformofaspatiallineobjectrepresentedbythespatialdatatypeline3D[ 38 ].ThegetGeometryoperatorisoverloadedandabletotakeasinglechanneloranentirenetworkasanargument.Thegeometryofachannelisasimple(thatis,continuousandnon-self-intersecting)linewhilethegeometryofanetworkisanexampleofacomplexlinewithpossiblymultiplecomponents.ThesignatureoftherstversionofthegetGeometryoperatorisgetGeometry:[A]A1!line3DinwhichA1istherstcomponenttypeofthelabeltypeAandrepresentsthetypeoftheid attrattribute.ThesignatureofthesecondversionisgetGeometry:[A]!line3D.Figure 3-6 BshowstheresultofrunningtheoperationgetGeometry(,l5)ontheroadnetwork2[A]showninFigure 3-6 A.Theresultisasinglelinedepictingthegeometryofthehighwaynamedl5.Alljunctionsandcrossoverpointsareremovedfromit,leavingonlyitsgeometry.Similarly,iftheoperationgetGeometry()isappliedtothesamenetwork,theresultisacomplexlinewithoutanylabelinformationandanyjunctionorcrossoverinformationasshowninFigure 3-6 C.Afterobtainingthegeometryofaspatialnetworkorpartofaspatialnetworkasaline,itcanbeusedtoperformintersectionoperationsasshowninSection 3.2.2 .Assumingaspatialnetworkandachannelidentierl2A1,wehavethefollowingdenitionforthetwoversionsofgetGeometry. getGeometry(,l)=Channel(l)getGeometry()=fp2R3j(p)6=f?ggTherstversionusestheChanneloperatordescribedinSection 3.1.2 toreturnallthepointsbelongingtothechannel(identier)l.Theseconddenitioncollectsallthepointsintheplanewhichdonothaveanexterior(?)label.Thesepointsformthegeometryofthenetworkasallpointsofthenetworkhaveanon-exteriorlabel. 55

PAGE 56

A B C Figure3-6. TheresultofexecutinggetGeometry(,l5)(B)andgetGeometry()(C)onthespatialnetworkshownin(A) Junctionpoints.Sometimes,giventwochannels,itisinterestingtoknowwhethertheyinteractwitheachother,andiftheydointeract,wemightwanttoclassifytheinteractionasacrossoverorajunction.TheoperationsJunctionPointstaketwochannelidentiersasargumentsandreturnthesetofpointswheretheyformjunctions.Thisoperatorreturnsanemptypointsetiftherearenosuchjunctionpoints.Forexample,theresultofexecutingtheoperationsJunctionPoints(,l7,l2)onthenetworkshowninFigure 3-1 Breturnsthesetfj5gwhichindicatesthatthepointj5isthepointwherethechannelswiththelabels(componentid attr)l7andl2interacttoformajunction.ThesignatureofthisoperationisJunctionPoints:[A]A1A1!point3D.Weassumeaspatialnetwork:[A]andtwochannelidentiersl1,l22A1withl16=l2. JunctionPoints(,l1,l2)=fpj(i)p2J()(ii)9e1,e22(p):f1g(e1)=l1^f1g(e2)=l2gThisoperationreturnsasetofpoints(Condition(i))whoselabelincludesasinglesetcontainingbothchannelidentiersl1andl2(Condition(ii)).Thisindicatesthatthechannelswiththeidentiersl1andl2formajunctionatthatparticularpoint.Thisoperationisoverloadedandalsotakeonlyasinglechannelidentierl2A1asanargument.Inthiscase,theoperationsJunctionPointsreturnsalljunctionpointsofthe 56

PAGE 57

channelidentiedbyl.Forexample,inFigure 3-1 B,theexpressionJunctionPoints(,l7)returnsallthepointsonl7whichrepresentthelocationsofjunctionswithotherchannels.Theresultingsetisfj4,j5,j6,j7g.ThesignatureofbothoperatorsisJunctionPoints:[A]A1!point3D.ThedenitionofthisversionoftheoperationJunctionPointsisasfollows: JunctionPoints(,l)=fpj(i)p2J()(ii)9s2(p):f1g(s)=lg Crossoverpoints.Crossoverpointscanbeconsideredaspointsofinteractionbetweentwochannelseventhoughinathreedimensionalsensetheydonotphysicallyintersectforexampleabridgeoveraroad.TheoperationsCrossoverPointstaketwochannelidentiersasargumentsandreturnthesetofpointswherethechannelsformcrossoversoranemptysetiftherearenosuchpoints.OnperformingCrossoverPoints(,l3,l5)onthenetworkshowninFigure 3-1 Breturnsthesetfc5gwhichindicatesthatthepointc5isthepointwherethechannelswithid attrl3andl5foracrossover.ThesignatureofthisoperationisCrossoverPoints:[A]A1A1!point2DanditsdenitiontakesthehelpofanotherfunctioncalledthePartOfChannelstakesanypointonthenetworkandreturnsthesetofallchannelidentierstowhichthepointbelongs.Assumingaspatialnetwork:[A]andtwochannelidentiersl1,l22A1withl16=l2. CrossoverPoints(,l1,l2)=fatten(p1)j(i)l12PartOfChannels(p1)^l22PartOfChannels(p2)(ii)p1.x=p2.x^p1.y=p2.y^p1.z6=p2.zgThisoperationrstndsapairofpointswhicharepartofchannell1andl2respectively(condition(i))andthencheckstoseewhetherthepointshavethesamexandyco-ordinatesbutdifferentzco-ordinate(condition(ii)).Onlywhentheseconditionstogetherarefullled,canacrossoverexist.TheCrossoverPointsoperationisoverloadedtoreturnallthecrossoverpointsaparticularchannelisinvolvedin.Thisversionoftheoperatortakesasargumentasingle 57

PAGE 58

channelid attrandreturnsasetofpointsofcrossoverwiththischannelandanyotherchannelinthenetwork.ThesignatureofthisversionisCrossoverPoints:[A]A1!point2Dandthedenitionisasfollows: CrossoverPoints(,l1)=fatten(p1)j(i)l12PathOfChannels(p1)^p22)]TJ /F10 7.97 Tf 6.59 0 Td[(1(2A))]TJ /F4 11.955 Tf 11.95 0 Td[(Channel(l1)(ii)p1.x=p2.x^p1.y=p2.y^p1.z6=p2.zgCondition(i)ndpairsofpointssuchthatp1isfromthechannell1andp2isapointfromthenetworkbutnotapartofchannell1.Condition(ii)ensuresthatp1andp2arecrossoverpoints. Getallaccesspoints.Therearepointsinthenetworkwherematerialsowinginthenetworkareallowedtogetinandoutofit.Wecallthemaccesspoint.Arailwaystationisanexampleofanaccesspointasitallowspeopletogetinandoutoftherailwaynetwork;'exits'inahighwaynetworksystemarealsoexamplesofaccesspointsasvehiclescanenterandleavethenetworkatthesepointsonly.Thepointsinanetworkwhichareaccesspointsarelabelledassuchinthenetworkbythesecondeldofanylabelcalledis access pt.Theentirelabelisoftheform(id attr,is access pt,.thematic attr)Itisabooleaneldandavalueoftrueindicatesthattheparticularpointisanaccesspointotherwiseitisafalse.AnaxillarypredicatecalledisAccessPtidentiesanpointasanaccesspointornot.Thispredicatechecksthelabelofthepointandreturnsatrueifitisanaccesspoint.ThepredicateisAccessPtisdenedasfollows: isAccessPt(:[A],p)=f2g(p)ConsideringthelabelstobeoftheformA=ki=1Ai=A1...Ak(LetI=f1,...,kg),theoperatorfigisaprojectionoperatoranditreturnstheAivalue.HavingtheisAccessPtpredicatehelpsformallydenetheGetAccessPtsoperatorwhichndsalltheaccesspointsinanetwork.Furthercalculationscanbedonebasedontheseaccesspointssuchaswhichaccesspointistheclosest?orDoesanyofthe 58

PAGE 59

accesspointinthebusnetworkisclosetotherailnetwork?.TheGetAccessPtsreturnsasetofpointsanditssignatureisGetAccessPts:[A]!R2.Consideraspatialnetwork:[A],theformaldenitionofGetAccessPtsis: GetAccessPts(:[A])=fpjp2)]TJ /F10 7.97 Tf 6.58 0 Td[(1(2A)^isAccessPt(p)gThisoperationreturnsonlythosepointspinaspatialnetworkwhichhasisAccessPts(p)istrue. Getclosestaccesspoint.Oftentimes,apersononthedrivingonthehighwaymayneedtoreachtheclosestexittofuelup.Thiswouldmeansearchingforthenearestaccesspointofthehighway.ThisquerycanbeeffectivelyansweredbytheoperatorClosestAccessPtwhichtakesapointonthenetworkandreturnstheclosestaccesspointinthatnetwork.ThesignatureofthisoperationisClosestAccessPt:[A]R2!R2.Consideraspatialnetworkandanetworkpointp,thenthisoperationisdenedas, ClosestAccessPt(,p)=fpij(i)pi2GetAccessPts()(ii)8pj2GetAccessPts():NetworkDistance(,p,pi)NetworkDistance(,p,pj)gTheclosestaccesspointisfoundbycomparingtheNetworkDistanceofalltheaccesspointsfromtheoriginalpoint(condition(ii))andchoosingtheleastone.AuxiliaryOperations Thesesetofoperationsarenotintendedtobeusedbyitselfbutareusedinthedenitionofotheroperators.AuxiliaryoperationsincludePartofChannels,Buffer,operationstogetthegraphrepresentationofanetworkandtoextractthematicvaluesfrompartsofanetwork. Directconnections.Inthissection,wespecifythethreeauxiliaryoperationsPartOfChannels,isDirectlyConnected,andDCNonspatialnetworks.Eachoperationdeploysthepreviousoperationinthislistforitsdenition.TheoperationPartOfChannelstakesanypointonthenetworkandreturnsthesetofallchannelidentierstowhichthe 59

PAGE 60

pointbelongs.Forthispurpose,itretrievesallchannellabelsassociatedwiththepointandextractsthechannelidentiersfromtheselabels.Foraspatialnetwork2[A]andanetworkpointp2L(),thisoperationisdenedas PartOfChannels(,p)=ff1g(l)jl2(p)gTheBooleanpredicateisDirectlyConnectedreturnstrueiftwogivenpointsonanetworkareconnectedviaasinglechannel.Thatis,inordertogofromonepointtoanotherpoint,thereisnoneedtochangechannels.ThepredicatehasthesignatureisDirectlyConnected:[A]R2R2!BandusestheoperatorPartOfChannelstondoutifbothpointsinquestionarepartsofacommonchannel.Foraspatialnetwork2[A]andtwopointsp,q2L(),thispredicateisdenedas isDirectlyConnected(,p,q)=(PartOfChannels(,p)\PathOfChannels(,q)6=?)TheoperationDCNappliedtoaspatialnetworkandareferencejunctionpointdeterminesthesetofjunctionpointswhicharereachablefromthereferencejunctionpointviaasinglechannel,orinotherwords,thatbelongtothesamechannel.ItchecksalljunctionpointsofthespatialnetworkandcollectsthoseforwhichthepredicateisDirectlyConnectedyieldstrue.Foraspatialnetwork2[A]andajunctionpointp2J(),DCNisdenedas DCN(,p)=fqjq2J()^isDirectlyConnected(,p,q)g Buffer.Bufferisaclassicoperationonspatialobjectswhichreturnstheareaborderingtheobject.Spatialnetworkalsohasacorrespondingoperationwhichidentiestheareaaroundthechannelsinanetwork.TheBufferoperationmaybeusedtoidentifytheareaaroundariverwhichmayoverowduringtheoods.Givenapointandabufferlength,thebufferoperationcomputesthebufferofthepointandreturnsaregionobjectrepresentingthebuffer.TheBufferoperationhasasignatureBuer:pR!r,wherepisthesetofspatialpointsandristhesetofspatialregions.Theformaldenitionofthebufferoperationisasfollows-assumingapointpandabufferlengthl,wehave, 60

PAGE 61

Buer(p,l)=fpij(i)piisaspatialpoint(ii)pi2R2(iii)dist(p,pi)lgThisoperationworksbyusingthedistfunctionwhichreturnsthedistancebetweenthetwogivenargumentpoints.TheBufferoperationisoverloadedtotakeanentirenetworkandreturnthebufferforthatpartofthenetwork.ThesignatureofthisversionisBuer:[A]R!r.TheformaldenitionusestheprimitiveversionoftheBufferoperationtocalculateandcombinetheindividualbufferofallthepointsinthegivenchannel.Consideringaspatialnetwork:[A]andachannelinitcalledlrepresentedbythefunctionfl,andthebufferdistanceasd,theformaldenitionisgivenbythefollowing: Buer(,d)=fBuer(pi)jpi2)]TJ /F10 7.97 Tf 6.58 0 Td[(1(2A)g Graphrepresentationofnetwork.AgraphisrepresentedasanorderedpairG=(V,E)comprisingasetVofverticesornodestogetherwithasetEofedgesorlines,whichare2-elementsubsetsofV(i.e.,anedgeisrelatedwithtwovertices,andtherelationisrepresentedasunorderedpairoftheverticeswithrespecttotheparticularedge).Thestructureofaspatialnetworkmaybeviewedasasimpleundirectedgraphwiththenodesofthegraphbeingthejunctionandtheboundarypointsofthenetworkandtheedgesofthegraphbeingthepartofchannelswhichlinksthejunctionsortheboundarypointstoeachother.Onlythosejunctionswhicharedirectlyconnectedinaspatialnetworkwouldhavecorrespondingedgesinthegraphrepresentation.Thegraphstructureofanetworkremovesallthesemanticsinthenetworkandabstractsawaythegeometryinit.Thegraphthencanbeusedinanumberofgraphoperationsandanalysis.TheoperationGetGraphtakesasargumentaspatialnetworkandreturnsagraphrepresentingthenetworkstructure.Sinceaspatialnetworkisathreedimensionalstructurewithpossibleoccurrencesofcrossovers,thegraphreturnedbythisfunction 61

PAGE 62

A Figure3-7. TheresultofexecutinggetGraph()onthespatialnetworkshowninFigure 3-1 isanon-planargraph.Figure 3-7 visualizestheoutputofrunninggetGraph()onthespatialnetworkshowninFigure 3-1 .Thegeometryofthegraphislostandonlytheconnectionsareleftintheresultantgraph.Figure 3-7 showsthatthegraphhastwodisconnectedcomponentsC1andC2.ThesignatureoftheoperationisGetGraph::[A]!Gandtheformaldenitionoftheoperationisasfollows: GetGraph()=fgj(i)gisagraph(ii)g=(V,E)(iii)8ji2J()[():9vi2V(iv)8j1,j22J()[()^isDirectlyConnected(,j1,j2):9ei2EgCondition(i)statesthattheresultofthisoperationisagraphwithasetofverticesVandasetofedgesE.Foreachjunctionpointandboundarypointinthenetwork,thereisacorrespondingvertexinthesetV.(Condition(ii))andforeachpairofdirectlyconnectedjunctionpointsorboundarypoints,thereisanedgeeinthesetofedgesEintheresultinggraph(Condition(iii)). 62

PAGE 63

Getattributevaluesfromanetwork.Asdescribedearlier,allthepointsinanetworkarelabelledwiththematicvaluesandinvariousoperations,itisinterestingtoaccesstheseattributevalues.Eachlabelhasasetofattributesandvaluesforthoseattributes.ThedatatypeoftheseattributesbelongstothebasicSQLdatatypes.Inordertogetthevalueofanattributeataparticularpointorchannelinthenetwork,theoperatorGetAttributeValisused.Thisoperationacceptsapointfromthenetwork,anlabelattributenameandanexpecteddatatypeofthereturnvalueandreturnsasetofvaluescorrespondingtothegivenattribute.Itreturnsasetofattributesbecausethespeciedpointatwhichpointthevaluesissoughtmaybeapartofajunction.Asexplainedearlier,junctionpointstakethelabelofallthechannelsintersectingatit.Sotheresultsetreturnedcontainsavaluefortheattributeforeachofthechannels'labels.Incasethepointisnotajunctionpoint,thenasetcontainingasinglevalueisreturned.Assuming,DisthesetofallbasicSQLtypes.ThesignatureoftheoperationisGetAttributeVal:[A]R2Ai!2D,whereAiisalabelattribute.Thisoperationisoverloadedtotakeasinglechannelandreturnthevalueofaparticularlabelattribute.Thisversionoftheoperatorcanonlyreturnthevaluefromthestartingpointofthechannelasthelabelattributecanhavemultiplevaluesforthesameattributealloverthechannel.ThesignatureoftheoperationisGetAttributeVal:[A]A1!D.TheformaldenitionoftheseoperationsmakeuseoftheprojectionoperatordescribedinSection 3.1.2 .Assumingaspatialnetwork:[A],apointpinthenetwork,andthelabelattributeai2Atheformaldenitionofthisoperationsisgivenas: GetAttributeVal(,p,ai)=fi(l)j8l2(p)gThenotation(p)givesthelabelsetatthepointp.Foreachlabelinthesettheattributeaiisprojectedoutfromthislabelusingtheprojectionoperatori.Againassumingaspatialnetwork:[A],achannell2Id Attr()withthefunctionfl[0,1]!R3describingit,andthelabelattributeai2Atheformaldenitionofthisoperationsisgivenas: 63

PAGE 64

GetAttributeVal(,l,ai)=i((fl(0)))Similartotheearliercase,wendthestartingpointofthechannellusingfl(0).Thelabelatthispointisextractedandnallyprojectedoutusingtheoperatorasi((fl(0))).Thevaluesofaparticularattributemayvaryalloverthenetworkanditisinterestingtorecovertheminimumorthemaximumvalueofaparticularattributefromtheentirenetwork.Thisisaccomplishedbyapairofoperator:getMinValandgetMaxVal.Theseoperatorstakesaparticularlabelattributeofanetworktypeandreturnsasetofpointsinthenetworkwhichhasthehighestorlowestvaluerespectivelyfortheparticularattribute.ThesignatureoftheoperationsareasfollowsminValue,maxValue:[A]Ai!2R3.Assumingaspatialnetwork:[A],wehavealabelattributeAi,weformallydenetheseoperationsas: getMaxVal(,ai)=fpj8pi2:MAX(GetAttributeVal(,ai,p))MAX(GetAttributeVal(,ai,pi))ggetMinVal(,ai)=fpj8pi2:MIN(GetAttributeVal(,ai,p))MIN(GetAttributeVal(,ai,pi))gNetworkRetrievalOperations NetworkRetrievaloperationsretrievesasub-networkfromtheoriginalnetwork.Thesub-networkischosenbasedonvariouscriteria.ThesesetofoperationsincludeShortestroute,window,clipping,heightandattributebasedselectionofanetwork. Shortestroute.Oneoftheclassicalqueriesinaspatialnetworkistheshortestroute(path)query.Thetaskistondaroutebetweentwopointsinanetworkwhichhastheleastdistanceamongallroutesbetweenthetwopoints.Shortestroutequeriesareusedtoautomaticallynddrivingdirectionsbetweenphysicallocations,forexample,betweentwocities.TheShortestRouteoperatorndssuchashortestroutebetweentwopointsp,q2L()inanetwork2[A].ThesignatureofthisoperatorisShortestRoute:[A]R2R2![A].Itsdenitionisgivenas 64

PAGE 65

ShortestRoute(,p,q)=fsrj(i)sr2Routes(,p,q)(ii)8r2Routes(,p,q):Length(r)Length(sr)gThisoperatorchecksalltheroutesbetweenpandqandcomparestheirlength.Itchoosestheroutewiththesmallestlengthastheshortestroute.Sincetherecouldbeseveralshortestpaths,itreturnsalloftheminaset.Notethatthisisaconceptualdenitionandnotanalgorithmicstrategytocomputetheshortestpath. Window.ConsiderthequeriesWhichpartsofthenationalhighwayhavebeenaffectedbythesnowstormX?.Forthiskindofquery,werstneedtoobtaintheextentofthesnowstormasaspatialregion.Ifthisregionisgeometricallyintersectedwiththehighwaynetwork,weobtainthosepartsofthenetworkthathavebeenaffectedbythesnowstorm.Suchakindofqueryaimingattheintersectionofaspatialnetworkwitharegioncanbeusefulinvarioussituations.WeprovidethetwooperationsWindowandClippingforthispurpose.TheoperationWindowallowsausertoretrievethosecompletechannelsofaspatialnetworkwhoseintersectionwithagiven(region)windowisnotempty.Figure 3-8 Ashowsaspatialnetworkwitharegionr(coloredingrey)overlayingit.Figure 3-8 BdemonstratestheeffectoftheoperationWindow(,r)onthespatialnetworkwithrespecttor.Thisoperationcompletelypreservesthechannelsl3,l5,andl7thatintersectr.Theirboundarypointsarealsopreservedbutthejunctionpoints(likej5andj7)andcrossoverpoints(likec1andc3)withchannelsthatarenotpartoftheresultareremoved.OnlyforillustrationpurposesthequerywindowinFigure 3-8 isarectangle.Butitcanbeanyobjectofthespatialdatatyperegion[ 37 ],thatis,inparticular,itcanbeofanyarealshape,haveholes,andconsistofmultiplecomponents.ThesignatureoftheWindowoperationisWindow:[A]region![A].Thedenitionofthisoperationmakesuseofthewellknowngeometricsetoperationintersection()betweenspatiallinesandregions.Foraspatialnetwork2[A]andanarbitraryregionobjectr2region,theWindowoperationisdenedasfollows: 65

PAGE 66

A B C Figure3-8. Theoriginalnetworkandtheregionr1(A).Theresultoftheclipoperationwiththenetworkandtheregionr1(B),andtheresultofthewindowoperationwiththenetworkandtheregionr1(C) Window(,r)='suchthatthefollowingconditionshold:(i)'2[A]isaspatialnetwork(ii)L(')L()(iii)8l2Id Attr('):Flatten(getGeometry(,l))r6=?(iv)8l2Id Attr())]TJ /F4 11.955 Tf 11.95 0 Td[(Id Attr('):Flatten(getGeometry(,l))r=?Condition(i)statesthattheoperationresultsinaspatialnetworkofthesametype.Condition(ii)requiresthatallpointsinthenewnetworkareelementsoftheoriginalnetwork.Condition(iii)ensuresthatallchannelsinthecomputednetworkgeometricallyintersectthegivenregionrcompletelyorpartially.Sincethe3Dcurvesofthechannelsareintersectedwith2Dregions,itisnecessarytousetheFlattenoperatortorstattenthegeometryofthechannels.Condition(iv)guaranteesthat'isthemaximumspatialnetworkthatintersectsr. Clipping.TheoperationClippingissimilartowindowoperationbutdiffersinasinglewaythatistheClippingoperatordoesnotonlyidentifythechannelsthatintersectagivenrectanglebutitalsocomputestheintersectionoftheregionwiththenetwork 66

PAGE 67

geometry,thatis,withallintersectingchannels.Thisoperationmayresultinpartialchannelsoftheoriginalnetworkandthusgivesrisetoartifacts.Forexample,newboundarypointsarecreatedwhereverapartofthechannelisclippedbytheedgeofthequeryregion.Buttheinteriorpartsofthenetworkalwaysremainintact.Figure 3-8 CgivesanexampleoftheoperationClipping(,r)andshowsthosepartsofthenetworkinFigure 3-8 Athatgeometricallyintersectregionr.Theeffectofthisoperationisthatchannelslikel1,l2,l4,andl6areremoved,theoriginalchannelsl5andl7aretruncated,andnewboundarypointsarecreated,forexample,attheendpointsofthechannelsl5andl7.ThesignatureoftheClippingoperationisClipping:[A]region![A].Foraspatialnetwork2[A]andaregionobjectr2region,theClippingoperationisdenedasfollows: Clipping(,r)='suchthatthefollowingconditionshold:(i)'2[A]isaspatialnetwork(ii)Flatten(L('))=Flatten(getGeometry())r(iii)8p2L('):'(p)=(p)Condition(i)statesthattheoperationresultsinaspatialnetworkofthesametype.Condition(ii)requiresthatallpointsoftheresultingnetworkareexactlythosepointsoftheoriginalnetworkthatgeometricallyintersectregionr.Thismeans,inparticular,thatL(')L()holds.Inordertoperformthischeckwehavetogetthe2Drepresentationofthegeometryofthenetworkandintersectitwiththeregion.Theresultantobjectshouldbeequaltotheattenedstructureofthenewnetwork'.Condition(iii)ensuresthatthelabelingoftheoriginalnetworkispreservedintheclippednewnetwork. Channelconnections.Achannelisconnectedtoanotherchannelonlyifthetwochannelsshareajunction.Aparticularchannelmayhaveanumberofotherchannelsconnectedtoitbyformingmultiplecommonjunctionpoints.Theoperation 67

PAGE 68

Connected tocomputesallchannelsthatareconnectedtoaparticularchannel.Forexample,amajorrivermayhaveanumberoftributaries.TheoperationConnected toreturnsalltributarieswhichareconnectedtotheriver.InourexamplenetworkshowninFigure 3-1 B,theresultofConnected to(,l3)isthesubnetworkofthatcontainsthechannelswiththeidentiersl6andl7.Thechannell6isconnectedtochannell3atthejunctionpointj2.Similarly,thechannell7isconnectedtochannell3atthejunctionpointj6.However,thechannell5doesnotappearintheresulteventhoughitinteractswithchannell3.Thereasonisthatthepointofinteractionisacrossoverpointandnotajunctionpoint.TheoperationhasthesignatureConnected to:[A]A1![A],thatis,ittakesaspatialnetwork2[A]andachannelidentierl2A1asargumentsandreturnsthesubnetworkofthatcontainsallchannelsthatareconnectedtolandthusshareajunctionpointwithl. Connected to(,l)='suchthatthefollowingconditionshold:(i)'2[A]isaspatialnetwork(ii)L(')=[p2JunctionPoints(,l)s2(p),e2sflg,l'2f1g(e)getGeometry(,l')(iii)8p2L('):'(p)=(p))-222(flg)-222(fl'2Ajq2JunctionPoints(,l),S=[s2(q)s,l'=2SgCondition(ii)requiresthattheresultingnetworkonlycontainsthepointsofchannelsthatshareajunctionpointwithl.Forthispurpose,theoperationrstndsthejunctionpointsonlusingtheoperationJunctionPoints.ThenitdeterminesthechannelidentiersassociatedwitheachjunctionpointandretrievesthegeometriesforeachchannelidentierwiththeoperationgetGeometry(Section 3.2.2 ).Condition(iii)statesthatthelabelsofthenewnetwork'havetobeinheritedfromthenetwork.However,thelabelsof'havetobecorrectedinthesensethatforeachnetworkpointanyofitslabels 68

PAGE 69

thatisnotassociatedwithajunctionpointonlhastoberemoved.Inparticular,labellhastoberemoved. Heightbasednetworkselection.Invariousscenariositisinterestingtoretrieveonlythosepartsofthenetworkwhichareataheightaboveorbelowacertainpointinthenetwork.Forexample,thereisaoodandthecityofcialsareinterestedtoknowthepartsoftheroadnetworkwhichmightgetooded.Thisinvolvesselectingpartofthenetworkbasedonitsheightatthatposition.TwooperationsNetwork BelowandNetwork Abovearefunctionwhichtakesasinglepointinthenetworkandreturnsthepartofthenetworkwhichareatheightbeloworataheightabovetheparticularpoint.Theseoperationscanbeusedinndingtheportionofthehighwaywhichwillbesubmergedwhenoodsoccur.AquerylikeFindthepartofthenetworkwhichwillbesubmergedwhenthedikecollapses.Theseoperatorstakesanetworkpointandcomparesitsheightwithalltheheightofalltheothernetworkpointsandreturnsasubnetworkoftheoriginalnetwork.Allthepointsintheresultantnetworkhasaheighteitherhigherorlowerthantheheightofthespeciedpointintheoriginalnetwork.ThesignatureoftheseoperationsareNetwork Below,Network Above:[A]R2![A].Consideringanetwork2[A]andanetworkpointp2L(),theoperationNetwork Aboveisdenedas Network Above(:[A],p)=':[A]j'^8pi2':pi.z>p.zTheNetwork Belowoperationissimilarlydenedanditreturnsasubnetworkoftheoriginalnetworkwhereinallthepointsareataheightlowerthanthespeciedpoint.Againconsideringanetwork2[A]andanetworkpointp2L(),theoperationNetwork Belowisdenedas Network Below(:[A],p)=':[A]j'^8pi2':pi.z
PAGE 70

than,lessthan,greaterequal,lessequal,ornotequal)andavaluewhichmaybeofanybasicSQLdatatype.Allpartsofthenetworkwhichsatisfythepredicatearereturned.Consideringtheset=f<,>,,,=gandDbeingthesetofallthebasicSQLdatatypes,thesignatureofthisoperationisSelectNetwork:[A]AiD![A].Whenappliedonaspatialnetwork,thisoperationreturnsanothernetworkwhichisasubnetworkoftheoriginalnetworkbutallthepointsintheresultingnetworksatisfythegivenpredicate.Assumingthatisanetwork,aiisalabelattribute,2andvalisavaluetobecheckedandval2D,Theformaldenitionofthisoperationsisgivenasfollows: SelectNetwork(,ai,,val)=f'j(i)'2[A]isaspatialnetwork(ii)'(iii)8p2':GetAttributeVal(',ai)val)gMetricOperations Metricoperationsareaclassofoperatorswhichreturnsanumericresult.TheyincludeoperationslikeGradient,Curvature,NetworkDistance,andgraphcentralitymeasuresofanetwork. Gradient.Gradientreferstothegradualchangeintheheightofachannel.Itplaysacrucialroleinthefreeowofmaterialsinapipeline.Thisoperationtakesasargumentapointinthenetworkandreturnsanumericvaluerepresentingthegradientatthatpoint.Tocalculatethegradient,wedividethechannelatthespeciedpointintoinnitesimallysmallchordapproximationsandthenndthelimitinggradientofthechordatthatpoint.LetusconsiderapointpinthechannelL2Channels()whichhasadescribingfunctionfL.ThesignatureofthisoperationisGradient:[A]R2!R.Assumethattheandisformallydenedas Gradient(:[A],p)=(@fL=@z)atpointpThismethodmayalsobeusedtocalculatetheaveragegradientbetweenanytwopointsinthesamechannel.Inthiscasewesinplyndthedifferenceinthez 70

PAGE 71

co-ordinatesbetweentherstandthesecondpointthatis,theheightdifferencebetweenthepointsandthendivideitbythedistancebetweenthesetwopoints.ConsideragainachannelLasdescribedabove,andthetwopointsp=fL(a)andq=fL(b)witha,b2[0,1].WedeneanoverloadedGradientoperatorwiththesignatureGradient:A1[0,1][0,1]!Ras Gradient(L,a,b)=(fL(a).z)]TJ /F4 11.955 Tf 11.95 0 Td[(fL(b).z)=Length(L,a,b)ThisoperationmakesuseofLength(L,a,b)operatorwhichreturnsthelengthofthechannelLfrompointp=fL(a)toq=fL(b).AnothervariationoftheGradientoperatorhasthesamesignatureGradient:[A1]!R.Butinthiscase,thisoperatortakesacompletechannelL2Channels()asargumentandndstheaveragegradientofthechannel.Itisdenedas Gradient(L)=Gradient(L,0,1) Curvature.Intuitively,curvatureistheamountbywhichageometricobjectdeviatesfrombeingat,orstraightinthecaseofaline.Incaseofachannelinaspatialnetwork,weconsidercurvaturetobehowsharplyachannelisturningasitistraversed.Ataparticularpointalongthecurveatangentlinecanbedrawn;thislinemakingananglewiththepositivexaxis.Curvatureisthendenedasthemagnitudeoftherateofchangeofwithrespecttothemeasureoflengthonthecurve,i.e,thearclengths.Curvatureofarailtrackisanfactorindecidinghowbigrailwaycarriagescanberunonthem.Speedlimitsofroadsaredecidedonthecurvatureoftheroadatthepoint.TheoperationCurvaturecomputesthecurvatureofachannelataspecicpoint.ThesignatureofthisoperationisCurvature:[A]AiR2!R.Assumingaspatialnetwork:[A],achannell2Id Attr()andapointp2Channel(,l),theoperatorCurvatureisdenedas: Curvature(,l,p)=@fl=@(x,y,z)atpointp Networkdistance.Networkdistanceisthedistancebetweenanytwopointsinthenetworkviathenetwork,thatis,theminimumdistanceonehastotraveltoreachthesecondpointfromtherst.ThisisopposedtoLengthexplainedearlierwhichisthe 71

PAGE 72

distancebetweentwopointsinthesamechannel.QuerieslikeWhatisthetravellingdistancefromGainesvilletoAtlanta?maybeansweredbasedonnetworkdistance.ThedenitionofnetworkdistancerequirestheconceptofShortestRoutewhichisaminimumlengthconnectiononecantakeinordertoreachasecondlocationfromarstlocation.Tocalculatethenetworkdistancebetweenanytwopointsinthenetwork,wedescribeanoperationNetworkDistance,whichreturnstheLengthoftheShortestRoutebetweenthetwopoints.Givenaspatialnetwork:[A]andtwopointsp,q2L(),wedenetheNetworkDistanceoperatoras NetworkDistance(,p,q)=Length(ShortestRoute(,p,q)) Degreeofajunction.Thedegreeofajunctionoranodecomputesthetotalnumberofchannelswhichintersectatthejunctionpoint.Thismeasureindicateshowwellaparticularjunctionisconnectedwiththerestofthenetworkandisalsoknownastheconnectivityofthenode.Thehigherthedegree,moreimportantistheparticularjunctionpointinthenetwork.Ascalefreelikearoadnetworkfollowsthepowerlawwhichstatesthatnewconnectionspreferentiallyconnecttonodeshavinghigherdegree.Inourmodel,anyjunctionpointorcrossoverpointisformedbytheinteractionofanumberofchannels.Hencethejunctionpointbelongstoallthechannelswhichintersectatthejunctionpoint.Apointfromanychannelwhichisnotapartofajunctionoracrossoverwillonlybelongtoasinglechannel.Junctionpointsandcrossoverpointsarelabelledbythecombinationofallthechannellabelswhichinteractatthepoint.WedeneafunctionPartOfChannelswhichtakesanypointonthenetworkandreturnsasetofallthechannelstowhichthepointbelongs.PartOfChannelsworksbylookingintothelabelofthegivenpointandextractingtheid attrofallthechannelswhichformsthelabel.Foraspatialnetwork:[A],andanetworkpointp2L(),thefunctionisdenedas, PartOfChannels(,p)=fId Attr(l'')j8l'2(p),l''2l'g 72

PAGE 73

ThedegreeofanyjunctionnonthenetworkcanbedirectlycalculatedbycomputingthecardinalityofPartOfChannels(,n).Foraspatialnetworkof:[A]andajunctionn2L(),degreeofthejunctioniscalculatedbytheoperationDegNodeandisformallydenedas DegNode(,n)=jPartOfChannels(,n)j Characteristicpathlength.Thecharacteristicpathlengthisunderstoodastheimpedimentbetweenallpairsofnodeswithinanetwork.Itmaybeexpressedastheaveragedistance(impediment)betweenallpairsofnodesinanetwork,andthismeasureissuitedforacomparativeanalysisofpublictransportnetworksorfornetworkassessment.Asmallcharacteristicpathlengthindicatesthepresenceofshort-cutconnectionsbetweenthenodesinthenetwork.Thismeasurehasvastsignicanceinanytypeofspatialnetworks.Forexample[ 5 ]studiestheimpactofthecharacteristicpathlengthonthestructuralvulnerabilityofpowergridsandconcludesthatwiththedecreaseofthecharacteristicpathlength,theprobabilityofmassloadlossdecreasesdramatically.Thesetofnodesisthesetofjunctionsinourmodel,andforaspatialnetworkof:[A],itisgivenbyJ().TheoperatorCPLcomputesthecharacteristicpathlengthofanetworkbysummingupthenetworkdistancesbetweenallthepairsofnodesinthenetworkandbydividingitbythenumberofallpairs.Thenumberofallpairsisgivenbythenumberofwaysofchoosing2nodesoutofallthenodesinthenetworkwhichinturnisgivenbythenumberof2-combinationofthesetJ().Mathematicallyitiswrittenasjj()jC2.TheexpressiononthenumeratorofCPL,Pp1,p22L(),p16=p2NetworkDistance(,p1,p2)takeseachpairtwice,sowedividethisvalueby2(jj()jC2).Assumingaspatialnetwork:[A],thesignatureandtheformaldenitionofCPLisasfollows, 73

PAGE 74

CPL:[A]!RCPL()=Xp1,p22L(),p16=p2NetworkDistance(,p1,p2) 2(jj()jC2) Globalefciency.Theabilityofaspatialnetworksuchasatransportationnetworkorapipelinenetworktominimizespatialresistanceorimpedimenttotravelisindicatedbyitsglobalefciency.Globalefciencyisusefulforcomparingcentralityinnetworksbeforeandafteranalterationtoitsstructure.Itiscalculatedastheinverseaverageshortestroutelengthbetweenanytwonodes(junctions)inanetwork.TheoperatorGlobalEfciencycomputestheglobalefciencyofanetwork.Forthenetwork,oftype[A],GlobalEfciencyisformallydenedas GlobalEciency:[A]!RGlobalEciency()=2 jj()jC2Xp1,p22L(),p16=p21 NetworkDistance(,p1,p2) Degreecentrality.Degreecentralityfallsunderacategoryofmeasurescalledcentralitymeasures.Thesemeasuresareindicatorsofindividualnodescontaininglocallyrelevantinformation.Degreecentralityofanodeisdenedastheratioofnodesdirectlyconnectedtoitoutofallthenodesinthenetwork.Itmeasurestheaveragenumberofnodesencounteredinordertoaccesseveryothernodeinthenetwork.Inapublictransportationnetwork,itmaybeunderstoodasthenumberoftransfersrequiredtoreachaparticularnode.ThedegreecentralityiscomputedbytheoperatorDegreeCentralitywhichtakesanodeasargumentandusesDCNtondthenumberofdirectlyconnectednodestothenodeanddividesthisbythetotalnumberofnodesinthenetwork.Foraspatialnetworkoftype:[A]andanodep2j(),thefunctionDegreeCentralityisformallydenedas DegreeCentrality(,p)=jDCN(,p)j jJ()j 74

PAGE 75

3.2.3Inter-NetworkOperationsThesesetofoperatorsoperateontwonetworksatatime.Theyincludethebasicoperations,theretrievaloperations,thenetworkstructureoperationsandanewclassofoperationscalledthenetworksetoperations.BasicOperations Thesearethelistoffundamentaloperationsequivalenttothetheintra-networkbasicoperationsbutthesesetofoperationsoperateonmorethanonenetworkatatime. Getalltransferpoints.Whentwonetworksappearsidebysideitmayhappen(byaccidentorbydesign)thattheaccesspointsofboththenetworkappearatthesamepointintheplane.Forexample,abusstation(whichisanaccesspointforthebusnetwork)maybeco-locatedwitharailwaystation(accesspointfortherailwaynetwork).Thissituationallowsmaterialtoowfromonenetworktoanotheraspeoplemaygetoffatthebusstationandthengointotherailwaynetwork.Wheneveraccesspointsfromtwoormorenetworkareco-located,wecallthesituationatransferpoint.Transferpointscometoplaywhencalculatingtheshortestpathbetweentwopointsinthesameordifferentnetwork.Theshortestpathbetweentwonetworksmightbemulti-hoppedwithpartsoftheroutepassingoveradifferentnetwork.Thiscanonlyhappenifthetwonetworksaresituatedsidebysideandhaveatransferpointbetweenthem.TheoperatorTransferPtsreturnsasetofpointswhicharetransferpointsamongtwogivennetworkanditssignatureisTransferPts:[A][B]!2R.Assumingatwospatialnetworks1and2,theoperatorisformallydenedas: TransferPts(1,2)=fp1j(i)p121^p222(ii)isAccessPt(1,p1)^isAccessPt(2,p2)(iii)p1=p2gTheformulationreturnsasetofpointssuchthatthepointbelongtonetwork1andthereisanotherpointp2inthenetwork2suchthatp1isanaccesspointofnetwork1 75

PAGE 76

andp2isanaccesspointofnetwork2(condition(ii))andthepointsp1andp2coincide(condition(iii)).AnauxiliarypredicatecalledisTransferPtcheckswhetheragivenpointisatransferpointbetweengiventwonetworks.ThepredicatetakesthehelpoftheTransferPtsoperatortogetallthetransferpointsbetweentwonetworksandthenreturnstrueifthegivenpointbelongstothesetoftransferpoints.ThesignatureoftheoperationisisTransferPt:[A][B]R3!B.Theformaldenitionofthepredicateisgivennext.Assumeaspatialnetwork2[A]andapointp,wehave, isTransferPt(1,2,p)=p2TransferPts(1,2) Routes.Thisisanextensionoftherouteoperationonasinglenetwork.Whengoingfromonepartofthecitytoanother,apersonmayavailmultiplemodesoftransportation.Forexamplehemaytakethebustoreachthetrainstationfromwherehetransferstoatrainandthengetoffatatrainstationtoavailacabtoreachthenaldestination.Thebus,train,andcabarepartofdifferentnetworks.Computingtheroutefromtheinitialpositiontothenaldestinationonasinglenetworkdoesnotgiveallpossibleroutes.Soamulti-networkversionoftherouteoperationisnecessary.Thisversionofthetheoperationreturnsasetofrouteswhichencompassdifferentnetworks.Thejumpfromonenetworktoanothercanonlyhappenattransferpoints.Theinter-networkversionoftherouteoperationtakesasargumenttwospatialnetworksaswellasastartingpointandadestinationpointwitheachofthemcomingfromeithernetwork.Itthenreturnsasetofnetworkseachofwhichrepresentsaroutefromthestartingpointtothedestinationpoint.Eachofthereturnednetworkshavesomespecialcharacteristics,namely,thestartingpointandtheendingpointaretheonlytwoboundarypointsofthenetworksensuringthatthenetworkisasinglecomponentandnotseparatedintomultipledisconnectedcomponents.Also,thenetworkdonothaveanybranches,thatis,allthejunctionsareofdegreetwo.Additionally,oneofthejunctionpointsisatransferpointbetweenthegivennetworks.Thisconditionensuresthatthe 76

PAGE 77

routeencompassesonenetworktotheother.Thepointtonotehereisthatiftherearenotransferpointbetweenthetwonetworksinquestion,thentherearenopossibleroutes.Butexistenceoftransferpointsdonotguaranteetheexistenceofroutes. A B C Figure3-9. Theoriginalnetworks1(A)and2(B),andtheoverlayofthenetworks(C) A B C Figure3-10. Theoperationroutes(1,2,p1,p2)onthenetworkshowninFigure 3-9 (C) ThesignatureofthisoperationisRoutes:[A][B]R2R2!2[C].Assumingthat1:[A]and2:[B]aretwospatialnetworksandtwopointsp21andq22,wedenetheRoutesoperationasfollows: Routes(1,2,p,q)=f'j(i)'2[A]isaspatialnetwork(ii)L(')L(1)[L(2)(iii)8l2'(J(')):jlj=2(iv)p,q2(')(v)j(')j=2(vi)9j2J('):isTransferPt(1,2,j)g Distancebetweentwonetworks.Whencreatinganationalrivergridtolinkalltherivers,itisnecessarytobuildcanalsfromonerivertoanother.Themostefcientplace 77

PAGE 78

tocreateacanalwouldbebetweentheclosestpointsofthetworivers.Theclosestpointsbetweentworiversaregivenbythisoperationwhichtakestwonetworksandreturnsasetcontainingtwopoints-onefromeithernetwork,suchthattheEuclideandistancebetweenthemistheleastamongallpossiblepairs.ThesignatureofthisoperationisclosestPoints:[A][B]!2R2.Assumingthereisafunctiondist(p1,p2)whichtakestwopointsintheEuclideanspaceandreturnsthedistancebetweenthem,andtwospatialnetworks12Aand22B,theformaldenitionofClosestPointsaregivenas: ClosestPoints(1,2)=fp1,p2j(i)p1,p22R3(ii)p121^p222(iii)8pi21,pj22:dist(p1,p2)dist(pi,pj)gThisoperationtakespointsfromeachofthenetworkandpairwisecomparestheirdistanceusingthedistoperator.Itreturnsthepairofpointswhichhavetheminimumdistancebetweenthem. Findtheclosesttransferpoints.Sometimesatravelerwhileonthegomaywanttotransferfromonenetworktoanother.Forexample,whiletravelingonthebushemaywanttotranfertoatrain.Thisoperationhelpstondthenearestpossibletransferpoint.Ittakestwoarguments-anetworktotransfertoandapointinthecurrentnetwork.Itreturnstheclosestaccesspointinthecurrentnetworkwhichispartofatransferpointtothegivensecondnetwork.ThesignatureoftheisclosestTranferPoint:[A][B]R3!R3.ThisoperationtakesthehelpofthealreadydescribedTransferPtsoperatortogetallthetransferpointsbetweentwonetworksandthencomputestheclosestamongthemfromthespeciedpoint.Assumewehavetwospatialnetworks1:[A]and2:[B]andapointp21,wedenetheclosestTransferPointoperatorasfollows: 78

PAGE 79

closestTransferPoints(1,2,p)=fp1j(i)p12TransferPts(1,2)(ii)8pi2TransferPts(1,2):NetworkDistance(p,p1)NetworkDistance(p,pi)gThisoperatormakesuseoftheNetworkDistanceoperatorwhichcomputesthelengthoftheshortestroutebetweentwopointsinanetwork.RetrievalOperations Theinter-networkretrievaloperationsaresimilartotheintra-networkretrievaloperationsandconsistsoftheshortestrouteoperation. Shortestroute.Themulti-networkoperationissimilartothesinglenetworkshortestrouteoperation.Insteadofasinglenetwork,ittakestwonetworksandastartingpointpandanendingpointqfromeitherofthenetworks12[A]and22[B].Itthenreturnstheroutewhichistheshortestinlengthamongallthepossibleroutes.ThesignatureoftheoperatorisShortestRoute:[A][B]R2R2![C].Itsdenitionisgivenas ShortestRoute(1,2,p,q)=fsrj(i)sr2Routes(1,2p,q)(ii)8r2Routes(1,2p,q):Length(r)Length(sr)gThisoperatorchecksalltheroutesbetweenpandqandcomparestheirlength.Itchoosestheroutewiththesmallestlengthastheshortestroute.Sincetherecouldbeseveralshortestpaths,itreturnsalloftheminaset.Notethatthisisaconceptualdenitionandnotanalgorithmicstrategytocomputetheshortestpath.NetworkSetOperations Animportantclassofoperationsonanyspatialobjectsarethegeometricsetoperations.Inthissectionwedenethegeometricsetoperationsonspatialnetworkincludingthenetworkunion(Section 3.2.3 ),thenetworkintersection(Section 3.2.3 ),andthenetworkdifference(Section 3.2.3 )operations.Thesearegeometricsetoperations 79

PAGE 80

likethesetunion,setintersection,andsetdifferencebuttakingconsiderationofnotonlythegeometrybutalsothelabellingandotheraspectsoftheinteractingnetworks. Networksetintersection.NetworkintersectionoperationsareusedtoanswerqueriessuchasFindtheroadsservedbybusroutes20and21.Thatis,wehavetondthechannelswherethespatialnetworkrepresentingroute20intersectsthechannelsinthespatialnetworkrepresentingroute21.Geometricintersectionoftwonetworkscanresultintwotypesofspatialobjects-pointsandlines.Twochannelsfromdifferentnetworksmayintersectatisolatedsinglepointsorportionsofchannelsmayoverlaptoformintersectinglines.Sowehavetwonetworkintersectionoperations:therstiscalledcommon network pointswhichreturnsonlyisolatedpointsofintersectionbetweentwonetworksandthesecondoperationiscallednetworkIntersectionwhichreturnsanewnetworkbythelinesofintersectionoftwonetworks.Inordertodeneisolatedpointsweneedtheconceptofneigborhoodofpoints.Wedenetheneighbourhoodofagivenpointp=(px,py,pz)asthesetofpointsformingaspherearoundpwithaninnitesimallysmallradiusr.Inordertoretrievetheneighbourhoodofapointp,wedenetheneighbourhoodoperationwhichreturnsthesetofpointscontainedintheneighbourhoodofp: N:R3!2R3N(p)=f(x,y,z)j(x)]TJ /F4 11.955 Tf 11.96 0 Td[(px)2+(y)]TJ /F4 11.955 Tf 11.95 0 Td[(py)2+(z)]TJ /F4 11.955 Tf 11.96 0 Td[(pz)2=(r)2gWecannowdeterminewhetherapointisisolatedorcontagious.ApointpisisolatedinasetA,ifan2R+existssuchthatN(p))-295(fpg=.Wedenecom-mon network pointsasthesetofisolatedpointswhichresultsafterthechannelpointsoftwonetworksareintersected.Consideringtwonetworks1:[A]and2:[B],thesignatureandtheformaldenitionofcommon network pointsis: common network points:[A][B]!point3Dcommon network points(1,2)=fp2R3j(i)p2L(1)\L(2)(ii)pisisolatedinL(1)\L(2)g 80

PAGE 81

NetworkIntersectionoperationstakestwonetworksandreturnsanewnetworkwhichonlyhasthelinearoverlappingpartsofthetwonetworks.Thedenitionofthisoperationtakesthehelpoftheintersectionoperationforline3D[ 38 ].Theintersectionoperationofline3Dremovesalltheanomaliesintheresultingline(forexample,isolatedpointsanddiscontinuities).Figure 3-9 AandFigure 3-9 Baretwospatialnetworks1and2respectively.Thesetwonetworksoverlapinspaceandwhenseentogether,theoverlappingofthenetworksisshowninFigure 3-9 C.Theresultoftheintersectionofthenetworks1and2hasbeenshowninFigure 3-11 A Figure3-11. TheresultofNetworkIntersection(1,2)ofthenetworks1and2showninFigure 3-9 ThenetworkIntersectionoperationisdenedasfollows: networkIntersection:[A][B]![C]networkIntersection(1,2)=f':[C]j(i)'isaspatialnetwork(ii)L(')=intersection(getGeometry(1),getGeometry(2))gCondition(i)statesthattheresultofthenetworkIntersectionisaspatialnetworkandcondition(ii)statesthatchannelpointsofthenewnetwork(L('))isformedbytheintersectionoftwoline3DresultingfromthegetGeometry(1)andgetGeometry(2) Networksetunion.Setunioninthecontextofsetmeanstocombinetheelementsoftwoormoresetsintoasingleset.Inthecontextofspatialnetworks,itmeanstocombinethegeometryandthethematicattribute(labels)oftwodifferentspatial 81

PAGE 82

networks.Geometricallycombiningtwospatialnetworkscanbedonebysimplycreatinganewspatialnetworkhavingchannelsofboththeoriginalnetwork.ThenetworkUnionoperatornotonlycombinestwospatialnetworkgeometrically,italsocorrectlyhandleshowintersectionpointswork.Atthepointofintersectionoftwochannelsbelongingtoseparatenetworks,ajunctionisformed.Thisoperationtakestwospatialnetworkasargumentsandcreatesathirdresultingspatialnetwork.Onperformingtheunionoftwonetworkshavingtype[A]and[B],wegetaresultingnetworkcontaininglabelsfromboththenetwork,soitisoftype[A[B].ThesignatureofnetworkUnionisnetworkUnion:[A][B]![A[B].Assumingtwospatialnetworks,1:[A]and2:[B],networkUnionisformallydenedas, networkUnion(1:[A],2:[B])=f':[A[B]j(i)L(')=L(1)[L(2)(ii)Channels(')=Channels(1)[Channels(2)(iii)J(')J(1)[J(2)(iv)8p2common network points(getGeometry(1),getGeometry(2)):'(p)=1(p)[2(p)gThenetworkUnionoperationresultsinanewspatialnetwork,'.Thenewnetworkcontainsallthechannelpointsfromboththeoriginalnetworks1and2(condition(i)).Italsocontainsallthechannelsfromboththeargumentnetwork(condition(ii)).Condition(iii)statesthatthejunctionsintheresultingnetworkisasupersetoftheunionofthejunctionsintheoriginalnetwork.ItisasupersetbecauseonperforminganetworkUnion,newjunctionsarecreatedwhentwochannelsfromseparatenetworksintersect.Thesenewlycreatedjunctionspointsarereturnedbytheoperationcommon network points(getGeometry(1),getGeometry(2)) 82

PAGE 83

Thesepointsarelabeledbythetheunionofthelabelsatthesamepointfromtheoriginalnetworks(condition(iv)). Networksetdifference.MathematicallywedenesetdifferenceofsetsAandBasthesetofallelementsofAwhicharenotalsoelementsofB.Inthecontextofspatialnetworks,theoperationNetworkDifferenceconsidersboththenetworksaspointsetsandperformsetdifferenceonthem.Theresultingsetofpointsmaycontaininconsistencieslikeisolatedpointsordiscontinuitieswhicharenotallowedsincetheresultingpointsetisalsoaspatialnetwork.TheNetworkDifferenceisapurelygeometricoperationwhichmeansthatwhenperformingasetdifferenceonthenetworks1:[A]and2:[B],thelabelvaluesintheresultingnetworkaresimplytakenfromtherstnetworkintheargumentsoftheoperation.Forexample,onperformingSetDierence(1,2),allthepointsoftheresultingnetworkhaslabelswhichcorrespondtothelabelsoftheoriginalnetwork1.Figure 3-12 showsthegeometryofthespatialnetworkasaresultofthenetworkdifferenceoperationonthenetworksshowninFigure 3-9 A B Figure3-12. TheresultofnetworkDierence(1,2)(A)andnetworkDierence(2,1)(B) Thisoperationtakestwospatialnetworkasargumentsandcreatesathirdresultingspatialnetwork.Onperformingthedifferenceoftwonetworkshavingtype[A]and[B],wegetaresultingnetworkcontaininglabelsfromonlytherstnetwork,soitisoftype 83

PAGE 84

[A].ThesignatureofnetworkDifferenceisnetworkDierence:[A][B]![A].Assumingtwospatialnetworks,1:[A]and2:[B],networkDifferenceisformallydenedas, networkDierence(1:[A],2:[B])=f':[A]j(i)L(')=Regularize(L(1))]TJ /F4 11.955 Tf 11.96 0 Td[(L(2))(ii)Id Attr(')Id Attr(1)TheoperationnetworkDifferencecreatesanewnetwork',whichisoftypeA,thetypeoftherstnetworkintheargument.Allthepointsinthenewnetworkisasetdifferenceof1and2.Sincethesepointsetcanhaveirregularitieslikediscontinuityinachannelorisolatedpoints,itispassedthroughaRegularizefunctionwhichremovestheinconsistencies(Condition(i)).Thenetworkdifferenceoperationdoesnotcreatenewchannelsintheresultingnetwork.Theresultingnetworkcanonlyhaveasubsetofthechannelsintheoriginalnetwork(Condition(ii)). 3.2.4UseofOperationsinSpatialNetworkQueryLanguageInthissection,weshowhowuserscanaccess,manipulateandrunoperationsonaspatialnetworkdatatypecalledsnet.WerstdiscussthetypeofqueriespossibleinaspatialnetworkinanintuitivemannerandthenshowhowSQLlikeconstructscanbeextendedtoprovidequeryingcapabilitiesonaspatialnetworkinadatabasecontext.Unliketraditionalspatialdataobjectswhichonlycontainthegeometry,spatialnetworkscontaingeometryaswellasthematicinformation.Thusaspatialnetworkquerymaynotbepurelybasedongeometry.Fourtypeofqueriesforspatialnetworkshavebeenidentied;First,theymaybebasedonthespatialnetworkgeometry(net-workqueries).ThistypeincludequerieslikeDoesthebusroute20intersectwithbusroute21?.Thisquerycomparesthespatialnetworkofbusroute20andchecksforintersectionwiththespatialnetworkrepresentingthebusroute21.Second,queriesmaybebasedoncomponentsinaspatialnetwork(componentqueries).Thecomponentsofaspatialnetworkincludethechannels,junctionsandthecrossovers,boundarypoints,accesspointsetc..TheseincludequerieslikeHowmanydistinctroadsarethere 84

PAGE 85

inGainesville?orDoesthe13thStreetintersectwith1stAvenue?.Third,queriesmaybebasedonattributesassociatedwiththespatialnetworkcomponents(compo-nentattributequeries).TheseincludeWhatisthecapacityoftheoilpipe?.Thesesetofquerieslookintothethematicdataassociatedwiththenetworkandextractsrelevantinformationfromit.Lastly,queriesmaybebasedonattributesassociatedwithentirespatialnetworks(networkattributequeries).AnexampleofthistypeofqueriesisWhichdepartmentadministersthehighways?.Thiskindofinformationisnotembeddedinsidethespatialnetwork,buttheyappearalongsidethenetworkinasingledatabaserecord.BasedonthesnetdatatypewenowdeneconstructstoposequeriesinSNQL.AnSNQLstatementhasthefollowingclauses:theSELECTclausesayswhatwillbereturnedinthequery,theFROMclauseindicatesalistoftableswhichmaycontainsomesnetattributeandtheWHEREclausecontainsaBooleanexpressionthatisevaluatedoveralltherecordsinatable.Usingthisscheme,weprovidesamplequeriesbelongingtothefourquerytypesdiscussedearlier.Forthesequeries,weassumethatthereisadatabasewhichcannativelystorespatialnetworksandcanhandleSNQL.ThedatabasehasthetablesNatPowerGridsandRoadNetwork.Networkqueriesdealwiththetheentirenetworkasawhole.Theyincludequerieslike`WhichpartofeachofthenetworksintersectwiththeInterstate?'.Informulatingthisquery,weusethespatialnetworkoperatorintersectwhichreturnstheintersectionbetweentwonetworks.TheSNQLstatementfortheabovequeryisasfollows: selectIntersect(N.roadNet,M.roadNet)fromRoadNetworksasN,RoadNetworksasMwhereM.roadNet=`Interstate'andN.roadNet<>`Interstate'Thisqueryperformsaselfjoin,thenusestheIntersectoperatorpairwisewitheachroadnetworkandtheinterstatenetwork.Thisresultsinasetofnewnetworkswhichiscomposedofonlythosepartswhichintersectwiththeinterstatenetwork. 85

PAGE 86

Componentqueriesdealwiththecomponentsinanetworkwhicharechannels.Thesequeriesextractpartofachanneloracompletechannelandoperateonthem.TheSNQLcanhandletheseoperationssinceachannelorpartofachannelisalsoansnetobject.Atraditionalqueryintransportationistheshortestpathndingwhichmaybeoftheform`FindtheshortestroutefromMiamitoAtlantaavoidingAlachuacounty'.ThisisarestrictedformofshortestpathsinceithastoavoidalltheroadspassingthroughAlachuacounty.AssumingthatAlachuacountyisgivenasaregionwiththename`alachua',andtheinitialandthenalpointsaspAandpBrespectively,wewritethequeryinSNQLas selectShortestRoute(N.roadNet)]TJ /F4 11.955 Tf 11.96 0 Td[(window(N.roadNet,alachua),pA,pB)fromRoadNetworksasNThewindowoperationreturnsthepartofthenetworkwhichintersectswithAlachua.Thisportionofthenetworkissubtractedfromtheoriginalnetworkandtheshortestpathiscomputedonthetruncatednetwork.Componentattributequeriesarebasedonthethematicinformationattachedtothecomponentsofaspatialnetworkintheformoflabels.ThesevaluesareextractedbytheoperatorGetAttributediscussedearlier.Forexampleaninterestingqueryis`Findtheaveragecapacityineachofthepowergrids'.Thisqueryasksfortheaveragetransmissioncapacityofeachofthepowerlinesineachofthegrids.Weassumethatthenetworklabelattribute`capacity'isinthelabelsforthepowergridnetworksinthetableNatPowerGrids.WeusetheGetAttributeoperatortondthecapacityofeachofthepowerlinesinanetworkandthenaveragethevalue.ThisquerydemonstrateshowSQLconstructslikeGROUPBYmaybeusedinatraditionalmannerinSNQLtogroupbytheaveragecapacityforeachpowergrid.TheSNQLstatementisasfollows: selectG.sectorName,avg(GetAttribute(sn,number,capacity)fromRoadNetworksasG,GetAllChannels(G.Grid)groupbyG.sectorName 86

PAGE 87

AssumingTheGROUPBYclausegroupstheaveragecapacitiesbyeachnetworkgridaseachnetworkgridhasauniquesectornamewhichtheSELECTclausereturns.Thenaltypeofqueries,termedasnetworkattributequeries,queriestheattributesattachedtoanentirenetwork.Theseattributesarenotattachedtothesnetobject,butarepartoftherecordcontainingansnetobject.Forexample,`Whichgovernmententitymaintainstheroadnetwork?'canbeansweredbyasimpleSQLquerywhichselectsoutthe`administeredby'eldfromtheRoadNetworkstable: selectN.RoadType,N.administered byfromRoadNetworksasN 87

PAGE 88

Table3-1. Listofspatialnetworkoperations OperationTypeIntra-NetworkInter-Network BasicOperationsLength:A1[0,1][0,1]!RLength:[A]!RRoutes:[A]R3R3!2[A]Routes:[A][B]R3R3!2[C]getGeometry:[A]A1!line3DgetGeometry:[A]!line3DCrossoverPoints:[A]A1A1!point2DCrossoverPoints:[A]A1!point2DJunctionPoints:[A]A1A1!point3DJunctionPoints:[A]A1!point3DGetAccessPts:[A]!R3closestPoints:[A][B]!2R3ClosestAccessPt:[A]R3!R2TransferPts:[A][B]!2R3closestTranferPoint:[A]R3!R3AuxiliaryOperationsisDirectlyConnected:[A]R3R3!BDCN:[A]R3!R3Buer:pR!rBuer:[A]R!rGetGraph::[A]!GRetrievalOperationsShortestRoute:[A]R3R3![A]ShortestRoute:[A][B]R3R3![C]Window:[A]region![A]Clipping:[A]region![A]Connected to:[A]A1![A]SelectNetwork:[A]AiD![A]Network Below,Network Above:[A]R3![A]minValue,maxValue:[A]Ai!2R3MetricOperationsNetworkDistance:[A]R3R3!RDegNode:[A]R2!RCharacteristicPathLength:[A]!RGlobalEciency:[A]!RDegreeCentrality:[A]R3!RCurvature:[A]AiR2!RGradient:[A]R2!RNetworkSetOperationsnetworkUnion:[A][B]![A[B]networkIntersection:[A][B]![A[B]networkDi:[A][B]![A[B] 88

PAGE 89

3.3PredicatesonSpatialNetworksPredicatesareexpressionswhichevaluatestoatrueorafalseandareusedinthesearchconditionofthewhereclauseofaquerylanguage.SimilarlynetworkpredicatesareexpressionsbasedoncharacteristicsofspatialnetworksandareusedinthewhereclauseoftheSpatialNetworkQueryLanguage(Section 3.1.3 ).Thissectiondescribesnetworkpredicatesandhasbeendistinguishedintotwotypes.Theintra-networkpredicates(Section 3.3.1 )applyonasinglenetwork.Theinter-networkpredicates(Section 3.3.2 )workontwoormorepredicates. 3.3.1Intra-NetworkPredicatesIntra-networkpredicatesareapplicableononlyonenetworkatatimeandconsistofthebranchpredicate,thenearnesspredicates,andtheconnectionpredicate. Branchof.Thisis branch ofpredicatehelpsidentifythetributariesordistributariesofariverorspursofaroad.Thispredicatetakesasargumenttwochannelsandreturnstrueifthesecondchannelhasitsoriginontherstchannel,thatisitsendpointisconnectedtotherstchannel.Figure 3-1 showsthisbranchingsituationatjunctionj6.Thechannell6branchesoutfromchannell7atjunctionj6.Theoperationworksbyextractingtheendpointsofthesecondchannelandcheckingwhethertheybelongtotherstchannel.Ifitdoes,itmeansthatthesecondchannelhaseitheritsoriginoritsterminationattherstchannel.Inboththecases,itisconsideredtobeabranchoftherstchannel.Considertwochannelsl1andl2,theis branch oftakesthesetwochannelsasargumentandreturnstrueifthel2startsorendsinl1. Denition1. Considertwochannelsl1andl2inaspatialnetwork,wehave is branch of(,l1,l2)=(fl2[0]\l16=_fl2[0]\l16=) Near.Thenearpredicateworkswithchannelsaswellaswithsinglepointstoo.Forexample,tondwhichbusstopisnearthejunctionof13thstreetand20thave,wemayconsiderthejunctionasaspatialpointpjandtheobjecttosearch,whichhereisthebusstop,asthepointp.wethenusetheoverloadedformatofthenearpredicate.The 89

PAGE 90

overloadedformofnearpredicatetakesapointinsteadofachannelasreferenceandisdenedasfollows: Denition2. Considerachannellinaspatialnetwork,adistanced,aspatialpointtosearchfrompj,andanobjecttosearchpwehave near(,pj,d,p)=p2Buer(pj,d) On.Aconceptsimilartothenearisthepredicateon.Thispredicatedecideswhetheraparticularobjectinquestionisneartoaroutebetweentwopointsinthenetworkornot.Asanexample,theonpredicatecancomputewhetheragasstationisontheroutefrommyhousetomyofce.Insteadofcalculatingthenearnessoftheobjectfromaparticularlocationorachannel,thispredicatetakesasargumentanentirerouteandreturnstrueiftheobjectinquestionisneartoanypointontheroute.Aroutebetweentwopointsinanetworkiscreatedbytherouteoperation.ThesignatureoftheRoutesoperatorisRoutes:[A]R2R2!2[A].Thisoperatorreturnsthesetofallspatialsubnetworksrepresentingroutesbetweentwoselectedpointsoveragivenspatialnetwork.Allpointsofeachreturnedspatialnetwork,thatis,route,areasubsetofthepointsoftheoriginalnetwork.Thispredicatealsotakesinadistancemeasureandanobjectasarguments.Formallytheonpredicateisdenedasfollows: Denition3. Consideratwopointsinthenetworkp1andp2inaspatialnetwork,adistancedandaspatialobjectatpointp,wehave on(,p1,p2,d,p)=jfpijpi2route(,p1,p2,d)^near(pi,d,p)gj1 Isconnected.Asinglenetworkmaybecomposedofoneormore(disconnected)sub-networks.Forexample,nationalrivergridsarebeingbuiltsoastoconnectalltheriversinacountrytopreventwatershortageforirrigationpurposes.Themainideaistomakesurethatalltheriversinthecountryareconnectednaturallyorbyarticialconstructionofcanals.TheisConnectedpredicatemaybeusedtocheckwhethertwo 90

PAGE 91

pointsinanetworkareconnectedornot.Thispredicatetakestwonetworkpointsandreturnstrueifaroutecanbeconstructedbetweenthesetwopoints.FormallytheisConnectedpredicateisdenedasfollows Denition4. Consideratwopointsinthenetworkp1andp2inaspatialnetwork,wehave isConnected(,p1,p2)=jfsjs2route(,p1,p2)gj1 3.3.2Inter-NetworkPredicatesThetopologicalpredicatesarethemostimportantclassofinter-networkpredicatesandtheydealwiththespatialcongurationandarrangementofonenetworkwithanotherone.Topologicalpredicatesinanyspatialobjectincludesrelationshipslikeover-lap,inside,disjointetc.whichcharacterisetherelativepositionbetweentwospatialobjects.Similarly,topologicalpredicatesamongspatialnetworkscharacterisetherelativepositionoftwospatialnetworksthatarepreservedundercertaincontinuoustransformationsincludingallafnetransformation.FromadatabaseandGISperspective,theirdevelopmenthasbeenmotivatedbythenecessityforaformallydenedtopologicalpredicatesaslterconditionsforspatialselectionsandspatialjoinsinspatialquerylanguagesandasasupportforspatialdataretrievalandanalysistasks,bothattheuserdenitionlevelforreasonsofconceptualclarityandatthequeryprocessinglevelforreasonsofefciency.Inthispaperwebaseourdenitionoftopologicalrelationshipsonthe9-intersectionmodelrstdescribedin[ 12 ].Thisrestsonthepointsettheoryandpointsettopologyandleveragethepropertiesandrelationsofobjectcomponentslikeboundaries,interiors,andexteriorsforthedenition.Therelationshipsdescribedin[ 12 ]arebasedonsimplepoints,lines,andregions.Theseareinadequateforreallifeapplicationsbecausethegeometricobjectsdonothavesufcientcomplexityandvarietyofgeographicreality.Topologicalpredicatesoncomplexspatialdatatypeshavebeen 91

PAGE 92

describedin[ 39 ].Theseincludecomplexpoints,complexlines,andcomplexregions.Thetopologicalpredicatesdescribedin[ 39 ]satisfythepropertiesofcompletenessandexclusiveness.Thepropertyofcompletenessensuresafullcoverageofalltopologicalsituations.Thisimpliesthatweareabletoexpressanytopologicalrelationshipbetweentwospatialobjects.Thepropertyofexclusivenessensuresthattwodifferentrelationshipscannotholdforthesametwospatialobjects.Thisensurestheuniquenessofeachtopologicalrelationshipandavoidsambiguityandconfusion.Inthe9intersectionmatrixmodel,thebinarytopologicalrelationshipbetweentwospatialobjectsAandB,isbaseduponthecomparisonofA'sinterior(Ao),boundary(@A),andexterior(A)]TJ /F1 11.955 Tf 7.08 -4.34 Td[()withB'sinterior(Bo),boundary(@B),andexterior(B)]TJ /F1 11.955 Tf 7.09 -4.34 Td[().Thesixsubcomponentsareintersectedtoformninefundamentaldescriptionsofatopologicalrelationshipbetweentwospatialobjectsdescribedbytheemptyvalueornon-emptyvalueoftheintersectedparts.ThetopologicalpredicatebetweentwospatialobjectsAandBistheorderedsetofthesenineintersections,calledthe9IntersectionMatrix(9IM)andisrepresentedasa3X3matrix[ 24 ].R(A,B)=0BBBB@Ao\Bo@A\BoA)]TJ /F2 11.955 Tf 9.74 -4.34 Td[(\Bo1CCCCAAo\@B@A\@BA)]TJ /F2 11.955 Tf 9.74 -4.34 Td[(\@BAo\B)]TJ /F6 11.955 Tf 19.04 -4.33 Td[(@A\B)]TJ /F4 11.955 Tf 19.04 -4.33 Td[(A)]TJ /F2 11.955 Tf 9.74 -4.33 Td[(\B)]TJ /F1 11.955 Tf -250.28 -21.24 Td[(EverydifferentcongurationofthematrixRrepresentsdifferenttopologicalrelationshipsandrelationshavingthesamematrixisconsideredtopologicallyequiv-alent.Aspatialnetwork:[A]isalsocomposedbythethreecomponents,theboundary(()),theinterior(L())]TJ /F6 11.955 Tf 12.08 0 Td[((),andtheexterior(R3)]TJ /F4 11.955 Tf 12.08 0 Td[(L())]TJ /F6 11.955 Tf 12.08 0 Td[(()).Thesecomponentscanbepairwiseintersectedwithasecondnetwork:[B]tocreatethe9IMandcomputethetopologicalrelationshipbetweenthenetworks.Inourmodeloftopologicalpredicatesamongspatialnetworks,wetakeavariationofthebasic9IMmodelknownasthetopologicalpredicatesforcomplexlinesanduseadrill-downapproachtorevealinterestingpredicatesnotcapturedbythe9IMmodelalone. 92

PAGE 93

Anetworkchannel(Section 3.1.2 )isasinglecomponent3Dcurvealsoknownasasimplecurve.AsimplecurveisasinglecomponentlinearfeaturewithtwoendpointsasdenedinSection 3.1.2 .Acomplexcurve,alsoknownasline3D,isdenedastheunionofanitenumberofsimplecurves.Sinceaspatialnetworkconsistsofanumberofchannels,thegeometryofanentirespatialnetworkisacomplexspatialcurve[ 38 ]in3Dspace.Severalsinglecomponentcurvesmayshareacommonendpoint.Thesharedendpointbelongstotheinteriorofthecomplexcurveandisnotaboundarypoint.Theformaldenitionofline3Disgivenin[ 38 ].Sincethegeometryofaspatialnetworkcanbeassumedtobeacomplexcurve,thetopologicalpredicatesamongspatialnetworksarenothingbutthetopologicalpredicatesamongcomplexcurvers.Sowediscussthetopologicalrelationshipsbetweentwonon-empty,complexcurvesAandB.Toaccomplishthis,wefollowtheapproachpresentedinthepaper[ 39 ].Thetotalnumberofpossible9IMmatrixis512.Butallofthemarenotvalid.Werstpresentasetofconstraintrulesfortwocomplexcurves.Theconstraintrulesareformulatedrulecolloquiallyandlaterformalizedbyemployingthenineintersections.Nextweexplainwhytheconstraintrulemakessenseandiscorrect.WepresupposethatAandBarenotempty,becausetopologicalrelationshipsforemptyoperandsarenotmeaningful. Lemma1. Theexterioroftwocomplexcurveobjectsalwaysintersectwitheachother,thatisA)]TJ /F2 11.955 Tf 9.74 -4.33 Td[(\B)]TJ /F2 11.955 Tf 10.41 -4.33 Td[(6=Proof:Weknowthat A[A)]TJ /F5 11.955 Tf 11.33 -4.34 Td[(=A)]TJ /F2 11.955 Tf 10.11 -4.34 Td[([ A=R3and B[B)]TJ /F5 11.955 Tf 11.33 -4.34 Td[(=B)]TJ /F2 11.955 Tf 10.11 -4.34 Td[([ B=R3.HenceA)]TJ /F2 11.955 Tf 10.02 -4.34 Td[(\B)]TJ /F1 11.955 Tf 10.41 -4.34 Td[(isemptyifeither(i)A=R3,or(ii)B=R3,or(iii)A[B=R3.SinceAandBareobjectsofline3D,whicharebounded,linearshapesofnitelength,theyareunabletocovertheunboundedspaceofR3. Lemma2. Theinteriorofacomplexcurveobjectintersectseithertheinterior,theboundary,ortheexterioroftheotherlineobject,thatis(Ao\Bo6=_Ao\@B6=_Ao\B)]TJ /F2 11.955 Tf 10.41 -4.34 Td[(6=)^ 93

PAGE 94

(Ao\Bo6=_@A\Bo6=_A)]TJ /F2 11.955 Tf 9.74 -4.34 Td[(\Bo6=)Proof:Assumingthattheconstraintruleisfalse.Then(Ao\Bo=_Ao\@B=_Ao\B)]TJ /F5 11.955 Tf 10.74 -4.34 Td[(=)^(Ao\Bo=_@A\Bo=_A)]TJ /F2 11.955 Tf 9.87 -4.34 Td[(\Bo=).Weshowthattherstargumentofthedisjunction(similarforthesecondargument)leadstoacontradiction.ItcanbesummarizedasAo\(Bo[@B[B)]TJ /F5 11.955 Tf 7.08 -4.34 Td[()=Ao\R3=.Thisisacontradictiontotheassumednon-emptinessofaline3DobjectrequiringthatAo=andAo\R2=Ao,thatis,AoR3. Lemma3. Iftheboundaryofthecomplexcurveobjectintersectstheinteriorofanothercurveobject,itsexterioralsointersectstheinterioroftheothercurveobject,thatis,((@A\Bo6=)A)]TJ /F2 11.955 Tf 9.74 -4.34 Td[(\Bo6=)^(Ao\@B6=)Ao\B)]TJ /F2 11.955 Tf 10.4 -4.34 Td[(6=))$((@A\Bo=_A)]TJ /F2 11.955 Tf 9.74 -4.33 Td[(\Bo6=)^(Ao\@B=_Ao\B)]TJ /F2 11.955 Tf 10.4 -4.33 Td[(6=))Proof:Withoutlossofgenerality,letPbeanendpointoftheboundaryofAlocatedintheinteriorofB.FromPexactlyonecurveofAstartsorends.EitherPdividesacurveofBintotwosubcurves,orPisendpointofmorethanonecurveofB,intotwosubcurves,orPisendpointmorethanonecurveofB.Hence,inPatleasttwocurvesofBend.SincethecurveofAcancoincidewithatmostoneofthecurvesofB,atleastonofthecurvesofBmustbesituatedintheexteriorofA. Lemma4. Iftheboundaryofacomplexlineobjectintersectstheexteriorofanotherlineobject,itsinterioralsointersectstheexterioroftheotherlineobject,thatis,((@A\B)]TJ /F2 11.955 Tf 10.41 -4.33 Td[(6=)Ao\B)]TJ /F2 11.955 Tf 10.41 -4.33 Td[(6=)^(A)]TJ /F2 11.955 Tf 9.74 -4.33 Td[(\@B6=)A)]TJ /F2 11.955 Tf 9.74 -4.33 Td[(\Bo6=))$((@A\B)]TJ /F5 11.955 Tf 10.4 -4.34 Td[(=_Ao\B)]TJ /F2 11.955 Tf 10.41 -4.34 Td[(6=)^(A)]TJ /F2 11.955 Tf 9.74 -4.34 Td[(\@B=_A)]TJ /F2 11.955 Tf 9.74 -4.34 Td[(\Bo6=))Proof:Foreachpointp2B)]TJ /F1 11.955 Tf 10.41 -4.34 Td[(wecanndaneighbourhoodN(p)suchthatN(p)B)]TJ /F1 11.955 Tf 7.09 -4.34 Td[(.Ifp2@A,ineachneighbourhoodofpwemustndpointsofAo,sinceacurveofAstartsatp.Hence,interiorpointsofAexistthatintersectB)]TJ /F1 11.955 Tf 7.09 -4.34 Td[(.Theseconstraintarethesameastheonesforline2Dasshownin[ 39 ].Thepaper[ 39 ]showsthatanevaluationofallthe51233-interactionmatrixagainsttheseconstraintrulesrevealthat82matricessatisfytheserulesandthusrepresentthe 94

PAGE 95

possibletopologicalpredicatesbetweentwospatialnetworks.Consequently,these82relationsarethetotaltopologicalpredicateswhichcanappearinathecontextoftwospatialnetworks.Eachofthesetopologicalpredicatesareidentiedbya9-tuplewhereeachitemisa0ora1andtheyrepresentasinglecellintheR(A,B)matrix.Theyarewrittendowninrow-wiseorderandeachsequenceisknownasthetopologysequenceandthereareonly82suchsequencecorrespondingtothepossible82relations.Disjointisawellknowntopologicalpredicatewheretheinteriorsandtheboundaryofonenetworkdonotintersecttheinteriorortheboundaryoftheothernetwork.TheR(A,B)matrixrepresentingthetopologicalpredicatealongwithitscorrespondingtopologysequenceisshowbelow:R(A,B)=0BBBB@0011CCCCA001111Thetopologysequence,S,forthiscongurationisS=(0,0,1,0,0,1,1,1)Wetermthese82topologicalpredicatesasglobaltopologicalpredicatessincetheyconsidertheinterior,exterior,andboundarypointsetsofthewholeobjects,andignoresthefactthatspatialnetworksarecomposedofindividualandseparatesub-components.Asaresult,localtopologicalinformationregardingtherelationshipbetweenindividualcomponentsfromeachobjectislost.Considerthesituationthattheinteriorsoftwospatialnetworkintersect,butamongtheinteriorpoints,itmaysohappenthattheaccesspointsoftwonetworksintersect,thuscreatingatransferpointsituation.Theoveralltopologicalpredicateusingthe9IMmodelwillbeoverlap,butthelocaltransferpointrelationshipisignoredinthiscase.Ifwecanidentifythetransferpointsituation,thenitcancomputetheshortestpathbetweentwopointswhichspanfromonenetworktoanotherviathetransferpoint.Thisexampleillustratesthedominanceofoverlapovertransferpoint.Similarly,theglobalmeetmaydominateoverthelocalboundarytransfer 95

PAGE 96

pointrelationship.Inordertoidentifythelocaltopologicalpredicates,weperformadrill-downstep.WeobservethattheinteriorpointsofanetworkA,denotedbyAoisacompositionoftheinterioraccesspoints,Aoandtheinteriorpointswhicharenotaccesspoints,denotedbyAo)]TJ /F1 11.955 Tf 7.09 2.95 Td[(.So,Ao=Ao[Ao)]TJ /F1 11.955 Tf -239.48 -27.43 Td[(Similarly,weobservethattheboundarypointsofanetwork@A,arecomposedoftheboundarypointswhichareaccesspoints@Aandboundarypointswhicharenotaccesspoints,@A)]TJ /F1 11.955 Tf 7.09 1.79 Td[(,So,@A=@A[@A)]TJ /F1 11.955 Tf -246.98 -28.59 Td[(ThusweseethateachofthecellsinthematrixR(A,B)actuallyconsistofamatrixinitself.WeexpandthematrixRextended(A,B)=0BBBB@0@Ao)]TJ /F21 5.978 Tf 7.59 1.99 Td[(\Bo)]TJ /F17 5.978 Tf 17.85 1.99 Td[(Ao\Bo)]TJ /F33 5.978 Tf 17.85 8.99 Td[(1AAo)]TJ /F21 5.978 Tf 7.59 2 Td[(\BoAo\Bo0@@A)]TJ /F21 5.978 Tf 7.6 1.26 Td[(\Bo)]TJ /F22 5.978 Tf 17.85 1.99 Td[(@A\Bo)]TJ /F33 5.978 Tf 17.85 8.99 Td[(1A@A)]TJ /F21 5.978 Tf 7.6 1.27 Td[(\Bo@A\Bo0@A)]TJ /F21 5.978 Tf 7.59 -2.51 Td[(\Bo)]TJ /F33 5.978 Tf 17.85 8.99 Td[(1AA)]TJ /F21 5.978 Tf 7.59 -2.5 Td[(\Bo1CCCCA0@Ao)]TJ /F21 5.978 Tf 7.59 2 Td[(\@B)]TJ /F17 5.978 Tf 17.85 1.27 Td[(Ao\@B)]TJ /F33 5.978 Tf 17.85 8.27 Td[(1AAo)]TJ /F21 5.978 Tf 7.59 1.99 Td[(\@BAo\@B0@@A)]TJ /F21 5.978 Tf 7.6 1.27 Td[(\@B)]TJ /F22 5.978 Tf 17.85 1.27 Td[(@A\@B)]TJ /F33 5.978 Tf 17.84 8.27 Td[(1A@A)]TJ /F21 5.978 Tf 7.6 1.26 Td[(\@B@A\@B0@A)]TJ /F21 5.978 Tf 7.59 -2.5 Td[(\@B)]TJ /F33 5.978 Tf 17.85 8.27 Td[(1AA)]TJ /F21 5.978 Tf 7.59 -2.51 Td[(\@BAo)]TJ /F21 5.978 Tf 7.59 1.99 Td[(\B)]TJ /F17 5.978 Tf 17.85 -2.51 Td[(Ao\B)]TJ /F33 5.978 Tf 17.85 4.08 Td[(@A)]TJ /F21 5.978 Tf 7.6 1.26 Td[(\B)]TJ /F22 5.978 Tf 17.85 -2.51 Td[(@A\B)]TJ /F33 5.978 Tf 17.85 4.08 Td[(A)]TJ /F21 5.978 Tf 7.59 -2.51 Td[(\B)]TJ /F33 5.978 Tf 17.85 4.08 Td[(Asillustrated.Rextended(A,B),eachcellofR(A,B)consistofasub-matrix.Thecellsofthesub-matricescontaineithera0ora1.SimilartothemannerwereducedthenumberofpossiblematrixofR(A,B),wecanwritedowntheconstraintrulesforeachofthesubmatricesofRextended(A,B).Now,wewilltakeupeachofthesubmatricesinRextended(A,B)andwritedownthepossibleconstraintrulesandgivethetotalnumberofpossiblematrices.WenumbertherowsandcolumnsoftheRextended(A,B)matrixwiththerstrowbeingnumbered0andincreasingbyone.Thecolumnumberingalsostartsfrom0.Westartbyexaminingthesub-matrixintherstrowandrstcolumn,thatis,Rextended(A,B)[0,0]=0B@Ao)]TJ /F2 11.955 Tf 9.74 2.96 Td[(\Bo)]TJ /F4 11.955 Tf 19.04 2.96 Td[(Ao\Bo)]TJ /F18 11.955 Tf 19.04 19.21 Td[(1CAAo)]TJ /F2 11.955 Tf 9.74 2.96 Td[(\BoAo\BoTherearenoconstraintrulesforthissubmatrix,sothetotalnumberofcongurationspossibleforthissubmatrixis24=16. 96

PAGE 97

Thesubmatrixintherstrow,secondcolumnisgivenas,Rextended(A,B)[0,1]=0B@@A)]TJ /F2 11.955 Tf 9.74 1.79 Td[(\Bo)]TJ /F6 11.955 Tf 19.04 2.95 Td[(@A\Bo)]TJ /F18 11.955 Tf 19.04 19.21 Td[(1CA@A)]TJ /F2 11.955 Tf 9.74 1.8 Td[(\Bo@A\BoThismatrixalsodoesnothaveanyconstraintrulesassociatedwithit,sothetotalnumberofcongurationsare24=16.ThismatrixisanalogoustothematrixRextended(A,B)[1,0].Thesubmatrixintherstrowandthirdcolumnis,Rextended(A,B)[0,2]=0B@A)]TJ /F2 11.955 Tf 9.74 -4.34 Td[(\Bo)]TJ /F18 11.955 Tf 19.04 19.21 Td[(1CAA)]TJ /F2 11.955 Tf 9.74 -4.33 Td[(\BoThereoneconstraintruleattachedwiththissubmatrixis, Lemma5. Iftheinterioraccesspointsofaspatialnetworkintersectstheexteriorofanotherspatialnetwork,thentheinteriorpointsoftherstnetworkwillalsointersectthesecondnetworkpoint.(Ao\B)]TJ /F2 11.955 Tf 10.4 -4.34 Td[(6=)$(Ao)]TJ /F2 11.955 Tf 9.74 2.96 Td[(\B)]TJ /F2 11.955 Tf 10.41 -4.34 Td[(6=)(Bo\A)]TJ /F2 11.955 Tf 10.41 -4.34 Td[(6=)$(Bo)]TJ /F2 11.955 Tf 9.75 2.96 Td[(\A)]TJ /F2 11.955 Tf 10.41 -4.34 Td[(6=)Proof:Foreachpointp2B)]TJ /F1 11.955 Tf 10.41 -4.34 Td[(wecanndaneighbourhoodN(p)suchthatN(p)B)]TJ /F1 11.955 Tf 7.09 -4.34 Td[(.Ifp2AoineachneighbourhoodofpwemustndpointsofAo)]TJ /F1 11.955 Tf 7.08 2.95 Td[(,sinceachannelAoisacontinuouscurvewithisolatedAopointsinit.Hence,interiornon-accesspointsofAexistthatintersectB)]TJ /F1 11.955 Tf 7.09 -4.34 Td[(.Sothereareonly2validmatricconguration.Theyare:0B@01CA00B@11CA1Usingthesamerule,wecanconcludethatRextended(A,B)[2,0]hastwocongurationstoo.Theyare:0011Therestofthesub-matricesdonothaveanyapplicableconstraintrulesonit.Thesub-matricesarealsoindicatedbyasequenceasexplainedfortheglobaltopologicalpredicates,butthesesequencesareconsideredasabinarynumbersandthematrixisidentiedbytheequivalentdecimalnumber.Forexample,ifamatrixisoftheform:0B@001CA11 97

PAGE 98

Thecorrespondingsequenceforthissub-matrixis0011.Thisbinarystringisconvertedtodecimalnumber,whichis3.Thusthesub-matrixisidentiedbythenumber3.Inordertospecifyaparticulartopologicalpredicate,therststepistochecktheglobalpredicate.Thereare82possibleglobalpredicates.Thesepredicatesareidentiedbytheiruniquetopologysequence.Asnotedabovetheglobaltopologicalpredicatescannotidentifyallpossiblecongurationsbetweentwonetworks.Ifagreatergranularityisrequired,thenadrilldownapproachistaken,whereinsomeoralltheitemsinthetopologysequencehavingavalueof1isextendedwiththeallowedcorrespondingsub-matrixvalues.Thesesubmatricesareidentiedwithanumber.Forexample,meetisawellknowntopologicalpredicateandintuitivelyitmeansthatonlytheboundaryofthetwointeractingnetworksintersect.Thiscanberepresentedbythetopologysequence,S=(0,0,1,0,1,1,1,1,1).Butthisdoesnotmakeadistinctionbetweentheintersectingboundarypointsareaccesspointsornot.Thisdistinctionissignicantbecauseifthemeetinghappenswithaccesspoints,thentherelationshipbetweenthetwonetworkscanbetermedastransfer-pointmeet.Theglobaltopologicalpredicatecannotdistinguishbetweenasimplemeetandatransfer-pointmeet.Toidentifythetransfer-pointmeetpredicate,wehavetousetheextendedsequencewhichlabelssomeoftheonesinthetopologicalsequencewithitssub-matrixconguration.Forthetransfer-pointmeet,onlytheboundaryaccesspoints(boundarypointswhicharealsoaccesspoints)shouldintersect.Thisisrepresentedbythesub-matrixRextended(A,B)[1,1]conguration1.So,theextendedtopologicalsequence,S',representingthetransfer-pointmeetrelationshipis,S'=(0,0,1,0,1(1),1,1,1,1)Thefthitem(representingRextended(A,B)[1,1])isextendedbytheallowedconguration,whichis1. 98

PAGE 99

CHAPTER4ANIMPLEMENTATIONCONCEPTFORCOMPLEXUSERDEFINEDTYPESApplicationslikegenomic,multimedia,spatialobjectsandothersmakeuseoflarge,variable-sized,highlystructuredcomplexapplicationobjects.Oftenbiologicalsequencedata,spatialdata,spatio-temporaldata,multimediadata,andimagedata,etc.tsthecriteriaofcomplexapplicationobjects.Currently,suchobjectsarehandledusinglesystemformatslikeHDFandNetCDFaswellastheXML,BLOB,andiBLOBdatatypesindatabases.Storing,accessing,andmanipulatingtheminanapplicationinastandard,user-friendly,efcient,high-levelmannerisachallenge.Allthesemechanismsrepresentcomplexapplicationobjectsaslow-level,binarystringsanddonotpreservetheirstructure,thusitforcestheapplicationdevelopertogodowntothebitleveltomanipulatethem.Additionally,thereisnowaytoimplementoperationsonthecomplexdatatypewithoutloadingtheentireobjectinmemoryandinterpretingtheinternalstructureofthedatatyperst.Theselimitationsimposeconsiderableconstrainontheapplicationdeveloper.Hehastonotonlycreateanimplementation-orienteddatastructureforthedatatype,butalsohastoaccessthedatatypebyinterpretingthematthebytelevelinsteadofhavinganapplicationoriented(semantic)viewofthedatatype.Whichmeanstheapplicationdeveloper(andtheapplication)hastospendamajorityofthetimemanagingthedatahimselfratherthancreatingfeaturesoftheapplication.Ourgoalistoprovidethetypesystemimplementerwithanabstractdatatypeviewofthecomplexapplicationdata.Abstractdatatypespeciestheoperationswhichcanbeusedonadatatypewithoutspecifyinghowthedatatypeisinternallyimplemented.Aftertheapplicationdeveloperspeciesthestructureofthecomplexapplicationdata,thedatamaybeaccessedbythehigh-levelapplicationorientedconceptsonly.Thiswouldrelievetheapplicationdeveloperfromgoingdowntothebyteleveltointerpretthestructureofanapplicationobject.Thisabstractviewofthedatatypewillcompletely 99

PAGE 100

hidetheunderlyingimplementationofthedatatype,thusallowingmultiplestoragemechanismtobeusedasappropriate.Inordertoaccomplishtheabovegoals,weproposeageneralizedmethod,namedtypestructurespecication(TSS),forrepresentingandinterpretingthestructureofapplicationobjects.Thisspecicationprovidesaninterfaceforthetypesystemimplementertodescribethestructureofcomplexobjectsattheconceptuallevelwithoutanyregardtotheunderlyingstoragemechanism.TheTSSacceptstheinternalstructureofadatatypeintheformofagrammar.TheTSSispartofaframeworkcalledtheTSSframeworkwhichimplementsprocedurestocaptureandvalidatethestructureofapplicationobjectsbymeansofatypestructurespecicationgrammar.OurimplementationoftheTSSframeworkemploysageneralizedimplementationconceptcalledintelligentbinarylargeobjects(iBLOBs),fortheefcientandhigh-levelstorage,retrieval,andupdateofhierarchicallystructuredcomplexobjectsindatabases.iBLOBsstorecomplexobjectsbyutilizingtheunstructuredstoragecapabilitiesofDBMSandprovidecomponent-wiseaccesstothem.TheTSSframeworkabstractsthelowlevelimplementationconceptoftheiBLOBSandprovidesatypesystemorientedwayofaccessingthedata.Itprovidestheapplicationdeveloperwithaclean,friendlyinterfacetocreateoperationsonthedatatype.InSection 4.1 wedescribethecurrentmechanismstodescribeandstorelargecomplexapplicationobjectsandtheapproachestohandlethem.theentireenvironmentandtheentitiesinvolvedinthecreationandusageofcomplexdatatypesareexplaininSection 4.2 .NextweintroduceourTSSconceptinSection 4.3 .SomeadditionalfunctionalityoftheTSSframeworkisdiscussedinSection 4.4 .SomeperformancestudieshavebeenperformedontheTSSframeworkandbeenexplainedinSection 4.5 4.1IssuesinRepresentingComplexApplicationObjectsNewemergingapplicationsaregeneratinglargevolumesofsimplealphanumericdatafromsensinginstrumentslikesensors,satellites,cameras,etcwhichdescribe 100

PAGE 101

complexobjects(likehurricane,maps,DNAstructureetc)andcanbefoundinbiological,genomic,meteorological,multimedia,web,digitallibrary,imaging,scientic,geo-spatialandspatio-temporalapplications.Thesecomplexobjectsallsharethecommonpropertyofbeinghighlystructured,largeinsizeandareofvariablerepresentationlength.Managing,manipulatingandmakinguseofthesedatarequiredomainspecicapplicationknowledge.Thishasledtothecreationofspecializedleformatstostoreapplicationobjects.Databasesareefcientatstoringandhandlinglargeamountsofdatabutcurrentdatabasesdonothaveanyintegratedmechanismofstoringcomplexapplicationobjects.SpecialleformatslikeNetCDFandNHD5storeobjectsinles.Theycanstorehierarchicalandmulti-dimensionaldatabutsincetheylackstandardDBMSfunctionalityliketransactionmanagement,recovery,concurrencycontrol,securityfeatures,etc.Additionally,thereisnoquerylanguageandallquerieshavetobeformulatedintheapplicationprogram.Onemechanismofstoringcomplexapplicationobjectsaffordedbydatabasesisblobs.ButblobimplementationinterfacesvarybetweenDBMS.Consequently,softwareportabilityacrossDBMSsystemsislimitedandthevariabilityofBlobinterfacesmakeisdifcultforthird-partydeveloperstocreatedatabaseapplicationsthataredatabaseindependent.Thisisknownasthegeneral-ityissue.Apartfromthegeneralityproblem,blobsonlyallowdatatobeappended,truncatedandoverwritten,itdoesnotsupportgeneralinsertionanddeletions(knownastheupdateproblem).ThegeneralityandtheupdateproblemhasbeensolvedbytheiBLOBconcept.WiththeiBLOBconcept,anumberofissuesrelatedtocreationofcomplexapplicationobjectshavebeensolved.Butsomeissuesstillremain.Firstly,objectorientedfeaturesofSQLstandardallowonetospecifyuser-denedtypes(UDT)anduserdenedfunctions(UDF),buttheobjectorientedconceptssufferfromanumberofdisadvantages.Theyrevealtheinternalstructureandrepresentationofdata.Thereisnoconceptofencapsulationoftheimplementationofatype.Soitisdifculttomaintain 101

PAGE 102

AbstractDataTypeconceptforUDTs.Sincethereisnodatahiding,itcannotbeusedinaproprietarydata.High-levelADTsareregisteredintheDBMSbutthedataisstoredinlow-levelBLOBs.Byte-leveloperationsinBLOBscomplicatetheimplementationofhigh-levelcomponent-wiseretrievalandupdateoperationsinADTs.ThereisnorealADTindatabasesbutonlyrestrictedhigh-levelmodelingofcomplexapplicationobjects.Complexdatatypesshouldbedesignedasproperabstractdatatypesthathighimplementationdetailsandaccessofthedatashouldhappenusinghighabstractionlevelusingdomainspecicconcepts.Singleentityviewofcomplexdatatypesarenotonlyelegant,butalsoallowcomplexdatatypestoberstclasscitizenofdatabasemanagementsystemsandcanbetreatedlikeanyothernativedatabasedatatype.Secondly,thedesignandimplementationofthecomplexuserdatatypesshouldbeindependentofDBMSandanystoragemechanism.Theobjectshouldbeabletobestoredinthememoryorsecondarystoragewithoutanyspecialeffortrequiredbythedatatypedesigner.Thismechanismallowsthedatatypeuserexibilitytochoosewheretostorethecomplexdataobjectsseamlessly.Thisgoalcanbeachievedifthestoredbinarydatacorrespondtotherepresentationthatalgorithmscanprocessinordertoavoiddataconversions.Finally,thetypesystemdesignershouldbeabletodescribeandrepresentanewcomplexdatastructurewithoutusinganyimplementationconcepts.Thismeansthatthetypesystemdesignershouldusedomainspecicconceptstospecifytheinternalrepresentationofthecomplexapplicationtype.Accessmechanismforobjectsofthiscomplextypeshouldalsobebasedondomainspecicknowledgeasspeciedbythetypesystemdesigner.Thismechanismwillavoidalltypesoflowlevelphysicaldatastoreconceptsandprovideaveryhighlevelofabstractionwhichisclosetotheapplicationfortheusertoaccessthecomplexdataobjectsthusfreeingtheusertolearnimplementationconceptsfordataaccessandusage. 102

PAGE 103

4.2TSSUsageInthissectionweexplainhowtheTSSframeworkwillworktogetherwithvariousothercomponentsinthecreationofnewcomplexapplicationobjects.Ahighlevelabstractview(bigpicture)oftheentirestrategyalongwiththeactorsinvolvedandtheirroleshavebeenexplainedhere. Figure4-1. Thelevelsofcomplexdatausageandmanagement Intheeco-systemofuserdenedcomplexobjects,atthetoparetheappde-velopersasshowninFigure 4-1 .Thesearethedeveloperswhousealreadydenedcomplexapplicationobjectstocreatenewapplications.GISisanexampleofthisclassofapplication.Atthislevel,theappdeveloperviewsacomplexdatatype(forexample,regiondatatype)asanabstractdatatype.Thatis,theydonotknoworneedtoknowtheinternalimplementationofthecomplexdataobjects.Theysimplyusetheobjectusingtheassociatedfunctions(forexamplearea(),boundary()).ThecomplexdatatypeshavetobedenedandimplementedandthisisdonebytheTypeSystemImplementerorTSI.TheTSI'sroleistodenenewdatatypeswhichincludesspecifyingtheinternalrepresentationofthenewdatatypeandimplementingtheassociatedoperationonit.ItisassumedthattheTSIhasnoknowledgeofthelowerlevelimplementationdetails 103

PAGE 104

ofthestoragemechanismandheorshewouldliketoaccessandmanipulatethedatausingdomainspecicconcepts.Thismeansthatinsteadofreadingbytesorsequenceofbytesfromthestoragemedium,theTSIwouldliketohavecomponentwiseaccesstotheinternalcomponentsandsub-componentsofanobjectofacomplexdatatype.Inordertodoso,theTSImakesuseoftheTSSframeworktodeneandimplementthenewdatatypes.InordertodenethestructureofthedatatypetheTSIusestheconceptofthegrammardescribedabove.Toaccessandmanipulateobjectsofcomplexdatatypesinadomainspecicconcepts,heusesthefacilitiesprovidedbytheTSSframeworkwhichhavebeendescribedlateroninthissection.TheTSSframeworkhasbeendesignedandimplementedbyusandwecallourselvestheTSSframeworkdesigner.TheTSSframeworkreliesontheiBLOBinterfaceforstoringandmanipulatingdata.TheiBLOBisagenericmechanismforstoringandaccessingcomplexdataandhasbeenimplementedbytheiBlobdesigner.ThefollowingarethelistofbenetsenjoyedbytheTSIandtheapplicationdeveloperinusingtheTSSframeworktocreatenewcomplexdatatypes. FromTSIpointofview EasywaytocreateComplexDataTypes:TheTSSframeworkprovidesallthetoolstodescribeadatatypeanduseitinaveryintuitivefashion.Thestructureisdenedbythegrammarwhichiscompletelytextualandcanbewritteninatextle.Thegrammarusesonlytraditionalgrammarconventionsanduniversallyknownkeywordsforbasicdatatypeandintroducesveryfewnewconcepts.Itisveryeasytolearnandnotsteeplearningcurve.Inspiteofbeingeasytowritedown,almostallhierarchicalandgraphicstructurescanberepresentedusingthegrammar.Thisrangefromrepresentingsimplebasicdatatypes,arrayorlisttypestocomplexspatialdatatypeslikespatialnetworks.TheframeworkincludesaTSSParserwhichparsersthegrammarandindicatesifthereareanyerrorsinthem.CurrentlywehaveaC++implementation,butsincetheTSSframeworkimplementationdoesnottakeanylanguagespecicfeatures,itcanbeimplementedandusedwithanyobjectorientedlanguage. TypeSystemImplementeriscompletelyagnosticaboutstoragemedium:ATSI'sresponsibilityisreducedtoonlyaccessandmanipulateanobjectusingtheTSSframework.TheTSIdoesnotneedtoworryaboutwhethertheobject 104

PAGE 105

isbeingstoredinles,database,orinthemainmemory.TheaccessforallthesemediumisthroughtheTSSframeworkonly. Accessandmodifycomponentsofacomplexobjectusingapplicationsemanticsonly:TheTSSframeworkcompletelyeliminatestheneedtouseanyimplementationconcepttomodifycomplexapplicationobjects.TheTSIdoesnotneedtoknowhowthedataisorganizedintheiBlobobjectandhowtoaccessthem.TheTSIcanaccessandmodifythecomponentsofacomplexobjectusingapplicationlevelsemanticallytokensdenedbyhiminthegrammar. Auto-generatecodefromTSSgrammarrelievingtheTSIfromwritingboilerplatecode FromthepointofAppDeveloper CancreateComplexobjectsonanykindofstoragemedium HaveaADTviewofapplicationdataobjectwithdenedoperationsonit Canperformoperationsonconcreteobjectsstoredindifferentstoragemediumsimultaneouslywithoutanyextraeffort 4.3TheConceptofTypeSystemSpecicationFrameworkTheTypeSystemSpecication(TSS)frameworkisacompleteframeworktospecifytheinternalsofacomplexdatatype,accessmechanismforcomplexdatatypeobjects,andamechanismtousethecomplexdatatypeobjectsinapplicationprogramslikeanabstractdatatype.Theinternalsofacomplexdatatypeisspeciedbytheconceptofgrammarwhichisasimple,textualrepresentationofthetype(Section 4.3.1 ).TheconceptofPath(Section 4.3.2 )whichprovidesaveryhighlevelabstractwayofaccessingthedatawithoutreferringtotheimplementationdetails.AndtheconceptofADTpackage(Section 4.3.3 ).whichisusedtocreateacomplexdatatypeasanabstractdatatypeinanintegratedwayanduseitinanapplicationprogramlikeanyotherdatatype. 4.3.1TSSGrammarInordertousetheTSSframeworktodeneanewdatatype,theapplicationdeveloperhastospecifytheinternalstructureofthedatatype.Thiscanbeachievedbyusingatypespecicationgrammaralsoknownasgrammarinshort.Grammarisa 105

PAGE 106

textualrepresentationoftheinternalstructureofacomplexdatatypewhichiswrittendownbasedoncertainsetofrulesgivenbelow.Thegrammarisdesignedtobeeasilyspeciedbythetypedesignerusingtraditionalgrammarrules.Allcomplexobjectshaveawelldenedhierarchicalinternalstructure.Asanexample,Region(Figure 4-2 )isacomplexdatatypeconsistingofmanyinternalsub-componentsincludingfaces,outercyles,innercycles,holecycles,someofwhichsomeofwhichhavetheirownsub-components(eg.segments).Thetypespecicationgrammarallowsthetypesystemimplementertodenehierarchicalstructureofanycomplexobject.Thecomponentsofthistree-likehierarchycanbedistinguishedintoBaseObjects(BO)whicharetheleafnodesrepresentingindivisiblebasecomponents.ThetypeofthesebasecomponentscanbeofanyoneofthethirteenprimitivedatatypesprovidedbyC++.WewillassumethatallthebaseobjectsforagrammarisrepresentedbythesetB.ThenthereareStructuredObjects(SO)whichareinternalnodeswithadditionalstructureorbaseobjectsandareassumedtoberepresentedbythesetS.TherearesomenodesinthetreestructurewhicharecalledReferenceObjects(RO),whicharepointernodeslinkingtootherbaseorstructuredobjects,representedbythesetR.TheROallowstheimpositionofasecondaryaccessstructuretothebasedataapartfromtheprimaryonerepresentedbythehierarchicaltree.TheROalsoallowstherepresentationtobeacomplexdirectedgraphstructureapartfrombeingonlyatree.AlltheROnodespointtoastructuredobjectorbaseobjectanda`&'isusedtodenotethenodebeingpointedtobytheRO.Thetypesystemspecicationallowsthedenitionofstructuredobjectlists,referenceobjectlists,orbaseobjectlistsapartfromthereindividualcounterpart.Alistisasequenceofobjectsgroupedtogetherandisindicatedbethe`+'signafteranobject.Anycomponentofeitherthebaseobject,structuredobjectorthereferenceobjectisspeciedinthegrammarintheformvarName:typeName.ThetypeNameisthenameofthestructuredobjectorbaseobjecttypewhilethevarNameisavariablename 106

PAGE 107

attachedtothetype.Thetopleveldatatype(alsoknownastherootofthegrammar)neednothaveavariablenameassociatedwithit.Thegrammartakeseachstructuredobjectandspecieshowitisfurtherexpandedintosub-components.Startingattheroot(topleveldatatype)allthebranchesofexpansionrecursivelyendsinoneormorereferenceobjectsand/orbaseobjects. Figure4-2. Thecomponentsoftheregiondatatype Inordertolaydowntherulestocreatethegrammar,werstdenetheconceptofidentier.Anidentierisoftheform: 1.identier=identstartjidentpart2.identstart=A-Zja-z3.identpart=(identstartj0)]TJ /F5 11.955 Tf 11.96 0 Td[(9)Allthes2Shastobeformedbythefollowingrules: 1.s=varName:sTypeName2.varName=identier3.sTypeName=identierAllther2Rhastobeformedbythefollowingrules: 1.s=varName:rTypeName2.varName=identier3.rTypeName=identierAlltheb2Bhasthefollowingstructure: 107

PAGE 108

1.b=varName:bTypeName2.varName=identier3.bTypeName=(unsigned charjcharjunsigned short intjshort intjunsigned intjintjunsigned long intjlong intjbooljoatjdoublejlong doublejwchar t)TheTSImayspecifythetypesystemspecicationforanynewdatatypeinatextualrepresentationwhichfollowsthefollowingrules: 1.TypeSpec=stmt+2.stmt=LHS::=RHS;3.LHS=stjrt,wherestisasNameType,rtisarNameType4.ifLHS=st:thenRHS=(bjsjrjb\+"js\+"jr\+")+,wheres2S,r2R,b2B,st2sNameType5.ifLHS=rt:thenRHS=(\&"bj\&"s),wheres2S,rt2rNameType,b2B6.8stinRHS9!stinLHSwheres2sTypeName7.8rtinRHS9!rtinLHSwherer2rTypeNameTheorderofthestatementsdonotmatter.Thegrammarforanydatatypehastobeinaleandthelenameofthegrammarlehastobetheexactlysimilartothenameofthetopleveldatatypebeingdenedsufxedwith.tss.Additionally,thereexistsanimportstatementwhichmaybeaddedalongwiththespecication.Thisstatementisusedtobuildupanewdatatypeusingearlierdenedtypespecicationswithouttheneedforredeningthemagain.Theearlierdeneddatatypemaynotberedened,butsimplyimportedintothenewspecicationusingthestatement`importOldDatatype;'.TheTSSframeworkwilllookforthealready 108

PAGE 109

denedtypeinalenamedaftertheimportdatatypenamesufxedby.tssinthecurrentdirectory.Thefollowingisanexamplegrammarforregiondatatypespecication.TheregiontypespecicationusesanalreadydenedtypecalledSegmentswhichhasbeensimplyimportedinsteadofbeingredened.Contentsoftheleregion.tss region::=regionlabel:char+face:Face+;Face::=faceLabel:char+vOCycle:OuterCyclevHCycle:HoleCycle+;OuterCycle::=vSeg:Segment+;HoleCycle::=vSeg:Segment+;importSegment;ContentsoftheleSegment.tss Segment::=startingpoint:double+endingpoint:double+ 4.3.2PathConceptTheconceptofPathiscentraltoaccessingandmanipulationthecomplexdataobjectfromahighlevelofabstractionwithdomainspecicconcepts.Pathsareusedtorefertosub-componentsofacomplexobjectandtheyrepresentaroutestartingfromtherootofthedatatypehierarchyandgoesallthewaytoasub-componentofthestructure.Itcanbewrittendowninatextualformconsistingofadotseparatedstringconsistingofcomponentvariablenameswithindiceswithinsquarebracketsindicatingspecicelementsinalist.Notethattheindicesstartfromzero.Forexample,region.vFace[1].hOCycle[4].vSeg[5]denotesapathanditpointstothesecondface'sfthholecycle'ssixthsegment.Thepathmaycontinuetoabaseobjectorstopatastructuredobject,butitmustalwaysstartattheroot.Thepathobjectscanbetreatedlikeastringandinthesensethatstringscanbeaddedtoittoextendit.Sincethepathdependonlyonthegrammarprovidedbythetypedesigner,thepathisaexibleapplicationspecicinstrumenttoreferto 109

PAGE 110

Table4-1. Pathfunctionsignatures FunctionGroupSignatures PathCreationcreatePath:!PathcreatePath:string!PathSetset:PathT!intset:PathT[]uint!intset:PathPath!intReadread:Path!Tread:Path!T[]Appendappend:PathT[]uint!intappend:PathPath!PathDeletionremoveObj:Path!boolAuxilliarycount:Path!intisBO:Path!BisSO:Path!BisRO:Path!BisList:Path!B sub-componentsbyentirelyabstractingfromanyphysicalimplementationconceptofbytesorpointers.Thepathconceptareassociatedwithasetoffourbasicfunctionstoreadandmanipulatethedata.Theyarethesetfunction,thegetfunction,theappendfunction,andtheremovefunction.Ithasasetofaxillaryfunctionslikecount,isBO,andisSO,isRO,andisList.Thesimpleinterfacecombinedwithaintuitivelistoffunctionmakeslearningthesystemverysimple.ThecompletelistisgiveninTable 4.3.2 .ThedetailsofthefunctionsaregivenintheAppendix. 4.3.3ADTPackageTheTSSframeworkmakesitincrediblyeasytocreateanduseauserdenedcomplexdatatypeasabstractdatatypes.Duringtheimplementationofacomplexuserdeneddatatype,thetypesystemdesigner,alsoknownastheTypeSystemImplementer(TSI)iscompletelyagnostictothephysicalstoragelocationoftheactual 110

PAGE 111

object.TheuserofthecomplexdatatypeisgiventheoptionofchoosingtheappropriatestoragelocationusingtheObjectLocationconcept.Theprocessofcreatingacomplexdatatypebyabstractingfromthephysicalstorageandthetheconceptofobjectlocationisdescribedinthissection.Afterspecifyingtheinternalstructureofagrammar,theTSIneedstocreateaclassfortheparticularcomplexdataobjecttoimplementoperationsonit.AllComplexUserDeneddataTypes(CUDT)classescreatedbyTSIhastoinheritavirtualbaseclasscalledUDT.TheUDTcontainsaniBlobobjectwhichwillbethefoundationofstorageoftheabouttobecreatedcomplexdatatypesothereisnoneedtodeclareavariableoftypeiBlobinthedenitionofacomplexuserdeneddatatype.TheUDTclasshasfunctionstoassociateastoragelocationwithacomplexobject.(Theactualstoragelocationiscreatedbytheapplicationdeveloperandisexplainedlater).ThesefunctionsfreetheTSIfromcreatingandallocatingphysicalstorageofthedataobject.ThisalsohasanaddedeffectthattheTSI'simplementationisnotdependentonthetypeofphysicalstoragemedium.Inallthememberfunctionsofthedatatype,theTSIneedstosimplycheckwhetherstoragelocationhasbeenallocatedornotbeforeperforminganyoperationontheCUDT.TheTSIneedstosimplycheckwhetherstoragelocationhasbeenallocatedornotbeforeperforminganyoperationonthecomplexdatatype.ThiscanbeaccomplishedbycallingtheUDTclassmemberfunctioncalledisStorageAllocated()whichreturnstrueifstoragehasbeenallocatedtothisobjectbytheapplicationdeveloperelseitreturnsafalseifithasn'tbeenallocated.TheUDTclassalsoprovidesafunctioncalledgetStorewhichreturnsaniBlobvariablefortheTSItouseandmanipulatesusingaTSSobjectandthePathconcept.Figure 4-3 showstheclasshierarchybetweenUDTandotheruserdenedclasses.Asshowninthegure,theUDTclasshastwovariablesandoneofthemisaniBlobvariable.Italsoprovidesthreememberfunctions:Aconstructor,allocateLocation(),to 111

PAGE 112

beusedinternallytoallocatelocationtoaninstanceoftheCUDTandisStorageAllo-cated(),tobeusedbytheTSItocheckwhethertheparticularCUDTobjecthasbeenallocatedstorageornot.Thesub-classesofsegment,region,andDNAareCUDTscreatedbyTSIs.ItisessentialfortheseclassestohaveanobjectoftheTSSclasstomanipulatethecomplexobjectwith. Figure4-3. Theclasshierarchyforcomplexuserdeneddatatypes InordertodemonstratethemechanismexplainedearlierweusearelativelysimplecomplexdatatypecalledSegment.Thegrammarrepresentationisasfollows.Contentsofthelesegment.tss Segment::=lPt:CoordinaterPt:Coordinate;Coordinate::=lat:doublelon:doubleTheactualimplementationofthecomplexdatatypeisdoesusingtheconceptofopaquepointers.Anopaquepointerisadatatypedeclaredtobeapointertoarecordordatastructureofsomeunspeciedtype.Itisamechanismtohidetheimplementationdetailsofaninterfacefromtheusers,sothattheimplementationmaybechangedwithouttheneedtorecompilethemodulesusingit.Thisbenetstheprogrammeras 112

PAGE 113

wellsinceasimpleinterfacecanbecreated,andmostdetailscanbehiddeninanotherle.Thisisimportantforprovidingbinarycodecompatibilitythroughdifferentversionsofasharedlibrary,forexample.Listing 1 showstheSegmentclass.TheSegmentclassrepresentsasegmentcomprisingoftwoendpoints.AllcomplexclasseswhichintendstouseTSShastoinheritaclasscalledUDT(Line6).Intheexample,theSegmentclasshasfourpublicfunctions:theconstructor,thedestructor,theinsertValuefunction,theisIntersects,andtheprintfunction.Theinsertvaluefunctionstakestheendpointsofthesegmentandcreatesasegment.TheisIntersectsfunctiontakesanothersegmentandcheckswhethertheytwosegmentsintersect.Theprintfunctionreadsbackthesegmentandprintsouttheendpointvalues.NoticethattheprivatepartoftheSegmentclasscontainsthedeclarationofaninnerclasscalledSegmentImpl.ThisisfollowedbythedeclarationofapointeroftypeSegmentImpl.TheactualimplementationdetailsareintheSegmentImplclassthuseffectivelyhidingthedetailsfromtheuserofthisdatatypelibrary. 113

PAGE 114

1 #include"TSS.h" 2 #include"UDT.h" 34 class Segment : public UDT5{6 public : 7Segment();8 int insertValue( double x1, double y1, double x2, double y2);9 void print();10 bool isIntersects(Segmentseg2);11 ~ Segment();1213 private : 14 class SegmentImpl ;15SegmentImpl segment;16}; Listing1.TheSegmentclassTheactualimplementationhappensintheleSegment.cpp.TheSegmentImplclassisdeclaredinthisleandtheclassislistedinListing 2 .TheSegmentImplclasshasamembervariableoftypestringcalledgrammarFile(line9)tostorethelocationofthegrammarleandanTSSobjectt(Line10).Thesemembervariablesareassignedintheconstructor. 114

PAGE 115

1 #include"Segment.h" 23 class Segment :: SegmentImpl4{5 public : 6SegmentImpl() : grammarFile( "segment/Segment.tss" ),t(grammarFile, true ){}7 private : 8 const std :: stringgrammarFile;9 const TSSt;10}; Listing2.TheSegmentImplclassimplementationThefollowingcode(Listing 3 )isasnippetfromtheimplementationoftheSegmentclass(inleSegment.cpp).ThisisthefunctioninsertValuewhichtakesfourdoubleendpoints.InLine4,theTSIveriesthatstoragehasactuallybeenallocatedforthisobjectusingtheinheritedfunctionisStorageAllocated.Ifnot,thenthefunctionexists.InLine7andLine8,theTSIcreatestwoPathobjectspointingtoSegment.lPtandSegment.rPtrespectively.ThisisdoneusingtheTSSfunctioncreatePath.ThecreatePathfunctiontakesapathstringandaniBlobobject.TheiBlobobjectisreturnedbyanotherinheritedfunctiongetStore.ThesimpleinterfaceofPathobjectisdisplayedinLine10whenthePathobjectpLptisextendedwithlatbysimplyusingtheadditionoperatorcreatingthePathobjectpLptLatwhichpointstoSegment.lPt.latindicatingthelatitudeoftheleftendpointofthesegment.ThevalueofthiscomponentisassignedusingthesetfunctionasshowninLine11. 115

PAGE 116

1 int Segment :: insertValue( double x1, double y1, double x2, double y2)2{3 //Checkifstoragelocationallocated 4 if ( isStorageAllocated())5 return 0 ;67PathpLpt = segment -> t.createPath( "Segment.lPt" ,getStore());8PathpRpt = segment -> t.createPath( "Segment.rPt" ,getStore());910PathpLptLat = pLpt + "lat" ;11pLptLat.set(x1);1213PathpLptLon = pLpt + "lon" ;14pLptLon.set(y1);1516PathpRptLat = pRpt + "lat" ;17pRptLat.set(x2);1819PathpRptLon = pRpt + "lon" ;20pRptLon.set(y2);2122 return 1 ;23} Listing3.TheinsertValuefunctionimplementationTheObjLocconceptisaexiblemechanismtoallocatestoragetoacomplexobjectbeforeitisused.TheObjLocconceptallowstheapplicationdevelopertodecidetheexactphysicalstoragetobeusedforthecomplexobjectwhentheapplicationprogram 116

PAGE 117

isbeingimplemented.TheObjLocisbasedontheiBLobconcept,thatis,itisassumedthatthereisaniBlobstoragestructurewhereallstoragehappens.ThismechanismdoesnotrestrictpossiblestorageoptionssinceiBlobisawrapperoverconcretestoragemethodslikedatabases,les,andmemory.TheappdeveloperusestheCUDTcreatedbytheTSIforitsapplications.BeforetheappdevelopermayuseanyobjectofCUDT,hehastorstcreateastoragelocationandbindittotheobject.Onceanobjecthasbeenbound,alltheoperationsdenedintheobjectcanbeperformed.Thestorageneedstobeboundonlyonceanditremainsassociatedwiththeobjecttillitslifetime.Thestoragemaynotbechangedafterithasbeenbound.ThissectionexplainsthestepsneededtouseaCUDT.Firstthestoragehastobecreatedbeforeitcanbeallocated.ThisisdonewiththehelpofObjLocanditssub-classes.AsshowninFigure 4-4 ,thebaseclassObjLocisinheritedandspecializedforvariousstoragecases.ThespecializedclassObjLocO-racleisspecializedtohandleOracleDatabasestore.Similarly,wemayhaveleandotherdatabasestorestoo.Theconstructorofthesespecializedobjectlocationstakeappropriatearguments.TheObjLocOracletakesanOCILobLocator,OCIError,andanOCISrvCntxvariablesasarguments.TheOCILobLocatorisapointertoaBlobobjectfromthedatabasewhichhastobecreatedearlier.TheObjLocbaseclasshasapurevirtualbind()functionwhichhastobere-denedinitssub-classes.Thebind()functionbindsanCUDTtoaObjLocobject.ThefollowingshowshowaSegmentobjectisusedbytheapplicationdeveloper.HerstusestheOCIfunctionstogettheOCILobLocatorandotherOraclerelatedparameters.TheappdeveloperthencreatesanobjectofObjLocOracle(LineNo.18).Afterwards,hemayusetheSegmentobjecttocallanyofitsmemberfunctions.ItistheresponsibilityoftheTSItocheckthatthebind()functionhasbeencalledbeforeanyoperationonthatcomplexobjecttakesplace.Thiscanbeeasilyhandledbycallingan 117

PAGE 118

Figure4-4. TheclasshierarchyforObjLoc alreadydenedfunctioninUDTclasscalledisStorageAllocated()whichreturnsatrueorafalsevalueasappropriate.PleasenotethatthefunctionprepareBLOB In DB()hasnotbeenshownexplicitly.Itisassumedthatthisfunctionreturnstheparameters(mylob,errhp,svchp)requiredbyOracle. 118

PAGE 119

1 int main( int argc, char argv[])2{3 //ESTABLISHCONNECTIONTOTHEDATABASE 4 //andcreatethedatastructuresrequiredforOracleconnection 5 //likeOCILobLocator*,ServerContextetc. 6prepareBLOB_In_DB(string( "phoenix.cise.ufl.edu:1521/orcl" ),7string(username),8string(password));91011 //CreateanuninitializedSegmentobject 12Segmentseg1;1314 //CreateaOracleStoreLocation 15ObjLoc ol = new ObjLocOracle(mylob,errhp,svchp);1617 //BindtheSegmenttotheOracleStoreLocation 18ol -> bind(seg1);1920 //WorkontheSegmentobjectusingprovidedfunctions 21seg1.insertValue( 0.0 0.0 10.0 10.0 );22seg1.print();2324 return 1 ;25} Listing4.CodeWrittenbyAppDeveloperwhoUtilizesSegmentclass 119

PAGE 120

4.4AdditionalFunctionalityofTSSOneoftheimportantfeaturesoftheTSSisthecapacitytohandlearraysorlists.Veryfrequently,weneedtostorebaseobjectsaslists.Forexample,segmentsmaybeconsideredtobeanarrayoffourdoubleobjects.Similarly,wordsinabookmaybeconsideredtobealistofcharacters.Duetothepervasivenatureofsuchconstructs,baseobjectlistsaretreatedspeciallybytheTSSframework.TheTSSframeworkhasasetoffunctiontoreadandwritethelistofbaseobjectsallatonce.ReadingthebaseobjectstogethercanbedoneusingthereadIntArray()andthereadDoubleArrayoperations.Writingtothemmaybeaccomplishedusingthesetfunctionswhichareoverloadedtoacceptanarrayofeitherintordouble.Apartfromlist,matricesandhigherdimensionalobjectsneedtoberepresentedinsomecomplexobjectsandtheTSSframeworkallowsanynumberofdimensionstoberepresented.Theideahereistoviewamatrixasalistofrowswhicheachconsistofalistofcolumnseach.Forexample,torepresentamatrixasshowninFigure 4-5 Figure4-5. Anexamplematrix Assumingallthecellsinthematrixareoftypeinteger,wecanconceptuallyviewthestructureinthefollowingform(Figure 4-6 ).ItshowsthatamatrixiscomposedofalistofRowsandeachRowitselfiscomposedofalistofbaseobjectscalledvcolwhichareoftypeint.TomirrorthematrixinFigure 4-5 ,thevrowhastobealistcontainingthreeitemscorrespondingtothethreerows.Andeachoftheseitemswillcontainvebaseobjectsoftypeinteger.Inordertoaccessthethirdrow'ssecondcolumn'element,wehavetodeneapathasmatrix.vrow[2].vcol[1].Notethatsincebaseelementlistsare 120

PAGE 121

alsotreatedasasingleobject,entirerowscanbereadusingTSS'sbuiltinoperationatatime.Thisstrategycanbeusedtorepresentanyofthethirteenbaseobjecttypesasthetypeofeachcell.Moreover,thematrixcanbeextendedtorepresenthigherdimensionalstructuresaswell.Thiskindofrepresentationallowsanumberofbenets.Firstly,dependingontherequirementandreadinghabitsofaapplication,wecanimplementarow-majororacolumn-majormatrix.SincetheTSSdoesnotenforceanexactsizeonthelists,wecanhaverowshavingunequalsizedcolumn.Thatis,ifforsomereason,the2ndrowneedstohaveonly2columnsinsteadof5,thiswillbeallowedbytheTSS.Thecolumnsizecanbeextendedorshrunkatalatertimetoo.Itsavesstoragespacewhenwewantvariablesizedmatrix.Inregularmatrixrepresentation,thelengthisgenerallydictatedbythelengthofthelargestcolumnandthushaveunusedspacesfortheotherrows. Figure4-6. Thehierarchicalstructureofamatrix Referenceobjectsareusefulinenforcingasecondarystructuretoacomplexobjectinadditiontothemainstructureortohaveaindexonit.Thefollowingexamplebringsouttheutilityofthereferenceobjects.Letssupposewehavetheregiondatatypehierarchyasshownearlier.Inadditiontothat,weincorporateanothervariablecalledindexoftypereferenceobjectpointingtoSegments,whichitselfisastructuredobject.ThemodiedstructureisshowninFigure 4-7 andthegrammarisasfollows:Contentsoftheleregion.tss 121

PAGE 122

region::=regionlabel:char+face:Face+index:&Segment;Face::=faceLabel:char+vOCycle:OuterCyclevHCycle:HoleCycle+;OuterCycle::=vSeg:Segment+;HoleCycle::=vSeg:Segment+;importSegment;ContentsoftheleSegment.tss Segment::=lPt:CoordinaterPt:Coordinate;Coordinate::=lat:doublelon:double; Figure4-7. ThecomponentsoftheregiondatatypeincludingIndex Accordingtothemainstructureofregions,thesegmentsarearrangedaccordingtothefacetheybelongto.Onmanyoperations,mostlywhilecomputingintersections,itisnecessarytoaccessthesegmentsinaregiononalexicographicalorder.Thiscanbeachievedbytheindex:&Segment.Thisreferenceobjectisalistandeachitemofthislistpointstoasegmentintheregionobject.Wecanorderthislistofsegmentpointerstopointtosegmentsinlexicographicalorder.Sincethereferenceobjectsarepointerstoactualsegments,theydonottakeupanyextraspaceandreadingthelistoftheindexreferenceobjects,wegetthesegmentsinthedesiredlexicographicalorder. 4.5PerformanceStudiesTheTSSrepresentsawrapperontheiBLOBinfrastructureforstorageinfrastructure.SoitisexpectedtoperformnotbetterthantheiBLOBintermsofreadingandwriting 122

PAGE 123

speeds.Inordertoevaluatetheperformance,westoredandreadobjectsofSeg-mentdatatype.Segmentisageometricprimitiveandisrepresentedbyastraightlinesegmentconnectingtwoendpoints.Theendpointsarelocatedbythelatitudeandlongitudevalues.ThegrammaroftheSegmentdatatypeisgiveninDenition 4-7 .ThewritetestsincludedaseriesofwritesofsegmentdatatypesusingtheTSSconceptandusingtherawiBlobAPI.Thewriteoperationshavebeentimed.Chart 4-8 comparesthetimerequiredinwritingthesegments.ThechartshowsthatthetimetakentowritesegmentstothedatabaseusingtheTSSframeworkisconsistentlylowerthanthetimetakentosegmentstothedatabaseusingtheiBLOBAPIsdirectly.ThechartcomparingthereadtimesofsegmentsusingtheTSSframeworkversustheiBLOBAPIalsoshowsasimilartrend. Figure4-8. ComparisonoftimerequiredtowriteSegmentsusingTSSandiBLOBAPI ThisresultcanbeattributedtothecachingmechanismbuiltintheTSSPathimplementation.Wheneverapathiscreatedortraversed,theendpointisstoredinthepathobjectforsubsequentcallstothesamepath.Sincethedestinationaddressis 123

PAGE 124

Figure4-9. ComparisonoftimerequiredtoreadSegmentsusingTSSandiBLOBAPI storedinthepathobjecthoppingoflinksareavoidedanytimethesamecomponentisaccessedinsteadthesubcomponentisdirectlyaddressed. 4.6SummaryItisincreasinglyclearthatanintegratedwayofdesigning,creating,handlingandmanipulatingcomplexapplicationobjectsasabstractdatatypeisrequired.Thismechanismshouldbeindependentofphysicalstorageandallowtheuserstoaccessthedatausingahighlevelofabstraction.TheiBlobconceptallowsthestorageofcomplexdatainahierarchicalformatandaddressestheissuesrelatedtogenerality,variablelength,andupdateproblems.Soitonlyaddressesasmallportionoftheentiregamutofissuesrelatedtothecreationofcomplexdatatypes.ThemostimportantconcernrelatedtoiBlobusageisthatitrequirestheusertoknowlowlevelimplementationdetailsforittobeused.TheTSSframeworkisacomprehensiveframeworktodesign,implement,andusecomplexdatatypesfromaveryhighlevelofabstractionusingonlydomainspecicknowledgewhileprovidingtheexibilitytochooseanyphysicalstoragelocationranging 124

PAGE 125

fromdatabasestomemoryorles.TheTSSframeworkisexibleenoughtobeabletorepresentfromsimpleprimitivedatatypes(eg.characterorinteger)tocomplexdatatypes(eg.spatialdatatype).Theframeworkcanrepresentlistsofarbitrarylength,representmatrixandmulti-dimensionaldata.TheTSSframeworkallowsthetypesystemdesignertospecifytheinternalstructureofthecomplexdatatypeusingdomainspecicterms,concept,andknowledgeintheformofagrammarandthenallowsaccesstothedatausingthesametermsandconceptthuscompletelyabstractinganylowlevelimplementationdetails.Theframeworkmakestheimplementationoftheoperationsonthedatatypetobecompletelyindependentofthestoragelocation.Finally,theTSSframeworkallowstheusageofanycomplexdatatypeinanapplicationprogramasanyclassobject. 125

PAGE 126

CHAPTER5DESIGNANDIMPLEMENTATIONOFSPATIALNETWORKSINDATABASESYSTEMInthissectionwewilldescribehowtheabstractspatialnetworkconcepthasbeenimplementedasthedatatypesnetusingtheTSSframeworkandincorporatedinthedatabasesystem.Thissectionexplainstheinternalrepresentationofasnetobject.Thespatialnetworkdatatypecanbeusedintwoways.First,itcanbeusedinaprogramasanobjectoftheclasssnet.Secondly,itcanbeusedinthecontextofdatabasesattheSQLprompt.Thissectionexplainshowboththeimplementationsareobtained,thatis,howthesnetdatatypehasbeenimplementedoutsidethedatabase(Section 5.1 )andhowthespatialnetworkdatatypehasbeenincorporatedintheOracledatabasemanagementsystem(Section 5.2 ).Lateritexplainshowtomakeuseofthespatialnetworkdatatypeindatabases. 5.1TheSpatialNetworkImplementationThespatialnetworkdatatypehasbeenimplementedasadatatypecalledsnet.ThesnetdatatypehasbeenimplementedusingtheTSSframework.First,thegrammaroftheinternalrepresentationofthesnetdatatypehasbeendetermined.Inordertounderstandtheinternaldatastructureofthespatialnetwork,weneedtoknowfewconceptsrelatedtothespatialnetworkdatamodel.Aspatialnetworkconsistofanumberofchannels.Thesechannelsaregeometricallyrepresentedbya3Dcurve.Associatedwitheachsuchchannelissetofattributesandtheircorrespondingvalues.Thevaluesassociatedwithattributesmaynotremainconstantovertheentirelengthofachannel.Junctionsareaconceptualentityinaspatialnetworkandiscolloquiallydenedasthepointwheretwoormorechannelsintersectthusallowingmaterialstoowfromonechanneltoanother.Junctionshaveimpactontheshortestpathcomputations.Crossoverpointsarepointsinthenetworkwhereonechannelgoesoveranotherchannelanddoesnotintersect.Bridgesareexampleofcrossoverpoints.Anothernativefeatureofspatialnetworksareaccesspoints.Theyarespecialpoints 126

PAGE 127

alongchannelswhichallowmaterialtogoinandoutofthenetwork.Accesspointsalsoallowtransferpointstoformwhenaccesspointsfromtwodifferentnetworklayatthesamepoint.Inthefollowingpart,theimplementationstructureofthespatialnetworkisexplainedindetail.Thegeometryofachannelisapproximatedbeaseriesofsegments.Segmentsarestraightlinecomponentsrepresentedbythelocationoftheirendpoints.Aseriesofconsequentsegmentsmakeupthegeometryofachannel.Locationsinthechannelarereferredbytheconceptoflinearreference.Thestartingpointofachannelisgiventhevalue0andtheendpointofthechannelisgiventhevalue1.Alltheintermediatepointsinthechannelarereferredtobyarealnumberbetween0and1representingtheratioofthedistancefromthestartingpoint.Inthedatastructureforspatialnetworks,thesegmentsofachannelarerelatedtoachannelusingtheconceptoflinearreferencing.Thatis,allthesegmentsrepresentarangeinthechanneltheybelongtoandthestartingpoint'slinearreferenceandtheendingpoint'slinearreferencetogetherformtherangeofthesegment.Allthechannelsalsocontainthereferencetojunctionswhichareonit.Thelocationofthejunctionsaregivenbylinearreferencingalso.Athirdcomponentassociatedwithachannelisitsminimumboundingbox.Aminimumboundingboxisthesmallestthreedimensionalboxenclosinganentirechannelandisessentialforquicklycomputingtheintersectionofachannelwithanotherspatialobject.Theminimumboundingboxisrepresentedbythreepointsofthebox.Finally,thethematicattributesassociatedwiththechannelarestoredasapartofthechannel.Therearetwokindsofattributes,pointattributesandlineattributes.Pointsattributesareattributeswhosevaluearevalidataparticularpointinthechannel.Thisincludesattributesforexamplepositionofbusstopsontheroadnetwork.Lineattributesareattributeswhichspanforalengthofthechannel.Forexample,thespeedlimitsarevalidforacontinuousrangeofachannel.Eachattributeofthenetworkhasanentryintheattributelistandforeachattribute,thereisanassociatedname,andalistofarange 127

PAGE 128

withtheirassociatedvalueswithoneentryforeachdifferentvaluefortheattributeinthechannel.Therangeisgivenbylinearreferenceandisasinglepointforpointattributes.Thesegmentsofanetworkarestoredseparately.Thesegmentsofaspatialnetworkareorderedaccordingtolexicographicalorderandasegmentconsistofachannelitbelongsto,therangeinthatchannelitrepresents,andahalfsegment.Ahalfsegmentisageometricprimitivetypeconsistingofasegmentandaboolindicatingthedominatingend.Halfsegmentrepresentationisusefulwhencomputingplanesweepalgorithms.Junctionsconsistofitslocationinspace,andthelistofintersectingchannels.Theinternaldesignofthesnetdatatypeconsistoffourtoplevelcomponents.Theyarethechannels,thesegments,thejunctions,andtheattributeindex.Thesegmentsofthechannelsareseparatelystoredinlexicographicalorderwithareferencetothechannelitbelongsto.Eventhoughjunctionlocationscanbecomputedfromthechannels,theyareexplicitlystoredinthesnetdatarepresentation.Thefourthitemisanindexwhichmaintainsasortedlistofattributevaluesandthecorrespondingsegmentstheyappearintoallowquickaccesstocomponentshavingspecicvaluesorrangeofvalues.Eachchannelitselfisastructuredobjectanditconsistoffouritems.TheyarethelSegmentswhichisalistofsegmentsoftheparticularchannelsequencedinorderconsistingofareferencetothesegmentandthepositionitstartsindicatedbyalinearreference.ThelJunctionswhichisalistofjunctions,theMinimumboundingbox,andtheattributevalues.Thesecondbranchofthesnetobjectarethesegmentlist.Eachsegmentconsistofareferencetothechannelitbelongsto,thepositionrangeinthatparticularchannel,andahalfsegmentrepresentingthesegment.Allthesegmentsinthelistareorderedinlexicographicallyincreasingorder. 128

PAGE 129

Thethirdelementinthesnetdatatypearethelistofjunctions.Thejunctionscompriseofit'slocationwhichisoftypePoint3Dandalistofreferencestochannelswhichintersectatthelocationtoformthejunction.Thenalcomponentofasnetobjectistheattributeindex.Thereisanindexforeachattributewhichenablesquicksearchforachannelgivenanattributevaluesinceitsamappingfromtheattributevaluespacetothechannels.Werstprovidethestructureofthesnetdatatypeusingadiagram(Figure 5-1 )andthenlistthetextualgrammarspecication.Later,weexplainthestructureandthesemanticsinthestructureofthesnet Figure5-1. TheinternalrepresentationofSnetdatatype Thefollowingisthegrammarforthetypesystemshownabove: 129

PAGE 130

(i)snet::=channel:Channel+segment:Segment+junction:Junction+index:AttributeIndex+(ii)Channel::=lseg:lSegment+ljunction:lJunction+pMM:MBB2Dattribute:Attribute+(iii)lSegment::=linearRef:doublesegpointer:&Segment(v)lJunctions::=ref:doublejunctionPtr:&Junction(vii)Attribute::=name:char+value:Values+indexPtr:&AttributeIndex (viii)Values::=startPtRef:doubleendPtRef:doubleval:bool(x)Segment::=channelPtr:&Channelrange:Rangeseg:hSeg(xii)Range::=startRef:doubleendRef:double(xiii)Junction::=loc:Point3DInteractingChPtr:&Channel+(xv)AttributeIndex::=name:char+orderedSeg:OrderedSeg(xvi)OrderedSeg::=segRef:&SegmentLine(i)statesthatatthetoplevelasnetobjecthasfourentities-Channelsrepresentingtheconceptofchannels(includingthegeometryandthematicattributes),Junctionsrepresentingtheconceptofjunctions,Segmenttostoretheactualgeometryofthechannels,andAttributeIndextomaintainanindexstructuretothethematicattributesassociatedwiththenetwork.Thechannel:Channelisalistobjectandthelistcontainsallthechannelsinthenetwork.Thesegment:Segmentisalsoalistcontainingallthephysicalsegmentswhichmakeupeachchannelinthenetwork.Thejunction:Junctionisalsoalistcontaininginformationforallthejunctionsinanetwork.TheattributeIndexisalistandthereisoneentryforeachattributeinthelabelsetofthenetwork.Line(ii)representstheChannelentity.Itcontainsthedetailsofeachofthechannelinthenetwork.Thereisoneentryforsegmentscalledlseg:lSegment.Itisalistofsegmentswhichmakeuptheparticularchannelarrangedinacontagiousorder.Thejunction:lJunctionrepresentsallthejunctionsintheparticularchannel. 130

PAGE 131

ThepMM:MBB2Distheboundingrectangleoftheprojectionofthechannelandattribute:Attributestorestheattributevaluesassociatedwiththechannel.Line(iii)explainsthetypelSegment.Itcontainsthestartinglocationofthesegmentintheparticularchannelasarealnumberbetween0and1namedaslinearRef.TheactualsegmentisreferencedbythereferenceobjectsegPointerwhichpointstoanobjectofSegment(Line(iv)).Line(v)lJunctionrepresentsallthejunctionslocaltothatchannel.Thepositionofthejunctionisgivenrelativetothechannelasalinearreferencebytheentityref:D,andthedetailsofthejunctionisreferredtobythejunctionPtr:ROwhichpointstotheJunctiontype(Line(vi)).Line(vii)representstheattributevaluesassociatedwithachannel.Anyattributehasaname:S,thevaluesitassumeforthatchannel(value:Values)andareference,indexPtr:RO,whichreferstotheAttributeIndex(Line(ix))forthatparticularattributeinordertoexpeditesearchesforthatattribute.Line(viii)statesthatthevaluesofaparticularattributeforaparticularchannelisstoredasvalwiththestartingwheretheattributeassumedthatparticularvalue(startPtRef:D)andtheendingpoint(inthesamechannel)wheretheattributeassumedtheparticularvalue(endPtRef:D).Line(x)representstheactualsegmentsinthenetwork.ItconsistsofachannelPtr:ROreferencingthechannelaparticularsegmentbelongsto(Line(xi)),therangeofthechannelwhichisrepresentedbythatsegment(range:Range)andtheactualsegment(seg:hSeg)representedbyahalfsegment.Line(xii)showsthataRangeisrepresentedbyastartingpointreferenceandaendingpointreference.Line(xiii)tellshowajunctionconsistof.Itconsistsofageometric3Dpointrepresentingitslocation(loc:Point3D)andalistofinteractingChPtr:ROwhicharea 131

PAGE 132

listofreferenceobjectsreferringtotheChanneltype(Line(xiv))indicatingthechannelswhichintersecttocreatethejunction.Line(xv)denotestheindexstructureforeachoftheattributesinthelabeltypeofthesnetobject.Itisalistandeachentryconsistofthenameoftheattributeitindexes(name:S)andalistofsegments.Thesegmentsareorderedsuchthatthevalueoftheparticularattributeareinanincreasingorderinthesequenceofthesegments.(orderedSeg:OrderedSeg).Oncethegrammarhasbeendecided,theactualsnetclassbeenimplemented.TheentireimplementationofthesnetclasshasbeendoneinC++totakeadvantageoftheTSSframework.Inalltheoperationsassociatedwiththesnetclass,theTSS'spathobjectshavebeenusedtoaccesstheinternaldataofansnetobject.ThedatastoreforanyclassbuiltusingtheTSSisassumedtobeaniBlobobject.Eachofthememberfunctionsareimplementedonebyone.Tomakethecodeproprietary,weusetheopaquepointerconcept.IBlobvariablescanbecreatedinmemoryorindatabases.Whenadatabaseiblobiscreated(usingtheTSSframework)thenthesnetobjectisstoredinthedatabaseasanobjectoftheeldsnet.Thus,wecaneasilyhavesnetvariableswhicharestoredinmainmemoryorindatabases.Whenstoredindatabases,thedatabasehastobepreparedrstbycreatingatableandaeldtypeofsnet.Themechanismtodosoisexplainedinthenextsection. 5.2IncorporatingSpatialNetworkinDatabasesThecorrespondingdatatypeforspatialnetworksindatabasesiscalledSNETandforthedatabasetorecognizethedatatypeSNETandforuserstocreatetableshavingeldtypeSNET,thisdatatypehastoberstregisteredwiththedatabase.TheOracledatabasehastheCREATETYPEstatementtospecifythenameoftheobjecttype,itsattributes,methods,andotherproperties.UserdenedobjecttypescanbecreatedwiththeCREATETYPEstatements.WedeneatypecalledSNETwhichcontainsjustasingleBLOBobjectcalledpdata.Alongwiththedatavariableitcontainsthedeclaration 132

PAGE 133

ofallthefunctionmemberscorrespondingtotheC++snetclassimplementedearlierasshowninListing 5 .TheCREATETYPEBODYstatementcontainsthecodeforthemethodsthatimplementthetypeandthecorresponding(partial)CREATETYPEBODYstatementisshowninListing 6 .Thefunctionsforthesnetdatatypehasbeendenedinapackagecalledthesnet pkg.Puttingalltherelatedfunctionsinapackageisusefulfororganizingtherelatedfunctions. 1 CREATE OR REPLACE TYPE "SNET" as object 2(pdata BLOB ,3member function channellength return number ,4member function window return SNET,5member function clip return SNET,6member function getGeometry return line,7member function route return snet,8member function crossoverPts return Point2D,9member function junctionPoints return Point2D,10member function GetAccessPts return Point2D,11member function GetGraph return varchar2,12member function shortestroute return SNET,13member function minValue return Point2D,14member function maxValue return Point2D,15member function networkDistance return number ,16member function nodeDegree return pls_integer,17member function gradient return number ,18member function curvature return number ,19member function networkUnion return SNET,20member function networkIntersection return SNET,21member function networkDiff return SNET,22member function toString return varchar223); Listing5.CreatingandregisteringatypeforsnetinOracledatabaseFinally,theC++implementationofthesnetdatatypefunctionshastobelinkedwiththeOracle'sregisteredfunction.Todothis,alibraryhastobecreatedfortheC++snetclass.ItisassumedthatalltheimplementationofallthefunctionsdeclaredintheOracle'sSNETuserdenedtypehasbeenimplementedintheC++compiledlibrary 133

PAGE 134

1 CREATE OR REPLACE TYPE BODY "SNET" is 2member function channellength return number is 3 result number : = snet_pkg.channellength(pdata);4 BEGIN 5 return result ;6 END ;7member function window return SNET is 8valSNET: = snet_pkg.window(pdata);9 BEGIN 10 return val;11 END ;12member function toString return varchar2 is 13valvarchar2( 4000 ): = snet_pkg.toString(pdata);14 BEGIN 15 return val;16 END ;17 end ; Listing6.PartialbodyofthesnetdatatypeinOracledatabaselelocatedat`/home/aistdev/SNET/libs/libsnet.so'.Thelibraryisnamedsnet libandregisteredwithOracleusingtheCREATEorREPLACELIBRARYstatementasfollows: 1 CREATE or REPLACE librarysnet_lib as '/home/aistdev/SNET/libs/libsnet.so' ; Listing7.Linkandregisterthelibsnet.solibrarywithOracleassnet libOncethelibsnet.solibraryhasbeenregisteredwithOracle,wesimplylinkthebodyoftheOracle'sSNETuserdeneddatatype'sfunctionasexternalfunctionsinthebodyofthe'snet pkg'asshowninListing 8 .NotethatthelistingshowsonlythreefunctionsbelongingtotheOracle'sSNETdatatype.TherestofthefunctionshavetobesimilarlyregisteredwithOracle.TheSNET'schannellengthfunctionislinkedtotheexternalfunctionlengthcontainedinlibrarysnet libandthisisindicatedintheCREATEORREPLACEPACKAGEBODYstatementinlines2to7inListing 8 .Similarly,theSNETfunctionwindowislinkedtothefunctionwiththesamenameinthesnet liblibraryinlines9to14.Similarly,thetoStringfunctionhasbeenlinkedinlines16to21Listing 8 134

PAGE 135

1 CREATE OR REPLACE PACKAGEBODY "snet_pkg" AS 2 function channellength(b blob ) return number 3 as external 4 language C WITH CONTEXT5name "length" 6librarysnet_lib7 parameters (CONTEXT,bOCILobLocator);89 function window(b blob ,rREGION2D) return SNET10 as external 11 language C WITH CONTEXT12name "window" 13librarysnet_lib14 parameters (CONTEXT,bOCILobLocator);1516 function toString(b blob ) return varchar217 as external 18 language C WITH CONTEXT19name "toString" 20librarysnet_lib21 parameters (CONTEXT,bOCILobLocator);22 end ; Listing8.Partialbodyofthesnet pkgpackageinOracledatabaseOnceallthefunctionsoftheSNETuserdeneddatatypeinOraclehasbeensuccessfullyregisteredandlinked,theycanbedirectlycalledfromtheSQLprompt.ConsideringwehaveatableinOraclewiththeschemaRoadNetworks(RoadType:string,roadNet:snet,AdministeredBy:String),wecanposequerieswhichdirectlycallthefunctionsassociatedwiththeSNETuserdeneddatatypeinOracle.Forexample,thefollowingquery(Listing 9 )ndsthelengthofthenetworkusingthenetworklengthmemberfunctionofSNETdatatype. 1 Select snet.networklength(N.roadnet)2 from Roadnetworks as N Listing9.QuerytoreturntheentirenetworklengthThequeryinListing 10 computesthewindowofnetworkswitharegionnamedFloridawhichbelongstothetable`States'. 135

PAGE 136

1 Select snet.window(N.roadnet,S.Florida)2 From Roadnetworks as N,States as S Listing10.QueryexampletoshowthewindowoperationAllthefunctionsdeclaredinSNET(Listing 5 )canbecalledinaquery.ConsequentlytheSNQLweobtain,whichisanextensionofSQL,isexactlyasproposedinSection 3.2.4 5.3UsingSnetandPerformanceEvaluationAmongthenetworkmapsfreelyavailable,OpenStreetMap(OSM)isacomprehensivecollectionofroadnetworkdata.OpenStreetMapisacollaborativeprojecttocreateafreeeditablemapoftheworld.ThedatafromOpenStreetMapisavailableundertheOpenDatabaseLicense(ODbL)fromOpenDataCommons(ODC).Inthetestingofthisproject,OpenStreetMaphasbeenmadeuseof.TheOpenStreetMapdataisavailableinaXMLformatdirectlydownloadablefromtheirwebsite.TheOpenStreetMap'swebsiteallowstheusertodownloadpartialnetworkdata.OpenStreetMapusesatopologicaldatastructure,withfourcoreelements(alsoknownasdataprimitives).TheNodesarepointswithageographicposition,storedascoordinates(pairsofalatitudeandalongitude).Outsideoftheirusageinways,theyareusedtorepresentmapfeatureswithoutasize,suchaspointsofinterestormountainpeaks.Waysareorderedlistsofnodes,representingapoly-line,orpossiblyapolygoniftheyformaclosedloop.Theyareusedbothforrepresentinglinearfeaturessuchasstreetsandrivers,andareas,likeforests,parks,parkingareasandlakes.Tagsareusedtostoremetadataaboutthemapobjects(suchastheirtype,theirnameandtheirphysicalproperties).Relationsareusedforrepresentingtherelationshipofexistingnodesandways.Examplesincludeturnrestrictionsonroads,routesthatspanseveralexistingways,andareaswithholes.SincethedataisobtaineddirectlyfromtheOpenStreetMapdoesnotcorrespondtotheinternalrepresentationofoursnetdatatype,thedatahastobepassedthroughaconvertertoobtainthedesiredrepresentation.Namely,thejunctionpointshavetocomputedandlocatedineach 136

PAGE 137

Table5-1. Evaluationofsnetdatatypeperformance TestcaseNo.ofNo.ofCreationTime(ins)TimetorunTimetorunSegmentsChannelslength(ins)window(ins) 1145505.430.040.252507164330.231.83932588.790.040.354325419195.360.442.035538123.690.020.186738179460.31.96 channel,thesegmentsofthechannelhavetobeappropriatelylocatedinachannel.Thenthedatacanbepassedtotheconstructorofansnetobject.Forthepurposeoftestingourimplementationofthesnetdatatype,wechosetheareainandaroundGainesville'sroadnetworkdata.WedownloadedvarioussizesofdataandthedetailsofthedataalongwiththenumberofsegmentsandthenumberofchannelscanbefoundinTable 5.3 .Alongwiththenumberofsegmentsandthenumberofchannels,thetablealsogivesthetimeittooktocreateansnetobjectcontainingthatdata,thetimetorunthelengthoperationonthem,andthetimetorunthewindowoperationonit.Thedataprovidessomeinterestinginsightsintotheperformanceofthesnetdatatype.Whenthesnetcreationtime,timetorunlengthoperation,andtimetorunwindowoperationisplottedagainstthenumberofsegmentsasinthenetworkinChart 5-2 ,itisapparentthatthereishardlyanycorrelationamongthem.Ontheotherhandwhenthesamedataisplottedagainstthenumberofchannels(Chart 5-3 ),weseeadenitelycorrelationbetweenthem.Asthenumberofchannelsinanetworkincrease,thetimetakentocompletetheoperationsalsoincrease.Thisisaconsequenceofthefactthatthenetworkoperationstreatchannelsasunitsofthenetwork.Inboththechartsweseethatthetimetakentocreateanetworkiscomparativelylargerthanthetimetakentorunoperationsonit.Thisisexpectedbecausewhencreatingthenetwork,anumberofadditionaldataiscomputedandstored,forexample,thejunctionpointsetc..Notethatoncethesnetobjectiscreatedandputinsidethedatabase,thetimetakentorun 137

PAGE 138

operationsonitaremuchlower.Almostalltheoperationsrununderasecond.Thetimetoexecutetheoperationsdonotshowanexponentialincreasewiththeincreaseinthenumberofchannelseither. Figure5-2. PerformanceevaluationofSnetdatatype 138

PAGE 139

Figure5-3. PerformanceevaluationofSnetdatatype 139

PAGE 140

CHAPTER6CONCLUSIONThepurposeofthisresearchistobuildandintegrateacomprehensivecomponentinextensibledatabasemanagementsystems,whichconsistsofatypesystemforspatialnetworkdatalikeroadnetworks,pipelinenetworks,andquerylanguageextensionswithmostimportantoperationsandpredicatesliketheintersectionoperation,thetopologicalpredicatesforqueryingspatialnetworkdata.Toachievethisgoal,wehaverstdevelopedanabstractdatamodelforspatialnetwork.Thisdatamodelisarigorous,mathematicaldenitionofacomprehensivetypesystem(algebra)forspatialnetworkscalledthespatialnetworkalgebra.Thisdatamodelpresentsacarefulabstractdesignofasystemofcomplexnetworkdatatypeandthesemanticsofrelatedoperations.However,theemphasisisoncompleteness,closure,consistencyandgeneralityofthetypedenitionsandthesemanticsofoperations.Thisdatamodelservesasahigh-levelspecicationforimplementationofspatialnetworksoncomputers.Theabstractmodelillustratesaspatialnetworksdatatypeandsemanticsofrelatedoperationsonthem.Next,animplementationconceptforgenericcomplexdatatypescalledTypeSystemSpecicationhavebeendesignedandimplemented.TSSisacomprehensivepackagetodesign,implement,andusecomplexdatatypesystemsinaveryabstract,user-friendly,andapplicationdomain-orientedmanner.Itconsistsofgenerictoolstodene,access,andmanipulatecomplexapplicationobjectsusingasemanticmethod.Itusesagrammartoenablethehigh-leveldenitionofapplication-speciccomplexdatatypes.Itusesthepathconcepttoenablethehigh-levelhandlingofcomplexapplicationobjects,anditaddshigh-levelsemanticsthatallowstheapplicationprogrammertostayinhisapplicationenvironmentandusehis/herapplication-specicterminology.Thisframeworkallowsthecreationofnewcomplexdatatypesagnostictotheactualphysicalstoragelocations.Theuserofthecomplexdatatypehasasingleobjectview 140

PAGE 141

ofthedata.Theapplicationdeveloperchooseswheretophysicallystorethecomplexdatatypeobject.Theapplicationdevelopercanoperateoncomplexdatatypeobjectsspanningmultiplestoragelocationssimultaneously.Theapplicationdeveloperusescomplexdatatypeobjectsjustlikeanyclassobject.Thespatialnetworksbeingacomplexdatatype,TSSframeworkhasbeenusedtocreateadatatypecalledsnettoimplementspatialnetworks.ThisdatatypehasbeenincorporatedinOracledatabasetocreateadatabaseeldtypeforspatialnetworkdata. 141

PAGE 142

APPENDIX:TSSINTERFACE TheTSSframeworkexposesaninterfacewhichatypesystemdevelopermayusetoimplementoperationsonacomplexapplicationdata.InthissectionweexplaintheTSSinterface.TheinterfacefunctionsprovidedbytheTSSframeworkareclassiedintoseventypesbasedonsimilarityofpurposeandthegroupingcanbefoundinTable 6 .ThissectionisorganizedintosevensubsectionseachcorrespondingtoaTSSfunctiontype.ThesubsectionswillprovidegenericfunctionaldetailsofeachtypeandproceedtoenumeratetheC++syntaxsignaturesoftheTSSinterfacefunctionsthatbelongtothatparticulartypefollowedbyadescriptionoffeaturesdistincttoindividualfunctions. A.1ConstructorsThesesetoffunctionsrepresentthedifferentoptionsforTSSobjectcreation.TheTSSrepresentsanabstractionoverthe'iBloB'andrequiresagrammarthatspeciesthestructureofacomplexdatatype.Onceaconstructoriscalledandexecuted,aTSSobjectiscreated.ThisobjectcanbeusedtomanipulateandextractdatafromtheiBLOB. 1. TSS::TSS(constchar*tssle,boolisFile=true) TSS::TSS(constchar*tssle,boolisFile=true).IfisFileissettotrue,thenthetssleisanameofale(with.tssextension)toreadthegrammarfrom,elsetssleistheactualgrammar.Thegrammarisstoredandreadasacharacterstream.Incasethetsslestoresaninvalidgrammar,theconstructorwillthrowanInvalidGrammarException. A.2PathCreationThePathisthecentralconstructoftheTSS.Itencapsulatesadomainunderstandable'pointer'tocomponentsinsideacomplexdataobject,providingalogicalconnectionbetweenthem.Anexternalusermanipulatethepathasastring.PathsareanalogoustopointersinC++.ThefollowingfunctionsintheTSSinterfaceallowsausetocreatepathobjects: 142

PAGE 143

TableA-1. TSSfunctionsignatures FunctionGroupClassSignatures ConstructorsTSSTSS:stringboolPathCreationTSScreatePath:!PathTSScreatePath:string!PathSetPathset:PathT!intPathset:PathT[]uint!intPathset:PathPath!intGetPathget:Path!TPathget:Path!T[]AppendPathappend:PathT[]uint!intPathappend:PathPath!PathDeletionPathremove:Path!BAuxilliaryPathcount:Path!intPathisBO:Path!BPathisSO:Path!BPathisRO:Path!BPathisList:Path!BObjectAllocationObjLocObjLoc:!ObjLocObjLocbind:UDT!BUDTisStorageAllocated:!BUDTgetStore:!iBlob 1. PathTSS::createPath(void*storageHandler) 2. PathTSS::createPath(stringstrPath,void*storageHandler) PathTSS::createPath(void*storageHandler).ThisfunctionwillcreateanemptyPathobject.ThecreatePathfunctiontakesaniblobpointerasastorageHandlerandalwaysworksonthatparticulariblobobject. PathTSS::createPath(stringstrPath,void*storageHandler).ThisfunctioncreatesaPathcorrespondingtotheinputstring'strPath'.TheTSSwillrstcheckiftheinputstringrepresentsavalidpathusingthegrammar.Ifthestringdoesnotconform 143

PAGE 144

withthegrammaranInvalidPathExceptionwillbethrown.Ifthestringdoesrepresentagrammaticallyvalidpath,thenapointertotheparticularsubcomponentofthedataobjectwillbestoredandthePathobjectcontainingthatpointerwillbereturned. A.3SetFunctionsTheTSSinterfacefunctionsthatbelongtothistypeareusedtoinsertvaluestobaseobjects.Theytakeasinputthevaluetobewrittenandotherauxiliarydatarequired(ifany)forexample,sizeofinputarraytosetthevaluesofanintegerarray,alongwithaPath.ThesetfunctionsrstcheckiftheinputPathrepresentsaBaseObject.IfthePathdoesnotrepresentaBaseObjectanInvalidSetPathExceptionisthrown.ThisistoreectadesigndecisionthatwillallowuserstosetonlyBaseObjectvalues.StructuredObjectsinbetweentherootandthebaseobjectareimplicitlycreatedwheneverrequired.Thesetfunctionsareasfollows: 1. templateintPath::set(T&val) 2. templateintPath::set(T*val,intsize) 3. intPath::set(constPath&objp) templateintPath::set(T&val).InsertsanobjectofanytypeTintothepathpointedtobythePathobjectonwhichthefunctionhasbeeninvoked.Itreturnsapositivevalueonsuccessfulexecutionanda-1onfailure. templateintPath::set(T*val,intsize).InsertsanarrayobjectofanytypeTintothepathpointedtobythePathobjectonwhichthefunctionhasbeeninvoked.Thevariable`size'shouldcontainthenumberofelementsinthearray.Itreturnsapositivevalueonsuccessfulexecutionanda-1onfailure. intPath::set(constPath&objp).Thisfunctioncanonlybecalledbypathobjectspointingtoreferenceobjects.Aftersuccessfulexecutionofthisfunction,thereferenceobjectpointstoobjp. 144

PAGE 145

A.4ReadFunctionsThereadfunctionsreadformbaseobjectssub-componentinacomplexobject/IncasethePathpointstoalocationwhichcurrentlydoesnotexistinthedataobject,thenanexceptionisthrown.Readingastructuredobjectisnotsemanticallyjustiable.IfthePathdoesnotrepresentaBaseObjectanInvalidReadPathExceptionisthrown.Ifabaseobjecthasbeendenedasanlist,readfunctioncanreaditasalistorassingleobjectsdependingonhowthepathisspecied.Itreturnsapositivevalueonsuccessfulexecution. 1. templateintPath::read(T&val) 2. templateintPath::read(T*&val,int&size) templateintPath::read(T&val).ReadsandpopulatesthevariableTfromabaseobjectpointedtobythePaththefunctionisinvokedfrom.IfthePathdoesnotrepresentanbaseobjectanInvalidReadExceptionisthrown. templateintPath::read(T*&val,int&size).Reads,allocatesandpopulatesthevalpointerfromabaseobjectpointedtobythePath.Thesizevariableisupdatedtocontainthenumberofelementsinthearrayval.IfthepathobjectdoesnotrepresentabaseobjectanInvalidReadExceptionisthrown.Ifthebaseobjectisnotalist,thenanInvalidReadExceptionisthrown. A.5AppendFunctionsAlltheappendfunctionsworkonpathswhichpointtolists.Ifthesefunctionsareappliedtoanonlistpath,theappendfunctionsthrowanexception.TheappendfunctioninsertsanobjectattheendofalistandaresimilartothesetfunctionsintheiroverallexecutionTheappendfunctionsareoverloadedtoacceptallthebasicdatatypes.Ifthefunctioncompletesuccessfully,itreturnsaPathtothenewlyinsertedobject. 1. templateintPath::append(T*val,intsize); 145

PAGE 146

templateintPath::append(T*val,intsize).ConcatenatesanarrayobjectofanytypeTintothepathpointedtobythePathobjectonwhichthefunctionhasbeeninvoked.Thevariable`size'shouldcontainthenumberofelementsinthearray.Itreturnsapositivevalueonsuccessfulexecutionanda-1onfailure. A.6DeletionThisfunctionmaybeusedtodeleteasub-componentfromadataobject. 1. PathremoveObj() boolremove().:ThisfunctionwilldeletetheobjectrepresentedbythePath.IfthePathrepresentsaStructuredObjectallthecomponentsbelowthehierarchyofthestructuredobjectwillbedeleted.Ifthepathargumentisalistitem,thentheitemwillberemovedfromthelistandlistwillbecompactedtoremoveandholesformed.Thisfunctionwillreturntrueifdeletionwassuccessful,elseitwillreturnfalse. A.7AuxiliaryFunctionsThesesetoffunctionsprovideadditionalfunctionalityapartfromthereadandwritefunctions. 1. intcount() 2. boolisBO() 3. boolisSO() 4. boolisRO() 5. boolisList() Pathcount().:Thisfunctionreturnsthenumberofitemsinalistsubcomponent.Ifthepathobjectdoesnotpointtoalist,thenaexceptionisthrown. boolisBO().:Itreturnsatruevalueifthepathobjectpointstoabaseobject,elseitreturnsfalse. boolisSO().:Itreturnsatruevalueifthepathobjectpointstoastructuredobject,elseitreturnsfalse. 146

PAGE 147

boolisRO().:Itreturnsatruevalueifthepathobjectpointstoareferenceobject,elseitreturnsfalse. boolisList().:Itreturnsatruevalueifthepathobjectpointstoalistobject,elseitreturnsfalse. A.8ObjectAllocationFunctionsTheobjectallocationfunctionsareusedtocreatephysicalstoragelocationsandassociateittocomplexdatatypeobjects. 1. boolbind(UDT&) 2. boolisStorageAllocated() 3. iblob*getStore() boolbind(UDT&).:ThisfunctionbelongstotheObjLocclassanditbindsanobjectofObjLoctoaUDTobject,Ifthebindingfails,thenthefunctionreturnsafalse. boolisStorageAllocated().:ItisamemberfunctionoftheUDTclassanditreturnstrueiftheUDTobjecthasbeenallocatedphysicalstoragelocationbythebindfunctionexplainearlier. iblob*getStore().:ThisfunctionbelongstotheUDTclassanditreturnsapointertoaniBlobobjectassociatedwiththeUDTobject.TheiBlobobjectcannotbeaccesseddirectly.ItreturnsaNULLifthebindoperationhasnotbeenexecutedontheUDTobject 147

PAGE 148

LISTOFREFERENCES [1] Atwood,Jeff.XML:TheAngleBracketTax.2008.URL http://www.codinghorror.com/blog/2008/05/xml-the-angle-bracket-tax.html [2] Boynton,J.R.XMLcriticismandcomments.2002.URL http://www.tdl.com/~jrb/jrb7/xml.html [3] Brinkhoff,Thomas.AFrameworkforGeneratingNetwork-BasedMovingObjects.Geoinformatica6(2002).2:153. [4] Browne,Eric.Themythofself-describingXML.2003.URL http://workflow.healthbase.info/monographs/XML_myths_Browne.pdf [5] Chen,Xiaogang,Jiang,Quanyuan,andCao,Yijia.ImpactofCharacteristicPathLengthonCascadingFailureofPowerGrid.Int.Conf.onPowerSystemTechnology.2006,1. [6] Clark,James.XMLandJSON.2007.URL http://blog.jclark.com/2007/04/xml-and-json.html [7] Cruz,IsabelF.,Mendelzon,AlbertoO.,andWood,PeterT.AGraphicalQueryLanguageSupportingRecursion.ACMSIGMODInt.Conf.onManagementofData.1987,323. [8] Dale,M.R.T.andFortin,M.-J.FromGraphstoSpatialGraphs.AnnualReviewofEcology,Evolution,andSystematics41(2010).1:21. [9] David,MichaelM.TenProblemswithXQueryandtheSQL/XMLStandard.2010.URL http://www.databasejournal.com/sqletc/article.php/3865201/Ten-Problems-with-XQuery-and-the-SQLXML-Standard.htm [10] Demar,Urka,patenkov,Olga,andVirrantaus,Kirsi.IdentifyingCriticalLocationsinaSpatialNetworkwithGraphTheory.TransactionsinGIS12(2008).1:61. [11] Derekenaris,G.,Garofalakis,J.,Makris,C.,Prentzas,J.,Sioutas,S.,andTsakalidis,A.IntegratingGIS,GPSandGSMTechnologiesfortheEffectiveManagementofAmbulances.Computers,EnvironmentandUrbanSystems25(2001).3:267278. [12] Egenhofer,M.J.andHerring,J.AmathematicalFrameworkfortheDenitionofTopologicalRelationships.4thInternationalSymposiumonSpatialDataHandling.1990. 148

PAGE 149

[13] ESRI.DataModels-ESRISupport,year=2012,url=http://support.esri.com/en/downloads/datamodel,urldate=11/11/2012.???? [14] Fleming,T.andMellor,B.AnIntroductiontoVirtualSpatialGraphTheory.Int.WorkshoponKnotTheoryforScienticObjects.2006. [15] Frentzos,Elias.IndexingObjectsMovingonFixedNetworks.8thInt.Symp.onSpatialandTemporalDatabases.Springer,2003,289. [16] Goodchild,M.F.GeographicInformationSystemsandDisaggregateTransportationModeling.GeographicalSystems5(1998).1-2:19. [17] Google.ProtocolBuffers.DeveloperGuide.2008.URL https://developers.google.com/protocol-buffers/docs/overview [18] Gupta,Sandeep,Kopparty,Swastik,andRavishankar,Chinya.Roads,Codes,andSpatiotemporalQueries.PODS'04:Proceedingsofthetwenty-thirdACMSIGMOD-SIGACT-SIGARTSymposiumonPrinciplesofDatabaseSystems.NewYork,NY,USA:ACM,2004,115. [19] Guting,Hartmut,deAlmeida,Teixeira,andDing,Zhiming.ModelingandQueryingMovingObjectsinNetworks.TheVLDBJournal15(2006).2:165. [20] Guting,R.GraphDB:ModelingandQueryingGraphsinDatabases.20thInt.Conf.onVeryLargeDatabases.1994,297. [21] Gyssens,M.,Paredaens,J.,VandenBussche,J.,andVanGucht,D.AGraph-OrientedObjectDatabaseModel.IEEETransactionsonKnowledgeandDataEngineering6(1994).4:417. [22] Jensen,C.S.,Pedersen,T.B.,Speicys,L.,andTimko,I.DataModelingforMobileServicesintheRealWorld.Int.Conf.onAdvancesinSpatialandTemporalDatabases.2003,1. [23] Jeung,Hoyoung,Yiu,ManLung,Zhou,Xiaofang,andJensen,ChristianS.PathPredictionandPredictiveRangeQueryinginRoadNetworkDatabases.TheVLDBJournal19(2010).4:585. [24] JohnHerring,DavidM.MarkandMaxJ.Egenhofer.The9-Intersection:FormalismAndItsUseForNatural-LanguageSpatialPredicates.1994. [25] Kamath,SunilandShah,Punit.DB29XMLperformancecharacteristics.2006.URL http://www.ibm.com/developerworks/data/library/techarticle/dm-0606schiefer [26] Kanjilal,VirupakshaandSchneider,Markus.ModelingandQueryingSpatialNetworksinDatabases.JMPT2011.JMPT,2011. 149

PAGE 150

[27] Kanjilal,VirupakshaandSchneider,Markus.SpatialNetworkModelingforDatabases.SAC2011:Proceedingsofthe2011ACMSymposiumonAppliedComputing.ACM,2011. [28] Kothuri,RavikanthV.andGodfrind,AlbertandBeinat,Euro.ProOracleSpatialforOracleDatabase11g(Expert'sVoiceinOracle).Berkely,CA,USA:Apress,2007. [29] Longley,P.A.,Goodchild,M.F.,Maguire,D.J.andRhind,D.W.GeographicInformationSystemsandScience.JohnWiley,Chichester,2001. [30] Mannino,M.V.andShapiro,L.D.ExtensionstoQueryLanguagesforGraphTraversalProblems.IEEETransactionsonKnowledgeandDataEngineering2(1990).3:353. [31] Meschini,Lorenzo,Gentile,Guido,andPapola,Natale.AFrequencyBasedTransitModelforDynamicTrafcAssignmenttoMultimodalNetworks.17thInt.Symp.onTransportationandTrafcTheory.2007. [32] MichaelZeiler.ModelingOurWorld:TheESRIGuidetoGeodatabaseDesign.EnvironmentalSystemsResearchInstitute,1999. [33] Mike.HowXMLThreatensBigData.2009.URL http://www.dataspora.com/2009/08/xml-and-big-data/ [34] Miller,H.J.andShaw,S.-L.GeographicInformationSystemsforTransportation.OxfordUniversityPress,2001. [35] Scheider,S.andMay,M.AMethodforInductiveEstimationofPublicTransportTrafcusingSpatialNetworkCharacteristics.(2007). [36] Scheider,SimonandKuhn,Werner.RoadNetworksandTheirIncompleteRepresentationbyNetworkDataModels.GIScience'08:Proceedingsofthe5thinternationalconferenceonGeographicInformationScience.Berlin,Heidelberg:Springer-Verlag,2008,290. [37] Schneider,M.SpatialDataTypesforDatabaseSystems-FiniteResolutionGeometryforGeographicInformationSystems,vol.LNCS1288.Springer-Verlag,1997. [38] Schneider,MarkusandWeinrich,BrianE.AnAbstractModelofThree-DimensionalSpatialDataTypes.Proceedingsofthe12thAnnualACMInternationalWorkshoponGeographicInformationSystems.GIS'04.ACM,2004,67. [39] Schneider,MarkusandBehr,Thomas.TopologicalRelationshipsBetweenComplexSpatialObjects.ACMTransactiononDatabaseSystem31(2006):39. 150

PAGE 151

[40] Shekhar,ShashiandYoo,JinSoung.ProcessingIn-RouteNearestNeighborQueries:AComparisonofAlternativeApproaches.11thACMInt.Symp.onAdvancesinGeographicInformationSystems.2003,9. [41] Speicys,LaurynasandJensen,ChristianS.EnablingLocation-basedServicesMulti-GraphRepresentationofTransportationNetworks.Geoinfor-matica12(2008).2:219. [42] Thuraisingham,Bhavani.XMLDatabasesandtheSemanticWeb.CRCPress,2002. [43] Ulugtekin,N.N.,Dogru,A.O.,andThomson,R.C.ModellingUrbanRoadNetworksIntegratingMultipleRepresentationsofComplexRoadandJunctionStructures.12thInt.Conf.onGeoinformatics-GeospatialInformationResearch:BridgingthePacicandAtlantic.2004. [44] Vanderbist,Dirk.XMLversusEDI.LIRISK.U.LeuvenBelgium,2002. [45] Vinoski,Steve.ProtocolBuffers:LeakyRPC.2008.URL http://steve.vinoski.net/blog/2008/07/13/protocol-buffers-leaky-rpc/#comment-1093 [46] W3C.ExtensibleMarkupLanguage(XML)1.0(FifthEdition).2008.URL http://www.w3.org/TR/REC-xml/ 151

PAGE 152

BIOGRAPHICALSKETCH VirupakshaKanjilalcompletedhisPh.D.fromtheUniversityofFloridain2012.HewasadvisedbyDr.MarkusSchneiderandhisresearchinterestliesingeo-spatialdatabases.VirupakshareceivedhisBachelorsinTechnologyinComputerScienceandEngineeringin2008fromtheNationalInstituteofTechnology,Durgapur,India. 152