Plugin -> PicLayer
This plugin is meant for showing images as a background of the data being edited.
It offers two ways of loading the data:
- from a file and
- from the clipboard.
This is an early version and is not end-user-proof, so please follow the steps exactly in case you want to use it.
Note: Make sure the image is suitable, copyright-wise, if in doubt, don't use.
- Load some data from the server so that map is visible.
- Click the Imagery menu and either choose New picture layer from file or New picture layer from clipboard.
- If you chose a file, a file selector will pop-up. Choose the image you want. Of course the format you are using might not be supported yet :)
- If you chose a clipboard, please wait. For some reason it takes time. To be fixed later.
Note: If something failed, you should get a message box. If not - check the console for messages (Linux only?)
- Once the image is visible you may start positioning it. For that - select the PicLayer in the layers list and activate it (!!!).
- Start aligning the image.
- Move the image by choosing 'Move' from the toolbar and draggin the mouse around with left button pressed.
- Rotate the image by choosing 'Rotate' from the toolbar and draggin the mouse up/down with left button pressed.
- Scale the image by choosing 'Scale' from the toolbar and draggin the mouse up/down with left button pressed.
- You can also choose to scale in just one axis by selecting the proper button.
Note: If it does not work - make sure the right layer is selected AND ACTIVATED.
- If you need to reset your changes - you can use the popup menu available under the PicLayer entry in the layer list.
- If you want to save the calibraton of the picture you have made, you can also do this using the popup menu.
This plugin is meant to help with mapping from photos (for me it's mostly buildings) for people who simply don't like MetaCarta Rectifier.
Converting calibration data in PicLayer
For those interested in converting calibration data in PicLayer:
INITIAL_SCALEis the initial size of 100 image pixels (length of ruler in JOSM).
SCALEX/Yis the factor after changing the size of the raster image relative to JOSM data layer.
INITIAL_POS_y/Xare the coordinates of the image center in mercator projection.
POSITION_X/Yare the coordinates after shifting the raster image relative to JOSM data layer.
ANGLEis the angle in degrees (clockwise -> positive) when the raster image is rotated.
- Mercator units are arc units in longitude (PI <-> 180).
- Latitude is a bit complicated because this projection preserves angles but not areas:
y = ln(tan(45+b/2))
where b is in degrees, ln ist the natural logarithm and tan ist the tangent.
- The longitude in degrees l is obtained from x via:
l = x*180/PI.
- The latitude b can be calculated from y by:
b = 2*arctan(e!**y) - 45(when inverse tangent returns degrees).
When transforming longitude degree differences of image corners to distance, you have to take into account that one degree east-west has different size dependent on latitude.
At equator 1 degree -> d0 = 111.321 km (from GRS 80 semi-major axes), at latitude b you get:
d = d0*cos(b)
(only exact for sphere, but deviation from ellipsoid < 0.5%).
- PicLayer page at OSM wiki