Skip to content

Open Street Map XML

OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world (see http://www.openstreetmap.org). In contrary to the import filter „Google Maps“ and „Google Earth“ available in CadnaA the OSM import does not yield any bitmap data, but CadnaA objects like buildings or roads using digital geometry data.

Important Notice to Users

Due to the fact that OSM is an „open source“ project which means that basically everyone can contribute, the results may vary depending on the chosen global region. It is the user's own responsibility to make sure the data can be used for commercial/professional purposes and to take measures ensuring the correctness of the data. DataKustik cannot be held liable for any errors caused by using data obtained from OSM.

Obtaining OSM data

In order to obtain OSM data use the following steps:

  • Navigate in your web-browser to www.openstreetmap.org.
  • Enter on the „Search“ bar the location‘s name or find the section for import using the mouse.

  • On the top of the screen, hit the „Export“ button which will open a tab on the left side of the screen.

OSM website with export panel for Greifenberg area (Germany)

  • Make sure to check and acknowledge the license and then hit the blue „Export“ button.
  • In case the download is rejected either choose a different download mirror or select a smaller section. Depending on the desired bounds multiple files may result.
  • Depending on the download mirror you will be prompted to download a file called „map“, „map.osm“ or similar. Save the file to the hard drive and move to the next section.

Note

For exporting larger sceneries we recommend to use the option „Overpass API“ on the lower part of the window (at the top of the list of download mirrors) since this feature has less restrictions regarding maximum size of the area being exported from OSM.

Data Import

The import into CadnaA is similar to other text based file formats like "GML".

  • From File|Import menu and select „OpenStreetMap XML (*.osm)“ as import filter.

Note

CadnaA expects either the file extension „osm“ or „xml“. In case the downloaded file does not have any extension (or a different one) locate it using in Windows Explorer and add or rename the extension to „osm“. Since XML files are text files no data is lost by doing so.

  • Click the „Options“ button for additional features for import (for details see next section).
  • Clicking the „Open“ button starts the import procedure. In case the progress bar does not reach 100% it is likely that an error occurred during import due to corrupted data. In this case, re-download the OSM data.
  • After import zoom to limits using the symbol on the toolbox.

Import Options

Due to a predefined correspondence table „object type vs. object layer“ many CadnaA objects are automatically detected on import: road, railway tracks, traffic lights, parking lots, buildings, screens, bridges, foliage, height points and land usage. Objects not being convertible will be imported as auxiliary polygons. In any case, CadnaA tries to set the object‘s height provided this information is available (e.g. a building's height can be derived from the number of levels and the default storey height).

The „Options“ button offers the following features:

  • addressing object type to object layer (see Allocate Object Type to Layer)
  • Import only in a section (see Import only Section)
  • Simplify Geometry automatically (see Simplify Geometry in the manual „Introduction to CadnaA“)
  • Unknown Attributes to Memo-Variables (active per default): When active, attribute names unknown to CadnaA are imported to a memo variable each, listed in the Memo-Window of each object.
  • button „Transform“ (see Coordinate Transformation)
  • button „Open/Save“: opens/saves import filter settings

Dialog Options Import for OpenStreetMap

Importing data at strip borders

In case the data to be imported is crossing the border of two meridian strips of the selected geodetic system (e.g. UTM, border from 32nd to 33rd strip), a specific meridian strip (in this example 32nd strip) shall be selected on the Coordinate System dialog (see Coordinate System) instead of the default setting „(auto)“.

Further Information

Importing terrain contours

Terrain contours are not part of the data downloaded from the OSM servers. Terrain data can, however, be obtained from NASA‘s Shuttle Radar Topography Mission (SRTM) which mapped the Earth‘s globe from 56° South to 60° North (see http://www2.jpl.nasa.gov/srtm/). The resolution of the SRTM terrain model is 1 arc second (approx. 30 m). This data is free of charge and is converted into an XML file having the same data structure as the OSM data.

Note

Additional information regarding the accuracy of the SRTM data:
The data originated from the STS-99 Shuttle Radar Topography Mission (SRTM) in February 2000 and was obtained from approximately 233 km orbital altitude by an active synthetic aperture radar (SAR). The elevation data reflects the shape of the earth's surface, but includes vegetation and buildings. Thus, it does not correspond to the actual shape of the earth's surface, especially in built-up areas. The mapping of the earth's surface covered the area between 60 ° North and 58 ° South latitude. The relative accuracy of the heights stated is ± 6m with a grid spacing of approximately 30x30m for North America and 90x90m for the rest of the area covered. To conclude, the latter grid size, in addition to the restriction for vegetation and buildings, does not reproduce a realistic model of the earth's surface and is, therefore, believed to be too inaccurate in situations where the screening by terrain edges may be relevant in noise propagation.

Proceed as follows to import SRTM terrain data:

  • Open the URL http://wiki.openstreetmap.org/wiki/Srtm2Osm and download the SRTM2OSM tool offered there and extract it to a folder with writing permissions. There is no installation required.
  • Now, using the OSM website (see above), select the area to be imported and copy the URL to the clipboard (using the key combination CTRL+C).

Note

For this, do not enter a location‘s name, but navigate just using the mouse (for dragging) and the mouse wheel (for zooming). The reason is that the final URL just shows longitude/latitude data as long as no location name has been specified.

As example, this URL is used\:http://www.openstreetmap.org/relation/933870#map=13/48.0792/11.0785

Copying the URL for a selected region in OpenStreetMap

  • This URL is made of the following components:base URL /zoom level /longitude /latitude /optional parametersEverything after the first optional parameter (indicated by the '&' as separating character) shall be omitted. Edit the URL by pasting it, for example, to a text editor.
  • Navigate to the folder where the SRTM2OSM tool was extracted to using the Windows Command Prompt or use a batch file (see below). Once within the folder, enter the following command, substituting the URL with the one as copied before.

For example, for the region located before the full command would read:srtm2osm.exe -bounds3 "http://www.openstreetmap.org/relation/933870#map=13/48.0792/11.0785"

Windows Command Prompt: use Paste command from the context menu

Note

The URL parameter must be surrounded with quotation marks "".

Note

During download temporary files are written to a sub-folder in the specified path (where srtm2osm.exe was launched from). This requires that the user logged in has write access to that folder or drive, respectively (e.g. admin rights). Make sure that the directory or path being used has write access by the user logged-in.

Now, the software starts to download the SRTM data from the NASA FTP server and converts it to the OSM XML format. A notification about success or failure of this operation will be printed to the console window. When successful, a file called „srtm.osm“ will be created within the folder containing the srtm2osm.exe file.

  • Import this file into CadnaA as described before.

Additional import parameters

The SRTM2OSM tool offers a variety of parameters - which are all described on the Wiki page:

http://wiki.openstreetmap.org/wiki/Srtm2Osm

For example, specifying the location and name of the output file (-o) or entering the minimum and maximum latitude/longitude bounds directly (-bounds1) instead of the URL.

Using a batch file instead of the console

In case navigating using the Windows Command Prompt turns out to be too cumbersome, proceed as follows:

  • Locate the folder where the srtm2osm.exe was extracted to using the Windows Explorer.
  • Create a new text file with a descriptive name and the file extension .bat.
  • Open this bat-file using a text editor. To this end, click with the right mouse button on the filename and select the Edit command from the context menu.

Note

Do not double click the filename!

  • Now, copy the previously highlighted command to the file and save it.
  • Run that text file it using double click.

Once the import operation has been completed, the window will be closed automatically.