Zh-hant:JOSM

From OpenStreetMap Wiki
Jump to: navigation, search
Help
Available languages
Català Deutsch English Español Eesti Suomi Français עברית Magyar Italiano 日本語 Nederlands Polski Português Português do Brasil Русский Slovenčina Slovenščina Shqip Українська Tiếng Việt ‪中文(简体)‬ ‪中文(繁體)‬
Help About Browsing Editing Upload
JOSM Screenshot, showing the geo-tagged images feature.
JOSM Screenshot with (outdated) landsat.jar and mappaint.jar plugin.

JOSM的全名是"Java OpenStreetMap Editor"由Immanuel Scholz開發,目前的維護者是Frederik Ramm。官方網站為http://josm.openstreetmap.de/ ,你可以在那裡下載最新版本。 latest version (the nightly build, about 1.5 MB). 需要Java 1.5以上的版本。

選擇哪個編輯器

目前還有OpenStreetMap的其他編輯器,例如:線上編輯器PotlatchMerkaartor。那麼何時該使用JOSM,何時又該選擇其他的編輯器呢?Well, JOSM is a feature-rich editor for the experienced OSM mapper. It requires some installation and configuration efforts. But if you intend to become a great OSM mapper, it's worth the time you need to get used to it. And if this sounds complicated: it's not if you are a bit familiar with computers.

如果遇到以下狀況,你應該使用這個離線編輯器:


當發生以下的狀況,JOSM可能不適合你的需求:

系統需求

為了執行 JOSM,你的電腦要支援:

although note that the opengl option can cause problems with window managers on Linux.

下載及安裝

為了執行 JOSM,你的電腦必須安裝 Java 1.5 版。 很不幸的是 Mac OS 10.3.x 上面並沒有 Java 1.5 版。 然後你只要下載 JOSM jar 檔案。檔案可以在主站找到。

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

Ubuntu
Debian "pure"

Note: If you have another JVM installed, either select the sun java vm by specifing its executeable (/usr/lib/jvm/java-6-sun/java) or update the system configuration by invoking "update-java-alternatives -s java-6-sun"

Gentoo

Standard installation with Portage:

emerge -av josm

If you are interested in latest development version of josm and extra plugins use the OpenStreetMap Gentoo Overlay.

There are many plug-ins already available as ebuilds. Look at http://svn.openstreetmap.org/applications/utils/gentoo/ for a complete list.

openSUSE/Fedora/Mandriva

JOSM packages are available in the openSUSE's build service, in the Application:Geo repository.

Go to http://download.opensuse.org/repositories/Application:/Geo/, select you distibution and find the RPM in the noarch directory. Install using RPM or your favourite package manager.

Example for openSUSE 10.3 using zypper:

zypper ar http://download.opensuse.org/repositories/Application:/Geo/openSUSE_10.3
zypper ref
zypper in josm

Use this for openSUSE OneClick install:

 http://packages.opensuse-community.org/index.jsp?searchTerm=josm

Windows

Mac OS X

JOSM plugins

A list of plugins is on the JOSM/Plugins page in this Wiki, and also in the JOSM Wiki. Plugins are installed as described below:

Linux & Mac OS X

Windows

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 use Ubuntu 8.04 LTS and install JOSM via package, you will simply use josm.

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.

You can use the following script to use always the latest Josm Version:

#!/bin/sh
GPSDIR=/home/sven/Desktop/gps
PROXY=www-proxy
export JAVA_HOME=/usr/local/java/jdk1.6.0_04/
DCOPREF=`kdialog --title "Hole JOSM"  --progressbar "Hole JosmLatest" 100`
cd $GPSDIR
wget -N http://josm.openstreetmap.de/download/josm-latest.jar
dcop "$DCOPREF"  close
$JAVA_HOME/bin/java -Xmx1024M -DproxyHost=$PROXY -DproxyPort=8080 -jar josm-latest.jar

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

提示和小技巧

See also JOSM/Advanced Tricks (more tips for more experienced users)

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.

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:

The "Geotagged photos" feature is built in to JOSM. However you might like to try out the AgPifoJ plugin which works in a similar way, but offers enhanced reliability and usability.

For more information see Photo Mapping

Automatically Matching Sound Recordings to GPS traces

There is now a similar facility for applying and synchronizing sound recordings.

There are three methods, described with step-by-step instructions, in the JOSM Help:

1. Continuous audio with GPS waymarks

With this method, you collect explicit waypoints along your track using the buttons on your GPS and at the same time dictate onto a continuous sound recording on your voice recorder what the waymark represents on the ground - a street name or point of interest. Your GPS notes three key pieces of information about each waypoint - its location, the time it was made, and it's name or number. The audio and waypoint data are then synchronized in JOSM so that you can play back each description by clicking on a Marker representing the waypoint.

2. Continuous audio with vocally-identified points of interest

With this method you also make a continuous sound recording but instead of entering waypoints into your GPS you dictate an audible cue for each point of interest, for example "MARK! River Lane Primary School on left".

3. Audio clips with waymarks

With this method, you make waypoints to identify locations of interest. However you record a separate audio file for each one and the name of each file is added as a <link> element in the corresponding waypoint in the GPX file before loading into JOSM. When JOSM then creates the Audio Marker for each waypoint, it knows which audio clip to play when you click on the marker.

For more information see Audio mapping

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

Points for all platforms

Why don't my changes appear?

See also

Related

External links

Personal tools
Namespaces
Variants
Actions
site
Toolbox