NL:JOSM
| Help | About | Browsing | Editing | Upload |
De "Java OpenStreetMap Editor" (JOSM) is ontwikkeld door Immanuel Scholz en wordt op dit moment onderhouden door Frederik Ramm. De beginpagina is te vinden op http://josm.openstreetmap.de/, waar je de stabiele versie of de ontwikkelversie (ongeveer 2.2 MB) kunt downloaden. Java 1.6 of nieuwer is vereist.
Contents |
Welke editor gebruiken?
Er zijn meerdere editors voor OpenStreetMap-gegevens, zoals de online-editor Potlatch of Merkaartor. Wanneer gebruik je JOSM en in welke gevallen een andere editor? JOSM is een uitgebreide editor voor de ervaren OSM-kartograaf, en vereist enige installatie- en configuratieinspanningen. Maar als je een goede OSM-kartograaf wilt worden, is de tijd die je in JOSM investeert de moeite waard. Mocht dit allemaal wat ingewikkeld klinken: als je een beetje kennis van computers hebt valt het allemaal erg mee.
JOSM komt het best tot zijn recht in de volgende gevallen:
- Er veel gegevens die veranderd moeten worden;
- Je wilt veranderingen uitproberen, zonder dat ze direct in de database opgenomen worden;
- Tijdens het tracken zijn er foto's genomen en deze moeten gepositioneerd worden;
- Je bewerkt een gebied waaraan andere waarschijnlijk ook werken. JOSM ondersteunt het samenvoegen van veranderingen en het oplossen van mogelijke conflicten (vergeet niet te downloaden voor iedere upload).
Je kunt JOSM beter niet gebruiken in de volgende gevallen:
- Kleine aanpassing, zoals het veranderen van een straatnaam. Gebruik hiervoor de online-editor.
- Je wilt geen nieuwe applicatie installeren.
- Je bevindt je achter een firewall, waardoor JOSM niet goed functioneert (b.v. op je werk).
- De computer voldoet niet aan de minimum eisen, zie hieronder.
Minimum systeemvereisten
Om JOSM goed te kunnen draaien, moet je computer minstens aan de volgende eisen voldoen:
- Java 1.5 of nieuwer. ( Java 1.5 is niet beschikbaar voor Mac OS X 10.3 (Panther), JOSM werkt echter prima onder MAC OS X 10.4/5.)
- 256 MB RAM of meer.
- Een schermresolutie van 1024*768 of beter (800*600 is niet echt leuk).
- Een grafische kaart met een 2D-versneller is aanbevolen. Als je alleen OpenGL beschikbaar hebt, probeer dan
-Dsun.java2d.opengl=true
-Dsun.java2d.opengl=true -Dsun.java2d.opengl.fbobject=false. De instelling is getest op WinXP + nVidia FX1500 + dual monitor). Merk op: de OpenGL-optie kan op Linux problemen met de window-manager veroorzaken.
Voorbeelden van inschakelen 2D-versneller
Linux
In Ubuntu Hardy kan OpenGL 2D-versnelling als volgt worden ingeschakeld via de opdrachtregel:
java -Dsun.java2d.opengl=True -jar /usr/share/josm/josm.jar
het deel van de bovenstaande opdracht:
/usr/share/josm/josm.jar
geeft de locatie van het JOSM jar-bestand. Staat je jar-bestand ergens anders, dan past je dat deel aan.
Downloaden & installeren
Java 1.5 moet geïnstalleerd zijn om JOSM te kunnen gebruiken. (Java 1.5 niet beschikbaar voor Mac OS 10.3.x. (Panther).)
Vervolgens download je het JOSM jar-bestand. Verschillende mensen hebben JOSM veranderd, dus er zijn meerdere varianten en plugins beschikbaar. De oorspronkelijke JOSM-trunk staat op http://josm.openstreetmap.de/, waar je zowel JOSM als zijn plugins kunt downloaden.
Java installeren
Als Java nog niet op je computer aanwezig is, kun je het als volgt installeren:
Linux
- Download Java Runtime hier: Java SE
Ubuntu
- Installeer Java:
$ sudo aptitude install sun-java6-jre
- Als je geluid nodig hebt voor audio mapping en je gebruikt ALSA (default in ubuntu), installeer dan alsa-oss:
$ sudo aptitude install alsa-oss
- start JOSM:
$ aoss java -jar /usr/share/josm/josm.jar
Let er op het pad naar jouw josm jar bestand aan te passen.
-
Note: Om een of andere reden geeft JOSm geen geluid wanneer je Sun's JDK gebruikt. Dus wanneer je muziekbestanden gebruikt tijdens het editten dien je openjdk-6-jdk te gebruiken - Zet dan wel JAVA_HOME omdat josm niet niet luisterd naar /etc/alternatives/java - zie /usr/bin/josm voor meer infofor more. - Since Ubuntu 8.04 LTS JOSM is in the universe repository:
$ sudo aptitude install josm
- Als je up-to-date packages in Ubuntu 8.04 wilt gebruiken (bijna elke dag geupdate), kun je deze PPA gebruiken: The Launchpad OpenStreetMap Team
Debian "pure"
- Toets in (als root):
$ apt-get install sun-java6-jre
- Debian Lenny heeft JOSM (optioneel ook josm plugins) in de repository:
$ sudo aptitude install josm josm-plugins
Opmerking: Als je een andere JVM geinstalleerd hebt en je wilt SUN's java gebruiken, start dan josm met
JAVACMD=/usr/lib/jvm/java-6-sun/bin/java josm
Gentoo
Standaard installatie met Portage:
emerge -av josm
Op dit moment zijn alle pakketten voor josm gemaskeerd zodat je de /etc/portage/packages.keywords moet bewerken en sci-geosciences/josm ~x86 toe moet voegen.
Als je bent geïnteresseerd in de laatste ontwikkelingsversie van josm en extra plug-ins, gebruik dan de OpenStreetMap Gentoo Overlay.
Er zijn al vele plug-ins beschikbaar als ebuilds. Kijk op http://svn.openstreetmap.org/applications/utils/gentoo/ voor een volledige lijst.
openSUSE/Fedora/Mandriva
JOSM pakketten zijn beschikbaar in de openSUSE's build service, in de opslagplaats Application:Geo.
Ga naar http://download.opensuse.org/repositories/Application:/Geo/, selecteer je distibutie en zoek de RPM in de noarch directory. Installeren met behulp van RPM of je favoriete pakketbeheerder.
Voorbeeld voor openSUSE 10.3 met behulp van zypper:
zypper ar http://download.opensuse.org/repositories/Application:/Geo/openSUSE_10.3 zypper ref zypper in josm
Gebruik dit voor de openSUSE OneClick installatie:
http://packages.opensuse-community.org/index.jsp?searchTerm=josm
Windows
- Installeer Java Runtime vanaf hier: Java SE
Mac OS X
- Vanaf OS X 10.4.x (Tiger) is Java 1.5 al geïnstalleerd. Voor oudere OS X-versies is geen Java 1.5 beschikbaar.
JOSM plugins
Een lijst van plugins kun je op de JOSM/Plugins pagina in deze Wiki vinden, en ook in de JOSM Wiki. Plugins are installed as described below:
Linux & Mac OS X
- Installeer Java Runtime, indien die nog niet is geïnstalleerd
- Plug-ins installeren: sla ze op in
~/.josm/plugins(e.g./home/$USER/.josm/plugins/wmsplugin.jar)
Hoe JOSM op te starten?
Het jarbestand moet worden doorgegeven aan de Java 1.5 runtime. Deze stap is verschillend voor de diverse platformen:
Linux
Typ eenvoudigweg java -jar josm.jar in een shell. Er zijn ook enkele voorbeeldvideo's. Eén ervan beschrijft de stappen om KDE in te stellen voor het opstarten van JOSM door te klikken op het JARbestand. Bekijk de voorbeelden vanaf een van de mirrors die zijn vermeld op openstreetmap.de.
Ubuntu-gebruikers vinden een goede handleiding op UbuntuForums.
Indien je Ubuntu 8.04 LTS of Debian gebruikt en JOSM via pakket installeert, zul je eenvoudigweg josm gebruiken.
Als je het vanachter een proxy moet gebruiken, moet je dat doorgeven aan de java runtime met java -Dhttp.proxyHost=192.168.1.1 -Dhttp.proxyPort=3128 -jar josm.jar, met het IP-adres en poort van je proxy.
Als je ipv6 nodig hebt, kun je het doorgeven aan de java runtime met -Djava.net.preferIPv6Addresses=true
bijvoorbeeld
java -Djava.net.preferIPv6Addresses=true -Dhttp.proxyHost=proxy.ipv6.uni-leipzig.de -Dhttp.proxyPort=3128 -jar josm/josm-snapshot-xxx.jar
De proxy is hier alleen vermeld omdat de openstreetmap-server ipv6 nog niet ondersteund.
Je kunt het volgende script gebruiken om altijd de laatste Josm-versie te gebruiken:
#!/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
alternatieve versie of een bijwerken en opstart-script:
#!/bin/sh # # Startup-script for josm to fetch the latest version if an older version is installed # # fix for use with compiz, delete next line if you don't use compiz, else josm won't work properly. export AWT_TOOLKIT=MToolkit # change to directory where josm-jar-file is located cd ~/bin # backup old version in case the new one doesn't work cp josm-latest.jar josm-latest.jar.0 # download latest version if available wget -N http://josm.openstreetmap.de/download/josm-latest.jar # change to desired working directory cd ~/openstreetmap # start josm using alsa with 2D-acceleration and assign 512MB of memory aoss java -Dsun.java2d.opengl=true -jar -Xmx512M ~/bin/josm-latest.jar
- Opmerking: als je bepaalde dingen niet nodig hebt (zoals compiz of backup), kun je die regel in je script gewoon verwijderen.
Windows
Gewoonlijk kun je gewoon dubbelklikken op het josm.jar-bestand om JOSM op te starten.
In het uitzonderlijke geval dat dit niet werkt, maak dan met een eenvoudige tekstbewerker, bijvoorbeeld Notepad, een tekstbestand genaamd start_JOSM.bat. Typ de volgende regel in dat bestand:
java -jar josm.jar
Sla dit .bat-bestand op in dezelfde map als waar josm.jar is geplaatst. Nu kun je gewoon dubbelklikken op het .bat-betand en JOSM zal opstarten.
Je kunt ook een snelkoppeling instellen naar het JOSM.jar-bestand wat het mogelijk maakt aanvullende parameters op te nemen. Ik heb het volgende als de snelkoppeling "Doel" in mijn Startmenu wat een venster opent voor control prompt (handig om de voortgang van uploads/downloads te zien), JOSM in zijn afzonderlijke venster laadt en 512mb geheugen toewijst aan het proces hetgeen de snelheid van de bewerking enorm versnelt bij het bewerken van veel gegevens. Wijzig "path" naar het volledige pad van jouw josm-latest.jar-bestand.
C:\WINDOWS\system32\java.exe -jar -Xmx512M "C:\path\josm-latest.jar"
Mac OS X - systemen
Je moet Mac OS 10.4 of hoger hebben. 10.3 zal het werk niet aankunnen. In 10.4.x en 10.5.x, dubbelklik eenvoudigweg op het jar-bestand en Java 1.5 zou het JOSM jar-bestand moeten laden. Indien je meer geheugen toe wilt wijzen aan JOSM (om grotere bestanden te kunnen bewerken), zal het volgende script helpen:
java -jar -Xmx256M -XX:MaxPermSize=256M josm-latest.jar
Neem -Dapple.laf.useScreenMenuBar=true er in op om het menu in de OS X-menubalk op te nemen, en -Xdock:name="JOSM" -Xdock:icon="logo.png" om het een pictogram en een naam te geven.
Getting started
- For video tutorials that show how to get started with JOSM and openstreetmap, go to http://showmedo.com/videos/series?name=mS2P1ZqS6. There are six video tutorials here. You'll need to create an account to be able to download the videos. The main one is 141 megs, so you'll probably need a high-speed connection or an over-night dial-up session.
- If you have a GPX tracklog file of the ways you want to map, start JOSM. Choose File → Open to select and load your track. JOSM will automatically fit the workspace to the bounding box of your track.
- If you don't have a GPX tracklog file then you may want to use data collected from other users. See Korea Mapping Guide
- If you want to play around while learning how to use JOSM without changing the data on the server then just don't upload (downloading is OK), delete the layers you changed, and then start over.
- Always download before editing even if you are using data stored on your own computer.
- To exchange data with the server ensure you have entered your username and passphrase in the preferences of JOSM. Your username is not your wiki username but the email address you used for registering. When uploading from JOSM, the passphrase must not contain the special character @ (and perhaps other special characters).
- Now choose File → 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
See also JOSM/Advanced Tricks (more tips for more experienced users)
- 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
- 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-, (comma).
- If you mapped one lane of a motorway, find here a tool which creates the opposite lane for you.
- The node dragging sensitivity is set quite low. You will probably find that setting the threshold to 5 will make it more sensitive. In Advanced Preferences add a key named edit.initial-move-threshold and give it a value of 5.
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 (or any time you think of it)
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.
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"
or put this in the "Run Application" dialog:
compiz --replace && export AWT_TOOLKIT=MToolkit
This also happens under tiling window managers such as ratpoison and stumpwm with Java 1.5 and 1.6 VMs (no problem with IcedTea/Java 1.7). It seems like josm demands to adjust its geometry in a certain way and when it can't panics. A workaround is to launch JOSM under Xnest:
Xnest :1 -ac -geometry 1280x1024 DISPLAY=:1 java -jar josm-latest.jar
You may also need a window manager, this example uses fluxbox:
Xnest :1 -ac -geometry 1280x1024 fluxbox -display :1 DISPLAY=:1 java -Xmx1024m -jar ~/src/josm/dist/josm-custom.jar
Similarly, to launch under Xephyr (an alternative to Xnest):
Xephyr :1 -ac -screen 1280x1024 DISPLAY=:1 java -Xmx1024m -jar josm-latest.jar
One could also export the AWT_TOOLKIT variable above but that doesn't seem to work for certain things, e.g. the download dialog is zero-sized.
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 ;)
- Some plugins require applications installed under X11 to work properly, to do this install the applications via MacPorts or similar, you can add a shortcut to JOSM in the X11 Applications menu by choosing edit → add new, and enter "java -jar /path/to/josm-latest.jar". You can also add any command line arguments to this, such as -Xxm for allocating more memory.
Points for all platforms
- to select different ways which use the same nodes, then middle click the way then hold ctrl and left click the way you want
- Get the "mappaint" rendering mode. 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). (This plugin has now been integrated into JOSM and can be turned on and off from the View menu > Wireframe view.)
- 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 Edit > Preferences > Display Settings), 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 File → 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, fifth 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 may not contain your changes immediately - see FAQ entry
See also
Related
- OpenStreetMap component overview
- JOSM file format
- JOSM/Search_function
- HOWTO run JOSM from flash disk with Java
- JOSM Relations and Turn Based Restrictions