17 | | 1. Load some data from the server so that map is visible. |
18 | | 2. Click the '''Imagery''' menu and either choose '''New picture layer from file''' or '''New picture layer from clipboard'''. |
19 | | a. 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 :) |
20 | | b. If you chose a clipboard, please wait. For some reason it takes time. To be fixed later. |
| 19 | 1. Load some data from the server so the map is visible. |
| 20 | 1. Move and zoom the [wikitr:/Help/MapView MapView] to the estimated target position of the new background image. |
| 21 | 1. Click the **Imagery** menu and either choose **New picture layer from file** or **New picture layer from clipboard**. |
| 22 | a. If you chose file, a file selector will pop-up. Pick the image you want. All formats supported by Java (GIF with transparency) and furthermore ZIP as container and KML (#5451 experimental) are possible. |
| 23 | a. If you chose clipboard, importing the image data may take some time. |
24 | | 3. Once the image is visible you may start positioning it. For that - select the PicLayer in the layers list and activate it (!!!). |
25 | | 4. Start aligning the image. |
26 | | a. Move the image by choosing 'Move' from the toolbar and draggin the mouse around with left button pressed. |
27 | | b. Rotate the image by choosing 'Rotate' from the toolbar and draggin the mouse up/down with left button pressed. |
28 | | c. Scale the image by choosing 'Scale' from the toolbar and draggin the mouse up/down with left button pressed. |
29 | | d. You can also choose to scale in just one axis by selecting the proper button. |
| 27 | 4. Once the image is visible you may start to position and calibrate it. For that - activate the !PicLayer layer with the image in the [wikitr:/Help/Dialog/LayerList Layers window]. |
| 28 | 1. Start aligning the image. |
| 29 | a. Move the image by choosing 'Move' from the [wikitr:/Help/EditToolbar toolbar] and dragging the mouse around with left button pressed. |
| 30 | a. Rotate the image by choosing 'Rotate' from the toolbar and drag. |
| 31 | a. Scale the image by choosing 'Scale' from the toolbar and drag. |
| 32 | a. You can also choose to scale in just one axis by selecting the proper button. \\ \\ |
| 33 | 1. If you need to reset your changes - you can use the context menu from the !PicLayer entry in the layer list. |
| 34 | 1. If you want to save the calibration of the image, you can also do this using the popup menu. |
39 | | == Converting calibration data in PicLayer == |
40 | | For those interested in converting calibration data in PicLayer:[[BR]] |
41 | | * {{{INITIAL_SCALE}}} is the initial size of 100 image pixels (length of ruler in JOSM). |
42 | | * {{{SCALEX/Y}}} is the factor after changing the size of the raster image relative to JOSM data layer. |
43 | | * {{{INITIAL_POS_y/X}}} are the coordinates of the image center in mercator projection. |
44 | | * {{{POSITION_X/Y}}} are the coordinates after shifting the raster image relative to JOSM data layer. |
45 | | * {{{ANGLE}}} is the angle in degrees (clockwise -> positive) when the raster image is rotated. |
| 39 | == Converting calibration data in !PicLayer == |
| 40 | For those interested in converting calibration data in !PicLayer: \\ |
| 41 | * `INITIAL_SCALE` is the initial size of 100 image pixels (length of ruler in JOSM). |
| 42 | * `SCALEX/Y` is the factor after changing the size of the raster image relative to JOSM data layer. |
| 43 | * `INITIAL_POS_y/X` are the coordinates of the image center in mercator projection. |
| 44 | * `POSITION_X/Y` are the coordinates after shifting the raster image relative to JOSM data layer. |
| 45 | * `ANGLE` is the angle in degrees (clockwise -> positive) when the raster image is rotated. |
| 72 | |
| 73 | == Using auto calibration action == |
| 74 | This action helps you to position and calibrate an image (preferably a floor plan) into the world map. |
| 75 | |
| 76 | **What do I need to use this action?** |
| 77 | * an image, preferably a floor plan |
| 78 | * information about side length of building |
| 79 | |
| 80 | **How do I start calibration?** |
| 81 | * 1. open the image file and switch to the image layer so you can see the !PicLayer modes in the [wikitr:/Help/EditToolbar Edit Toolbar] on the left. |
| 82 | * 2. enter the "Calibrate Picture with outline" mode |
| 83 | * 3. follow the window |
| 84 | * 3.1 select **Building Corner Point** (example in picture : edge points) |
| 85 | * 3.2 enter **True Distances** - if you select the text field a green line will pop up and show you which distance on the image is required. Please enter the real distance in meter between the two points. |
| 86 | * 3.3 open the **Building Reference File** - open a .osm or .gpx file with coordinates of building outline or select a layer as reference |
| 87 | * 3.4 select **Building Reference Points** |
| 88 | * 3.4.1 mode selection - if the building outline coordinates are already defined in layer, select **defined** mode (.osm files only), if you want to set the coordinates somewhere on layer, select **manual** mode |
| 89 | * 3.4.2 select the same points as in step 3.1, now only on your real building outline (example in picture) |
| 90 | * 3.5 **run** calibration - **result** |
| 91 | |
| 92 | Example: [osmwiki:../w/images/a/a8/Piclayer_auto_calibration.gif Piclayer_auto_calibration.gif] |
| 93 | |
| 94 | **More information** |
| 95 | For more information about why do I need to insert distances and why the image usually does not fit exactly in the outline file, see [[osmwiki:JOSM/Plugins/PicLayer|PicLayer Page]]. |
| 96 | |
| 97 | |