ConcatenateVectorData - Concatenate Vector Data

Concatenate vector data files

Detailed description

This application concatenates a list of vector data files to produce a unique vector data output file.

This application will gather all the geometries from the input files and write them into an output vector data file. Any format supported by OGR can be used. Ideally, all inputs should have the same set of fields and the same spatial reference system.

Parameters

This section describes in details the parameters available for this application. Table [1] presents a summary of these parameters and the parameters keys to be used in command-line and programming languages. Application key is ConcatenateVectorData .

[1]Table: Parameters table for Concatenate Vector Data.
Parameter Key Parameter Name Parameter Type
vd Input vector files Input vector data list
out Concatenated output Output vector data
inxml Load otb application from xml file XML input parameters file
outxml Save otb application to xml file XML output parameters file
  • Input vector files: Vector data files to be concatenated.
  • Concatenated output: Output conctenated vector data file.
  • 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_ConcatenateVectorData -vd ToulousePoints-examples.shp ToulouseRoad-examples.shp -out ConcatenatedVectorData.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 ConcatenateVectorData application
ConcatenateVectorData = otbApplication.Registry.CreateApplication("ConcatenateVectorData")

# The following lines set all the application parameters:
ConcatenateVectorData.SetParameterStringList("vd", ['ToulousePoints-examples.shp', 'ToulouseRoad-examples.shp'])

ConcatenateVectorData.SetParameterString("out", "ConcatenatedVectorData.shp")

# The following line execute the application
ConcatenateVectorData.ExecuteAndWriteOutput()

Limitations

The vector data must be contain the same type of geometries (point / lines / polygons). The fields present in the output file are the ones from the first input.

Authors

This application has been written by OTB-Team.