5.10.6 Open Street Map layers importations applications

Generate a vector data from OSM on the input image extend

Detailed description

Generate a vector data from Open Street Map data. A DEM could be use. By default, the entire layer is downloaded, an image can be use as support for the OSM data. The application can provide also available classes in layers . This application required an Internet access. Informations about the OSM project : http://www.openstreetmap.fr/

Parameters

This section describes in details the parameters available for this application. Table 5.77, page 731 presents a summary of these parameters and the parameters keys to be used in command-line and programming languages. Application key is OSMDownloader.




Parameter key

Parameter type

Parameter description




out

Output vector data

Output vector data

support

Input image

Support image

key

String

OSM tag key

value

String

OSM tag value

elev

Group

Elevation management

elev.dem

Directory

DEM directory

elev.geoid

Input File name

Geoid File

elev.default

Float

Default elevation

printclasses

Boolean

option to display available key/value classes

inxml

XML input parameters file

Load otb application from xml file

outxml

XML output parameters file

Save otb application to xml file








Figure 5.77: Parameters table for Open Street Map layers importations applications.

Output vector data Generated output vector data path

Support image Image used as support to estimate the models

OSM tag key OSM tag key to extract (highway, building...)

OSM tag value OSM tag value to extract (motorway, footway...)

Elevation management This group of parameters allows to manage elevation values. Supported formats are SRTM, DTED or any geotiff. DownloadSRTMTiles application could be a useful tool to list/download tiles related to a product.

option to display available key/value classes Print the key/value classes available for the bounding box of the input image
** If not used : Note that the options OSMKey (-key) and Output (-out) become mandatory

Load otb application from xml file Load otb application from xml file

Save otb application to xml file Save otb application to xml file

Example

To run this example in command-line, use the following:

otbcli_OSMDownloader -support qb_RoadExtract.tif -key highway -out apTvUtOSMDownloader.shp

To run this example from Python, use the following code snippet:

#!/usr/bin/python 
 
# Import the otb applications package 
import otbApplication 
 
# The following line creates an instance of the OSMDownloader application 
OSMDownloader = otbApplication.Registry.CreateApplication("OSMDownloader") 
 
# The following lines set all the application parameters: 
OSMDownloader.SetParameterString("support", "qb_RoadExtract.tif") 
 
OSMDownloader.SetParameterString("key", "highway") 
 
OSMDownloader.SetParameterString("out", "apTvUtOSMDownloader.shp") 
 
# The following line execute the application 
OSMDownloader.ExecuteAndWriteOutput()

Limitations

None

Authors

This application has been written by OTB-Team.

See also

These additional ressources can be useful for further information: