JOSM/Plugins/Tracer2

From OpenStreetMap Wiki
< JOSM‎ | Plugins
Jump to navigation Jump to search


Description

The Tracer2 plug-in is designed to extract areas, with main attention to buildings from graphics (no photos).

To be able to extract areas/buildings the plug-in requires the Tracer2Server, which downloads the graphics and extracts the areas.

A version for Windows can be downloaded here: [1]

For Linux/OS X no prebuilt installer or binary files are available at this time. However, a description to create Tracer2Server from

sources are available on this wiki page.


Activating the plug-in

Tracer2 select param.png

After activating the plug-in Tracer2 via the Tools 2/Tracer 2 menu you'll be asked to select the desired parameters.

In this dialogue, only active parameter sets are shown. If there is just one parameter set, this is automatically activated and the dialogue is not shown.

It's recommended to choose the background layer corresponding to the Tracer2 parameter set.

After starting the Tracer2Server you can start extracting areas/building by clicking on the related item shown in your background layer.


Creating simple areas (buildings)

There are two ways to do this.

Initial situation: Building from WMS-Layer "Germany-NRW-Building"


Method 1 - creating a new area:

Methode 1 – Create new area

If you click outside of the already existing area, but inside the building shown in the WMS-Layer a new area is being created and tagged with a specified key.

The "old", already existing area (2) stays untouched.


Method 2 - transforming existing areas

Method 2 – Transform existing area

Mandatory requirement:

The already existing area has to have the same key as the one that will be created. In this case, that's building=*.

If you click inside of an already existing area it will be transformed. That means at first all old nodes will be removed and after that, the new ones will be added.

But that results in attributes getting lost. In this example, the entrances of the building will be removed. Nodes that belong to other objects will be kept but removed from the old object.


Selecting the desired key:

After creation of the new object, the desired object key can be selected by using the arrow keys.

You can use ↑↓ to select any "key values" known in JOSM.

Preferred key values can be selected by ←→ (e.g. building= yes / house / garage).


Creating further objects:

All further, newly created objects are always tagged with the last selected key value.

If you created a cathedral, it might happen that you create a village full of cathedrals if you don't pay attention!


Creating objects (buildings) with inner areas

Tracer2 building inner 0.png

If objects (buildings) with inner areas shall be created by the Tracer2 plugin first the inner area needs to be created.

There are two different ways to do so.


When you're using the mode "match color", simply click into the inner area (1a).

Tracer2 building inner 1.png

In case of using the mode "boundary", this method doesn't work as the inner area will be recognized as a boundary.

The inner area (1a) can be created by clicking directly below it (1b) as the Tracer2 plugin is always searching for the next boundary above the clicking position.


After creating the inner area (1a) the outer (2) can also be created by clicking directly below it.

Tracer2 building inner 2.png

The inner and outer areas can be combined by using the relation "multipolygon" after deleting the key-values of the inner area.


Side by side areas

Tracer2 2buildings.png

A newly created object is automatically connected to an existing object if it's tagged with the same key (e.g. building=*). It can, however, lead to errors if multiple points are close together. These have to be corrected manually before uploading the new changeset.


Areas with a dashed (broken) outer line

Tracer2 building broken line.png

Areas with a dashed outer line (stippled, dot chain, ...) can be created by using the "match color" mode. But if the inner colour is also used to be a "fill" of the broken outer line, the recognition will not be able to work properly.

It's not recommended to use the Tracer2 plugin to import such areas!


Be careful when clicking outside of areas

First, the Tracer2Server tries to find the outer line of an area above the clicking position. If there is no error message displayed, a new object was created. The new object might be outside the visible area!


Limitations

A square area with a maximum edge length of 65,536.00 points can be handled by the Tracer2Server, wherein the starting point is approximately in the middle.

The maximum area can be calculated as follows:

dLat = dLon = Tile size * 65536 / Resolution

dLat = dLon = 0,0004 * 65536 / 2048 = 0,0128

Bigger areas can be handled by adapting the settings "Tile size" and "Resolution".


Settings

Tracer2 settings 0.png

To display / change the settings

1. Open the JOSM settings menu by pressing F12.

2. Display the Tracer2 settings by clicking the related icon.

Tracer2 settings 1.png

In this menu settings for server request can be added, deleted, edited and (de-) activated. Minimum one parameter set has to be active in order to work with the plugin.


Name: Name of the server request settings. It should occur only once.

Description: Description of the parameter. Just as an user information, no other function.

Tracer2 settings 2.png

Address: wms layer address - can be imported from the wms / tms background layer settings in JOSM. Make sure you do not copy data from proprietary maps.

Tile size: Geographical area of an image.

Resolution: Image resolution.

Mode: „boundary“ for areas with a "dark" boundary. „match color“ for coloured areas without "dark".

Threshold: Recognition threshold.

Points per circle: Maximum number of points per circle. Arcs are automatically created with fewer points depending on their angle.

Tag: The key which is added to the new way e.g. building.

Preferred values: Preferred key-value. Only values known in JOSM are supported.

Setting up Tracer2Server on Linux / MacOS

Tracer2Server was written in C#, one of the programming languages for Microsoft's .NET Framework. A Linux / MacOS can be compiled from source code via an independent .NET implementation provided by the Mono Project. The following description provides a step-by-step description on how to create a working Tracer2Server for both Linux and MacOS.

Note that there's no installer available yet for Linux or MacOS at this time.

Preparation Steps

Linux

The following description assumes an Ubuntu Linux distribution.

1. Download Tracer2Server Source Code

 svn checkout http://svn.code.sf.net/p/tracer2server/code/ tracer2server-code

2. Install Mono Framework

 sudo apt-get install mono-complete

3. Install MonoDevelop (Mono development IDE)

 sudo apt-get install monodevelop

4. Start MonoDevelop

 monodevelop


MacOS

Tracer2Server running on MacOS

Source files can be downloaded as compressed archive file on the Tracer2Server project page. See Code -> Download Snapshot

For a standalone MonoDevelop installer check the following URL.


Compiling Tracer2Server

1. In Mono Develop - Menu: "File" -> "Open": Choose tracer2server-code/trunk/src/Tracer2Server.csproj

2. Right click on Tracer2Server in the project folder, click on Options in the context menu. Choose target framework Mono / .NET 4.0 in the popup under Create -> General

Step 2: Set Target Framework

3. Menu -> Run -> Start without debugger.

Assuming you already installed the Tracer2 Plugin in JOSM, you should be able to use Tracer2 by now.

When running a project MonoDevelop automatically builds the project and creates an executable file Tracer2Server.exe in directory tracer2server-code/trunk/src/bin/Debug. This executable can be used to launch Tracer2Server as a standalone application, i.e. MonoDevelop is not needed anymore. Simply copy this file to a suitable location. You may also use "Create" -> "Tracer2Server" in the menu to create the .exe file.