<<

2009:180 CIV EXAMENSARBETE

OpenStreetMap - Crowd sourcing client

Mattias Grape

Luleå tekniska universitet Civilingenjörsprogrammet Medieteknik Institutionen för Systemteknik Avdelningen för Medieteknik

2009:180 CIV - ISSN: 1402-1617 - ISRN: LTU-EX--09/180--SE Abstract Locationbasedmobileservices/applications[1]arebecomingmoreandmorepopularbothon thewebandinthemobilephones,accordingtoresearchfirmGartner.Thedemandforaccurate israpidlygrowingandthepossibilityfortheusertocontributetoadddetailstothemaps.In manypartsoftheworldmapscostalotofmoneytogetandeachtimeyouwanttoupdatethe mapsthereisafeetoupdatethem.OpenStreetMap(OSM)isanopensourceprojectthatprovides freewikibasedmaps. TheOpenStreetMaphasanengagedandactivecommunityofmappersthatconstantlyimprove thedata.OnewayistorecordGPStracksanduploadthemtotheOSMwebsite.Onthesite thereisadrawingtoolthatcanbeusedtodrawandobjectslikeroad,fields,houses,rivers etc.AlsoPointsOfInterests(POI)canbeaddedtothemaplikebusstops,trainstations,stores, restaurants,touristobjectsetc. ThisthesisworkshowstheprocessonhowtocontributetoOSMandpresentsdifferent techniquesusedforcollectingusefuldatathatisusedtobuildthemaps.Alsotheprocessonhow theJavaMEclientapplicationwasmadeforcrowdsourcingcontributiontotheOSM.Theclient “MobileOSMCreator”let’syoueasilyrecordGPStrackpoints,takewaypointsandrecordaudio clips.Eachofthesefeaturesissavedtoafilethat’sinGPSeXchangeFormat(GPX)format, whichcanthenlaterbeuploadedtoyourOSMaccountorimportedtoJOSMoranyothermap editor.PointsOfInterestscanbeuploadeddirectlytoOSMfromthemobilephonebyloggingin withyourOSMaccount.Theclientcanbecustomizedbytheuserinalotofdifferentways.All inallthe“MobileOSMCreator”isafeaturerichapplicationwhereyouamongmanythingscan setGPStrackingfrequency,offline/onlinemapsandrenderstylesforthemap.Thisclientcanbe downloadedfromEricssonLabs (https://labs.ericsson.com/applications ). Preface ThisthesisisapartoftheMasterofScienceinmediatechnologyeducationatLuleåUniversity ofTechnology(LTU).ThepurposeoftheprojectwastomakeanapplicationtotheEricsson Labs(https://labs.ericsson.com/ )collectionsofapplicationsandmakeitopensourcetoletthe communitycarryontheprojectaftermythesisworkisdone.Theprojectwasdevelopedat EricssonResearchinLuleå.IwouldliketothankmysupervisoratLTUKåreSynnes.Iwould alsoliketothanktheemployeesatEricssonResearch,especiallymysupervisorStaffanLarsson E,SebastienPierrelforvaluablefeedbackfromanexperiencedOSMcontributor,andTorBjörn Mindeforgivingmethisopportunitytodothiswork.FinallyIwouldliketothankeveryonethat havetestedtheprogram,especiallyRikardNilssonorreadpartsofthethesisreportandprovided comments,makingtheworkbetterthenitwouldhaveotherwisebeen. Contents Introduction ...... 1 1.1Objectives ...... 1 1.2Limitations ...... 1 1.3Thesisstructure...... 2 Background ...... 3 2.1WhatisOpenStreetMap? ...... 3 2.1.1Howcanaprojectlikethiscreateaccuratemaps? ...... 4 2.1.2Whyisthedatasometimesinconsistent? ...... 4 2.1.3WhyuseOSM? ...... 4 2.2HowtocontributetoOSMcommunity...... 5 2.2.1Publicdomainmap...... 5 2.2.2OpenStreetBugs...... 5 2.2.3Simpleedits...... 5 2.2.4Creatingmapsfromscratch...... 5 2.2.5Collaboratingwithothers ...... 5 2.3HowisOSMbuildup? ...... 6 2.4OSMcommunity...... 7 2.5WhyisSonyEricssoninterestedinOSM?...... 8 2.6EricssonLabsAPI ...... 8 Why to use as development method...... 10 3.1License...... 10 3.2Inputdata ...... 10 Method ...... 11 4.1LiteratureStudies ...... 11 4.2StudiesofExistingApplications...... 11 4.3Analysisofmappingtechniques ...... 11 4.4IdentifyandpriorityfeaturesforaJavaMEclienttool...... 11 4.5Discussion...... 11 4.6Iterativeimplementationaccordingtothesepriorities ...... 11 4.7Evaluateeachimplementationphase ...... 12 4.8Betatesting ...... 12 Map Making...... 13 5.1Mappingtechniques ...... 13 5.1.1GPStracklogs ...... 13 5.1.2Satellite/ArialImagery...... 13 5.1.3GPSWaypoints ...... 14 5.1.4Photomapping ...... 14 5.1.5Handdrawnmapsofcitystreets...... 15 5.1.6Audiomapping ...... 15 5.1.7Videomapping ...... 16 5.1.8Dictacam ...... 16 5.1.9Focusononetypeofstreet ...... 16 5.1.10Alwaysturnright...... 17 5.1.11Setborders...... 17 5.2Mappingstyle ...... 17 5.2.1Onewaymapping ...... 17 5.2.2Twowaymapping ...... 17 5.3Transportationmethod ...... 18 5.3.1Walk ...... 18 5.3.2/Inlineskates ...... 18 5.3.3 ...... 18 5.3.4Rail...... 18 5.4Uploaddata...... 18 5.4.1SavetoGPX...... 18 5.4.2UploadingtoOSM ...... 19 5.5Editing ...... 19 5.5.1Generaltipsforaddingroadsorotherways ...... 20 5.5.2Tagging ...... 21 5.5.3Changeset...... 22 5.5.4PotlatchonlineeditorinOSMwebpage ...... 22 5.5.5JOSMofflineeditor...... 26 5.6Rendermaps...... 28 Features discussed at the start of the project...... 29 6.1CoreFeatures ...... 29 6.1.1SupportdifferentconnectionsofGPS...... 29 6.1.2Map ...... 29 6.1.3CreateGPXfiles...... 29 6.2UploadGPXtrackfromphonetoOSMaccount...... 29 6.3DownloadlatestOSMmap...... 30 6.4Editmaponflywhentracking...... 30 6.5Audiofeatures ...... 30 6.6Photofeatures...... 30 6.7Accelerometer ...... 30 6.8Overlaymap...... 30 6.9Recognitionintelligence...... 30 6.10Automaticbuildingofroads ...... 31 Features included in final version...... 32 7.1Startupscreen...... 32 7.2GPS..32 7.3Map...... 32 7.3.1Maptiles...... 33 7.4Settings ...... 33 7.5Userfeedback ...... 33 7.6SendSMS ...... 34 7.7Recordaudio...... 34 7.8GPXtracklog ...... 34 7.9UploadGPXtrackandeditwork...... 35 7.10Basicmapeditingonthephone...... 35 7.10.1Pointsofinterest...... 35 7.10.2Buildway...... 35 7.11Renderstyles ...... 36 7.12Waypoints...... 37 7.13Setupmenu...... 37 Implementation...... 39 8.1Workflow ...... 39 8.1.1Optimization ...... 39 8.1.2Userexperience ...... 40 8.1.3Redesignofsourcecode...... 40 8.1.4Obfuscation ...... 40 8.1.5Progress...... 40 8.1.6Debugging...... 41 8.2Testing ...... 41 8.3Permissions...... 41 8.4Betatesting ...... 41 Future work...... 42 9.1Audiomappingwithbike...... 42 9.2Overlaymap...... 42 9.3Map...... 42 9.4PredownloadmapsonPC...... 42 9.5ChangeGUItoLWUIT ...... 42 9.6Optimization ...... 43 9.7Preprocessing ...... 43 9.8SplituptheGUIinlayers...... 43 Discussion and Conclusions...... 44 10.1Map ...... 44 10.2Mappingtechniques ...... 44 10.3SendinglargersizedinformationtoOSM ...... 45 10.4Differencebetweenjavaplatforms...... 46 10.5GPS...... 46 10.6Whathappensnext...... 47 10.7Conclusions...... 47 References...... 48 Appendix...... 51 Abbreviations API ApplicationProgrammingInterface Exif Exchangeableimagefileformat GPS GlobalPositioningSystem GPX GPSeXchangeFormat HDOP HorizontalDilutionofPrecision JAD JavaApplicationDescriptor JAR JavaARchive JavaME/J2ME JavaMicroEdition/(Java2platformMicroEditionoldname) JP JavaPlatform JSR JavaSpecificationRequest JOSM JavaOpenStreetMapEditor LCDUI LimitedConnectedDeviceUserInterface LWUIT TheLightweightUserInterfaceToolkit NMEA NationalMarineElectronicsAssociation OSM OpenStreetMap PDA PersonalDigitalAssistant PNA PersonalNavigationAssistant POI Pointsofinterest WGS84 WorldGeodeticSystem1984 XML eXtensibleMarkupLanguage

Chapter1 Introduction Locationbasedmobileservices/applications[1]arebecomingmoreandmorepopularbothon thewebandinthemobilephone,accordingtoresearchfirmGartner.Theseservicesneedsamap that’suptodateandcontainalotofdetailse.g.PointsOfInterests(POI)suchasbusstops,train stations,stores,restaurants,andtouristobjectsetc.Thequalityofthemapsisadealbreaker whetherthesetypesofserviceswillbeacommercialsuccessornot.TheOpenStreetMap(OSM) isanopensourceprojectthatwasstartedinAugust9,2004thattriestobuildmapsthathave goodcoverageandareuptodate.OSMisnotbuiltfromacompanylikemosttraditionalmaps, insteadOSMislikeformaps,peoplethatwanttocontributeorusethemapisfreeto doit. InthisthesisitwillbepresentedhowtheprocessofbuildinguptheOSMmaplookslike. Identifyingwhatfeaturesareused,whatfeaturesaremissingandcreatingacrowdsourcingclient inJavaMicroEdition(JavaME)whichincludesthefeaturesthatwasfoundtobeuseful.

1.1 Objectives Thegoalofthismasterthesisistomakeatooltothepersonscollectingdataandeditingthemap (OpenStreetMap).Theapplicationshouldbeeasytouse,andinthesametimegivemore advancedoptionsfortheexperienceduser.AclearintuitiveGUIisalsodesired.Thethesis’main objectivesare: • StudyOpenStreetMapcrowdsourcingfunctionalitiesandmapdrawingtools. • IdentifyfeaturesandpossibilitieswithaJavaMEclienttool. • Identifyanddescribeapossibletechnicalsolution. • ImplementaJavaMEclientsolution. • Focusonmakingtheapplicationeasytoextendwithnewfeatures.

1.2 Limitations Becauseathesisworkhaslimitedtimeframesomelimitationshastobemade. YoucantakeGlobalPositioningSystem(GPS)trackwithsoftwarethatisonseveraltypesof devices,likededicatedGPS,laptops,PersonalDigitalAssistant(PDA),PersonalNavigation Assistant(PNA),MobilephonesandhomebrewlikeSonyPSP.Thefocusinthisthesiswillbeon mobilephones. MobilephonescanhaveaninternalGPSbuiltinsidethephone,useanexternalGPSthatyou connecttothephonewithacableoruseaBluetoothGPS.GPSsendsoutinformationusing eitherNationalMarineElectronicsAssociation(NMEA)orSiRF(companyname)protocol.I choosetoonlyimplementsupportforBluetoothGPS,externalcableGPSandNMEAprotocol, becausenoteveryphonehasaninbuiltGPSandit’scheapertobuyandaddGPSsupportusing anothersmalldevicethantobuyanewphonewithinbuiltGPS.SonyEricssonprovides26 mobilephonemodelswithinbuiltGPS.FromthefeasibilitystudyitwasfoundthatNMEA

1 protocolwasusedbymostsimilarsoftware’s.BecauseofthisNMEAprotocolwasselectedas thecommunicatingprotocolbetweentheGPSandtheapplication. Everyphonemodelhasdifferentsupportoflibrarieswiththeirownstructure.Buildingan applicationthatisworkingwellonallmobilephonesisabigproject.Theapplicationistestedon afewSonyEricssonphonesthathaveSEJavaPlatform7(JP7)supportorbetter,whichisaset ofprofilesdescribingparticularSonyEricssonJavaimplementation. Somefeaturesarehardertorealizethanothers,whichmeanthatsomefeatureshadtobebalanced withrespecttotheotherdesiredfeatures.Thusworkhadtobelimitedbyrestrict functionalityof featuresorexcludingothers.Forinstancethefeaturetouploadyourworkdirectlytoyour accountprovedtobehardtoimplement.Thisfeaturethengotlimitedfunctionality,thefeature worksonJP8.5orlaterSonyEricssonphones,andtogivetimetoaddotherdesiredfeatures. Theapplicationshouldcurrentlybeconsideredasaprototypewhichwillbefurtherrefined,since theenvisionedfinalversionlieswellbeyondthescopeofthisthesis,hencethefocusonmaking theapplicationeasytoextend. Oneofthefocusesintheprojectwastoimplementasmanyfeaturesaspossibletogiveabetter hintofwhattheapplicationiscapableofinitsfinalrevision,insteadofmakinganapplication workonallmobilephoneswithfewfeaturesincluded.

1.3 Thesis structure Thestructureofthereportis: • Chapter1introducesthethesis,itsobjectivesandwhichlimitationsweremade. • Chapter2describesthebackgroundoftheOpenStreetMapproject. • Chapter3discussionaboutopensource. • Chapter4providethemethodologyused. • Chapter5goesthroughtheprocessofmapmaking. • Chapter6listwhichfeaturesthatwerediscussedatthestartoftheproject. • Chapter7describeswhichfeaturesthatareincludedinthefinalversion. • Chapter8isabouthowtheimplementationprocesswasdone. • Chapter9possiblefuturework. • Chapter10discussionandconclusions.

2 Chapter2 Background InformationaboutOpenStreetMap,ideasofhowtocollectdataandeditthemappresentedinthis reportisacompilationofinformationthatcanbefoundinOSMwikipage http://wiki.openstreetmap.org/wiki/Main_Page [2]. 2.1 What is OpenStreetMap? OpenStreetMap(OSM)islikeWikipediaformaps.OSMcreatesandprovidesfreegeographic datasuchasstreetmapstoanyonewhowantsthem.Theprojectwasstartedbecausemostmaps youthinkofasfreeactuallyhavelegalortechnicalrestrictionsontheiruse,holdingbackpeople fromusingthemincreative,productive,orunexpectedways.

Figure1:AmapoverLuleåusingOSMdata. ContributorstoOSMtakehandheldGlobalPositioningSystem(GPS)deviceswiththemon journeys,orgooutspecificallytorecordGPStracks.Theyrecordstreetnames,villagenames andotherfeaturesusingnotebooks,digitalcameras,andvoicerecorders.Backatthecomputer, contributorsuploadthoseGPSlogsshowingwheretheytraveled,andtraceouttheroadsonthe OpenStreetMap'scollaborativedatabase.Usingtheirnotes,contributorsaddthestreetnames, informationsuchasthetypeofroadorpath,andtheconnectionsbetweenroads.Thatdataisthen

3 processedtoproducedetailedstreetlevelmaps,whichcanbepublishedfreelyonsitessuchas Wikipedia,usedtocreatehandheldorincarnavigationdevices,orprintedandcopiedwithout restriction.Theresultingfreemapoftheworldcanbeviewedat http://www.openstreetmap.org ,a pictureofhowthemapscanlookisshowninFigure1.

2.1.1 How can a project like this create accurate maps? Thewikistyleprocessgivesnoguaranteethatthemapwillbeaccurate.Butdoproprietarymaps carrynoerrors?Infactcommercialmapprovidershaveforyearsused“CopyrightEasterEggs [3]”thatisintentionalerrorsinthemape.g.imaginarynamesandwrongstreets.Iftheownerof theproprietarymapfindstheseerrorsonanothermaptheycanbeusedasproofthattheyhave violatedthecopyright.Mapsfromdifferentprovidersareverysimilartoeachotherandawayto protectyourmapsistouseEasterEggs.Provingthataplagiarizedpieceiseitheracopyor unlawfulderivativeofanother'seffortisoftenveryhard.It’salwaysapossibilitythemapcould justbeanotheruniqueworkbasedonthesamefacts,makingitsomethingthatiscompletely protected. EasterEggsthatisusedindigitalmapscanbeusedinawaythatisnotobvioustoauserofthe map.Thelowerbitsofthegeographiccoordinatescanbemangledinsomesystematicwaye.g. allthecoordinateshavearemainderof3whendividedby7,orallcoordinatesaredisplacedfrom theirrealpositionbysomesmallbutrealoffset. Allusersgaininhavingaccuratedata.Iffewpersonsputininaccuratedata,maliciouslyor accidentally,theother99.9%ofthepeoplecancorrecttheerrorsmadebythesefewpersonsthat putsininaccuratedata.Thisisoneofthecornerstonesinthewikistyleprocess.SinceApril21, 2009,afulleditinghistoryisstoredforeachuser.Whenerrorsisfoundyoucanchecktheediting historyfromthatpersonandifyoufindthatuserdeliberatelyputsininaccuratedata,it’seasyto findallthechangesthatusermadeandfixthem. TheWikipediaprojecthasshownthatalargeamountofgoodqualitydatacanbecollectedbutit canbedifficulttoweedoutalltheinevitableerrors.

2.1.2 Why is the data sometimes inconsistent? OpenStreetMapisafreeeditablemapthatismadebyitsusers.Themapisasconsistentasthe peoplethatusethemapcontributetoit.Thedatabasewillalwaysbesubjecttothewhims, experimentation,andmistakesofthecommunity.Butit’salsooneofthestrengthofOSM becauseitallowsthedatatoquicklyaccommodatechangesinthephysicalworld.

2.1.3 Why use OSM? DirkSnauwaert[4]saysinthearticlethatabout15%oftheroadschangeseveryyearlike,new roads,onewayrestrictionsandnewspeedlimits.It’salsomentionedthatit’snoteconomically profitabletoupdateeverythingthatoftenoreventracksmallroads.Thisleadstooutdatedmaps andmissingcoveragefortheuser. Foreachtimeyouwanttoupdateyourmapsyouneedtopay forit.Evenifyoubuymapsfromcompaniesthatprovidemapsyouarenotfreetodowhatever youwantwithit.Youcan'tcorrectastreetname,oraddapub/barintothemaps.Whatabout sendingittoafriend,enclosingitinaninvitationorpostingitonanoticeboard?Alotofthese arelesslegalthanyoumightthink.WithOSMyoujustcorrecterrorsandaddmissingfeatures youfindandeveryoneistheownerofthemapandcanuseitfreely.

4 2.2 How to contribute to OSM community TherearedifferentwaystocontributetotheOpenStreetMap.

2.2.1 map PeoplethathaveaccesstopublicdomaindatacanaddittoOSM’sdatabase.It’swisetocontact thecommunitybeforeaddinganypublicdomaindatatomakesurethereisnolicensingissuesor ifit’salargeamountofdata.

2.2.2 OpenStreetBugs Peoplethatfeellikeit’stoodifficulttoeditthemapthemselvescanreporterrorsinthemapswith theeasytouse http://openstreetbugs.schokokeks.org/ [5]websitetomarkerrorstheyseeon OpenStreetMapdata.

2.2.3 Simple edits It’snotthathardtolearnhowtodosimpleedits.Allthatneedstobedoneistocreateanaccount ontheOSMwebsiteandchecktheMapfeatures[6]pagetogetanideaofhowtotagnodes. Chooseaneditoramongtheseveralchoicesthatexistandstartaddingthingslikepubs,fastfood restaurantsandshops,thathaven’tbeenaddedtothemapinyourneighborhood.Correct any mistakesyousee,e.g.misspelledroadnames.

2.2.4 Creating maps from scratch Inareasthathavenocoverageinthemapit’sagoodstarttolearndifferentmappingtechniques suchasrecordingGPStracksandaudiomapping,whichisdiscussedinChapter5.1andthe processofmapmakingthat’swholechapter5.Peoplecaneditfromtracksothershaveuploaded oruseYahoo!AerialImagery[7],iftheyhavenoaccesstoaGPSdevice.

2.2.5 Collaborating with others Mappingtogetherwithothersismorefunandbyworkingtogethereffortcanbefocusedand formidablemilestonesbecomeachievable.3commonwaystodomappingtogetherare. • MappingProjects: Peoplewithcommongoalsandinterestscollaboratingtogetherin goalorientedactivities,suchascyclenetworksorplaces.Theseprojectshavealongtime span. • Mappingparty: Meetingswhereexperiencedmappershelpnovicesonhowtodothe mapping.ThepeoplethatattendreceiveinstructionsinhowtousetheGPSreceiver,take waypointswithitandwritedownnotesofthewaypointstoapaper.Theplacethat’s goingtobemappedisdividedupamongtheparticipants.Whenthenewcomersreturn backtothevenue,theexperiencedmappershelpthemouttotransferthewaypointsand GPStracktoanOSMeditor.ThewaypointsgetsconvertedtoPOIsandgetsappropriate tagsfromthehandwritteninformationtheparticipantshavecollectedandroadsarebuilt fromtheGPStrack.Thedatathengetsuploadedtothemap.It'saverysocialeventwhere peoplecanmeetupandtalk(usuallyatapub)inbetweenmappingsessions.Mapping partiesoftenlastforaweekend.

5 • Micromappingparty: Arewelldefinedmappingobjectiveswhereasmallgroupof mappersmeetonacasualbasis.hasusedthismethodsuccessfullywhereseveral mappersliveclosetoeachother.Thesepartieslastfromafewhourstooneday. Ifyouwanttoorganizeyourownmappingpartyforthefirsttimethisguide[8]canbehelpful.

2.3 How is OSM build up? Figure2[9]isatechnicaloverviewoflogicalsystem/componentsofOpenStreetMap.

Figure2:HighleveloverviewofOSM. Figure2givesahintofhowOSMcomponentsconnecttoeachother. Thedatabaseholdsatableofthecurrentrepresentationofthemapandanothertablewithall revisionsthatthemaphashad.ThedatabaseisusingthePostgreSQLsoftware. TheApplicationProgrammingInterface(API)0.6isaprotocolthatcommunicatesbetween clientslikemapeditingsoftwareandthedatabaseserver.TheAPIisfetchingandsavingraw geodatafrom/totheOpenStreetMapdatabaseandstoresuseraccountinformation.TheAPIis basedontheideasoftheRepresentationalstatetransfer(RESTful)API.ForinstancePotlatchis sendingrequestintheformofHTTPGET,PUT,POST,andDELETEmessagestotheOSM databaseserver.RequeststomodifythedatabaseareauthorizedusingHTTPBasic Authorization. PlanetdumpsaremadeeachweekofthecurrentrepresentationofthemaponWednesdayand releasedonThursdaymorning.

6 Maptilesthatthemainwebsiteusestodisplaythemaparerenderedfrom2differentrender processescalledandOsmarender. Theapplicationthatismadeinthisthesisworkusesafewofthesecomponents.API0.6isused tocommunicatewiththeOSMdatabase.MaptilesaredownloadedwiththeAPI.Maptilesare OSMdatathatarerendered,whichareusedtobuildthemap.Featuresintheapplicationare madeinwaythatcaneasilybeusedbyPotlatchandJavaOpenStreetMapEditor(JOSM). IfyouwanttoknowmoredetailsaboutwhatthecomponentsdovisittheComponentoverview [10]page.

2.4 OSM community TheOSMprojectwasstartedin2004.Thelast18months,theuserbasehasgrownalotandthe mapgetsbetterandbiggerforeachnewcontributor.Inthefigure3youcanseethisgrowthin registeredusersandtrackpointsovertimefromOSMdatabasestatistics[11].

Figure3:UsersandUserGPXuploadsdiagram. TheOpenStreetMapcommunityislarge,andspreadacrossmanylocations,speakingdifferent languages,andfocusingondifferentinterestareas.Thereareseveraldifferentchannelsforthe communitytocommunicatewitheachother.Aforum,livechatatIRCchannel,blogfor announcementsandinterestingdevelopments,wikipageusedforreferenceandover20mailing lists.It’sinthemailinglistsmostofthediscussionstakeplaceanddecisionsaremade. GPSisnotanaccuratetool.Eachtimeit’susedtheresultsitgivescanbeseveralmetersfrom eachother.WhenyoustartfromscratchandbuildingamapanduseGPSasatooltobuilditup,

7 it’sgoodtohaveabigcommunitythatallcaneditthemapandchangeitwhentheyfinderrorsin themap. IntheFigure4youcanseewhichprogramthatisusedtocreatechangesetsthatisuploadedto theOSMdatabase,thedataisfromApril21,2009toNovember25,2009.Thedatacomesfrom thechangesetdumpthatistakeneveryweekonOSMhomepage.Everyuploadyoudotothe OSMdatabaseneedstobewrappedinsideachangesets,youcanreadmoreaboutchangesetsin section5.5.3.Inthetableyouseethenumberofchangesetsuploadedbyeachprogram, “with_bboxes”isthenumberofchangesetsthathaveaboundingboxandusersarethenumberof distinct(public)userids.

creator | Changesets | with_bboxes | users ------+------+------+------Potlatch | 964387 | 718768 | 54823 JOSM | 1064183 | 1015659 | 12741 Merkaartor | 121672 | 114819 | 2057 BigTinCan Upload Script | 245 | 201 | 109 osm2go | 898 | 865 | 98 iLOE | 940 | 850 | 84 Osmose Raw Editor | 714 | 330 | 78 bulk_upload | 59740 | 55051 | 58 osmtools | 7914 | 7622 | 56 Vespucci | 542 | 359 | 48 Mapzen Alpha | 310 | 164 | 37 andnav | 207 | 191 | 31 Mapzen POI Collector | 738 | 709 | 27 QGIS OSM v | 114 | 98 | 23 PythonOsmApi | 935 | 753 | 18 upload | 35026 | 33431 | 14 KMLManager | 17443 | 17313 | 9 Figure4:Tableofwhichprogramthatisusedtocreatechangesets. TheonlineeditorPotlatchthatyoucanfindonthemainwebpageisusedbymostusersand JOSMhavemostcreatedchangesets.These2editorsareusedthemostbyalargemarginand thereforetheywillbeevaluatedinthisthesisworkandthecrowdsourcingclientapplication shouldintegratewellwiththem.

2.5 Why is Sony Ericsson interested in OSM? ToreachalargeruserbasebyprovidingseveralmapsforexampleTeleAtlasandOSM.Manyof theusersofOSMarepeoplethatSonyEricssonhasidentifiedaspotentialusersof“Ericsson Labs”andbyprovidingOSMtheymightbemoreinterestedin“EricssonLabs”.SinceEricsson isdoingresearchoncrowdsourcingandusingOSMintheirservices,theywanttogive somethingbacktothecommunity,hencetheOSMcrowdsourcingclient.

2.6 Ericsson Labs API AtthestartoftheprojectEricssonhadanideathatthisworkshoulduseoneoftheAPIsthatis providedat“Ericssonlabs”theMobileMapsAPI.MobileMapsAPIprovidesthefunctionality ofdownloading,displaying,andinteractingwithmapstoyourapplications.Italsoincludes

8 accesstothemapdataitself.Themapsdataarestreamedfromaserverandrenderedinthe mobilephone,whichenablesthepossibilitytouseeffectivecompressionandtransferalgorithms. Mostmapstodayarerenderedintheserverandtherenderedmaptilesaresenttothemobile phoneapplication,asideeffectofthisisthatthemaphasfixedscalelevels.MobileMapsdoes nothavefixedscalelevels.

9 Chapter3 Why to use open source as development method Opensourceinvolvesabroadbodyofcollaborators,typicallyvolunteers,whoseevery contributionbuildsonthosebefore.Justasimportant,theproductofthiscollaborationisfreely availabletoallcomersandthesourcecodeisfreelyshared. OpensourceharnessesthedistributivepowersoftheInternet,parcelstheworkouttothousands, andusestheirpieceworktobuildabetterwholeputtinginformalnetworksofvolunteercodersin directcompetitionwithbigcorporations.Itworkslikeanantcolony,wherethecollective intelligenceofthenetworksupersedesanysinglecontributor. 3.1 License Opensourcesoftwaredoesn'tjustmeanaccesstothesourcecode.Thedistributiontermsofopen sourcesoftwaremustfollowsomedefinitions[12].Aprogramisopensourceonlyifitusesone oftheapprovedlicenses[13],theselicensesfollowthedefinitionssetbyOpenSourceInitiative (OSI).SomeexamplesofapprovedlicensesareGNUGeneralPublicLicense,GNULesser GeneralPublicLicenseandBSDlicense. OpenStreetMapdataispublishedunderanopencontentlicense,withtheintentionofpromoting freeuseandredistributionofthedatabothcommercialandnoncommercial.Thelicenseusedis currentlytheCreativeCommons[14]AttributionShareAlike2.0license(CCBYSA),however legalinvestigationworkandcommunityconsultationisunderwaytorelicensetheprojectunder theOpenDatabaseLicense(ODbL)fromOpenDataCommons[15](ODC)whichismore suitableforamapdataset.OpenStreetMapsoftwareislicensedundertheGNUGPL[16]ifnot statedwithanotherlicense.Whatthismeanstoyou(andthisisn'tlegaladvice)isbasicallyyou candowhatyoulikewiththedata,solongasyoumentiontheoriginalcreatorandthelicense andanyoneelsecandothesamewithanythingyouproducebasedonit.Agoodexampleonhow tocredityourworkthatisbasedonOSMcanlooklike“Data/MapsCopyright2009 OpenStreetMapContributors|License:CreativeCommonsBYSA2.0”.

3.2 Input data AlldataaddedtotheprojectneedstohavealicensecompatiblewiththeCreativeCommons AttributionShareAlikelicense.Thiscanincludeoutofcopyrightinformation,publicdomainor otherlicenses.AllcontributorsmustregisteranaccounttoOSMsitetobeabletouploaddataand bycreatinganaccount;youagreethatalldatayousubmittotheOpenStreetMapprojectistobe (nonexclusively)licensedunderCreativeCommonsAttributionShareAlikelicense.Useof copyrightdataisanespeciallysevereproblemformaps,astheonlywaytoprovethatnodata camefromcopyrightsourceswouldbetorollbackthewholeareainquestiontobeforethe additionofthequestionabledata.

10 Chapter4 Method ThisisthemethodthatisusedtoidentifywhichfeaturesthatshouldbeincludedintheJavaMe crowdsourcingclient.

4.1 Literature Studies ThefirststepistogettoknowwhattheOSMcommunityisabout.OSMhasawikipagewitha lotofinformationaboutwhatOSMprojectis,howtostartmappingandwhichsoftwarethatexist etc.

4.2 Studies of Existing Applications Afterestablishingbackgroundfromliteraturestudies,thenextstepwastotestouthowmapping isdonetodaywithavailablesoftwareformobilephonesandhowtoeditthecollecteddata.The purposeofthiswastoidentifywhatcanbedoneandfinddrawbacksandmissingfeaturesthat canbeimplemented.

4.3 Analysis of mapping techniques InOSMwikipagetheylistseveralmappingtechniquesofhowtocollectdata.Ananalysisof thesetechniquesprovidesvaluableknowledgeofwhatfeaturesthatwillbelikedbytheOSM community.

4.4 Identify and priority features for a Java ME client tool Aftertestingavailableapplicationswhichfeaturestheyprovideandreadthemappingtechniques ofhowtousethesefeatures.Itstimetoprioritizethefeaturesandmakealistforinwhichorder thesefeaturesshouldbeimplementedintheJavaMEclientandidentifynewfeaturesthatcould beadded.

4.5 Discussion TheprioritylistoffeaturesisdiscussedinaBrainstormmeetingwith3employeesfromEricsson researchinLuleåand1fromKista.SebastienPierrelfromKistahasbeenoutmappingandhas someknowledgeofwhatcanbedonetomakehisworkeasier.

4.6 Iterative implementation according to these priorities Iterativeandincrementaldevelopment[17]isacyclicsoftwaredevelopmentprocess.Keysteps intheprocessaretostartwithasimpleimplementationofasubsetofthesoftwarerequirements anditerativelyenhancetheevolvingsequenceofversionsuntilthefullsystemisimplemented. Foreveryiterationoftheapplicationdevelopmenttime,designmodificationsaremadeandnew functionalcapabilitiesareadded.

11 Theprojectwasdividedinto3iterativeimplementationphases: • FirstphasetomakeCorefunctionstocollectdataandamapyoucanzoomandpan aroundin. • Secondphasetoaddeditingtools.POI,waypointsanduploaddatatoOSM. • Thirdphasetoaddmorefeaturesandrobustness.

4.7 Evaluate each implementation phase Aftereachimplementationphasethereisanevaluationofwhat’sbeendoneandproblemsthat havecomeup.Thefeaturethatwasintheoriginalplanisevaluatedandanewprioritylistis madeoffeaturestoimplementinnextimplementationphase.

4.8 Beta testing Whenthelastimplementationphasewasdoneafewselectedpersons,somewithexperiencewith othersimilarsoftware,wasusedtobetatesttheapplicationtofindweaknessandstrengthsofthe program.Thecommentsmadebythebetatestersgaveinvaluablefeedbackonhowtheyusethe applicationtomakefinaladjustmentstotheprogrambeforeit’sreleasedto“EricssonLabs” webpage.

12 Chapter5 Map Making TheprocessofaddingdatatoOpenStreetMapisdonein4steps • Collectdata.Chapter5.15.3 • Uploaddata.Chapter5.4 • Editdataandaddtags.Chapter5.5 • Rendermaps.Chapter5.6

5.1 Mapping techniques Whenmappingyouneedtoknowwhereyouareandwhatareatthatposition.Therearedifferent typesoftechniquestocollectdatathatgivesthisinformation.

5.1.1 GPS track logs Thebasictechniqueformappingroads,footpaths,ferrycrossings,skiroutes,etc.istouseaGPS andletitrecordatracklog.IftheGPStakesthetimestampsinWorldGeodeticSystem1984 (WGS84)datumyoucanuploadtheGPSeXchangeFormat(GPX)tracklogdirectlytoyour OSMaccount.SomeapplicationsletyourecordGPXtrackswithyourmobilephone,laptopor PDA,ifaGPSreceiverisconnected.MakesurethatyourGPSunithasthe'Lockonroad'or 'Snaptoroad'optionswitchedofforelseyouwillberecordingadirectcopyofthemaploaded intotheGPSunit.Thisisacopyrightinfringement.TurnoffwrappingfunctionifyourGPShas one,toavoidthatthefirstpointswillberemovedwhenthememoryisfull.SettheGPStorecord pointsasdenselyaspossibleandnecessary. Twodifferentrecordingrulesetsareusedeithertimeordistance.Withthedistancerulesetevery pointisrecordedafterathresholddistance“x”isreached.Thegoodthingisthatnopointswill getrecordedwhilestandingstill.Thebadthingsisthat,unnecessarypointswillberecordedwhen travelingonstraightroadsanditcanmissthesubtletiesofcurvesanddirectionchangesif“x”is toolarge.Withtimerulesetapointsisrecordedevery“x”seconds.Thebadthingisthatwhen standingstill,pointswillbesavedthatisnotneededandwhenmovingslowlymorepointswill besavedthennecessary.Thegoodthingarethatrelativespeedcanbejudgedbythespacing, Therearemorepointswhenyouslowdownforcurvesorturnsandlessonstraightwayswhere youneedfewerpoints.

5.1.2 Satellite/Arial Imagery Manycitieshavehighresolutionaerialphotosavailablewhichcanbeusedtoaidmapping.Due tocopyrightconcernsofthederiveddata,onlypublicdomainorCCimageryshouldbeused. Yahoo’saerialimagerytheeditingappletcanalsobeused,andinfactthisaidsbuildingthemap laterifyou'reusingtheonlinePotlatcheditor. SelectanareayouwanttomapfromYahoo!Maps.Usethesatellitetabtogetthemapwhichyou havelegalrightstouse.Donotprintoutthestreetmap.Printoutthemapandgooutmapping. Makenotesofstreetnames,streettypesandPOIsetc.AgooduseofYahooAerialmapsisto

13 findareasofinteresttobemapped.Whenyougethome,openuptheeditingappletanddraw everythingasyou'venoteddown.

5.1.3 GPS Waypoints WaypointsaresinglepointsyoucanlogseparatelywithyourGPSreceiverthatmark geographicalpositionsofrelevantobjects,suchaspubs,ATMs,busstops,restaurantsandmany more. TotakewaypointswithaGPSisusuallyjustabuttonpush.ManyGPSreceiversnumber eachwaypoint.Useanotepadorsoundrecordertorecordwhatthatwaypointcorrespondsto. Whilemovingandsavingwaypointbeawareofthat,aGPSreceiverusuallysendsposition informationeverysecond.Savingawaypointcanhappenanywherefromexactlyafteryouhave receivednewpositioninformationuptojustbeforethenextinformation,hencealmost1second. Thisisabigfactorofinaccuracywhentakingwaypointswhilemoving.Inonesecond,youmove 10mat36km/h,20mat72km/h,30mat108km/hetc.

5.1.4 Photo mapping Digitalcamerasareusefulforrecordingstreetnames,villagenames,andotherfeatures.Most digitalcamerashaveatimestampofwhenaphotowastaken.Providedthecameraclockwas reasonablyinsyncwiththeGPSlogger,youcangetanaccuratepositionofwherethephotowas shot.ThisinformationcanbeputtotheExchangeableimagefileformat(Exif)headerinsidethe picturefileandthusgeotaggingit.JOSMincludessupportforreadinggeocodedphotographs Ageocodedphotographisaphotowhichisassociatedwithageographicallocation.Theimage canbeassociatedwithlatitude,,ortoastreetaddress.Somemethodstocreate geocodedphotographsare • AutomaticusingaconnectedGPS:Withadigitalcameraorcameraphonesthatsupport GPS.TheGPScanbebuiltintothecameraorbeconnectedtoanexternalGPSreceiver. WithfullsupportedgeocodingwhenaphotoistakenrelevantGPSdatawillautomatically beputintothephoto’sExifheadertag. • SynchronizingwithaseparateGPS:Mostcamerassoldtodaydonotcontainabuiltin GPSreceiver;however,anexternallocationawaredevice,suchasahandheldGPS logger,canstillbeusedwithanonGPSdigitalcameraforgeocoding.Thephotoistaken withoutgeographicalinformationandisprocessedlaterusingsoftwareinconjunction withtheGPSdata.Timestampsmadebythecameracanbecomparedtotimestampsin therecordedGPSinformation,providedthattheclocksintheseparatedevicescanbe synchronized.TheresultingcoordinatescanthenbeaddedtotheExifheaderinformation ofthephoto. • Manuallygeocoding :canalsobeusedevenifnoGPSdevicewaspresentwhenthe photowasshot.LatitudeandlongitudecanbeentereddirectlytotheExifheadertagorby selectingalocationfromamapusingsoftwaretool.Alessprecisemethodistoadd descriptivedataofthelocationtoanimage. Atipisto takeaphotoofyourGPSscreen/displayshowingthetime(ontheGPS)whenyoustart mapping.Youcanthenlateronsyncthetimebycheckingwhattimethephotowastakenandthe timeshowninthepicture.

14 5.1.5 Hand drawn maps of city streets Onebigproblemwhenmakingamapistogetthenamesofeverystreet.Drawhowstreets intersectandwritedownnamesforthem.ThesketchesarethencomparedwithyourGPXtrack. ThequalityofthesketcheshastobegoodenoughforyoutospotwhereontheGPXtrackyou are,tobeofanyuse.ThiscanbedonebyusingtheYahooAerialImagerythatyouprintout(this maphastohavenotagsornamestonotbrakethecopyright)orOSMmapofstreetsthatis alreadymappedbutnotnamed.Thenthesketchesarealreadydoneandyouonlyhavetoname thestreets.

5.1.6 Audio mapping Someofthebenefitsofusingaudiomappingtechniquearethatit’sfasterthanpen&paperor typinginmeaningfulnamesforwaypoints.It’stheonlymetadatatechniquethatissuitablewhile drivingacarandpracticaltousewithbike(becauseyoumightnotneedyourhandsfor recording).GivedetailsthattheGPSlogscan’tgive,streettypesandnames,accessrestrictions, POIs,linearfeaturesparalleltoyourtrack,likerivers.Butitcanbeconfusingwhenthesound canhaveseveraldifferentspellingsandit’seasytomissapostrophes.Remembertospellnames thatdifferfromtheusual/commonspellingwhentheyhaveanequivalentpronunciation,e.g."M ORE"isbetterthan“MORE”soyoudon’taccidentallyadd"MOOR"totheOSMdatabase.If yourareaisalreadymapped,orifyouhavegoodsatelliteimages,youmightuseaudiomapping onitsown,butinmostcases,youwilluseaGPSatthesametime.Whenyouareontheroad, justsaywhatyousee. Whenyouareaudiomappingstartyou’rerecordingbysaying“Mark”whenyouenteranew road,whileusingcontinuousrecordingmethoddescribedlateron.Thisisdonetoknowexactly wherearoadstarts.Anexampleonhowthiscanlooklikeis“Markresidentialroadcalled midsommarvägenspeedlimit30”. Youraudiodatawillbeworthlessifyoucannottellwhatrecordingbelongstowhichlocation. BecausetheGPStrackandtheaudiorecordingmightnothavebeenstartedsimultaneouslyyou mighthavetosynchronizethem.Youmayalsohavepausedtherecordingpartwaythrough,so youwouldneedtoresynchronizeatthatpointtoo.Therewaystodothesynchronizationare: • Implicitsynchronization:Ifthesamehardandsoftwareisusedforaudiorecordingand GPS,theywillbesynchronizedautomatically. • Timesynchronizing:UsesthetimestampoftheaudiorecordingandlooksuptheGPS datatoknowwhatlocationyouwhereonthattime.Ifthesyncisasaccurateasadelayof 1secondbetweenaudiorecorderandGPS,youcancorrelatevoiceandpositionas accuratelyasmappingcanbe.Record“Markcinemaatrightside,calledFilmstaden”. Thekeyword“Mark”isusedexactlywhenyoupasstheentranceofthecinema,toknow wheretoaddthePOI.IfthetimestampsbetweentheaudiorecorderandGPSistoolarge youhavetousespatialsynchronizingfirsttogetanaccuratesynchronization. • Spatialsynchronizing:Givesyousecondaccuracyeveniftheclocklagsorthedevice doesnottaketimestamp.StarttheGPSandwaitforafixwithfullsignalstrengthbefore doingthespatialsynchronizing.Chooseaplacetodothesyncthatisclearlyidentifiable (forinstancealinethatispaintedontheground)andpassthatpointatthesamevelocity aswhenyouaremapping.Whenpassingthatpointyourecord“Mark”andpassthesame

15 pointfromanotherdirectionandrecord“Mark”againattheexactmomentthatyoupass it. Alongwiththesynchronizingproblemgoesthequestion,doyourecordonebigaudiofileor makeanewaudiofileforeveryclipyoutake.Tonotgetalotofnoisewhenmakingonebigfile, pausetherecordingwhenthereisnothingtosay.Thereisahugerangeofvarietyinaudio mappingtechniques3ofthemare. • ContinuousaudiowithGPSwaypoints: MakewaypointswiththeGPSthatsavesits location,timeanditsnumber/name.Atthesametimeyoudictateontoacontinuousaudio recordingwhateachwaypointrepresentse.g.POIorstreetname.Synchronizationmerely helpstoselectcorrectpartintheaudiotrackforeachwaypoint.It’seasytolocatethe audiodescriptionforeachPOI.ButyouhavetodosomebuttonpressingontheGPS, whichcanbecumbersomewhenmoving. • Continuousaudiowithcontextualwaypoints:Insteadofenteringwaypointsintothe GPSyoumakeaudionotesforeachwaypoint.Ifyouspeakouteveryturnyoumake,you mightfollowwhereyouarebylookingatyourtracklog.Synchronizationwiththis methodiscritical.Nobuttonpressingisneededwhileyouaremoving.Butyouhavetobe cleverwhileyoumaketheaudiorecordingtonotgetlostinthetrack. • Audioclipswithwaypoints :Foreverywaypointyoumakerecordaseparateaudiofile. Thenameoftheaudioclipissavedasaelementinthecorrespondingwaypoint intotheGPXfile,toknowwhichaudioclipthatbelongstoeachwaypoint.No synchronizationisrequired.IfyourGPScandothelinkingautomaticallyandcreatethe GPXfilethismethodwillbeeasytouse.Otherwiseyouhavetouseanothersoftwarethat doesthelinking.

5.1.7 Video mapping WithVideomappingyoudon’thavetodoanythingwhileyou’reoutandcollectingdatabeside mountthevideocapturingdeviceonyourcarandstartthevideoandGPSrecording.The disadvantagesarethat,processingofthecollecteddatawilltakemoretimeandothermapping techniques;youcanonlymapwhat’scapturedinthevideoandtakesupalotofstoragespace. ThismethodisrarelyusedbyOSMmappers.Commercialcompaniesuseitandmoreadvanced camerastoget3Dstreetmaps.

5.1.8 Dictacam Dictacamareacombinationofaudiomappingandphotomappingwhereyoutakeaphotoand recordavoicetagtothatphoto.Whenyou’reaudiomappingit’shardtocorrelatetheaudioclip withapointintheGPStrack.Withapicturethecorrectpointiseasiertofind.Dictacamusethe strengthsofbothphotoandaudiomappingwhichmakesitsuitableforPOIandstreetnames recording.

5.1.9 Focus on one type of street Togetlessinformationtokeeptrackonwhilemappingyoucanfocusononetypeofstreetfor everyrecordingyoutake.Ifyoudecidebeforeyoustarttrackingtofollowforexamplea cyclewayyoudon’thavetotakenotesofwhenyouchangetoanothertypeofstreet.Ifyouareon atripandjustcollectingdataofwhereroadsareandnottakinganynotes,youcanatleasttag

16 everyroadyoueditwiththestreettype.Nowyouhavelessinformationtocollectforthesecond tripinthatareaandyoucaneasierchooseasuitabletransportationmethodforthattripbecause youknowthestreettype.

5.1.10 Always turn right Whenrecordingtracksinurbanareas,agoodwaytocoverconvolvedhousingdevelopments is toalwaysturnright(or,alwaysturnleftinthecountriesthathaveleftsidetraffic).Itiseasierto coverallsideroadswhenusingthistechnique.Italsoavoidsmakingturnsacrossoncoming trafficwhichcanbebothtimeconsuminganddangerous.Thismeansthatyouwillcatchtheside roadsofonesideofthemainstreetonyourjourneyoutwardandonyourjourneybacktothe startingplacetheroadsontheothersideofthemainstreetwillbecovered. Whenyouarriveatajunctionyoualwayschoosetotakethestreetthatistherightsideofwhere youstandandifyouhavealreadybeentothestreetattherightside,gostraight.Ifthatisalso covered,goleft.Ifallturnsarealreadycoveredyoumakeauturnandgobackthewayyou came.

5.1.11 Set borders Tomapacity,orabigarea,startbydrivingallthemainstreetswiththecartodividethearea intochunks.Nowyoucanchooseachunkandusethemainstreetsasyourborderswhile mapping.Usethe“alwaysturnright”techniquewithintheconfinesoftheborders.

5.2 Mapping style Mappingisdoneintwosteps:First,youneedtoknow“where”thingsare,mainlythestreetsand roads.Thenyouneedtoknow“what”thereis,streetnames,POIsorwhichtypeofroaditis.You candotheseoneafteranother,orbothatthesametime,butyoucanhardlydo”what”beforethe “where”. Betweeneithercollectingbothwhereandwhatinonetriporsplititupintwotripswhereyou firstfocusonwherethingsareandlateronmakeasecondtriptomapwhatisatthatplace.This sectionwilldiscusswhichmappingtechniquesaregoodtouseforthetwomappingstyles.

5.2.1 One-way mapping CombinationsofthemappingtechniquesGPStracklogs,audiomapping,GPSwaypointsand transportationmethodwalking/bicyclearegoodtousewhenmappinginonetrip.Becauseyou willmakemanystopswhilemakingnotesofwaypointsandaudioclip,walkingispreferred. Bicyclecanalsobeusedwhichareeasytostartandstopifyouareplanningtomakealonger trip.

5.2.2 Two-way mapping ThefirsttripyoumaketheGPXtracklogsofwheretheroadsareandtakefewGPSwaypointsto notewhichtypeofroadyouaremapping.Forthistripyouwanttousethefastesttransportation methodthatissuitableforthetypeofroadyouaremapping.Forthesecondtripyoufocuson takingnotesofwhatdetailthatisinthatarea.It’salwaysrecommendedtotakeGPXtracklogs foreverytripyoutaketogetmoretrackstousefromwhenbuildingroads.

17 5.3 Transportation method Whichtransportationmethodyouusemakedifferentmappingtechniquesappropriate.Depending onthetypeoftrackswhichyouintendtocreate,sometransportationmeansarebettersuitedthan others.

5.3.1 Walk Forshortdistancetracksthathavealotoffeaturestomap,handdrawnmapsofcitystreets techniquecanbeused,becauseyouhavebothhandsfreeandnovehiclethat’sinyourwaywhen youstopfrequentlytotakenotes.

5.3.2 Bicycle/ Inline skates Abicycleisgoodtouseformediumdistancetrackswhenyouwanttomakeseveralstopstotake notes.Inlineskatesaremoresuitedfortrackingresidentialareaswithdensefeaturestomap.

5.3.3 Car Acarisgoodtotrackallthelengthofamotorway,wherelittlespecialfeaturesappear.Ifthere arealotofspecialfeaturesalongthemotorwaythatyouwanttomap,2personsareneeded,one thatisthededicateddriverandtheotheronedoesthemappingwork.Ifyouarerecordingintime intervals,driveslower(ifpossible)whileturningtogetmoredenselypointswheretheroadis curving.

5.3.4 Rail Whiletakingarailtrip,getagoodfixbeforeboarding.Onceyougotthefix,theGPSreceiver cangetanewfixveryfastwithintensofmillisecondsforaperiodof24hours.Thisisvaluable inharshreceiverconditionssuchasrailcabs.Itcanalsohelp(thoughtoalesserextent)when travelingbybusorcar.IfpossibleplacetheGPSreceivernearawindowinthesameheightas thewindowtoeasiergetthesignalsfromthesatellites.

5.4 Upload data BeforeyoucanuploaddataandeditthemapyouneedtocreateanaccountontheOSMwebsite andlogin.YourGPXfilemustconsistoftrackpointswithvalidtimestamps.Trackswillfailto uploadifdataformatsarenotcorrect.ForexampleGPSsetupoccasionallythrowsinaNaNasan elevationvalue.Deletingthoselinesfromthefilefixestheupload.GPX1.0and1.1schemais accepted,exampleofhowtheylookcanbeseeninappendixB.OSMusestheWGS84 latitude/longitudedatumexclusively.AlluploadedtracksandeditsshouldalwaysbeinWGS84, thedefaultdatumformostGPSreceivers.

5.4.1 Save to GPX IfyouhavecollectedyourtrackdatawithaGPSreceiveryouneedtosavethefileinGPX format.CheckthemanualofyourGPSreceiverorsoftwaretolearnhowtosavethetrack.If GPXisavailable,saveitasGPXfile.IfGPXisunavailable,savethetrackinanotherformatand useaconverterprogramtochangeittoGPXformat.Onesuchconverterprogramthatcan convertfrommostformatsisGPSBabel.

18 5.4.2 Uploading to OSM OnceyouhaveaGPXfile,uploadittothewebsitebyclickingthe“GPStraces”tab.After uploadingyourGPXfileyoucandownloadthedatafromtheeditorJOSM,alongwithallother datainthatarea.Alternatively,youcanopenitintotheeditorPotlatch,byclickingthe“edit”link totherightofthetrace(nottheoneatthetop). 5.4.3 Always upload your tracks TheaccuracyofthepointsinasingleGPStrackmaybeoutbyseveralmeters.Thisdependson lotsoffactorssuchasthepositionsofthesatelliteswhenthetrackwastaken,treecover, proximitytonearbybuildings,positionoftheGPSunitrelativetothecentreoftheroadetc.If manytracesaretakenforthesameroad,thentheeffectoferrorsinanyonetracewillhavea muchsmallerimpactontheaveragepositionofthesetracks.Tohelpwiththis,it'susefulifyou uploadallyourGPStrackstotheserver,eveniftheycoverroadsalreadyinthedatabase.This allowsotherstouseyourtrackstoaverageouttheerrorsandshouldeventuallyresultinlower positionerrors.

5.5 Editing Afteryouhavecollectedtherequiredinformationit’stimetoeditthemapwithyournewdata. OpenStreetMap'sdataismadeupfromtheelements,node,wayandrelations. • ode:Anodeisusedtomarkpointsofinterestsorassegmentstobuildupaway.Anode consistsoflatitudeandlongitudethattellswherethenodeislocated.Standalonenodes shouldhaveatleastonetagthatdescribeswhatpointofinterestitisreferringtoe.g. (amenity=pub). • Way:Anorderedlistofnodesofatleast2nodesandupto2000nodes,displayedas connectedbylinesegments.Theyareusedtodescriberoads,pathsetc.Ifawayisover theupperlimititwillnotgetaccepted.Justdivideitupinsmallersegmentsandgroupthe waysinarelationofnecessary.Nodescanbeapartofseveralways. • ClosedWay:Isaspecialcaseoftheelementway,whichisawaythatgoesinacomplete loop,whichisusedtodescribeareaslikeparks,lakesorislands. • Relation: Fromthedatamodel'sperspective,relationsarebasicallygroupsofobjectsin whicheachobjectmaytakeonaspecificrole.Relationsmayalsohavetags.Typically youwouldexpectthe'type'tagtobeset,specifyingwhattypeofrelationitis.Relations canbeusedforrepresentingthingslike,trafficenforcementdevices;speedcameras,red lightcameras,weightchecksordestinationsignsatorbeforeintersections.

Figure5:TheelementsthatmakeuptheOSMdata.

19 Alltheseelementsmusthavetagslikedescribingnameortypeofroadetc.Youhaveachoiceof severaleditorsforaddingelementsandtags,2ofthemarePotlatchandJavaOpenStreetMap Editor(JOSM). Asaveryroughruleofthumb,Potlatchiseasierforquickedits,andbetterforeditswhichrange overawidearea(e.g.cycleroutes).JOSMisbetterforheavydutyeditinginaconcentratedarea (e.g.housingestates)andoffersfacilitiesforaudioandphotosurveying.Buteveryonewillhave theirownpreferences.

5.5.1 General tips for adding roads or other ways Thelengthofawaysegmentcanvarygreatly.Ifaroadisextremelycurvythenitneedsalotof segments/nodes.Ifit'sdeadstraight,withnoadjoiningways,then1segmentissufficientforthe entiredistance.NotethestraightbitinFigure6atthecenterofthewayrequiresonlyone segment.

Figure6:Exampleonhowtocreatearoad. Iftherearemultipletracksyoushouldputthewaydownthecenterofthemall,asinFigure7, image1.Butyoushouldconsiderthattracksthatcomesfromroutesthatwasdoneonfootor bicycleismorelikelytobeaccuratethanroutesthataredoneinacar.Becausetheslowermeans oftransportationhashadmoretimefortheGPStogetsignalsfromthesatellites.It'sbesttorely onthisdatatobemoreaccurate. GPSdataisfarfromaperfectdrawingofthepath.Ifthedotsareallovertheplace,drawa smoothwaydownthecenter(inFigure7,image2isincorrect,image3iscorrect.Theaverage routehasbeendrawncleanlydownthecentre).Ifyoudotheeditingshortlyafteryouhave collectedtheGPXtrackit’seasiertorememberhowtheroadlooks.Ifthedotsarereally scatteredyoushouldconsiderifyoushouldusethattrackatall.

Figure7:ExampleonhowtousetheGPStrackpoints.

20 ThemoreGPStracksyouhaveoverthesameroadandaveragebetweenthosethemorelikelyit’s thatyouhaveanaccurateroad.ThepointsthatyouseefromalltheGPStracksisusedasa guidelineofwhereyouwillputyournodesthatbuildsuptheroad. Whencreatingandeditingdualcarriageways,trytokeepthenodesandsegmentsalignedand parallel,asinFigure8,image1.Ifoneofthecarriagewayscurvesoffthennodesdon'tneedtobe wastedonthestraightcarriageway,asinimage2.

Figure8:Exampleonhowtocreatedualcarriageways. Whenconnectingtworoadstogethertheymustbothlinktoasharednodethisisshowedin Figure9,image1.Acommonbeginner’smistakeistoplacenodesveryclosetooneanother,but notformaconnectionFigure9,image2,oroverlap2waysandpresumeaconnection,Figure9, image3.Onlyimage1willwork.Tocheckifbothwayshaveasharednode,movetheassumed sharednodeandthenundoit,ifbothwaysmoveyouhavedoneasuccessfulconnection.

Figure9:Howconnecting2roadsshouldbedone. TolearnmoreonhowtoeditthemapsvisitEditingStandardsandConventions[18].Many questionscanbeansweredbylookingattheworkofothers.Downloadpiecesthatareverywell mappedandhavealook.Notethatsomecountrieshavedifferentstandards;preferablylookat yourowncountry.

5.5.2 Tagging Onceyouhaveaway,youneedtoaddtagstothewayinordertoseethemrenderedonthemap. EachelementmayhaveanarbitrarynumberoftagswhichareKeyValuepairs(e.g. amenity=theatre).Alltagsneedtobeinlowercase,exceptfornames.OntheMapFeatures[6] pageyoucanlearnmoreonhowtotagcorrectly.Manyoftheexamplesonthemapfeatures page,particularlythoseregardingroads,arespecifictotheU.K.Usersinothercountrieswill wanttolookatTagging[19]forguidanceinapplyingthetaggingschemetotheircountry. Anyonecanproposetagsandit'snotarequirementtohavethem"approved"beforeyoucanuse them,butit’sunlikelythetagwillshowupwithaniconinthemapsbeforeitisapproved.The bestadviceisalwaysthis: • CheckthemapfeaturesoranyothertaggingrelatedpagesontheOSMwikiwebpageto seeifthereisalogicaltagthatfitsyourneeds. • ChecktheProposedfeatures[20]pagestopickupthetaggingideasofothers.

21 • Ifyoufindtagsfromoneoftheabovepagesthatmatchyourcriteriaandyoubelievethey arelogicalthenusethose. • Ifwhatyouwanttotagdoesn'tfitanyoftheexistingdocumentedtagsorproposedtags thenmakeupyourownusingalogicalprocess.Useyournewtag(s)andaddapageon theOSMwikiwebpageandexplainwhatthetagis. Notagneedsapprovalortobecome"official"beforeuse.AnytagkeyorvalueisvalidinOSM andtheapprovalprocesssimplyoffersamechanismtodiscusstagsastheybecomeused.

5.5.3 Changeset Everymodificationofoneormoreoftheelementshastobewrappedinachangeset.Changesets canbeupto50000editsandaliveforupto24hours.Thechangesetneedstobeopenbefore anythingcanbeuploadedtotheOSMdatabase.Closingachangesetcanbedonemanuallyor automaticallyifnothingisuploadedforacertaintime(1hourcurrently).Achangesetcanhave tagsjustliketheotherelements.Arecommendedtagforchangesetsistogiveashortdescription ofwhatyouhavemodifiedinthemapmadeinthatchangeset. ChangesetsareusedforrollbacksoftheOSMdatabase.Ifonepersoniscommittingsomething thatotherpersonsofthecommunityisquestioningandthinksiswrongit’seasiertoidentifythe changesmadebythatpersonifit’swrappedinsideachangesetinsteadofrollingbackawhole region.Itcanbeaverycomplexprocesstorollbackachangesetthereforesupportfordirect rollbackisnotavailableintheAPI.Insteadrollbacksneedtobemademanuallybyreverse merging,examinethechangesandundothemtoobtainthedesiredresults.

5.5.4 Potlatch online editor in OSM webpage PotlatchisanonlineeditorforOpenStreetMapintendedasaneasytolearneditingenvironment foraddingnewroads,railways,riversorotherfeaturestothemapandtochangeexistingones.A clear,uncluttereduserinterfaceisparamountforthisaudience. PotlatchusesAdobeFlash,soyouwillneedaFlashPlayertouseit.Itisrunninginyourstandard webbrowser.WhenyougotothewebsiteOpenStreetMap[21]zoomintothestreetsyouwantto edit,andthenstartPotlatchwiththeedittabofthemainmap,ascreenwillpopupasshownin Figure10.Youwillgetachoiceto“Editwithsave”wheretheupdateofyourworkhappensafter yousaveit,or“Editlive”whereyourchangeswillbeuploadeddirectlyafteryoumakethem. Editliveisgoodtouseatmappingparties.Editwithsaveisrecommendedforbeginners.

Figure10:LoginscreentoPotlatch.

22 AnincreasingnumberofexperiencedmappersusePotlatchasasupplementtoJOSMforinstant editing,andafewuseitastheirprincipaleditor. Thereisnoneedtowaitforthetracktobeimportedintothedatabasebeforeyoustartworking withatrackyouhaveuploaded.InSundayeveningsuploadingthingstothedatabaseusually takeslongerwheneveryoneisuploadingtheirweekend’smapping. OneofthemorepowerfulfeaturesistodirectlyconvertaGPStracktoaroad.Onthe“GPS Traces”tabonthesite,clickthe“edit”linktotherightofyourtrackasshowninFigure11.

Figure11:GPSTracestabinOSMwebpage,clickeditconvertGPStracetoroad. WhenyouopenPotlatchinthisway,waituntiltheGPStrackhasloadedandalightbluelinewill appearwhenthisisdone.Mark“ConvertGPStracktoways”boxtodotheautomaticconversion asinFigure12.Afterafewseconds,anew,brightredwaywillappear.

23 Figure12:LoginscreentoPotlatchwhenopenedwitheditbutton. YourwaypointswillalsobebroughtinasPOIthatislocked,sotheydonotgetautomatically uploadedtothedatabaseifyouuse“Editlive”Figure13.

Figure13:ExampleonhowawaypointfromaGPXfilecanlookwhenopenedinPotlatch. IfyoudowanttouploadthePOI,tagitupproperlyandclickthelittlepadlocktotherightofthe POInumber.WhenyoudeselectthePOI,itwillbeuploaded.

Figure14:HowtounlockthePOI. Likethewaypointsthewaywillalsobelocked.Dothenormaleditworkofsplittinguptheway, joinittoexistingwaysandtagit.Tounlockthewayclickthelittlepadlocktotherightofthe waynumber.Asusual,deselecttoupload.Ifthewayhasmorethan200pointsunlockingtheway willnotwork,splititupmorebeforeunlockingit.

24 Figure15:ExampleonhowanconvertedGPStracecanlooklike. PotlatchisusingDouglasPeuckeralgorithmtosimplifyyourGPStracktoremoveunnecessary pointsonalongstraightroad.IfyoufindtheautomaticconversionoftheGPStracktocoarse, youcanholdShiftwhenclicking“Editwithsave”or“Editlive”.Thiswillrunafiner simplificationoverthetrack. Beforeyoustartmappingandwanttousetheautomaticconversionfeatureyouneedtoknowthe pitfallsyoucanfallin.Youcan’tcrossthesameroadtwicebecausethenyouwillgetdouble waysofoneway.Thisfeatureisnotsuitedformappingahousingestatebecauseit’shardto avoidcrossingthesameroadseveraltimes.ButifyouaremappinganormaltripfromapointA topointBe.g.yourecordyourjourneyfromyourhometothetown.Thisfeaturecansaveyouan awfullotoftracing. Pros It'srightthereonthe'Edit'tab.Itallowsquick,easyandimmediateediting.Mapchangescanbe sentbacktotheserverasyoumakethem.Yahoo!AerialImageryissupportedwithoutinstalling aplugin.GPStracesareavailableasaseparatelayer.AutomaticconversionofuploadedGPS tracks.

25 Cons It'snotintendedforpowerusersorthosewhowantthespeedofadesktopclient.Zoomingand panningpromptsamapfetch. Photoandaudiomappingandotherfileaccessingfeaturesarenot possible.Flashneedstobeinstalled.Itisnotpossibletoworkfullyoffline.

5.5.5 JOSM offline editor JOSMisafeaturericheditorfortheexperiencedOSMmappers.Itrequiresalittleinstallation andconfigurationefforts.Youneedtodownloadtheeditor,java1.5andquiteafewplugins[22] existthatyoucaninstall.InthepreferencesenteryourusernameandpasswordtoOSMaccount. StartbyimportingtheGPXfilethenJOSMwillautomaticallyfittheworkspacetothebounding boxofyourGPXtrack.Clickonthegreendownarrow tofetchthedatafrom openstreetmap.org.Inthefollowingdialog(Figure16)ensurethatthecheckboxtogetOSMdata isenabledandpresstheOKbutton.ThereisalsoacheckboxtodownloadeveryrawGPSdata forthatboundingbox.Ifthetrackistoolong,theserverwillrefusetosendyoutheOSMdatafor thatarea.Zoominabittorestricttherequesttoareasonablesize.

Figure16:DownloadscreeninJOSMforOSMdataandGPStracks.

26 Analternativewaytostartifyoudon’thaveaGPXfileistoclick andzoomintothearea youwanttoworkon.EnsurethatthecheckboxtogetOSMdataandrawGPSdataisenabledand pressOKbutton.

Figure17:ExampleonhowtheOSMdatacanlooklikeinJOSM. OnceyouhavedrawnyourlinesegmentsasinFigure17,itstimetouploadyourchangesto OSM.Followthisprocedure. • Redownloadtheareayouhaveedited.Thischecksthattheareayouhavebeenworking onhasnotbeenalteredbysomebodyelseinthetimeyouhavebeenediting.Clickonthe greendownarrow . • Ifthereareconflicts,comparethemandpickwhichoneyouthinkiscorrect.Conflictscan beviewedinthesidebarsection,openedwithaltc.Youshouldbeinformedwhen conflictsoccur.

• Uploadyourchanges.Clickonthegreenuparrow . • JOSMwillgiveyouanoverviewontheelementsit'sabouttoupload.Enteracomment thatdescribeswhatyouhaveedited.

27 Thelongeryouspreaduploadsapart,thegreaterthechancesarethatsomebodyelsewilleditthe samearea.Itisbesttouploadchangeseveryfewminutes. Afteryouhavecommittedyourchangestotheopenstreetmap.orgdatabase,itwilltakesometime untilthenewwayswillappearinthemainmap.Ifyouwanttoshortenthisprocess,youwantto getfamiliarwiththeTiles@home[23]project. JOSMhaveseveralmorefeaturesthatcanbeusedtomaketheeditingworkeasiersomeofthem are,photoandaudiomapping.Aerialsatelliteimageryfromvarioussourcescanbetracedin JOSM.ThisrequirestheinstallationoftheWMSPluginthatallowsyoutofetchimagesfromany WMSsource,anddisplaythemasabackgroundimagewithinJOSM.Highresolutionimagery formajorcitiesisavailablefromYahoo! Pros Thepanningandzoomingofthemapisfastandfluid.Youcanzoomintonearinfinitelevelfor superprecisemapping.JOSMcanworkofflineusingdownloadeddatafiles,andcanworkwith localphotoandGPXfiles.Advancededitingfunctionalitye.g.makesnodesofaroundaboutinto acircle.JOSMishighlyconfigurableandextendibleviaplugins[22]. Cons MustbedownloadedbeforeitcanbeusedanditrequiresJava1.5towork.Thefinerpointsofthe interfacetakeawhiletolearn.

5.6 Render maps Youhavenowcollecteddata,createdways,taggeditanduploadedthechangestoOSMandwant toseethenewmapwithyourchanges.Butbecausemapimagestakesometimetorender,the maptilesarecached,andonlyupdatedonaperiodicbasis,ratherthanimmediatelyafteryouedit it.OntheotherhandyoucandownloaduploadedchangestoOSMdatabaseimmediatelyusing forexampletheJOSMeditor. ThedefaultmapMapnikisupdatedwithhourlydiffssothatmostdatachangesshouldget renderedwithinanhour.Whenyoutrytoviewthemapforthatarea,itwillflagtheareatothe renderingsoftware.Pleasekeepinmindthat"tiles"atparticularzoomlevelsarenotupdatedall atonce.Thereforeduringtheupdateperiodyoumayseeyourchangesatsomezoomlevel,while atanothertheywillbevisibleafterawhile. AlternativelyyoucanchoosetheOsmarenderlayer.Selectthisusingthe+iconatthetoprightof themap.TheOsmarendertilesareupdatedbymanyOSMersusingtheirowncomputers Tiles@home[23],whichhasresultsindifferentresponsespeedsusuallylessthanonehour.If thisdoesnotworkoryouliketoseequickerupdate,youcangotoinformationfreeway.org[24] webpage,gotozoomlevel12andpressctrl+clickonthetilestobeupdated.Itwillthenbe addedtothelistforTiles@homecomputerstorender. Ifyourchangesdoesnotappearevenaftersometimehasgonebyoryouhavemanually requestedanewrenderyoumighthaveataggingproblem.Checkthat. • Allyourwaysaretaggedwithsomethingappropriatethatwillberendered • Tagsareinlowercase:HIGHWAYandHighwaywillnotwork. • Youhaveunderscore“_”andnotaspacefortagssuchashighway=bus_stop.

28 Chapter6 Features discussed at the start of the project Thischapterdiscusseswhichfeaturesthepersonsthataremappingcouldhaveuseofinacrowd sourcingclient.Thiswasdiscussedinabrainstormmeetinginthebeginningoftheproject. Severalfeaturesthatwerediscussedatthestartoftheprojectwillbepresentedandassigneda prioritywhenthatfeatureshouldbeimplemented.

6.1 Core Features Somefeatureshavetobeincludedtobeabletohaveatracklogofthepathyoutraveled.Those featuresbelongtothecorefeaturesandwillbeimplementedfirst.

6.1.1 Support different connections of GPS ThereexistmanytypesofGPSdevices.SomeareconnectedwithBluetooth;othersareserial connectedtoanexternalGPSunitforexampleSonyEricssonHGE100.JSR179APIproduces informationaboutthedevice'spresentphysicallocationtoJavaapplications.Youcanusethe internalGPSinthemobilephones,whichsupportJSR179.MobilephoneswhichsupportJSR 179arefarfeverthanJSR82whichisanAPIforBluetoothcommunication.Thismeansthatthe mostimportantGPSconnectiontoimplementissupportforJSR82andthereforebe implementedfirst.

6.1.2 Map Amapthatyoucanzoom,panandcenterthemaponyourpositionthatisbuiltfromOSMdata. TogetanycontextofyourGPStracknodesit’sanicefeaturetobeabletoseethemplotted againstamapovertheareayouarelocatedin,thenyougetconfidencethattheGPSworks.The mapcanalsobeusedtomakePOI.

6.1.3 Create GPX files EachpointmusthaveatimestamporelsetheOSMdatabasewillnotacceptthepoint.Allother informationaboutthepointisoptionaltoincludelikealtitudeofthepointsorsignalstrength fromthesatellites.GPX,orGPSeXchangeFormatisanXMLschemadesignedfordescribing GPSdatabetweensoftwareapplications.WaypointscanbeaddedtotheGPXfile.Whenall pointsandwaypointsarecollectedthatshouldbeincluded,aGPXfileiscreatedandstoredinthe filesystem.

6.2 Upload GPX track from phone to OSM account InsteadofthenormalwayofeitherstoringyourGPXfileinthemobilephoneinternalorcard memory,transfertheGPXfiletothecomputerfromthemobilephonesmemoryanduploaditto yourOSMaccountthroughtheOSMwebsite.YoucoulduploadyourGPXfiledirectlytoyour OSMaccountfromthephone.Thenyougetfewerstepstodowhenuploadingyourcollected data.ThisisoneofthemainfeaturesEricssonwantedtobeimplementedandhavehighpriority whenthecorefunctionsareimplemented.

29 6.3 Download latest OSM map Tonotgetconflictswhenuploadingchangesandtonotdoworkthatisalreadydone.It’s practicaltobeabletodownloadthelatestOSMmapdirectlytoyourmobilephone.

6.4 Edit map on fly when tracking BasiceditingworklikeaddingPOIs,whichtypeofstreetitisandgivingnametoobjectscanbe ausefulfeaturewhilemapping.Thenyoudon’thavetouseanymappingtechniquestoremember whereyourareandwhattomap.ThisrequiresthatyoucanseethelatestOSMmaponyour mobilephoneandtheabilitytouploadtheeditedmapstoOSMdatabasetobeconvenient.Thisis anothermainfeatureEricssonwasaskingforandwillbedoneafterthecorefunctions.

6.5 Audio features Itcanbecumbersometotypeinlongmessagesinamobilephoneoruseanotebook;insteadyou couldmakeaudioclipsandmarkthemwithawaypointofwheretheaudioclipwasrecorded.In theeditoryouselectthewaypointtoplaytheaudioclip.Thisfeaturewillbeimplementedwhen allcoreandmainfeaturesaremade.

6.6 Photo features Takingphotosisveryspaceheavy,amobilephonemighthavelimitedstoragememoryandthe useofthisapproachtomakenotesofwhattomap,isnotsuitedforacrowdsourcingclientfor themobilephone.Thisfeaturehaslowpriority.

6.7 Accelerometer TheAccelerometercanbeusedinthemobilephonesthatsupportit,torecordvibrationsofthe mobilephone.Thiscanbeusedtogiveasuggestionofwhattypeofstreetyouareone.g.paved streetsoroffroadstreet.AnotherfeatureistofeelthedirectiontheMobilephoneisdirectedto. Thiscanhelpyourememberwhichwayofthestreetyoutookapicture.Accelerometerisnot supportedbyallmobilephones.FeaturesthatuseAccelerometercan’tbecorepartsifyoudon’t makethesamefeaturewhichhasnorequirementofAccelerometer.Accelerometerrequires detectionworkstobeimplementedthat’snottrivialtoadd.Thisbelongsmoretoafuturework whenyouhavetheotherfeaturesalreadyworkingonitsown.

6.8 Overlay map TheoverlaymapmaybeusedasaguideofwhereGPStrackneedstoberecorded.Themost powerfuluseofOverlaymapistouseaYahooAerialImageryoverOSMmaptospotareas whichhavenotyetcoveredbyOSM.Otherwiseyouhavetoguessifthereissomethingaround thecornerthatneedstobetracked.YahoohasgivenOSMcommunitylegalrightstousetheir aerialimagerytobuildupOSM,orelsethisapproachwouldbebreakingthecopyrights.This featureishandybutnotrequiredandwillthereforebeimplementedifthereistimeleft.

6.9 Recognition intelligence Softwarereadsinformationfromaudioclipsorphotosandinterpretsit.Youtakeaphotoofa speedsignandthesoftwareseesthatit’sa30km/hspeedsignandmakeanoteofit(key= maxspeedandvalue=30).Thisfeatureisabigprojectonitsownandwillbeskippedinthis thesiswork.

30 6.10 Automatic building of roads WhiletrackingyoucanseetheGPStracklogscontinuallygetupdatedonyourmapwiththepath youhavetraveled.Thesepointsofwhereyouwerelocatedonaspecifictimecanbeusedto createroadsautomatically.WhenstartingyourGPStrackingyoudecidewhichtypeofroadto track,forinstancekey=highwayandvalue=cycleway.Thenyoufollowonlythattypeofroad andifyouwanttotrackanotherroadtypeyoumakeanewGPStracklog.Thisisdonetomakeit easierforthesoftwaretoknowwhattypeofroadthatistracked.Whilethisisagoodfeatureto have,ithastomakecorrectdecisionsallthetimeorelseitwilladdroadsthatarenotcorrect. ThisfeatureisbettersuitedforareasthatdonothaveanycoverageintheOSMdatabasealready, becausethenthealgorithmdoesnothavetodownloadeverynodefromtheOSMdatabaseand makeassumptionsifanodeshouldbeconnectedtotheroadthatisbeingmadewhiletracking.If thisisnotdonebythealgorithm,thenyouhavetomanuallyedittheroadcreatedbythe applicationinaneditorandthepointofthefeaturetoavoideditworkislost.Thatmakesthis featuretimeconsumingandhardtodorightandlowpriorityisgiventothisfeature.

31 Chapter7 Features included in final version Inthischapteritwillbepresentedwhichfeaturesthatareincludedinthefinalversionattheend ofthisthesis’workandhowtousethem.

7.1 Startup screen Beforetheapplicationcanbeusedyouhavetoacceptthetermsofuseoftheapplication,thisis shownonlythefirsttimetheprogramisused,ifaccepted.Thefirstscreenthatisshownwhenthe applicationisstartedgivestheuserachoiceof3differentmodesforGPStrackingfrequency, car,bicycleandwalk,eachofthesemodeshavetheirownGPXsettings.Themapwillstartfrom differentzoomlevelsdependingwhichmodeyouhaveselected.Theusercanalsochangethe GPXsettingsforeverymode.Thereisabuttonthatisnamed“Onlinemaps”or“Offlinemaps” thatwillchangethebehaviorofthemaptobeeitheranonlinemaporanofflinemap.Youcan choosetostarttheapplicationwithoutstartingtheGPSwiththebuttonthatisnamed“Without GPS”.Finalbuttonis“NewGPS”thatwillgivetheusertheabilitytochangewhichGPSthey use.

7.2 GPS StartyourGPSandwaitforittogetafixbeforestartingtheapplication.Thereareusuallysome lightsblinkingontheGPSwhenitistryingtogetafixfromthesatellitesthatleaveanindication whentheGPShasgotafix,whenthishappenstheprogramisreadytobeused.Forexamplewith SonyEricssonHGE100youneedtoplugtheGPSunitintothephone,leaveitthereforagood fewminutesuntiltheblinkinggreenlightturnssolidgreentogetasatellitesfix.Makesureyou areoutsideandthattheantennaispositionedwiththewritingfacingupwards. WhenyoustarttheapplicationforthefirsttimeyouwillgetachoicetoselectwhichGPStype youwanttouse.TheavailableGPStypesthatareBluetoothGPSinNMEA0183formator externalGPSconnectedwithacableusingNMEA0183format.Therestofthetimesthe applicationisstartedtheprogramwilltrytosetupaconnectiontotheGPSthatwasusedthelast time. AfterselectingwhichtypeofGPSthatisgoingtobeused,theapplicationwilltrytosetupa connectionbetweentheGPSandtheapplication.Itwillthencheckiftheprogramcanreadany datacontainingtheinformationaboutyourpositionwhichissentbytheGPS.Ifdataisfounda mapwillbepresentedthatshowsthatlocation.Ifnodataisfoundthisstepwillberepeated4 moretimesandifnodataisfoundafterthatthelastknownpositionwillbeused.

7.3 Map WhenstartingtheapplicationthemapshowsthecurrentpositionandiftheGPSisnotturnedon orasatellitefixtakestolongtoreceive,themapwillshowthelastknownposition.Youcan zoomoutandinbypressing“1”and“3”button.Panaroundinthemapbypressingjoystickor “2,4,6,8”buttons.CenteringthemaponyourpositionifGPSisturnedon,orlastknown positionotherwise,bypressing“5”button.Themapwillfollowthepathyoutravel.Afterusinga panbuttonthemapwillstopfollowingyourtravelpathuntilyoupress“5”again.

32 Whenamaptileisusedit’sstoredinthecachememoryforfastaccess.Thecachesizeis10map tiles,henceonlythelast10usedmaptilesisstoredinthecachememory,thisisdonebecausethe mobilephonehavelimitedmemory.Theusercanchooseifdownloadedmaptilesshouldbe storedinthefilesysteminordertogetfasteraccesstothemaptiles.Thisalsominimizesthedata traffic. In“Setupmenu”thereareoptionstomaketheprogramignoremaptilesthatarestoredinthefile systemortoclearallmaptilesinafolder.Beawarethattheclearoperationcantakealongtime ifmanymaptilesexistinthatfolder.Youcanalsoturnthemaptoanofflinemapthatdoesnot downloadmaptilesfromtheOSMserverbyselecting“Offlinemap”ineither“Setupmenu”orat thestartupscreen.Inofflinemapmodeacompletelywhitemaptilewillbedisplayedinsteadof downloadingamaptilefromOSMserver.

7.3.1 Map tiles TheMapisbuiltupfromtilesthatare256*256pixelPNGfiles.

0 1tilecoverswholeworld

1 2×2tiles

2 4×4tiles

n 2n×2 ntiles Figure18:Maptilesperzoomlevel. Whenthepainterneedsanewtiletheprogramwillsearchthecachefirstandlookifit’sthereand otherwisecheckifit’sinthefilesystem.Ifnomaptileisfound,theprogramwilldownloadthe maptilefromtheOSMserverifthemapisin“Onlinemode”. Foreachrequestmapcall,it’scalculatedinwhichtileyouarelocated.Themathematics forthat canbeseeninappendixD.Theapplicationwillthencheckwhereinthemaptileyouare,to knowwhichnearbytilesthatalsoneedstobeusedtofillthescreen.Ifyouarelocatedinrighttop cornerofthemaptileyoualsoneed,tilex+1tiley,tilextiley+1,tilex+1tiley+1.Whenall tilesthatareneededtofillthescreenareknown,theprinteriscalledtopaintthescreen.Lastit checksifyouenteredanewtileandpredownloadsthetilesthatare1stepfurtherawayandone zoomlevelmorezoomedinandout.

7.4 Settings Informationneedstoberememberedtothenexttimetheprogramisused;todothisarecord storewasimplemented.TheJavaMErecordmanagementsystem(RMS)providesamechanism throughwhichMIDletscanpersistentlystoredataandretrieveitlater.Manysettingsthatchange howtheprogrambehavescanbechangedin“Setupmenu”includingwherefileswillbesaved.

7.5 User feedback Userfeedbackisveryimportantinaclientbasedprogram.Withoutanyfeedbackonkeypresses theuserdoesn’tknowiftheactionwassuccessful,unsuccessfuloriftheprogramhasbeen

33 frozen.Userfeedbacksthataresupportedintheapplicationare;menusthatchangeafter preformedactionlike“StartTracking”becomes“StopTracking”,popupsmessagesthat explainwhathappenedorwhytheactioncan’tbeused,loadingscreenwhilewaitingfor somethingtobedone. ThereisalsostatusinformationatthebottomrightcornerfortheGPS,iftheGPSisnotturned on,iftheGPShasnotfoundafixyetorhowmanysatellitestheGPShasconnectionwith.The signalstrength(HorizontalDilutionofPrecision[25])HDOPisalsoshown.HDOPisavalue thattellstheadditionalmultiplicativeaffectofGPSprecision,hencelowHDOPvaluearegreater signalstrength.Ifyougotavalueover5HDOP,it’snotrecommendedtousethattracktobuild uproads,becauseifyoursignalstrengthisthislowyourpointswillhavetobadaccuracy.After youhaveactivated“StartTracking”,informationabouthowmanypointsthathavebeenrecorded willbedisplayedinthebottomrightcorner.

7.6 Send SMS YoucansendanSMSwithyourlocationinlatitudeandlongitude.Thiscanbeusedwhenyou havemappingpartiesandwanttogiveyourpartnerthelocationwhereyouhavefoundagood placetomeetup.Youcanenterthelocationyougotfromtheotherpersonbypressing“#”for1 secondandenterlongitudeandlatitudetomovethemaptothatlocation.

7.7 Record audio Theprogramusesthe“Audioclipswithwaypoints”methodfromsection5.1.6 tosave recordings.TorecordaudioclipsyourmobilephonesneedtosupportencodinginWAVformat. ThereasonforchoosingthisformattorecordtheaudioisthatJOSM(JavaOpenStreetMap,An editorprogram)canunderstandit.IfyourecordinAMRformatanotherapplicationneedstobe usedonyourcomputertoconverttheAMRtoWAVformatifyouwanttousetheaudiomapping featurewithJOSM.AmessagewilltellyouifyouhavenosupportforWAVencodingwhen tryingtorecord. Press“RecordAudio”inmenuor“9”buttontostartrecordingaudio.Press“StopRecordAudio” inmenuor“9”buttontostoptherecording.AwaypointwillbesavedintotheGPXfilewhere theaudioclipwasrecorded.Alinktagwillbeaddedtothewaypointthattellswhichaudioclip thatbelongstothewaypoint. TolistentotheaudioclipsinJOSM,transfertheGPXfiletoyourcomputerandcopytheaudio folderfromthemobilephoneandputitinthesamefolderastheGPXfile.ThenstartJOSMand importtheGPXfile.GPStracksandwaypointswillbedisplayedasnormalbutnowJOSM createsAudioMarkerforeachwaypointthatcontainsanaudioclip.JOSMknowswhichaudio cliptoplaywhenyouclickonthemarkerthroughlookingonthedescriptiontag.

7.8 GPX track log Theapplicationwillneedtogetsignalsfromatleastthreesatellitesbeforeapositioncanbe determinedandtrackingcanbeinitiated.Theapplicationsavesthecurrentsignalstrength (HDOP)toeverypointthatisrecorded.Manyexperiencedmappersuseascriptthat automaticallydiscardspointsintheGPXfilethatwastakenunderbadsignalstrengthfromthe satellitesbylookingatHDOPvalueforeachpoint.Trackpointsaresavedaftereitheradistance thresholdisreachedorafteratimeinterval.Insetupmenu“GPXsettings”youcanchoosetouse distanceortimeastherulesetofhowoftenpointsaresavedandthethresholddistanceortime

34 intervalcanbechanged.WaypointsandaudiorecordingswaypointsaresavedtotheGPXfile. YoucandisplayyourGPXtracksbypressing“ManageGPX”inthemenuorpressingthe“*” buttonfor1second.ThemapwillbecenteredonthefirstpointoftheGPXtrack.Pressing“7” willtogglebetweenshowingtheGPXtrackinthedisplayornot.

7.9 Upload GPX track and edit work AddingPOIsandpathstotheOSMdatabaseissupported.AlsouploadingofGPXtrackstoyour OSMaccountaresupported.Buttheapplicationdoesnotsupportuploadsthatarelargerthan2kb insizeonSonyEricssonphonesthathavetheJP8.4platform orless.JP8.5platform version willmakeuploadworkregardlessofthesizeoftheupload.ThisisanOSMserverproblem wheretheydon’tsupportHTTPPOSTdatasentinchunkedmode,evenwhenrequiredbythe HTTP/1.1specifications .InappendixcyoucanreadapostmadeintheSonyEricssondeveloper forumaboutthischangemadeinJP8.5platform.Twokbcorrespondtoabout7nodes,whichis notenoughtomaketheuploadofGPXfileshaveanypracticaluse.

7.10 Basic map editing on the phone IntheapplicationthereissupportforbasicmapeditingdirectlytotheOSMdatabase.

7.10.1 Points of interest Pointsofinterestscanbeaddedtothemapbythenormalwayoftakingawaypointandtakenote ofwhatPOIitis.Backonyourcomputeryoutagthewaypointwithaneditoranduploadittothe database. Withthisapplicationyouhaveanotherwaytodothisdirectlyonyourmobilephone.Pressthe “0”buttonor“AddPOI”inthemenutogetapresetlistofcommonPOIs.Chooseoneofthe POIsinthelistornoneifyouwanttoaddsomePOIthatisnotinthepredefinedlist.Addall appropriatetagstothePOI,bypressing“Addtag”inmenu.Enterthekeyandvalueofthetag e.g.togetatagname=HardRockCafeenter“name”askeyand“HardRockCafé”asvalue.All tagsneedtobeinlowercaseexceptnametagtogetacceptedbyOSMdatabase.Afteralltagsare setpress“UploadtoOSM”touploadthePOI.Ifnochangesetismadeyouwillgetatextboxto addacommenttodescribewhattypeofupdateyouaredoingtotheOSMdatabase.

7.10.2 Build way “Editmode”inmenuwillmakethemappaninsmallersteps,forbetterprecisionwhenadding nodes.Press“9”toaddnewnodeandpress“7”toremovelastnode.Createawayoftheadded nodes,bypressing“*”.It’simportantthatallthenodesareaddedinanorderedsequencewhen makingaroad.

Figure19:Nodesthatbuildsupthewayhavetobeinanorderedsequence. ThesameprocedureisusedtoaddadditionaltagsanduploadtoOSMasforPOI.

35 7.11 Render styles Fourdifferentrenderstylesaresupportedintheapplication.Thedefaultmapis“Mapnik”which isusedwhenstartingtheapplicationthefirsttime.“Osmarender”whichcanbeusedinsteadhas anotherlookthatissimilarto“Mapnik”.“CycleMap”highlightsthecycleways.“NoName”is thelastoptionandhighlightsroadswithnonametagwitharedcasingathigherzoomlevels,or asthinredlinesatlowerzoomlevels.

(a)Mapnik (b)Osmarender

(c)CycleMap (d)oame Figure20:Exampleonhoweachrenderstylecanlooklike. ThepicturesinFigure20showsapartofLuleåinzoomlevel12.Eachrenderstyleusedifferent parametersforhowtobuildthemap,forexampleOsmarendershowscyclewaysinthiszoom leveland“Mapnik”startstodisplaythecyclewaysatzoomlevel13.Theusercanchoosewhich oftheserenderstylesthattheylikemost,bygoingtothe“Setup–Maprendertype”andselect whichofthese4renderstyleshe/shewantstouse.

36 7.12 Waypoints Thereareseveraldifferentwayssupportedtocreateawaypoint.Firstoneistopress“5”for1 secondorinthemenuselect“SaveWaypoint”tosavethewaypointonyourpositionorpressing “#”tosavethewaypointonthepositionofthecrossinthemiddleofthescreen.Nowyouwill getaformwhereyouhaveatextfieldtoenterawaypoint.Thereisalistofthelast9different waypointsmade,whicharenumberedfrom19.Ifyouenteroneofthesenumbersfirstinthetext field,thewaypointassociatewiththatnumberwillbeadded.Anotherwayistodoublepressa keytoaddapredefinedwaypoint.ForexampleselectingAddSpeedLimits”inthemenuwillget youalistofwaypointsthatbelongstospeedlimitsandpressing“3”willaddawaypoint maxspeed=30km/h.Thatisusefulwhiletrackinginacar.Thirdistomakeyourownpredefined waypointkeybindings.MakeaTXTdocumentwithpredefinedwaypointsintheformatshowed inFigure21,imagea.everywaypointendswitha“,”signthatisusedtoparsethefile.Figure21, imagebshowstowhichbuttononthemobilephoneit’smappedto. amenity=restaurant, Button1 amenity=pub, Button2 amenity=food_court, Button3 amenity=fast_food, Button4 amenity=drinking_water, Button5 amenity=bbq, Button6 amenity=biergarten, Button7 amenity=cafe, Button8 amenity=cinema, Button9 amenity=nightclub, Button* amenity=studio, Button0 amenity=theatre, Button# (a) Textdocument (b)Keybindingonphone Figure21:Tablethatshowswhichbuttonawaypointismappedto. Putthe.txtdocumentinthemobilephonesfilesystem.Inthesetupmenuyoucanchosewhich TXTdocumenttouse.ThenameoftheTXTdocumentwillappearinthemenu,select“Add (name)”andthepredefinedwaypointsfordoublepresswillchange.Waypointsarealwayssaved onthelocationwheretheGPSis.

7.13 Setup menu Inthesetupmenuyoucanconfiguresomesettingsintheprogram: • “DiscoverGPS”,ChoosewhichGPStypetousefromBluetoothGPSorserialconnected GPS.

37 • “OSMaccount”,theusercansavehis/herOSMaccountusername,passwordandweb addresstoOSMserver. • “Filepathsettings”,choosewherefileswillbestoredinthefilesystem. • “GPXsettings”,changeparametersonhowGPXfileiscreated. • “Waypointkeybindings”,changewhichusercreatedTXTfilethatareusedforadd waypointsbydoublebuttonpress. • “POIlist”,changeusercreated.txtfile,whichareusedforquickaccesstopredefined POI. • “Online/Offlinemaps”,willturnon/offtheabilitytodownloadnewmaptiles. • “Maprendertype”,thereis4differentrendertechniquestochoosefrom“Mapnik”, “Osmarender”,“CycleMap”and“NoName”. • “About”,givescredittoOSMcontributorsthathavehelpedbuildthemapandthelicense forOSMdata. • “Help”,showwhateachkeybindingsismappedto.

38 Chapter8 Implementation Themaingoalwiththedesignofthearchitecturewastomakeiteasytoextendwithnew features.Anothergoalwastomakeasmanysettingsaspossibleintheapplicationuser configurable.Firsttaskwastoarrangeaworkingenvironmentby: • SettingupaBluetoothconnectionbetweenmobilephoneandGPSreceiver. • ImplementingathreadthatfetchesinformationfromtheGPSreceiverinregularintervals. • ConstructingaparserthatinterpretthedatathattheGPSreceiverissendingandstorethat information. • Usingtheinformationaboutlatitudeandlongitudetocalculatewhichmaptileyouarein. • SettingupaninternetconnectiontotheOSMAPItodownloadthatmaptile. • CreatingaGUIthatdisplaysthemap. • Makingasetupmenuforsettingsofparametersintheprogram. • Addingfunctionalitytochangewhatisdisplayedinthescreen. Withthesefunctionswehaveaworkingenvironmentthatcanbeusedfortesting.Allthatisleft isjustaddingnewfeaturetotheprogramandyoucaninstantlytestifitisworkingasintended, thuswebeginthenextphaseoftheimplementationwhichistheworkflow.

8.1 Work flow Thephilosophyfortheworkflowwastoaddsmallupdatesintheformofanewfeature.Most addedfeatureswentthroughthefollowingsteps: • Design: Inthedesignphase,selectafeatureandplanhowitwillbeimplemented. • Implementation: Intheimplementationphase,yourealizethedesignandwritethe sourcecode. • Testing: Inthetestingphase,youchecktheimplementation.Becausetheapplicationis usingonlineinformationbyrequestingmaptilesthatarenotinthecachememoryorfile system,allthetestingwasdoneonarealdevice. Astoldinchapter4aniterativeimplementationcyclewasusedin3phases.Attheendofeachof these3phasesitwasdevotedtimeforoptimizationsandaddinguserfeedbackfunctions.

8.1.1 Optimization Whenyouimplementandtestyourprototype,youusuallydiscovershortcomingsthatneedtobe fixedintheoptimizationphase.Typicalshortcomingsincludethefollowing:encounteredbugson somedevices,butnotonothersandtheperformancearenotasgoodasexpected.

39 Typicalrealworldscenariosweretestedandtheperceivedperformancewasanalyzed.Ifyou don’tgetfrustratedontheslowspeedoftheapplicationit’sagoodindicatortheperformanceis goodenough. Forthefirstimplementationofafeaturethegoalwastomakeitworkandiftheperformancewas topooranothersolutionwastested. Oneexampleofoptimizationthatwasdonewaswiththeproblemthataftertrackingstartsthe pointsweredelayed20secondsbeforetheyweresaved.Atthispointseveralthreadswereused thatwasputtosleepwhentheyhadnothingtodo,insteadofthisasinglemainthreadwasmade thatdidthesameworkastheotherthreadsdidtogether.Withthathighleveldesignchangethe delaywasimprovedalittlemorethan1secondbutmadetheprogramcrashfrequently.The programcrashedfromsynchronizationissues.Afterfixingthatissuetheprogramstopped crashingbutthefixmadeitlittleslower.

8.1.2 User experience Nextstepwastoadduserfeedbacktothefeatures.Lettingtheusersknowabouttheprogressof anongoingtaskisagoodinvestment,becauseitincreasestheusers’patiencedramatically. Whentheapplicationwasevaluatedbyotherpersonsmostoftheircommentswastochange wordsofbuttonsortousefewerbuttonstogetsomethingdone.Thusinthisphasethegoalwas tomakethetaskscompleteinfeweruserconfirmedstepsandaddmoreautomaticbehaviorfrom theapplication.

8.1.3 Redesign of source code Afterthelastimplementationphasewasfinished,thearchitectureofthewholeapplicationwas analyzedandredonetominimizetheapplicationsize.AfterthisworktheJavaARchive(JAR) fileofthecompiledapplicationwasreducedinsizefrom209kbto126kb.Atthesametime debuggingtestingwasdonetopolishtheprogramevenmore.

8.1.4 Obfuscation WhencompilingthesourcecodetoJavaApplicationDescriptor(JAD)andJARfiles obfuscation [26]wasusedtogetbettersecurity,smallerfootprint,andimprovedruntimeperformance.After obfuscationthesizeoftheJARfilewasreducedinsizefrom126kbto76kb. Ingeneral,anobfuscatorchangesthebytecode(thecodestoredinyour.classfiles).The obfuscatorremovesthepackage,method,class,field,andvariablenamesthatisunusedand changestheremainingonestomeaninglessstringsthatareasshortaspossible.Italsoremoves anycommentsordebugginginformation.Tofurtherimprovethesecurity,obfuscatorschangethe actualcontrolflow(loops,conditionals,etc.)andactualdatastructuresarealtered. It’seasytodecompileandreverseengineeryourapplication;henceit’simportanttousemethods likeobfuscationtomakethecodethatcomesoutfromdecompilersnearlyimpossibleto understand.

8.1.5 Progress Togetafeelingthattheapplicationwasmovingforwardeachday,andnotgetstuckona problemforalongtimewhennothinggetsaddedtotheprogram,hardtoimplementfeatureswas mixedwitheasytoimplementfeatureseachday,insteadofjustfocusingononefeatureatatime.

40 Thehighflexibilityofthesoftwaredevelopmentprocessmodelused,whereyoucanaddanynew featureandtestitintheworkingenvironmentmadeitpossibletoworkonseveralthingsatthe sametimeindependentlyofeachother.

8.1.6 Debugging Thedebuggingmethodwastotesttheprograminthemobilephoneandseewhathappenedwith thenewestaddedcodebywritingwhatisdoneinthecodetoalogform.Inthelogyoucanseeif thelatestcodedoeswhatitwassupposedtodo.

8.2 Testing TheapplicationhasbeentestedtoworkonafewSonyEricssonmobilephones.Somefeatures can’tbeusedbyallmobilephones.Inthebulletlistthatfollowstherestrictionthatappliestothe bulletsbeforealsoapplytocurrentone. • K850,G502andC702nouploadover2kb. • K810noaudiorecording. • K800needstobesignedtoworkwithoutmessagesthatpopupsrepeatedly. Theprogramwastestedononemobilephone6267.Nokia6267needstobesignedand givenpermissiontoaccessnecessaryresourcestowork.Noaudiorecordingissupportedbutyou canuploadafilethatisaslargeasthememoryheapallows.UploadingaGPXfilewith2000 pointstookabout2minutes. DependingonwhichphonebrandthatisusedreadinginformationfromaGPXfilewith700 pointstakes3secondsonSonyEricssonG502and40secondsonNokia6267. Theprogramhasbeentestedwith2differentBluetoothGPS(Wayfinderand Holux M-1000 ) andSonyEricssonHGE100forserialconnectedGPS,alltestedGPS’sareworking.

8.3 Permissions Theapplicationisrequiredtohavepermissionsto“Readuserdata”,“Writeuserdata”,“Internet access”and“Localconnectivity”.“Multimedia”isoptionalandusedtogivepermissiontorecord audio.Ifyourmobilephonedoesnothaveanyoptiontosetthesepermissionsto“Askonce”or preferably“Neverask”theapplicationwillnotbefuntousebecauseitwillaskyoufor permissiontodothesetasksregularlyandoften.Thesesettingsaresetonyourmobilephone.If youcansetthepermissionsto“Askonce”theprogramwillaskifit’sallowedtoaccessthem oncewhenstartingtheapplication.With“Neverask”permissiontheprogramwillneverask.

8.4 Beta testing Uptothispointalmostalltestinghasbeendonebytheauthorandsomelimitedtestingbyafew employeesatEricssonResearch.Nowtheapplicationwasatastagethatwasreadytobetested byaselectedfewpeoplethatarethetargetgroupforthisapplication.Thebetatesterswereused to,testthestabilityoftheprogram,andgivefeedbackofwhatthingsthataregood/badinthe application,discussideasonhowtoimprovetheprogramandgetanunderstandingonhowthey usetheapplication.Thisfeedbackwasusedtomakesomelastadjustmentstothecrowdsourcing clientapplication.

41 Chapter9 Future work Arequirementforwidespreadusageofthisapplicationistomakeitworkwithmoremobile phonemodelsandbrands.ItshouldalsohavesupportforinternalGPS.Existingfeaturescanbe improveduponinseveralareasandthereareanumberofnewfeatureswhichwouldbeofbenefit tothegeneralusabilityoftheapplication.Someideasandsuggestionsarementionedbelow.

9.1 Audio mapping with bike Supportforaccessories likeSonyEricssonHGE100,whichhasaGPS,somebuttonsanda microphone.TheGPScanbeusedinsteadofaBluetoothGPSandthebuttonscanbeusedfor easyaccesstousefulcommandoslikestarttracking,savetrackandrecordaudio.Theabilityto recordaudiointhismannergivesanincrediblepowerfultoolwhiletrekkingwithabike.Then youcanjustputyourmobilephoneinyourpocket.Lockthebuttonsonthephonetopreventthat theyareaccidentallypushedandusethebuttonsontheHGE100torecordaudiothroughits microphone.Ifyouconnectearphonesyoucouldhavedifferenttypesofsoundnotifications whileyoupushabuttontokeeptrackonwhathappense.g.startrecordaudioandstoprecord audio.

9.2 Overlay map Oftheplannedfeaturesthatarepresentedinchapter6thatdidnotgetincludedinthefinal versioninthisthesiswork,nexttoimplementshouldbeoverlaymapsection6.8.Withthe overlaymapit’seasiertofindplaceswhereOSMhasnotbeenmappedalready.

9.3 Map Implementingafeaturethatchecksifthestoredmaptilesareold,anddownloadnewmaptilesif theyareobsolete,wouldbeagoodaddition.Becausecheckingfornewmaptilesisatime consumingtask.Oneapproachtofixthisistodoanupdatefeaturewhereyoupressabuttonto startlookingifthemaptilesthatarestoredinthefilesystemneedtobedownloadedagaintobe uptodate.Theadvantageindoingthisbeforeyougooutandmappingisthatyouwillgeta betterresponsivemap.Whenyoudothisthemapwillworkasanofflinemapfortheplacesyou havebeentobeforeandthenewplaceswillworkasanonlinemap.ForthedefaultMapnik renderstylemap,everymaptilehasastatusfieldthatcanbecheckedtoseewhenitwaslast rendered.Toseethisinformationjustadd“/status”totheURLaddressforthemaptile.

9.4 Pre download maps on PC Makeanapplicationthatdownloadsmaptilesonyourpcthatcanbetransferredtothefilesystem onthemobilephone.Thisisusefulforthepeoplethatdonothave“flatrate”subscriptionfor dataandneedstopayforalldownloadeddata.Theseusersusetheofflinemapsfeaturewhen absolutelylatestmapsarenotneededandknowwhichareahe/shewillvisitinadvance.

9.5 Change GUI to LWUIT TheLightweightUIToolkit[27](LWUIT)uselittle,ifanydevicespecificcodewhichmakesit moreportablebetweenmobilephonesmodelsandbrandsthanstandardlibraryLCDUIcanoffer. TherealstrengthandpowerofLWUITcomesinhowmuchmorecontrolyouhaveoflayoutand

42 displaycharacteristics(color,font,andsoon).Ifthereisamissingfeatureorcomponent,youcan createyourownandplugitinyourcode. AllLWUITcomponentssupporttouchevents.No specialcodingneededforaLWUITapplicationtorunonatouchenableddevice.

9.6 Optimization Youcouldoptimizetheperformancebyclosingoperationswhentheyarenotneeded.For examplewhenyouuploadyourGPXtracktoyourOSMaccountyoucouldstoplisteningfor messagessentbytheGPSreceiver.

9.7 Preprocessing Inthepreprocessingphase,thesourcecodeischangedbeforeitiscompiled.Youcanutilizea wholearmadaofpreprocessingdirectivesforcustomizingyourapplicationtodifferent environments.Eachdevicedefinescapabilitiesandsymbolsthatyoucanuseinthepreprocessing step.Withpreprocessingyoucanadaptyourapplicationtodifferenthandsetswithoutcreating incompatibilities.Thisisneededbecauseofthefragmentationinthemobilephonemarketwhere everydevicecanuseadifferentAPI.Ifyoudon’tusethedevice’sownAPIyouwillnotget optimalperformanceorworse.“Somedevicesdonotacceptanyapplicationsthatreferto unknownclasses,evenwhenthoseclassesareloadedonlyviaJava'sreflectionmechanism[28]”.

9.8 Split up the GUI in layers SplituptheGUIinseverallayerstoavoidthateverythingneedstoberepaintedwhenthemap needstobeupdated.Onelayerwiththemaptiles,anotherlayerwithinfoaboutsignalstrength etc.andalayerforGPStrackpoints.Withtheselayersyoucouldoptimizetheapplicationalot. ForexamplewhenyoupanthemapyoucouldalsopanthelayerthatisholdingtheGPStrack pointsinsteadofrewritingthepoints,whichcanbequitemanyafter1hoursoftracking.Then youwouldonlyneedtorepaintthetrackpointsforzoomoperations,whicharealotlessused, comparedtothepanoperation.Whenyouhavetheinfoinalayeronitsown,thatlayercouldbe updatedeverysecondwhennewinformationisfetchedfromtheGPSreceiver,insteadofevery 10secondasitisnowwithoutanyeffectontheperformance.Thisfeatureshouldhavehigh prioritytoimplementifthisworkiscontinued.

43 Chapter10 Discussion and Conclusions Manymapstodaycollectnewmapdataoveratimeperiodandinregularintervalsupdatethe maps.InabrainstormmeetingitwasdecidedtonotusetheMobileMapsAPIandinsteadusea directlinktotheOSMdatabasetoguaranteethatthemapsyoudownloadarethelatestrendered maps.Forthisapplicationit’sveryimportantthatyouhavethelatestmapavailabletominimize conflictswhenuploadingyoureditworkwithotherpeople’sworkthatisdoneinthesamearea. Forexampleifyougooutandmapinaplaceyouthinkareunmappedandtriestouploadyour editworkaproblemwillappear.Ifyourmapis2daysoldandanotherpersonalreadyhave mappedthatplace,thenyouneedtospendtimetodounnecessaryworktofixtheconflictsthat couldhavebeenusedtoaddnewfeaturestothemapinsteadifyouwouldhavehadthelatestmap fromthebeginning.Anotheradvantageisthatyourworkcanbeseenfasterwhenyouwork directlywiththeOSMdatabase,usuallythemapsarerenderedwithnewchangeswithinanhour.

10.1 Map Touseanonlinemapposesachallengewithloadingtimestofetchthemaptilesthatbuildsup themapincontrasttoanofflinemapwherethemapispredownloadedbeforeit’sused.Toavoid thattheapplicationdownloadsnewmaptilesforeveryrequestmapcall,eachusedmaptileisput intothecachememory.Thereisanoptiontousethemapasamixofbothonlineandoffline map,wherethemaptilesarestoredinthefilesystemwhentheyaredownloaded.Thiswillmake themapworkasanonlinemapthefirsttimeyouvisitaplaceandthefollowingtimesasan offlinemapbecausethenthemaptileswillbefetchedfromthefilesysteminsteadofdownloaded fromtheOSMdatabase. Theadvantageofanonlinemapisthatthemapisalwaysuptodate,whichwillavoidconflicts withdoubleworkofthesamearea.Theadvantageofanofflinemapisthattheresponsivenessof themapismuchfastertozoomandpanoperations.Thebestofbothworldswouldbetoonly downloadmaptileswhentheyareupdated,butthatintroduceadditionalcomputationstocheckif anewmaptileexistintheOSMdatabaseandthegainofthisapproachneedstobemeasuredto beabletodeclareifitisanyfasterthananonlinemapintheaveragecase. Inthisthesisworkonlytheperceivedloadingtimesforzoomandpanoperationsofthemaphas beenanalyzedandtheconclusionfromthetesting’sarethatthespeedisgoodwhenfetchingmap tilesfromthecachememoryorthefilesystem,butslowwhendownloadingfromtheOSM database.Thespeedisgoodenoughtodownloadmaptilesforthemaintaskswiththeapplication whichistouseitasatoolforcrowdsourcingtoseethepathyoutravelandchecknearbymap tilesofwheretogo.Butifyouwanttozoomandpanaroundinthemapalot,it’stooslow.An ideatoimprovethemapispresentedinsection9.3and9.8.

10.2 Mapping techniques Ofthemappingtechniquesmentionedinchapter5,“audiomapping”isoneofthemostpowerful featurestohaveinamobilephonecrowdsourcingclient.Withamobilephoneyouwanttotype intextaslittleaspossiblebecauseit’satimeconsumingtaskandtobuildagoodmapyouneeda lotoffieldinformation,henceuse“audiomapping”.

44 Oftheproblemsthatexistwith“audiomapping”almostnoneisarealproblemwhenusinga mobilephone.Synchronizing,linkingwaypointstocorrespondingaudiofileandtoputthe waypointintotheGPXfilearedoneautomatically.Interpretingtheaudioclipscanbeovercome bybeingcarefulandawareoftheproblemwhilerecordingsoundclips.Therealproblemlaysin thataudioclipstakealotofspaceinthememorywhichisalimitedfactorinamobilephone, especiallywhenrecordingisdoneinWAVencodingtomaketheaudioclipsworkwithJOSM editordirectly. Insection9.1anideaispresentedonhowtomakethe“audiomapping”featureworkwellina mobilephonesolutionwhilemappingwithabike. TomakeWaypointsisalsoveryusefulifyouonlyhavetopressabuttonor2togetonebecause typinginafulllengthwaypointname/descriptiontakestolongtime.Toachievethisgoalofa fastwaytomakespecificwaypoints,thisapplicationsupporttheusertodotheirownpredefined waypointlistofupto12waypointsperlistandthelistcanbechangeinruntimewhiletracking between3predefinedwaypointlists.Toaddawaypointyoudoublepressakeyfastwiththeright listactivated.

10.3 Sending larger sized information to OSM TheproblemthattookmosttimetosolvewasoneofthemainfeaturesthatEricssonResearch wantedmetodo,uploadingGPXtracksfromphonetoOSMaccount,discussedindetailin section6.2.Whenyouuseanexternalserverthatyouhavenoaccesstostudywhatreallyissent bytheclient.Itishardtoknowiftheerrorwasontheapplication’spartortheOSMserver. ManydifferentparameterswhensendingHTTPPOSTmessagestotheserverwastestedand noneaffectedtheproblemthattheserverrefusedtohandleuploadlargerthan2kbcorrectly. Thenaproxyserverwassetuptoseeexactlywhattheapplicationonthemobilephonewas sendinganddiscoveredthattheclientwassendingindifferentwaysforuploadslargerthan2kb. Whensendinguploadssmallerthan2kbthelengthparameterintheheaderfortheHTTPPOST messageisusedbytheservertoseehowmanybytesthattheservershouldexpecttoget.While sendinguploadslargerthan2kbthemobilephonedidthe transferencoding inchunkedmode.In chunkedmodethephoneignoresthelengthparameterintheheaderandinsteadsendsamessage thattellshowmanybytesthatwillbesentandthereaftersendstherealdata,inchunkedmodethe clientreliesthattheserverisfollowingtheHTTP1.1specificationsandcanassemblethis.OSM servercan’tdothis;hencetheproblemtosendfilesover2kb.ThenaNokiaphonewastestedto seeifithasthesameproblemwhichitdidn’t.TheNokiaphonecouldsenddatalargerthan2kb fineuntiltheuploadwaslargerthanthememorycouldhandle. Nowtherootoftheproblemwasnarroweddowntonotbeingcausedbytheapplicationandthe OSMservercouldhandleuploadsthatwasnotusingtransferencoding inchunkedmode.Later on,anannouncementmadebySonyEricssondeveloperswasputintheirforumthatthenextjava platformJP8.5willusetheHTTPPOSTheadertospecifylengthofmessageregardlessofthe sizeoftheupload.AfterthatitwasdecidedwithmysupervisorStaffanELarssontofocuson otherfeatureswhenthecauseoftheproblemwasfoundinsteadoffindingaworkaroundtothis problem.

45 10.4 Difference between java platforms TomakeagoodlookingGUIforaJavaMEapplicationthatlooksthesameforeverymobile phonemodelandbrandisnotaneasytask.Thisalsoappliestoseveralotherareaswhereeach mobilephonedevicecanhavetheirowndevicespecificarchitecturethatsolvestheproblemina differentway,thusmakingcrosshandsetfriendlycodehardwork. ThebuiltinUIcomponentsinJavaMELimitedConnectedDeviceUserInterface (LCDUI)are generallyhideous;youhaveverylittlecontrolovertheirappearance.Whatlooksprettyonone handsetlookedawfulandoutofplaceonanother.Forexampleprioritizingcomponentsinwhich ordertheywillbeputonthescreenbygivingavalueforeachcomponentseemedfineintheory, butsomephonesbuildupthecomponentsfromleftsidetotherightsideandotherphonesfrom theoppositedirection,henceputtingachoicetoexittheapplicationbypressingyesornothathas yesonleftsidewasnotalwayspossible.It'sverydifficulttowritecrosshandsetfriendlycode usingLCDUIandit’srecommendtouseanothersolution. Aftersearchingforotheroptions“J2MEPolish[29]”wasfound.J2MEPolishisreallyuseful whendevelopingJ2MEApplicationsspeciallyagenericone.J2MEPolishisaframework,for buildingyourapplicationforvariousdevices.J2MEPolishisdistributedundertheGNUGeneral PublicLicenseaswellascommerciallicenses.YoucanusetheGPLlicenseforprojectswhich arelicensedundertheGNUGeneralPublicLicensewithoutlimitations. AnotheroptiontouseforGUIisTheLightweightUIToolkit[27](LWUIT).LWUITisaUI librarythatisbundledtogetherwithapplicationsandhelpscontentdevelopersincreating compellingandconsistentJavaMEapplications.LWUITsupportsvisualcomponentsandother UIgoodiessuchaslayoutmanagement,transitions,animationandmore.Thecurrentversionof thelibraryworksontopofCLDC1.1/MIDP2.0andConnectedDeviceConfiguration(CDC) platforms.LWUIThelpstoeliminateamajorsourceofdevicefragmentationissuesthatoccurat thegraphicaluserinterfacelevel.TheLWUITJARisabout225KB,whilenotinsignificant,the powerLWUITpacksmakesitwellworththespaceallocationanditworkssimilarto Swing/AWTthatisavailablefordesktopapplications. Itisreasonablylicensed.TheGPL+CLE(classpathlinkingexception)makesitavailableto closedsourceprojects.LWUITcomeswithaprettygoodsetofdocumentation.TheJavadocAPI documentationisnotthick(manymethodscontainasinglelineofdocumentation),butitis complete.Formoredetails,takealookattheDeveloper'sGuide,whichisdistributedwiththe downloadZIPfileandprovidemoreexplanationaboutLWUITfeaturesandoftenprovides examplecodeforhowtouseLWUITclasses.

10.5 GPS AcoupleofthingsabouttheGPSunits: • Theyvaryinaccuracybybrandandmodel.Unitsthatare10yearsoldormorehaveless accuracy. • Themoresatellitestheunitisreceiving,themoreaccuratethepointsget. • TreesandbuildingsoranymetalabovetheGPScanblocksignals.

46 • Withstateoftheartreceivers(sirfstarIIIorsimilar)theprecisionofyourtrackpointscan reachfrom3meters(freesighttothesky)to10meters(denseforest)oreven30meters andmore(innercitywithhighbuildingsaround). It’sgoodtomakeafewtracesalongthepath,preferablyatdifferenttimesofthedayand/or differentdays.Thiswillgiveyoureadingsfromdifferentsatellitesfromdifferentangles,and thenaverageyourtraces.Ifyoubringuppreviouslyloadedtracesfromothers,youwillseequite oftenthetracesarewobblybutifthereareenoughtraces,youcanseeafairlyaccuratelinefrom theaverageofallthetraces. SometipsonhowtoimprovethetrackqualitiesistoholdtheGPSinfrontofyourselfratherthan havingitinapocket.It’sgoodtogivethedeviceafewminuteswhilststandingstationarywith freesighttothesky,togetagoodlockfromthesatellitesbeforeyoustarttracking.When trackingastreet,walkdownonesideofastreetandbackuptheotherside.Ifthere’saglitchin theGPSit’susuallyobvioustospotthemifyouwalkedthesamestreettwiceandtowaypoint certainobjectsseveraltimestogetanideaofaccuracy/drift.

10.6 What happens next Whathappenswiththeapplicationafterthisthesis´workisfinishedisthatitwillbereleasedas anopensourceproject;aninvestigationhasbeenstartedtoseeifthisispossible.Thegoalisthat theapplicationwillcontinuetobedevelopedbyeveryonethatgetsinterestedintheproject, hencewhythisthesishavehadafocusonmakingiteasytoextendwithnewfeatures.

10.7 Conclusions ThisstudyhasexploredhowtheOSMmapsarebuiltup.Anumberofpossiblemapping techniqueshasbeenidentifiedandanalyzed.Thisthesisworkdocumentsthefirstphaseof developingacrowdsourcingclientapplication.Currentlytheapplicationisworkingonalimited numberofcombinationsofmobilephonesandGPSdevices.Theambition,withinthescopeof thethesis,wastoaddasmanyfeaturesasthetimeallowedwithfunctionalitygoodenoughto properlyhandleitstaskwithoutgettingbaduserexperience. ThefinalversionoftheapplicationinthisthesisworkcanbefoundinEricssonLabshomepage attheapplicationsectioncalledMobileOSMCreator(https://labs.ericsson.com/applications ). Withthefastgrowingofservices/applicationsthatarelocationbased,moreandmorepeople understandtheneedsformapsthatareeasytoupdate,freeoftechnicalrestrictionsandcostfree touse.Theideatomakethemapsopensourceisaninterestingapproach.Everyonebenefitsfrom havinglargeandaccuratemaps,henceletthecommunityupdateit.Formanypeople,mapping canbehighlyaddictive.

47 References [1]2009:TheYearofLBS(LocationBasedServices),2009[Online],Available: http://www.readwriteweb.com/archives/2009_the_year_of_lbs_locationbased_services.php Last accessed8December2009. [2]OpenStreetMapwikiwebsite,2009[Online],Available: http://wiki.openstreetmap.org/wiki/Main_Page Lastaccessed7October2009. [3]CopyrightEasterEggs,2009[Online],Available: http://wiki.openstreetmap.org/wiki/Copyright_Easter_Eggs Lastaccessed20October2009. [4]IGN.seTeleAtlas:Framtidensgpskartauppdaterashelatiden,20071203[Online], Available: http://m3.idg.se/2.1022/1.133998 Lastaccessed2October2009. [5]OpenStreetBugs,2009[Online],Available: http://openstreetbugs.schokokeks.org/ Last accessed7October2009. [6]Mapfeatures,2009[Online],Available: http://wiki.openstreetmap.org/wiki/Map_features Lastaccessed7October2009. [7]Yahoo!AerialImagery,2009[Online],Available: http://wiki.openstreetmap.org/wiki/Yahoo%21_Aerial_Imagery Lastaccessed7December2009. [8]MappingWeekendHowto,2009[Online],Available: http://wiki.openstreetmap.org/wiki/Mapping_Weekend_Howto Lastaccessed7October2009. [9]OSM_Components,2009[Online],Available: http://wiki.openstreetmap.org/wiki/Image:OSM_Components.png Lastaccessed2December 2009. [10]Componentoverview,2009[Online],Available: http://wiki.openstreetmap.org/wiki/Component_overview Lastaccessed7October2009. [11]Stats,2009[Online],Available: http://wiki.openstreetmap.org/wiki/Statistics Lastaccessed 23November2009.

48 [12]TheOpenSourceDefinition,2009[Online],Available: http://www.opensource.org/docs/osd Lastaccessed7October2009. [13]OpenSourceLicenses,2009[Online],Available: http://www.opensource.org/licenses Last accessed3December2009. [14]CreativeCommons, 2009[Online],Available: http://en.wikipedia.org/wiki/Creative_Commons Lastaccessed10November2009. [15]OpenData, 2009[Online],Available:http://en.wikipedia.org/wiki/Open_Data_Commons Lastaccessed10November2009. [16]GNUGeneralPublicLicense, 2009[Online],Available: http://www.gnu.org/copyleft/gpl.html Lastaccessed [17]Iterativeandincrementaldevelopment,2009[Online],Available: http://en.wikipedia.org/wiki/Iterative_and_incremental_development Lastaccessed18 November. [18]EditingStandardsandConventions,2009[Online],Available: http://wiki.openstreetmap.org/wiki/Editing_Standards_and_Conventions Lastaccessed21 October2009. [19]Tagging,2009[Online],Available:http://wiki.openstreetmap.org/wiki/Tagging Last accessed7October2009. [20]Proposedfeatures,2009[Online],Available: http://wiki.openstreetmap.org/wiki/Proposed_features Lastaccessed21October2009. [21]OpenStreetMap,2009[Online],Available:http://www.openstreetmap.org/ Lastaccessed7 October2009. [22]Plugins,2009[Online],Available: http://josm.openstreetmap.de/wiki/Plugins Lastaccessed 7October2009.

49 [23]Tiles@home,2009[Online],Available:http://wiki.openstreetmap.org/wiki/Tiles@home Lastaccessed7October2009. [24]informationfreeway.org,2009[Online],Available:http://www.informationfreeway.org/ Last accessed7October2009. [25]Dilutionofprecision(GPS),2009[Online],Available: http://en.wikipedia.org/wiki/HDOP Lastaccessed7December2009. [26]UseObfuscationtoImprovetheSize,Performance,andSecurityofYourJ2ME ApplicationsAugust17,2005[Online],Available: http://www.devx.com/wireless/Article/28989/0/page/1Lastaccessed12November2009. [27]JavaMETechnology–LWUIT,2009[Online],Available: http://java.sun.com/javame/technology/lwuit/ Lastaccessed4November2009. [28]RobertVirkus,ProJ2MEPolishOpenSourceWirelessJavaTollsSuite,2005,p.101. [29]J2MEPolish,2009[Online],Available: http://www.j2mepolish.org/cms/topsection/home.html Lastaccessed21October2009. [30]ImportantHTTPPOSTrelatedchangeinJP8.5,2009[Online],Available: http://developer.sonyericsson.com/community/docs/DOC3217 Lastaccessed4December2009.

50

Appendix A)Userguide Startup • Beforethefirsttimeyouusetheapplicationsetthepermissionsto“Readuserdata”, “Writeuserdata”,“Internetaccess”,“Localconnectivity”and“Multimedia”onthe applicationinyourmobilephoneto“Askonce”orpreferably“Neverask”. • TurnontheGPSbeforestartingtheapplication.Keepinmindthatitcantakeawhilefor theGPStogetcontactwiththesatellitesbeforeyoucangetaposition. • ThefirsttimetheapplicationisuseditwillsearchnearbyBluetoothdevicestosetup connectionwithifyouselect“BluetoothGPS”,therestofthetimestheapplicationis used,itwillusethelastselectedBluetoothGPSatstartup.Thesameprocedureappliesif youchoose“Serial”forGPSconnectedwithcable. o IfyouwanttochangetheGPSdevice,itcanbedoneintheSetupmenuorwhen youstarttheapplicationthenexttimeselect“NewGPS”atstartupscreen. • Thestartupscreenletsyouchoosefrom3differentmodes(Car,Bicycle,Walk),thathave theirownsettingsforhowoftenGPSpointswillberecorded.Thesesettingscanbe changedinthe“Setupmenu–GPXsettings”. • Topreventbadpointsinthestartofyourtrackstandstillwithafreesighttotheskyuntil youhaveagoodfixfromthesatellites.Agoodideaistowaitanotherminuteorsofor everythingtosettledown. o Inthebottomrightcornerthereisavaluecalledhorizontal dilutionofprecision (HDOP)thattellshowgoodfixyouhave1.0HDOPisidealfix.Itis recommendedtohavebelow5.0inHDOPtohaveconfidenceyourposition detectionisenoughaccurate. • BeforeyoucanUploadGPXfiles,POIandwaystotheOSMdatabaseyouhavetoset yourOSMaccountdetailsinthesetupmenu. • Ifyoudon’twanttodownloadanythingfromtheinternetandhaveanofflinemapselect “Offlinemap”inthestartupscreen,thiscanalsobedoneinthe“Setupmenu”.Onlymap tilesthatarestoredinthefilesystemwillbeusedandwhennomaptileistherea completelyblankmaptilewillbedisplayedinstead. • IfyouwanttostarttheapplicationwithoutstartingtheGPSselect“WithoutGPS”at startupscreen.

51 Tracking • Whiletracking,thereddotsmarkyourtravelpath,thebluedotsaresavedwaypointsand greendotsaresavedaudioclips. • Savingwaypointscanbemadein3differentways: o Firstistouse”savewaypoint”eitherinthemenuorholddownthe”5”buttonfor asecond.Yougetatextboxwhereyouenteryournote.Thelast9waypoints addedisremembered,thesecanbeusedbytypinginanumber19inthetextbox. ThelocationofthewaypointisfetchedfromthepositiontheGPSisgiving. o Secondisthesameasfirstchoicebutthelocationofthewaypointisfetchedfrom thepositionofthecrossthatisinthemiddleofthescreen.Usethe“#”buttonto addawaypointwiththismethod. o ThirdistomakeaTXTfilewhereyoucanmakeupto12predefinednotes,where everynoteendswith”,”.In“setup”youcanloadthislist.ThenameoftheTXT filewillnowbeanoptioninthemenu.Whenselectingit,thekeyswillbemapped tothe12predefinednotes.Thefirstoneismappedtobutton1andsecondto button2etc.Tocreateawaypointyoudoublepressabutton.Forexampledouble pressonbutton“2”toaddawaypoint“lanes=2”.Twopredefinedwaypointlist alreadyexistintheapplicationthatcanbeusedwhichare“AddSpeedLimit”and “HighwayNote”.InyourmobilephonethereisanexampleTXTfilethatshows howtomakeyourownpredefinedwaypointlist,thatcanbefoundin “e:/Videos/Keybindings/”or“c:/Videos/Keybindings/”.ThisTXTfilewillbe createdafteracceptingthetermsofuse.Remembertoendeachwaypointnote with“,”asshownintheexampleTXTfiletomakeyourlistwork. • TosavetheGPXtracklogs,select”savetrack”orpressbutton”*”. • Torecordaudioyouselect"RecordAudio”inmenuorpressthe”9”key.Tostopthe audioclipselect"StopRecordAudio”inmenuor”9”.Awaypointwillbeaddedwhere thisaudioclipwasrecorded. Pointofinterest(POI) • AddPOIbyselecting“AddPOI”inmenuorpressthe”0”key.Youwillgetapresetlist ofcommonPOIthatissupportedwithiconsbyOSM.AfterchoosingaPOIyoucanadd moretagsforthenode,likeaddinganametothePOIbyaddingatagwithkey”name” andvalue”Ericsson”.Rememberthatalltagsneedtobeinlowercase,exceptthe“name” tag.Whenalltagsareset,youuploadthePOIbyselecting"UploadtoOSM”.Ifno changesetiscreatedyouwillgetaformtomakeone. Edit • CopytheGPXfiletothePCandtheaudiofoldertothesamefolderwheretheGPXtrack isplaced. • StartJavaOpenStreetMapEditor(JOSM),downloadthemapovertheareayouhave trackedfromOSMserverandimporttheGPXfiletostarteditthemap.Ifyouhave recordedsomeaudioclipstheywillnowappearsasamarkerinJOSMthatyoucanclick toplayupthesoundyouhaverecorded.

52 Tip • It’srecommendedtoalwaysuploadyourGPXfiletoyouraccountsootherscansee whereyoursourcecomesfrom. • Ifyouareusingthemappingtechnique“twowaymapping”thatisdescribedinsection 5.2,atipistochangetherenderstylein“Setup–Maprendertype”toNoName.Nowyou willgetamapthathighlightsroadsthathavenonametag,whichgivesyouahintof whereadditionalinformationshouldbecollected. • AtiponhowtoimprovethetrackqualitiesistoholdtheGPSinfrontofyourselfrather thanhavingitinapocket.It’sgoodtogivethedeviceafewminuteswhilststanding stationarywithfreesighttothesky,togetagoodlockfromthesatellitesbeforeyoustart tracking.Whentrackingastreet,walkdownonesideofastreetandbackuptheother side.Ifthere’saglitchintheGPSit’susuallyobvioustospotthemifyouwalkedthe samestreettwiceandtowaypointcertainobjectsseveraltimestogetanideaof accuracy/drift.

53 B)GPX1.0schema

ACTIVE LOG 115.976196 Figure22:SampleGPXfileusingGPX1.1schemawithonepoint.

54 GPX1.1schema

GPS Receiver track log Tallinn (car) Michael Collinson AYE Ltd. Estonia, Tallinn, A. Weizbergi Logged by Michael Collinson using EMTAC BTGPS Trine II AYE Ltd. 44 3d 300300300

Figure23:SampleGPXfileusingGPX1.1schemawithonepoint.

55 C)Problemsendinglargerfiles ImportantHTTPPOSTrelatedchangeinJP8.5at http://developer.sonyericsson.com/community/docs/DOC3217 [30]page. “OnourplatformspriortoJP8.5withHTTPPOSTweusedchunkstosendfileslargerthan2kb toservers.Sincethereareserversthatdonothavesupportforthis,althoughitisarequired HTTP/1.1feature,wemadechangesinJP8.5”. “InnewimplementationyoujusthavetosetcorrectContentLengthheaderandHTTPPOSTwill workwithallservers”. “HttpConnection#setRequestProperty("Content-Length", sizeOfRequestDataInBytes) .Thisguaranteesthatthetransferencodingwillbenonchunked”.

56 D) ReprojectthecoordinatestotheMercatorprojection:

x= longitude

y=log(tan( latitude )+sec( latitude )) (Latitude and longitude areinradians) Transformrangeof xand yto01andshiftorigintotopleftcorner:

x=(1+( x/π))/2

y=(1( y/π))/2 Calculatethenumberoftilesacrossthemap, n,using2 zoom where“zoom”isthezoomlevel. Multiply xand yby n.Roundresultsdowntogive tilex and tiley .

57