Google Summer of Code/2013/OpenSurveyor

From OpenStreetMap Wiki
Jump to: navigation, search

OpenSurveyor is a Google Summer of Code 2013 project aimed at creating a mobile (smartphone/tablet) data collection application suited for OSM purposes.

Application icon draft

Major features

  • Walking papers on the phone/tablet - a walking papers atlas without any need to print and scan anything. Just draw all you want on screen (stylus should be especially useful, but finger should work too), and it will then be transferred into JOSM.
  • All kinds of map markers - text, voice, photos, some predefined osm types.
  • Ability to work without GPS and Internet connection. If you have a Garmin or other device that can record tracks for days - let it do its job and save yourself some hours of battery life on the phone. The markers will be time-based and you could map them later on PC according to timings.
  • Subsecond presicion of timestamps. Standard GPX timestamp is 1 sec which is not enough sometimes (will be useful when driving a car)

GSoC Project & team information

Student: Pavel Melnikov

Mentor: Ilya Zverev

GSoC proposal link: https://google-melange.appspot.com/gsoc/proposal/review/google/gsoc2013/positron96/1

Github project development page: https://github.com/positron96/opensurveyor

Github project documentation wiki: https://github.com/positron96/opensurveyor/wiki

Working plan

  • Second half of June - July: Define project architecture and network upload format. (1 week) Create a proof of concept application with basic features included (pre-defined notes, text notes and data upload) and a rudimentary GUI (2 weeks). A lot of testing in the field related to precision of timestamps (1 week parallel with coding).
  • July: Implement other notes features (audio notes, speech recognition, photo notes, expand network implementation or new types of notes) (1 week) and fine GUI (1 week). Continuous testing of everything in the field (whole month).
  • August: Add support for track recording, and uploading to server (1 week). Add a map interface with ability to download tiles from OSM site (and store them locally for offline usage) (2 weeks), draw anything on a map (1 week), store it as vector data and upload using the specified protocol (1 week). Continuous testing in the field (month).
  • September. Polish GUI, add stuff like settings window, export tracks in GPX with POIs. Test everything, fix bugs.

Timeline and reports

Week 1

  • We figured what features will be implemented and what are most important.
  • Desided what the Look and feel should be and how to combine two major features (quick tagging in moving car and freeform drawing on the map) in a single application.
  • Data exchange format (xml scheme to store notes and POIs)
  • Getting familiar with new Android ActionBar and Fragments API on old devices and other 3.0 apis.

Week 2

  • A basic app that creates poi and saves them in xml file is created.
  • Continued work on the gui, specifically the part with buttons that create pois. It now has a custom flow layout that automatically aligns dynamically created buttons.
  • Started work on incorporating GPS functionality into main menu.

Week 3

Button UI Screensot. Toggle button used for bridge
Button UI Screensot for tablet.
  • Class hierarchy for POIs and markers is defined and coded.
  • Application layout now works on every screen size, and on landscape tablets it has a more suitable layout. Button size is correctly calculated at run-time.
  • Buttons are dynamically created from presets. Presets are hard-coded at the moment. Buttons can be toggle-buttons (e.g. for bridge start and bridge end). Support for POI properties is included, rigth now only linear=start and linear=end properties are generated. Icon support for buttons is included, but not suited for every screen size.
  • The app should work on Android 2.1 and upwards.
  • Data exchange format published here: https://github.com/positron96/opensurveyor/wiki/Data-exchange-format. Survey XML could be used for other applications with similar purpose.

Basically, the app can already be used to collect some data in the field.

Week 4

Property window
  • Button presets are loaded from XML, format published here: https://github.com/positron96/opensurveyor/wiki/Preset-XML-format, and POI buttons are created from these presets.
  • Tweaked class structure to differentiate between POIs, Notes and, in future, Audio notes and Photo notes.
  • Implemented property window for POI property editing. It expires automatically if not interacted with in 5 secs.
  • Supported property types: text (produces a EditText in property edit window), boolean (produces a CheckBox), choice (produces Spinner with choices)

All of it works correctly, properties are saved into session and exported into xml.

Generated code sample (in Russian)

<?xml version="1.0" encoding="utf-8" ?>
<survey start="2013-07-13T17:15:28.436+0000" end="2013-07-13T17:16:17.339+0000">
  	<point time="2013-07-13T17:15:35.172+0000" >
		<poi type="shop_convenience"/>
		<text generated="yes">Магазин</text>
		<property k="title" v="h" />
	</point>
  	<point time="2013-07-13T17:15:42.122+0000" >
		<poi type="city_limit"/>
		<text generated="yes">Населенный пункт</text>
		<property k="colour:back" v="blue" />
	</point>
</survey>

Week 5

  • Polished GPS functionality (bugfix with float number format in xml; correct handling of app pause/restore; UI has good-looking gps icons)
  • Button presets are loaded automatically from assets folder. Different presets are supported and can be switched on-the-fly from app menu. Added prototype of pedestrian preset.
  • Added Number type for properties (triggers soft numpad keyboard for EditText). Sequence typed from xml is mapped to Number type in app for mow.
  • Polished UI, again (actionbar looks good in every possible variant)
  • Bugfixes (Session object is now serializable correctly, so app is not crashing when paused)

Week 6

  • Voice recording POI
  • Share option to upload sessions somewhere
  • External files are supported, as well as generation of archives.
  • POI Buttons can be used for direction specification
  • Soft keyboard is shown automatically for TextMarker buttons
  • Toggle buttons can be triggered without generating POIs
  • UI polish
  • Preset files are also loaded from SD card
  • More app state is saved between app launches

Changelog and binary build can also be found on github releases, https://github.com/positron96/opensurveyor/releases/tag/soc-week6