Visual Tag Chooser Humanitarian OpenStreetMap Team Tech Challenge Tim Waters 2013 tim@geothings.net About Visual Tag Chooser The Visual Tag Chooser is an application designed to select and edit tags and to make JOSM (Java OpenStreetMap Editor) preset files for the HOT Exports Tool. The HOT Export tool requires a list of tags to be specified when downloading an extract. This list is generated by a user uploading a JOSM Preset XML file. The preset file is a structured format with groups of tags, translations of tags, defaults etc. Creating and editing a preset is essential for the HOT Exports application. That process is not easy at all for users and involves text editing a raw XML file. Solution An application that will create and edit a JOSM preset visually using a more user friendly interface. Limitations It misses out the more complex JOSM preset XML features such as auto increment, expressions, matches, display values and roles. User Guide & more information See docs in docs directory Internationalisation Strings in i18n/code.yml (e.g i18n/en.yml) Partials can be localized - for example home.en.erb Ensure you use the localized_erb method instead of the usual erb method Live http://visualtags.hotosm.org TODO * touch screen * UI / design * extract js into separate file * libraryify xml parsing code Very Partial Changelog 1.2.6 * UI new uses just the one dialog window * Colour hinting and minor usability tweaks, including add button * Add functionality for using localised partials 1.2.5 * Add delete icon to item * Remove delete buttons from dialogs * First item and tag is now automatically selected when viewing 1.2.4 * Note: migration needed * Add default presets - collections needs to be set to default = true in the console for them to show up. Defaults cannot be deleted nor edited, but can be cloned. * Add delete icon next to edit icon for tags * Remove selection from tag, as it wasn't doing anything * Creating a preset goes straight to the edit page now. 1.2.3 * Pagination of presets 1.2.2 * Add not found handling for presets * Add model tests 1.2.1 * Themeing similar to other HOT tools * Upload to HOT Exports tool * Removal of need to save an items tag after change 1.2.0 * Internationalisation of strings 1.1.0 * Editing of existing Items and preset element tags * removal of elements * removal of select options * js code refactoring and renaming * misc improvements * renaming collection to preset in text 1.0.0 * Presets shown using drag and drop tree * Item in a preset drag and droppable * New presets can be added * New elements in a preset item can be added * Tags Model deleted * Add new empty preset from scratch * Clone collection/preset * database wipe needed 0.2.2 * Preset Upload * preset parse and show as collection of tags * list collections * Edit collection * Delete collection * list tags in collection * show tag in collection * Add tag * Edit tag * Delete tag * Output as a simplified XML preset which will work with the HOT Exports application. * Tags grouped according to the geometry types. * Output groups into preset Items * Drag and Drop nested tree using groups and icons from presers * Presets can be invalid JOSM presets, but work fine in the HOT Export tool * Look at http://www.sjjb.co.uk/mapicons/ for cc0 icons Install Ruby 1.9.2 Postgres database The application should work with Heroku no problem. Ruby 1.8.6 If you are on Ruby 1.8.6 and want to use that, with sqlite3 database - have a look at the 1.8.6 branch. Installing gems gem install sinatra-activerecord -v '1.2.2' bundle install I then had to run gem pristine --all Develop Shell >tux on heroku: heroku run tux Run in development mode: rvm use 1.9.2 rvm gemset use visualtag rerun app.rb Test cd test ruby test.rb LICENSE - Undecided Open Source License.