wiki:Help/Plugin/PicLayer

Version 15 (modified by skyper, 12 years ago) ( diff )

fix

Plugin -> PicLayer

/pluginicon/PicLayer.jar/images/layericon.png

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.

Usages

  1. Load some data from the server so that map is visible.
  2. Go to PicLayer menu and either choose to add a layer from a file or from the clipboard.
    1. 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 :)
    2. 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?)

  1. Once the image is visible you may start positioning it. For that - select the PicLayer in the layers list and activate it (!!!).
  2. Start aligning the image.
    1. Move the image by choosing 'Move' from the toolbar and draggin the mouse around with left button pressed.
    2. Rotate the image by choosing 'Rotate' from the toolbar and draggin the mouse up/down with left button pressed.
    3. Scale the image by choosing 'Scale' from the toolbar and draggin the mouse up/down with left button pressed.
    4. 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.

  1. If you need to reset your changes - you can use the popup menu available under the PicLayer entry in the layer list.
  2. 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_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%).

See also


Back to Plugin Help
Back to Main Help

Attachments (4)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.