How to... (step-by-step instructions)
  1. Pix4D Documentation
  2. PIX4Dmapper
  3. How to... (step-by-step instructions)

How to create a Processing Options Template .tmpl File - PIX4Dmapper

This article describes the format of the .tmpl template file. This could be useful when there is a need to create a template file to automate processing using the command line.

Note: It is recommended to use the user interface as much as possible to create templates and to export them to a file.

.tmpl file format

The .tmpl file contains information about the processing options and which processing steps to run. The .tmpl file is written in XML format and has a formal definition by means of a XSD (XML Schema Document) file. The XSD file can be found in the installation directory in "resources/xsd/templates_*.xsd".

The name of the .tmpl file defines the template name that will be displayed in the software's User Interface.

The .tmpl file has the following structure

.tmpl 3.3 format summary
<? xml version = "1.0" encoding = "UTF-8" ?>
< pix4dtmpl>
< information>
<info>
<!--Contains user information about the template-->
</info>
<version>
<!--Contains the software version defining the template format-->
</version>
</ information>
< initial>
<!--Contains info about the processing options for step 1-->
</ initial>
< dense>
<!--Contains info about the processing options for step 2-->
</ dense>
< ortho>
<!--Contains info about the processing options for step 3 Orthomosaic and DSM-->
</ ortho>
< index>
<!--Contains info about the processing options for step 3 Index Calculator-->
</ index>
</ pix4dtmpl>

.tmpl XML tags

The section below lists the XML tags used for each processing options.

1. Initial Processing

Processing options for step 1. Initial Processing. For more information: Menu Process > Processing Options... > 1. Initial Processing > General.

Run Step
Option
XML Tag
Value Type and Range
Example
Run step 1. Initial Processing
runStep
Defines if step 1 should be run or not. Value can be:
  • true: run step 1
  • false: do not run step 1
true

General
Option
XML Tag
Value Type and Range
Example
Keypoints Image Scale
Keypoint Image Scale
keypointsImageScale
Defines how the image scale for keypoint extraction is chosen. Value is given by a string. It can be:
  • Full: for Full
  • Rapid: for Rapid
  • Custom: for Custom
Full
Image Scale
imageScale
Used only if keypointsImageScale = Custom

Defines the image scale used for keypoint extraction.
  • If Keypoint Image Scale is Full or Rapid: the Image Scale value is automatically chosen.
  • If Keypoint Image Scale is Custom: the value can be:
    • 0.125: for 1/8 (eighth image size)
    • 0.25: for 1/4 (quarter image size)
    • 0.5: for 1/2 (half image size)
    • 1: for 1 (original image size)
    • 2: for 2 (double image size)
1
Quality Report
Generate Orthomosaic Preview in Quality Report
generateOrthoInReport
Defines if the orthomosaic preview should be generated for the Quality Report or not. Value can be:
  • true: generate orthomosaic preview
  • false: do not generate orthomosaic preview
true

Matching
Option
XML Tag
Value Type and Range
Example
Matching Image Pairs
Matching Image Pairs
matchStrategy
Defines how to select the image pairs to match together. Value is given by a string. It can be:
  • AutoAerial: for Aerial Grid or Corridor
  • AutoOblique: for Free Flight or Terrestrial
  • Custom: for Custom
AutoAerial
Use Capture Time
matchTimeNbNeighbours
Used only if matchStrategy = Custom

Defines if the images pair should be matched according to capture time. Value can be:
  • 0: Do not use capture time
  • a positive integer n such that 0 ≤ n ≤ 50: Number of Successive Neighboring Images
2
Use Triangulation of Image Geolocation
matchUseTriangulation
Used only if matchStrategy = Custom

Defines if the image pairs should be matched by using a triangulation of the image geolocation. Value can be:
  • true: use triangulation
  • false: do not use triangulation
true
Use Distance
matchRelativeDistanceImages
Used only if matchStrategy = Custom

Defines if the image pairs should be matched according to the distance between them. Value can be:
  • a decimal number < 0: use Relative Distance Between Consecutive Images
  • a decimal number > 0: use absolute Distance Between Consecutive Images
  • a decimal number = 0: do not use distance
-1.5
Use Image Similarity
matchImageSimilarityMaxPairs
Used only if matchStrategy = Custom

Defines if the image pairs should be matched using image similarity. Value can be:
  • 0: Do not use image similarity
  • a positive integer n such that 0 ≤ n ≤ 100: Maximum Number of Pairs for Each Image Based on Similarity
2
Use MTPs
matchMtpMaxImagePair
Used only if matchStrategy = Custom

Defines if the image pairs should be matched using Manual Tie Points. Value can be:
  • 0: Do not use MTPs
  • a positive integer n such that 1 ≤ n ≤ 50: Maximum Number of Image Pairs per MTP
50
Use Time for Multiple Cameras
matchTimeMultiCamera
Used only if matchStrategy = Custom

Defines if time should be used to match images taken by different cameras. Value can be:
  • 0: Do not use time
  • 1: Use time
0
Matching Strategy
Use Geometrically Verified Matching
geometricallyVerifiedMatching
Defines if geometrically verified matching should be used. Value can be:
  • true: use geometrically verified matching
  • false: do not use geometrically verified matching
false

Calibration
Option
XML Tag
Value Type and Range
Example
Targeted Number of Keypoints
Targeted Number of Keypoints
keypointSelectionMethod
Defines how to select the targeted number of keypoints to extract. Value can be:
  • Automatic
  • CustomNumber OfKeypoints
CustomNumberOfkeypoints
Number of Keypoints
numberOfKeypoints
Used only if keypointSelectionMethod=CustomNumberOfkeypoints

Defines the number of targeted keypoints to extract. Value can be:
  • an integer n such that 100 ≤ n ≤ 1'000'000
10000
Calibration
Calibration Method
calibrationMethod
Defines which calibration method to use. Value can be:
  • Standard
  • Alternative
  • Accurate Geolocation and Orientation
Standard
Optimizer
optimizerType
Defines the optimizer type to use. Value can be:
  • Ceres
Ceres
Internal Parameters Optimization
internalParamOptimization
Defines how to optimize the internal camera parameters. Value can be:
  • None
  • Leading
  • All
  • All Prior
All
External Parameters Optimization
externalParamOptimization
Defines how to optimize the external camera parameters. Value can be:
  • None
  • Orientation
  • All
All
Rematch
Rematch
rematchStrategy
Defines how to choose whether to rematch the images or not. Value can be:
  • Auto: for Automatic
  • Custom: for Custom
Auto
Rematch
rematch
Used only if rematchStrategy = Custom

Defines if the images have to be rematched or not. Value can be:
  • true: rematch images
  • false: do not rematch images
true
Pre-processing
Sky Segmentation
automaticSkyMasking
Used only if the project consists of Parrot Bebop images.

Defines if masking the pixels that are covered by sky on the images is used. Value can be:
  • true: masking is applied
  • false: masking is not applied
true
Export
Camera Internals and Externals, AAT, BBA
exportCameraParamsAATBBA
Defines if the optimized camera internals and externals should be exported to files. Value can be:
  • true: export to file
  • false: do not export to file
true
Undistorted Images
exportUndistortedImages
Defines if undistorted images should be generated. Value can be:
  • true: generate undistorted images
  • false: do not generate undistorted images
false

2. Point Cloud and Mesh

Processing options for step 2. Point Cloud and Mesh. For more information: Menu Process > Processing Options... > 2. Point Cloud and Mesh > Point Cloud.

Run Step
Option
XML Tag
Value Type and Range
Example
Run step 2. Point Cloud and Mesh
runStep
Defines if step 2 should be run or not. Value can be:
  • true: run step 2
  • false: do not run step 2
true

Point Cloud
Option
XML Tag
Value Type and Range
Example
Point Cloud Densification
Image Scale
pclImageDownscaleFactor
Defines the image scale used for densified point cloud. Value can be:
  • 0: for 1 (Originial image size, Slow)
  • 1: for 1/2 (Half image size, default)
  • 2: for 1/4 (Quarter image size, Fast)
  • 3: for 1/8 (Eighth image size, Tolerant)
1
Multiscale
pclImageMultiscale
Defines if multi image scales should be used for point cloud densification. Value can be:
  • true: do not use multiscale
  • false: use multiscale
true
Point Density
pclDensity
Defines which point density to obtain. Value can be:
  • High
  • Optimal
  • Low
Optimal
Minimum Number of Matches
pclMinNoMatches
Defines the minimum number of matches. Value can be and integer n such that 2 ≤ n ≤ 6
3
Export
LAS
pclExportLAS
Defines if the densified point cloud should be exported in LAS format. Value can be:
  • true: export densified point cloud in LAS format
  • false: do not export densified point cloud in LAS format
true
LAZ
pclExportLAZ
Defines if the densified point cloud should be exported in LAZ format. Value can be:
  • true: export densified point cloud in LAZ format
  • false: do not export densified point cloud in LAZ format
false
PLY
pclExportPLY
Defines if the densified point cloud should be exported in PLY format. Value can be:
  • true: export densified point cloud in PLY format
  • false: do not export densified point cloud in PLY format
false
XYZ
pclExportXYZ
Defines if the densified point cloud should be exported in XYZ format. Value can be:
  • true: export densified point cloud in XYZ format
  • false: do not export densified point cloud in XYZ format
false
XYZ Delimiter
pclExportXYZDelim
Defines the delimiter of the XYZ file. Value can be:
  • Space: for Space
  • Tab: for Tab
  • Comma: for Comma
  • Semicolon: for Semicolon
Space
Merge tiles
pclExportMergeTiles
If several tiles have been generated, defines if they should be merged into one single file. Value can be:
  • true: merge point cloud tiles into a single file
  • false: do not merge point cloud tiles into a single file
false

3D Textured Mesh
Option
XML Tag
Value Type and Range
Example
Generation
Generate 3D Texture Mesh
meshGenerate3dTexturedMesh
Defines if the 3D Textured Mesh should be generated or not. Value can be:
  • true: generate 3D Textured Mesh
  • false: do not generate 3D Textured Mesh
true
Settings
Mesh Resolution
meshResolution
Defines the resolution of the mesh. Value can be:
  • High: for High Resolution
  • Medium: for Medium Resolution (default)
  • Low: for Low Resolution
  • Custom: for Custom
Medium
Maximum Octree Depth
meshMaxOctreeDepth
Defines the maximum depth of the octree used to create the mesh. Value can be:
  • positive integer n such that 5 ≤ n ≤ 20
12
Texture Size
meshTextureSize
Defines the mesh texture size. Value can be:
  • 256: for 256x256
  • 512: for 512x512
  • 1024: for 1024x1024
  • 2048: for 2048x2048
  • 4096: for 4096x4096
  • 8192: for 8192x8192
  • 16384: for 16384x16384
  • 32768: for 32768x32768
  • 65536: for 65536x65536
  • 131072: for 131072x131072
8192
Decimation Criteria
meshDecimationCriteria
Defines how to decimate the mesh after it has been created. Value can be:
  • Quantitative
  • Qualitative
Quantitative
Maximum Number of Triangles
meshMaxTriangles
Used when meshDecimationCriteria is Quantitative. Defines the maximum number of triangles for the mesh. Value can be:
  • positive integer n such that 100 < n < 20'000'000
1000000
Strategy
meshDecimationStrategy
Used when meshDecimationCriteria is Qualitative. Defines which qualitative strategy to use to decimate the mesh. Value can be:
  • Sensitive
  • Aggressive
Sensitive
Use Color Balancing for Texture
meshTextureColorBalancing
Defines if color balancing should be used for the texture of the mesh. Value can be:
  • true: use color balancing
  • false: do not use color balancing
false
Export
PLY
meshExportPLY
Defines if the 3D textured mesh should be exported in PLY format. Value can be:
  • true: export 3D textured mesh in PLY format
  • false: do not export 3D textured mesh in PLY format
false
FBX
meshExportFBX
Defines if the 3D textured mesh should be exported in FBX format. Value can be:
  • true: export 3D textured mesh in FBX format
  • false: do not export 3D textured mesh in FBX format
false
AutoCAD DXF
meshExportDXF
Defines if the 3D textured mesh should be exported in AutoCAD DXF format. Value can be:
  • true: export 3D textured mesh in AutoCAD DXF format
  • false: do not export 3D textured mesh in AutoCAD DXF format
false
OBJ
meshExportOBJ
Defines if the 3D textured mesh should be exported in OBJ format. Value can be:
  • true: export 3D textured mesh in OBJ format
  • false: do not export 3D textured mesh in OBJ format
true
Tiled Texture
meshExportTiledOBJ
Defines if the 3D textured mesh should be exported in OBJ format with tiled texture. Value can be:
  • true: export 3D textured mesh in OBJ format with tiled texture
  • false: do not export 3D textured mesh in OBJ format with tiled texture
false
3D PDF
meshExportPDF3D
Defines if the 3D textured mesh should be exported in 3D PDF format. Value can be:
  • true: export 3D textured mesh in 3D PDF format
  • false: do not export 3D textured mesh in 3D PDF format
false
3D PDF Logo
meshExportPDF3DLogoPath
Defines if a logo should be displayed on the 3D PDF. Value can be:
  • "": no logo is displayed
  • "<path_to_logo>: logo given by the path is displayed

Advanced
Option
XML Tag
Value Type and Range
Example
Point Cloud Densification
Matching Window Size
pclWindowSize
Defines the window size used for point cloud densification. Value can be:
  • 7: for 7x7
  • 9: for 9x9
7
Image Groups
Point Cloud
pclImageGroups
Defines which image groups to densify.
  • <pclImageGroups/>: no group is densified
  • <group name="group_name">: add a tag with the Image Group name for each image group to densify


Mesh Geometry
meshGeometryImageGroups
Defines which image groups to densify.
  • <meshGeometryImageGroups/>: no group is densified
  • <group name="group_name">: add a tag with the Image Group name for each image group to use for the triangle mesh generation


Mesh Texture
meshTextureImageGroups
Defines which image groups to densify.
  • <meshTextureImageGroups/>: no group is densified
  • <group name="group_name">: add a tag with the Image Group name for each image group to use for the texture generation


Point Cloud Filters
Use Processing Area
pclUseProcessingArea
Defines if the processing area (if defined) should be used or not. Value can be:
  • true: use the processing area (if defined)
  • false: do not use the processing area
true
Use Annotations
pclUseAnnotations
Defines if the annotations (if existing) should be used or not. Value can be:
  • true: use annotations (if existing)
  • false: do not use annotations
true
Limit Camera Depth Automatically
pclLimitDepthAutomatically
Defines if the camera depth should be automatically limited. Value can be:
  • true: limit camera depth
  • false: do not limit camera depth
false
3D Textured Mesh Settings
Sample Density Divider
meshSampleDensityDivider
Defines the value for the sample density divider. Value can be:
  • a positive integers n such that 1 ≤ n ≤ 5
1
LOD Generation
OSGB
lodExportOSGB
Defines if the LOD should be exported in OSGB or not. Value can be:
  • true: export LOD in OSGB
  • false: do not export LOD in OSGB
true
SLPK
lodExportSLPK
Defines if the LOD should be exported in SLPK or not. Value can be:
  • true: export LOD in SLPK
  • false: do not export LOD in SLPK
true
Number of level of details
lodLevelCount
Defines the number of levels of detail to be generated. Value can be:
  • a positive integers n such that 1 ≤ n ≤ 7
4
Texture quality
lodTextureQuality
Defines the resolution of the texture for the LOD. Value can be:
  • 0: for 512x512
  • 1: for 1024x1024
  • 2: for 4096x4096
512

3. DSM, Orthomosaic and Index

Processing options for step 3. DSM, Orthomosaic and Index. For more information: Menu Process > Processing Options... > 3. DSM, Orthomosaic and Index > DSM and Orthomosaic.

Run Step
Option
XML Tag
Value Type and Range
Example
Run step 3. DSM, Orthomosaic and Index
runStep
Defines if step 3 should be run or not. Value can be:
  • true: run step 3
  • false: do not run step 3
true

DSM and Orthomosaic
Option
XML Tag
Value Type and Range
Example
Resolution
Automatic
orthoResolution
Defines if the DSM and orthomosaic resolution is selected automatically as multiple of the GSD. Value can be:
  • negative integer < 0: multiple of the GSD. For example "-2" will use 2xGSD
Custom [cm]
orthoResolution
Defines if the DSM and orthomosaic resolution is a user defined custom value. Value can be:
  • positive decimal number > 0
DSM Filter
Use Noise Filtering
dsmFilterUseNoiseFilter
Defines if the noise filtering is used to generate the DSM. Value can be:
  • true: use noise filtering
  • false: do not use noise filtering
true
Use Surface Smoothing
dsmFilterUseSmoothing
Defines if the surface smoothing is used to generate the DSM. Value can be:
  • true: use surface smoothing
  • false: do not use surface smoothing
true
Type
dsmFilterSmoothingType
Defines the surface smoothing type. Value can be:
  • Smooth
  • Medium
  • Sharp
Sharp
Raster DSM
GeoTIFF
dsmTIFF
Defines if the DSM is generated in GeoTIFF format or not. Value can be:
  • true: generate the DSM GeoTIFF
  • false: do not generate the DSM GeoTIFF
true
Method
dsmMethod
Defines which method is used to generate the DSM. Value can be:
  • InverseDistanceWeighting
  • Triangulation
InverseDistanceWeighting
Merge Tiles
dsmTIFFMergeTiles
Defines if the DSM GeoTIFF tiles should be merged into one file or not. Value can be:
  • true: merge tiles
  • false: do not merge tiles
true
Orthomosaic
GeoTIFF
mosaicTIFF
Defines if the orthomosaic is generated in GeoTIFF format or not. Value can be:
  • true: generate orthomosaic GeoTIFF
  • false: do not generate orthomosaic GeoTIFF
true
Merge Tiles
mosaicTIFFMergeTiles
Defines if the orthomosaic GeoTIFF tiles should be merged into one file or not. Value can be:
  • true: merge tiles
  • false: do not merge tiles
true
GeoTIFF without Transparency
mosaicTIFFNoTransparency
Defines if the orthomosaic without transparent backgroud should be generated or not. Value can be:
  • true: generated orthomosaic without transparency
  • false: do not generate orthomosaic without transparency
false
Google Maps Tiles and KML
mosaicKML
Defines if the orthomosaic is generated in Google Maps Tiles and KML format or not. Value can be:
  • true: generate orthomosaic in Google Maps Tiles and KML format
  • false: do not generate orthomosaic in Google Maps Tiles and KML format
false

Additional Outputs
Option
XML Tag
Value Type and Range
Example
Grid DSM
XYZ
gridDsmXYZ
Defines if the Grid DSM should be generated in XYZ format or not. Value can be:
  • true: generate Grid DSM in XYZ format
  • false: do not generate Grid DSM in XYZ format
false
XYZ Delimiter
gridDsmXYZDelim
Defines the delimiter of the XYZ file. Value can be:
  • Space: for Space
  • Tab: for Tab
  • Comma: for Comma
  • Semicolon: for Semicolon
Space
LAS
gridDsmLAS
Defines if the Grid DSM should be generated in LAS format or not. Value can be:
  • true: generate Grid DSM in LAS format
  • false: do not generate Grid DSM in LAS format
false
LAZ
gridDsmLAZ
Defines if the Grid DSM should be generated in LAZ format or not. Value can be:
  • true: generate Grid DSM in LAZ format
  • false: do not generate Grid DSM in LAZ format
false
Grid Spacing [cm]
gridDsmGridSpacing
Defines the Grid Spacing for the Grid DSM. Value can be:
  • a positive integer n such that 1 r≤ n ≤ 1000
100
Raster DTM
GeoTIFF
dtmTIFF
Defines if the raster DTM should be generated in GeoTIFF format or not. Value can be:
  • true: generate the raster DTM in GeoTIFF format
  • false: do not generate the raster DTM in GeoTIFF format
true
Merge DTM tiles
dtmTIFFMergeTiles
Defines if the DTM GeoTIFF tiles should be merged into one file or not. Value can be:
  • true: merge tiles
  • false: not merge tiles
true
Raster DTM Resolution
Automatic
dtmResolution
Defines if the DTM resolution is selected automatically as multiple of the GSD. Value can be:
  • negative integer < 5: multiple of the GSD. For example "-5" will use 5xGSD
-5
Custom [cm]
dtmResolution
Defines if the DTM resolution is a user defined custom value. Value can be:
  • positive decimal number > 5 and <10000
25
Contour Lines
SHP
contourSHP
Defines if the contour lines should be generated in SHP format. Value can be:
  • true: generate contours in SHP format
  • false: do not generate contours in SHP format
false
PDF
contourPDF
Defines if the contour lines should be generated in PDF format. Value can be:
  • true: generate contours in PDF format
  • false: do not generate contours in PDF format
false
AutoCAD DXF
contourDXF
Defines if the contour lines should be generated in AutoCAD DXF format. Value can be:
  • true: generate contours in AutoCAD DXF format
  • false: do not generate contours in AutoCAD DXF format
false
Contour Base [m]

Contour Base [ft]
contourBase
Defines the value for the contour base. Value can be:
  • a positive decimal number n such that 0 ≤ n ≤ 10'000
0
Elevation Interval[m]

Elevation Interval[ft]
contourElevationInterval
Defines the value for the contour elevation. Value can be:
  • a positive decimal number n such that 0.001 ≤ n ≤ 10'000
10
Resolution [cm]
contourResolution
Defines the resolution of the contour lines. Value can be:
  • a positive decimal number n such that 0.001 ≤ n ≤ 10'000
100
Minimum Line Size [vertices]
contourMinLineSize
Defines the minimum number of vertices per line. Value can be:
  • a positive integer n such that 4 ≤ n ≤ 1000
20

Index Calculator
Option
XML Tag
Value Type and Range
Example
Resolution
Automatic
indexResolution
Defines if the index resolution is selected automatically as multiple of the GSD. Value can be:
  • negative integer < 0: multiple of the GSD. For example "-2" will use 2xGSD
-1
Custom [cm]
indexResolution
Defines if the index resolution is a user defined custom value. Value can be:
  • positive decimal number > 0
0
Downsampling Method
indexDownsamplingMethod
Defines which downsampling method to use to generate the reflectance map at the given resolution from the 1 GSD reflectance map. Value can be:
  • Gauss: for Gauss
  • Median: for Median
  • 75%Quantile: for 75%Quantile
  • Average: for Average
  • Min: for Min
  • Max: for Max
Gauss
Reflectance Map
GeoTIFF
indexReflectance
Defines if the reflectance map should be generated in GeoTIFF format or not. Value can be:
  • true: generate the reflectance map in GeoTIFF format.
  • false: do not generate the reflectance map in GeoTIFF format.
false
Merge Tiles
indexReflectanceMergeTiles
Defines if the reflectance map GeoTIFF tiles should be merged into one file or not. Value can be:
  • true: merge tiles
  • false: do not merge tiles
false
Indices
Indices
indices
Defines the list of indices to generate. Each index is defined as follows:

where:
  • index_name: name of the index, either a pre-defined or user-defined index
  • generate_index: can be:
    • true: generate index
    • false: do not generate index





Export
Index Values as Point Shapefiles (SHP)
indexExportPointSHP
Defines if the values of the selected indices should be generated as point shapefile. Value can be:
  • true: generate point shapefile
  • false: do not generate point shapefile
false
Index Values as Point Shapefiles (SHP)
Grid Size [cm/grid]
indexExportPointSHPGridSize
Defines the grid size for the point shapefile. Value can be:
  • a positive decimal number n such that 1 ≤ n ≤ 10'000
200
Index Values and Rates as Polygon Shapefile (SHP)
indexExportPolygonSHP
Defines if the values of the selected indices should be generated as polygon shapefile. Value can be:
  • true: generate polygon shapefile
  • false: do not generate polygon shapefile
false
Index Values and Rates as Polygon Shapefile (SHP)
Grid Size [cm/grid]
indexExportPolygonSHPGridSize
Defines the grid size for the polygon shapefile. Value can be:
  • a positive decimal number n such that 1 ≤ n ≤ 10'000
400