OpenHistoricalMap/JOSM
- Main article: OpenHistoricalMap/Contributing
JOSM is a more advanced alternative to iD, especially useful for large-scale tasks like imports and mapping international boundaries. OpenHistoricalMap uses the same official distribution of JOSM that OSM contributors use. Before you can contribute to OHM using JOSM, you need to adjust several configuration settings away from the OSM defaults.
Basic setup
- Main article: JOSM/Installation
- Main article: JOSM/Guide
Configuring server settings
Before you can edit OpenHistoricalMap instead of OpenStreetMap, you need to change the connection settings. OAuth 2.0 is the recommended authentication method:
- Open the Preferences window and switch to the OSM Server tab.
- Uncheck Use the default OSM server URL.
- Set OSM Server URL to
https://www.openhistoricalmap.org/api
,[1] then click Validate. - Select the Use OAuth 2.0 option, then under Access Token Secret, click Authorize now (Fully automatic).
- An Authorization Required page should have opened in your default Web browser, asking you to grant JOSM several permissions. Click Authorize.
- You should be taken to a page that says simply "OK". Return to JOSM and click OK.
Basic authentication
HTTP basic authentication remains available as an alternative authentication method. Choose Use Basic Authentication and set the OSM username and OSM password to your OHM credentials. These credentials will be transmitted as plain text over the network, so be careful only to use this option on a secure network.
Overpass
The Overpass API enables you to work with large features or large amounts of features by downloading a sparse subset of data instead of the full data:
- Open the Preferences window and switch to the OSM Server tab.
- Check the Expert Mode checkbox at the bottom of the window.
- Set Overpass server to
https://overpass-api.openhistoricalmap.org/api/
, then click OK. - Go to File and select Download data. Switch to the Download from Overpass API tab.
In many parts of the world, OHM's relation structures are much more complex than OSM's. Make sure your Overpass query includes connected features from different time periods than the one you are focused on. Before splitting any way that may be part of a boundary relation, download its parent ways and relations and download any incomplete relations in full, with their members. Afterwards, run the validator and check for any warnings about modifying incomplete relations or about gaps in relations, and sort the members of any relation you may have modified. |
Remote control
The Remote Control feature allows you to quickly access JOSM and access relevant data while browsing the main OSM website:
- In JOSM, open the Preferences window and switch to the Remote Control tab. Make sure Enable remote control is enabled.
- On openhistoricalmap.org, click the dropdown menu next to the Edit button and choose Edit with Remote Control.
You may need to configure your operating system's built-in firewall to allow JOSM to listen to localhost port 8111. The procedure varies from system to system.
utilsplugin2
You can configure shortcuts to open the OHM website from within JOSM. In the "Utilsplugin2 settings" tab of the Preferences window, add the following custom URLs.
- View Element History on OpenHistoricalMap
https://www.openhistoricalmap.org/{#type}/{#id}/history
- Browse Element on OpenHistoricalMap
https://www.openhistoricalmap.org/{#type}/{#id}
Alternatively, you can add the following lines to the plugins/utilsplugin2/customurl.txt file in your JOSM preferences folder:
View Element History on OpenHistoricalMap [demo, =Ctrl-Shift-H] https://www.openhistoricalmap.org/{#type}/{#id}/history Browse Element on OpenHistoricalMap [demo, =Ctrl-Shift-I] https://www.openhistoricalmap.org/{#type}/{#id}
By default, these custom URLs are only accessible from the Data ‣ Select custom URL menu item. However, you can make these URLs accessible via the View ‣ History (web) and Data ‣ Open custom URL items and their associated keyboard shortcuts by appending special suffixes to their names, as seen above.
Date filter
The ohm-date-filter plugin allows you to interactively filter the map features to a specific time period, reducing clutter from time periods that you aren't actively editing. To install this plugin, go to the Plugins tab of the Preferences window, then search for ohm
and check the checkbox next to ohm-date-filter.
Other preferences
When a feature evolves over time, OHM maintains multiple copies of the feature that differ by start_date=* and end_date=* tags. But since the type=* and name=* tags generally remain identical, the Relations panel often ends up listing many identically labeled relations. To more easily disambiguate the relations, you can open Advanced Preferences and modify mappaint.nameOrder
and relation.nameOrder
to include start_date
and end_date
, then restart JOSM.
Using an alternate preferences file
You can set up an alternate JOSM preferences.xml file and run JOSM from the command line if you wish to avoid changing the server preferences repeatedly.
Mac and Linux
By default JOSM puts its preferences file in a subdirectory, .josm. You can clone this directory and run JOSM from the command line. For example, copy .josm to .josm-ohm; edit the preferences.xml file and review & possibly change the settings for osm-server.auth-method, osm-server.password, osm-server.username, and osm-server.url. Once this is done, you can set up an alias in your shell profile such as:
josm-ohm='java -Djosm.home=/Users/myhomedir/.josm-ohm -jar /Users/myhomedir/JavaApps/josm-tested.jar