This article describes the format of the p4d file and how to write a minimum p4d file that can be automatically read by Pix4Dmapper. Minimum p4d files are useful for projects that cannot be created with the command line option, or when pix4dmapper.exe is not available to create the project.
The .p4d project file contains information about the project such as images, coordinate systems, GCPs, processing options, etc. The .p4d file is 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/pix4d_*.xsd"
The .p4d file has the following structure:
|p4d 2.1 format summary|
A minimum p4d file is a p4d file that contains a minimum set of information that can be opened into Pix4Dmapper.
This file must contain at least 3 images. Optionally, it can contain other information such as coordinate systems, GCPs or processing areas. When a minimum p4d file is imported into Pix4Dmapper, the missing information (camera model, coordinate systems, processing options, etc.) is automatically completed by the software.
The following information can be specified in a minimum p4d file:
A minimum p4d file must always contain at least 3 images.
|If the image geolocation is in the EXIF, it will be automatically loaded from there when the p4d file is read. Otherwise it is possible to specify the image geolocation directly in the p4d file as well as the coordinate system if it is different from WGS84.|
|It is recommended to use cameras that are in the internal database or where the camera model can be read from the EXIF. Therefore, the camera model should not be written in the minimum p4d file. If the camera model is in the database it will be loaded from there. Otherwise it will be read from the EXIF.|
When a project has GCPs, the minimum p4d file must contain:
The coordinate system must be defined for:
Both the horizontal and vertical coordinate systems must be defined.
Horizontal coordinate system
The horizontal coordinate system is defined through a WKT string using the <WKT> tag. WKT strings can be found here: http://spatialreference.org/
Vertical coordinate system
The following vertical systems are supported:
|The processing area can be given either in WGS84 or in the output coordinate system.|
The processing options should only be set using templates. When working with minimum p4d files, the templates can be set using the following ways:
This section gives some example of minimum p4d files depending on the project's characteristics.
- Example 1: For projects that consist only of images and have the image geolocation in the EXIF, or no image geolocation.
- Example 2: For projects that consist only of images and do not have the image geolocation in the EXIF.
- Example 3: For projects that consist only of images that have geolocation given in a projected coordinate system.
- Example 4: For projects that consist of images that have the image geolocation in the EXIF and have a processing area.
- Example 5: For projects that consist of images that have the image geolocation in the EXIF and have GCPs with image marks.
- Example 6: For projects that consist of images that have the image geolocation in the EXIF and should use the 3D Models pre-defined template.
Article feedback (for troubleshooting, post here instead)