Ja:JOSM
From OpenStreetMap
| Other languages: | +/- |
|---|---|
|
English • Deutsch • Français • Finnish • 日本語 • Italiano • Русский • Slovensky • עברית • 正體中文 • 简体中文 | |
| Help | About | Browsing | Editing | Upload |
JOSM(Java Open Street Map Editor)は、Immanuel Scholzが開発したOSM用地図エディタで、現在はFrederik Rammがメンテナーです。公式ホームページは、http://josm.openstreetmap.de/で 最新版(nightly build、サイズ約1MB)がダウンロードできます。JOSMの実行にはJava 1.5以上が必要です。
Contents |
エディタの選択
OpenStreetMapデータのエディタにはオンライン版のPotlatchエディタやMerkaartorなどほかにもいくつか存在します。JOSMはどういったユーザーに向いているのでしょうか。JOSMは機能が豊富な地図エディタなので、中級以上のOSMユーザーに向いています。JOSMを使う前にインストール作業と設定作業が必要ですが、どんどんOSMに貢献していくにはそれらの作業をしてJOSMに慣れる価値はあるでしょう。ややこしそうに聞こえますが、コンピュータに慣れていれば特に難しいことはありません。
JOSMを使った方がよい例:
- たくさんのデータを編集する場合
- すぐに変更が反映されてほしくない場合(試しに編集してみたい場合)
- You have taken photos during your track and want to display them on the position they were taken.
- You want to use an offline editor and going to edit an area, which you believe other people are currently changing. JOSM supports merging changes and conflict resolving from changed areas (remember to do a download prior every upload).
JOSMを使わない方がよい場合:
- 単に一つの路線に名前をつけたい場合。その場合は、オンラインエディタを使うことを考えてください。
- アプリケーションのインストールが面倒な場合。
- (職場など)ファイアーウォールの後ろにあるため、JOSMがうまく動作しないところから、それでも地図を編集したい場合。
- JOSMの動作に必要なハードウェア用件を満たしていない場合。
動作条件
JOSMを実行するには次の環境が必要です。
- Java 1.5以上(Mac OS X 10.3ではJava 1.5は用意されていません。OS X 10.4以降ならば大丈夫です。)
- 256 MB以上のメモリ
- ディスプレイ解像度1024x768以上(800x600だとなかなか使いづらいでしょう)
- 2Dアクセラレータ付きのグラフィックカードを推奨(OpenGLしかサポートされていなければ、"-Dsun.java2d.opengl=true"を引数に渡してみてください)
ダウンロードとインストール
JOSMを動作させるためには、コンピューターにJava 1.5がインストールされている必要があります。残念ながらMac OS 10.3.xではJava 1.5が利用できません。
Java 1.5がインストールされていれば、JOSMメインサイトにあるJOSMのjarファイルをダウンロードするだけでOKです。 日本のユーザならば、日本のミラーを使った方がいいでしょう。(ミラー一覧)
Various people started hacking on JOSM, so there are different flavours and plugins available. While the main JOSM trunk is at http://josm.openstreetmap.de/, you can download modified versions of JOSM, plugins or external tools that enhance JOSM.
Javaのインストール
JOSMを動作させるためにはJavaをシステムにインストールしておく必要があります。
Linuxの場合
- Java SEからJavaランタイムをインストールします。
Ubuntuの場合
- 次のコマンドを実行してください:
$ sudo aptitude install sun-java6-jre
Debian "pure"の場合
- (ルート権限で)次のコマンドを実行してください:
$ apt-get install sun-java6-jre
注: もし他のJVMを導入していた場合には、実行パス(/usr/lib/jvm/java-6-sun/java)を指定することでSUNのJava仮想マシンを選択するか、 "update-java-alternatives -s java-6-sun" を実行してシステム設定を変更してください。
Gentoo Linuxの場合
標準的なイスントール方法:
emerge josm
If you are interested in latest josm-development and plugins use the OpenStreetMap Gentoo Overlay. By using the "x86"-keyword you get a stable release, the "~x86"-keyword installs the svn-version.
There are many plugins already available as ebuilds. Look at http://svn.openstreetmap.org/applications/utils/gentoo/ for a complete list.
Windowsの場合
- Install Java Runtime from here: Java SE
Mac OS X
- Java 1.5は、OS X 10.4では最初からインストールされています。
JOSMプラグイン
PluginsサブページにJOSMプラグインのリストがあります。 JOSM Wikiのプラグインページも見てください。 いくつかのプラグインについては、このWikiに日本語の紹介があります。
Plugins are installed as described below:
Linux & Mac OS X
- Install Java Runtime, if not already installed
- To install plugins, save them in
~/.josm/plugins(e.g./home/$USER/.josm/plugins/wmsplugin.jar)
Windows
- Install Java Runtime, if not already installed.
- On the latest version of JOSM (April 2007), put the plugins in the directory is C:\Documents and Settings\your user name\Application Data\JOSM\plugins
How to start JOSM
The jar file needs to be passed to the Java 1.5 runtime. This step is different to the various platforms:
Linux
Just type java -jar josm.jar in a shell. There are also some tutorial videos. One describes the steps to set up KDE for starting JOSM by clicking on the JAR file. Get the tutorials from one of the mirrors listed at openstreetmap.de.
Ubuntu users have a good tutorial at UbuntuForums.
If you need to use it from behind a proxy, you can tell it to the java runtime like java -Dhttp.proxyHost=192.168.1.1 -Dhttp.proxyPort=3128 -jar josm.jar, with the IP and port of your proxy.
If you need ipv6, you can tell it to the java runtime with -Djava.net.preferIPv6Addresses=true
e.g.
java -Djava.net.preferIPv6Addresses=true -Dhttp.proxyHost=proxy.ipv6.uni-leipzig.de -Dhttp.proxyPort=3128 -jar josm/josm-snapshot-xxx.jar
The proxy here is only mentioned because the openstreetmap-server doesn't support ipv6 yet.
Windows
Usually you can just double click on the josm.jar file to start JOSM.
In the rare case that this doesn't work, create a text file named start_JOSM.bat with a simple text editor, for example Notepad. Write the following line in the file:
java -jar josm.jar
Save this .bat file into the same directory where josm.jar is located. Now you can just double-click on the .bat file and JOSM will start up.
You can also set up a shortcut to the JOSM.jar file which allows the inclusion of additional parameters. I have the following as the short cut "Target" in my Start Menu which starts a control prompt window (useful to see progress of uploads/downloads), loads JOSM in its separate window, and assigns 512mb of memory for the process which dramatically speeds up operation when editing dense data. Change "path" to the full path of your josm-latest.jar file.
C:\WINDOWS\system32\java.exe -jar -Xmx512M "C:\path\josm-latest.jar"
Mac OS X systems
You need Mac OS 10.4 or better. 10.3 will not do the job. In 10.4.x, simply double click on the jar file and Java 1.5 should load the JOSM jar file. If you need to allocate more memory to JOSM (in order to edit larger files), the following script will help:
java -jar -Xmx256M -XX:MaxPermSize=256M josm-latest.jar
Getting started
- 地図を作りたい道のGPX tracklogファイルがあれば、JOSMを開始しFile → Open メニューを選択して、ファイルを指定してロードしてください。 JOSMは、自動的にデータの領域を認識して作業領域を正しく設定します。
- GPX tracklogファイルがまだない場合には、他のユーザの収集したデータを使うこともできます。 Korea Mapping Guideを参照してください。
- もし、JOSMの使い方を覚えるために、サーバのデータを更新せずに試してみたいだけでも心配いりません。単にアップロードをしなければよいです。(ダウンロードでは何の問題もありません。)変更したレイヤーを削除し、最初からやり直すことができます。
- あなたのコンピュータに格納されたデータを使用する場合であっても、編集前につねにサーバからダウンロードするようにしてください。
- サーバとデータを交換する時には、ユーザ名とパスワードをJOSMの設定で入力しておいてください。ユーザ名はWikiのユーザ名では、ありません。登録したときのメールアドレスです。
- Now choose Connection → Download from OSM. In the following dialog ensure that the checkbox to get OSM data is enabled and press the OK button. Always download before uploading.
- If the track is too long, the server will refuse to send you the OSM data for that area. Zoom in a bit to restrict the request to a reasonable size.
- Wait a bit until all the data has been received. If there are existing ways of your area in the database, you will now see them in JOSM.
- Now start your editing session. Be careful when changing existing data, as streets and nodes can have lots of tags assigned.
- The JOSM manual is available online here, and these pages can also be accessed by pressing F1 from within JOSM. If you really mess things up simply delete the layers that have been changed before you do an upload and then start over.
- See here for a list of default shortcuts.
Hints and tricks
- After installing a plugin, you have to visit the preferences where you can enable and disable each plugin individually
- For users new to OSM, it is recommended to use a presets file for easier tagging. Ask for one in the mailing list or User:SlowRider
- To see the ways in different colours and thicknesses, install the mappaint plugin
- After you have committed your changes to the openstreetmap.org database, it will take a while (sometimes even a week) until the new ways will appear in the slippy map. If you want to shorten this process, you want to get familiar with the Tiles@home project
- If you do not have a wheelmouse, you can zoom in and out using the key combo Ctrl-. (Period) and Ctrl-,
- If you're an experienced user and looking for really advanced tricks, try JOSM/Advanced Tricks.
- If you mapped one lane of a motorway, find here a tool which creates the opposite lane for you.
Automatically Matching Photos to GPS traces
One of the problems when out mapping with a GPS is trying to keep accurate notes about the street names as you pass each junction. If you have a digital camera to take out with you, JOSM can help.
- take a photo of your GPS screen/display showing the time (on the GPS) when you start
As you are travelling around, take a picture at appropriate places/junctions/road signs. Then, when you get home with your completed GPS track uploaded into JOSM:
- In the "Layers" box, top right
- Right click on the GPS track layer, for the layer you have just uploaded. Note: you must do it from a layer you have just uploaded, and not from data that was downloaded from OSM, as that apparently no longer has a timestamp.
- Select "Import Images" (or possibly "import photos")
- Right click the photos layer,
- Sync the clocks using the (camera's timestamp on the) photo you took at the start (of the GPS screen/display clock)
- If you do not have a picture of the GPS for some reason, turn on the camera and GPS now. Work out the time difference between them. Now, subtract or add this to the time shown in the 'sync clocks' photo dialog.
JOSM error messages
Error while parsing. An error has occurred
The most likely cause of the above error is that the server is slow and has not sent the required response back to JOSM. If this occurs just try uploading the data again, and JOSM will resume from where it left off.
If you get error 412 precondition failed, it means that something changed on server in unexpected way. Try deleting affected objects.
JOSM seems to start okay, but the window is blank
If you have the fancy, compiz/beryl graphics stuff enabled, then this may happen. The solution is simple, add the following line to the user profile:
export AWT_TOOLKIT="MToolkit"
Newbie Notes
Here's a few notes from a beginner's (Parsingphase) first couple of days working on OSM, using the JOSM editor (on Mac OS X).
Mac-specific points
- "Installing" JOSM on OS X is a cinch — just download and double-click the .jar file.
- Use a two-button mouse with a scroll wheel — it makes life much easier. Right-dragging moves the map, the scrollwheel zooms.
- Otherwise, command-click (aka "Apple-click") does a right click, ctrl-arrows to move the map, and ctrl-, and ctrl-. to zoom.
- Because it starts with a dot, your ~/.josm directory will be invisible to the Finder. You either have to move the plugins into it from the command line, or open the folder using "Go to Folder..." ("Go" menu in the Finder).
- There's a Mac OS X look and feel under the Edit → Preferences menu; it doesn't actually change any functionality but it fits in ;)
Points for all platforms
- Get the "mappaint" plugin — it makes it far easier to see what's going on in your maps (and even work out where on earth you are), at the expense of slightly higher processor load on your machine (my PowerBook 12" copes fine).
- Upload and download small areas, frequently. The less time you've got unstored or unchecked changes, the lower the risk of conflict with other users.
- Always download an area before you start work on it, even if you have your own GPX data.
- Always download the area you are going to upload before doing so, to get any modifications made by other users and avoid overwriting data.
- When downloading an area you get all the data within the rectangular bounding box you choose, and also, where any way within that bounding box extends outside the box it is completely downloaded. It therefore becomes difficult to precisely know which areas you have downloaded full data for. If you check the "Draw boundaries of downloaded data" box (found in Display Preferences), a yellow rectangle is drawn around all the areas for which full data has been downloaded. Caution should be exercised when adding new data to areas outside these rectangles as it may duplicate already existing data, which you have not downloaded.
- A "small area" to start with might either be that from a short GPX track you've taken, or about a 1-km square around a known location. This equates to about 0.06° of latitude/longitude (give or take polar distortion), so enter an area about that size into the Connection → Download from OSM → Bounding Box.
- Rural areas with less detail might work better with larger areas — the 1-km recommendation is about right for a suburb of London.
- Once you're viewing an area in JOSM, at whatever zoom level, the JOSM download dialog box will default to the currently viewed area.
- It's very easy to select more than you expect to, particularly when making "ways". Open the "Current Selection" panel (Alt-e, fourth button up on the left) to keep an eye on what you've selected.
- Switch back to "select" mode regularly and click on nothing or type Ctrl-Shift-A to clear your select list.
Why don't my changes appear?
- See Map Features for how to specify that your way is a road/railway etc, and what type. If you're not sure of the type (e.g. primary/secondary) be conservative and choose the lesser (e.g. secondary).
- The slippy maps are only rebuilt fairly infrequently anyway. Join tiles@home to be able to rebuild your own in the osmarender layer.
See also
Related
- JOSM user interface brainstorming page
- OpenStreetMap component overview
- JOSM file format
- JOSM/Search function
- HOWTO run JOSM from flash disk with Java
- JOSM dev mailinglist

