JOSM/Plugins/OpeningHoursEditor

From OpenStreetMap Wiki
< JOSM‎ | Plugins
Jump to navigation Jump to search
OpeningHoursEditor icon OpeningHoursEditor
extended options for editing opening_hours

(NOTE: This page is outdated)

OpeningHoursEditor is a plugin for JOSM. It provides a graphical editor for editing opening_hours. It can also be used to edit other time related tags like collection_times for postboxes or lit for highways. At the moment the plugin is still in development. The main development is made by User:Boman.

Note that this plugin does only understand a subset of the approved syntax of opening_hours and will not work if features are used which it does not understand. Have a look at the wiki page for opening_hours and the Key:opening_hours/specification. In case features like holidays, opening_hours based on sunrise/sunset, months, years and so on are needed you can check out the evaluation tool.

Installation

Menu entry of the plugin

For installation see JOSM/Plugins#Installation. After restarting JOSM you should have a new menu-entry under 'Data' called 'Edit opening hours'.

Usage

Select one or more Elements and press 'Data'->'Edit opening hours'. Select the key you want to edit. The key with the best matching is already selected, so you can press Enter if you agree. Otherwise you have the possibility to choose one of the existing tags or to create a new tag.

Now the OpeningsHourEditor dialog will open and you can edit your chosen key. The value with the most occurrences is already inserted in the value field. You can drag the mouse inside the time-planner to create a rectangle. You can move and resize the rectangles by dragging with the mouse at the borders of the rectangle. By clicking right on a rectangle you can choose 'open end' the colour of the rectangle becomes red. You can also create a single time-point (for example: Mo-Fr 09:15) by setting the height of the rectangle to 0, the colour of the rectangle will change to green.

You can also delete a rectangle by changing its width or height to 0 or less.

Bugs

Report bugs and feature wishes via the JOSM-trac and set the Component of the ticket to "Plugin openinghourseditor".

Development

Source code can be found in svn.

Revision History

A list of major updates to the plugin.

Date Version Changes
2012-07-12 28477 bugfix #7844 fixing a NullPointerException when dragging the mouse in the greyed out editor and bugfix #7334 fixing small graphic glitch of the weekday lines in the editor
2011-10-12 26838 bugfix #6927 for Windows popup-menu and enhancement ticket #6927 for remembering the latest editmode
2011-06-31 26219 Choosing between 12 and 24 hour clock possible. The default is selected by the configured localization. See enhancement ticket #6359
2011-05-16 26002 added the possibility to edit more than one object simultaneous
2011-01-31 25190 minimal JOSM version set to 3835, due to changes in JOSM
2010-11-17 24290 Fixes Ticket #5554

Schema

The plugin is reading the value from the tag and parse it for showing the times in the GUI. This is the grammar which is used for parsing:

DIGIT ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
WEEKDAY ::= "Mo" | "Tu" | "We" | "Th" | "Fr" | "Sa" | "Su"
PLUS ::= "+"
OFF ::= "off"

startCompile ::= "24/7" | timespanlist
timespanlist ::= timespan [ "; " timespanlist ]
timespan ::= [ dayspanlist " " ] daytimespanlist

daytimespanlist ::=	daytimespan [ "," daytimespanlist ]
daytimespan ::= off | ( daytime ( openend |  [ "-" daytime ]) )
daytime ::=	(DIGIT DIGIT ":" DIGIT DIGIT )
openend ::= PLUS
off ::= OFF

dayspanlist ::=	dayspan [ "," dayspanlist ]
dayspan ::=	WEEKDAY [ "-" WEEKDAY ]