From OpenStreetMap Wiki
< JOSM‎ | Plugins
Jump to: navigation, search
Available languages — JOSM/Plugins/PicLayer
· Afrikaans · Alemannisch · aragonés · asturianu · azərbaycanca · Bahasa Indonesia · Bahasa Melayu · Bân-lâm-gú · Basa Jawa · Basa Sunda · Baso Minangkabau · bosanski · brezhoneg · català · čeština · corsu · dansk · Deutsch · eesti · English · español · Esperanto · estremeñu · euskara · français · Frysk · Gaeilge · Gàidhlig · galego · Hausa · hrvatski · Igbo · interlingua · Interlingue · isiXhosa · isiZulu · íslenska · italiano · Kiswahili · Kreyòl ayisyen · kréyòl gwadloupéyen · Kurdî · latviešu · Lëtzebuergesch · lietuvių · magyar · Malagasy · Malti · Nederlands · Nedersaksies · norsk bokmål · norsk nynorsk · occitan · Oromoo · oʻzbekcha/ўзбекча · Plattdüütsch · polski · português · română · shqip · slovenčina · slovenščina · Soomaaliga · suomi · svenska · Tagalog · Tiếng Việt · Türkçe · Vahcuengh · vèneto · Wolof · Yorùbá · Zazaki · српски / srpski · беларуская · български · қазақша · македонски · монгол · русский · тоҷикӣ · українська · Ελληνικά · Հայերեն · ქართული · नेपाली · मराठी · हिन्दी · भोजपुरी · অসমীয়া · বাংলা · ਪੰਜਾਬੀ · ગુજરાતી · ଓଡ଼ିଆ · தமிழ் · తెలుగు · ಕನ್ನಡ · മലയാളം · සිංහල · བོད་ཡིག · ไทย · မြန်မာဘာသာ · ລາວ · ភាសាខ្មែរ · ⵜⴰⵎⴰⵣⵉⵖⵜ ⵜⴰⵏⴰⵡⴰⵢⵜ‎ · አማርኛ · 한국어 · 日本語 · 中文(简体)‎ · 中文(繁體)‎ · 吴语 · 粵語 · ייִדיש · עברית · اردو · العربية · پښتو · سنڌي · فارسی · ދިވެހިބަސް

This plugin allows to load pictures and display them as JOSM layer.

Quick animated how-to: Piclayer Usage

General information


  • supported formats : PNG, JPEG, GIF
  • moving/rotating/scaling the picture with the mouse
  • loading/saving of the picture position on the map (.cal files)


  • no support for (Geo)TIFF
  • no georeferencing based on reference points or coordinates (only positioning with the mouse)
  • .cal files are projection-specific (.cal files are specific to the JOSM projection that existed when .cal file was saved. If you change JOSM projection, you should save the .cal file again, otherwise the pic will not load in its position next time.)


Use the plugin panel in the preferences of JOSM to install this plugin.


Loading a picture

  1. Load some data from the server so that map is visible. E.g., "File >> Download Data"
  2. select the menu "Imagery >> More... >> New Picture Layer from File"
  3. select one or several files

If calibration files (.cal) are available, then will be loaded automatically. If not, the image center will be placed at the current center of the screen, at a scale where it's reasonably visible.


  • New way (see animation at Piclayer Usage)
    1. Activate the layer.
    2. Click green arrow button at the left toolbar
    3. Select picture checkpoints ( 3 checkpoints needed for processing)
    4. Click red arrow button at the left toolbar
    5. At this mode you can move checkpoints (you should point exactly in the bubble of the point) and image will transform
  • Old way
    1. Activate the layer (not only select, really activate, this is important)
    2. Click on the appropriate icon "Drag to ... the picture" in the toolbar
    3. Use the mouse. You can press SHIFT while rotating or scaling the picture for a better precision.

Saving the cal file

Right click on a layer, "Save picture calibration..."

Loading the cal file

It will be loaded automatically when loading the picture based on the file name ( for instance). You can also load a cal file manually with "Load picture calibration..."

Important: the cal file is projection specific, make sure you use the same projection when saving and loading


See JOSM/Plugins/PicLayer/ReleaseNotes

Other links


New .cal file format

The following example uses UTM35 projection aka EPSG:32635, POSITION_X=28.8652921°E POSITION_Y=60.4985131°N and Image_Resolution~=0.5 m/pix

#JOSM PicLayer plugin calibration data
#Sun Nov 27 22:21:58 CET 2011
  • POSITION_X and POSITION_Y: position of the image center in world units (i.e. projection specific) — the same as in old .cal format
  • INITIAL_SCALE: equivalence of 100 pixels in world units
  • M00, M01, M02 and M10, M11, M12: affine transform coefficients

Mathematical background:

Latex translation-rotation-scale.png

(PX,PY)=POSITION_X/Y, S=INITIAL_SCALE, (x,y)=pixel location relative to the image center. (x',y')=projected coordinates. IGN=ignore. Technically, INITIAL_SCALE and POSITION_X, POSITION_Y are redundant because they could be merged into M. Also see for a graphic help on how M is constituted.

Old .cal file format

Example :

#JOSM PicLayer plugin calibration data
#Mon Nov 15 19:38:35 CET 2010
  • INITIAL_SCALE: world meters / 100 pixels at the time you load the image
  • SCALE_X/Y: additional scaling done by the user
  • SHEAR_X/Y: meaning?
  • INITIAL_POS_X/Y: meaning?
  • POSITION_X/Y: position of the image center in world units
  • ANGLE: 0 means not rotated

About scaling: the size of the image in world meters is: imgsize / 100 * INITIAL_SCALE * SCALE_X/Y

Remember that the cal files are projection specific, but the projection is not stored in the file.

Note: Josm may crash when trying to open a very old cal-file (see ticket 6123 with workaround)

How to convert an old .cal file format to new .cal file format


World file

If a world file is present next to an image when opened, it is used to automatically georeference the layer.

The format is a normal .wld file. However the projection (.prj) is not read and need to be set to the same as JOSM (default EPSG:3857).