|Version 10 (modified by stoecker, 2 years ago) (diff)|
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.
Step 1) Load some data from the server so that map is visible.
Step 2) Go to PicLayer menu and either choose to add a layer from a file or from the clipboard.
Step 2a) 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 :)
Step 2b) 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?)
Step 3) Once the image is visible you may start positioning it. For that - select the PicLayer in the layers list and activate it (!!!).
Step 4) Start aligning the image.
Step 4a) Move the image by choosing 'Move' from the toolbar and draggin the mouse around with left button pressed.
Step 4b) Rotate the image by choosing 'Rotate' from the toolbar and draggin the mouse up/down with left button pressed.
Step 4c) Scale the image by choosing 'Scale' from the toolbar and draggin the mouse up/down with left button pressed.
Step 4d) 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.
Step 5) If you need to reset your changes - you can use the popup menu available under the PicLayer entry in the layer list.
Step 6) 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.
For those interested in converting calibration data in PicLayer:
INITIAL_SCALE is the initial size of 100 image pixels (length of ruler in JOSM).
SCALEX/Y is the factor after changing the size of the raster image relative to JOSM data layer.
INITIAL_POS_y/X are the coordinates of the image center in mercator projection.
POSITION_X/Y are the coordinates after shifting the raster image relative to JOSM data layer.
ANGLE is 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%).