Coordinate System
A coordinate system is a reference system used to represent the locations of project data within a common coordinate framework. A coordinate system can be projected (X, Y), geographic (latitude-longitude), or geocentric (X, Y, Z). Each coordinate system is associated with its Well-Known Text (WKT) description, a simple structured, text-based format for spatial reference system information that is easy to store and share between systems (See https://www.ogc.org/standard/wkt-crs/). A coordinate system can optionally include a vertical datum that defines the origin for height values.
When you add input data to a project, PhotoMesh reprojects the various inputs to the AT’s project coordinate system and eventually to the output’s coordinate system. The inputs and other project information (e.g., calculated photos and output previews) are also reprojected to the 3D Window’s Lat-Long WGS84 coordinate system (with vertical datum if provided). If an input source does not include coordinate system information or PhotoMesh is unable to read this information, you must supply it so that PhotoMesh can reproject the source. Usually, the data supplier provides the information about the coordinate system used for each source.
The Coordinate System dialog is used to define the coordinate system for all project data.
When data is in Lat-Long WGS84 or ECEF coordinate system and no other coordinate system was used for photos and ground control points, etc., the default system used is the Universal Transverse Mercator (UTM) grid system with the UTM zone based on where the center of the data falls.
To set the coordinate system:
1. Open the Coordinate System dialog.
Coordinate System Dialog
2. Enter the coordinate system information using one of the following methods:
§ Click History and select one of the recently used coordinate systems. The last 20 coordinate systems used are saved in the History for future use.
§ In the Search field, type the EPSG code or a phrase from the Coordinate system Description, as indicated by the supplier, and click Search. Then select the required result from the search results displayed directly below.
§ In the Well-Known Text section, type the WKT. The Well-Known Text representation of spatial reference systems, regulated by the Open Geospatial Consortium (OGC), provides a standard textual representation for coordinate system information. You can edit an existing WKT.
Note: A custom coordinate system is listed with all the other coordinate systems, with an asterisk in the Custom column.
3. If your coordinate system includes vertical datum, click Set and select a vertical datum from a list of supported datums.
Note: If the WKT of your coordinate system references a particular grid shift file that was not bundled with the PhotoMesh installation, you can add the file by downloading it and placing it in the correct directory. See "Adding Grid Shift Files" in this chapter for information.
4. Click OK.
The following advanced coordinate system capabilities are available:
§ Generate WKT strings for coordinate systems
§ Add missing grid shift files (GSB, GTX)
Coordinate System Reprojection Tool
The Reprojection Tool reprojects data from one coordinate system to another:
§ Generate a WKT string that defines a coordinate system (optionally, with vertical datum) for inclusion in Excel/XML photo list files, control point files, and trajectory files.
§ Convert coordinate, OPK, and YPR values from one coordinate system to another.
§ Convert the rotation format from a rotation matrix to OPK/YPR. The rotation matrix transforms coordinates in the specified coordinate system into camera coordinates using: a 3x3 matrix with <Mij> tags, where Mij denotes the coefficient of the (i+1) row and the (j+1) column of the rotation matrix.
§ Convert the rotation format from OPK/YPR to a rotation matrix
To generate a WKT string for a coordinate system:
1. On the Tools tab, in the Coordinate System group, click Reprojection. The Reprojection Tool dialog is displayed.
2. Click Open List, and select a coordinate system.
3. Click Set and select a vertical datum from a list of supported datums.
4. Click OK. The generated WKT string can be copied into your files as required.
To convert from one coordinate system to another:
1. On the Tools tab, in the Coordinate System group, click Reprojection. The Reprojection Tool dialog is displayed.
2. On the left side, do the following:
a. Click Open List, and select a coordinate system.
b. Click Set and select a vertical datum from a list of supported datums.
c. Click OK.
d. Enter the XYZ values, and optionally, the OPK or YPR values.
3. On the right side, do the following:
a. Click Open List, and select the coordinate system you want to project to.
b. Click Set and select a vertical datum from a list of supported datums.
c. Click OK.
4. Click Project . The XYZ, OPK, and YPR fields on the right side are populated with the projected values.
To convert a rotation matrix to OPK and YPR:
1. On the Tools tab, in the Coordinate System group, click Reprojection. The Reprojection Tool dialog is displayed.
2. On either of the sides, do the following:
a. Click Open List, and select a coordinate system.
b. Click Set and select a vertical datum from a list of supported datums.
c. Click OK.
d. Enter the XYZ and OPK or YPR values.
3. Click Convert :
To convert OPK and YPR to a rotation matrix:
1. On the Tools tab, in the Coordinate System group, click Reprojection. The Reprojection Tool dialog is displayed.
2. Enter a rotation matrix.
3. Click Convert :
Adding Grid Shift (GTX, GSB) Files
PhotoMesh uses grid shift files (GTX, GSB) for shifting and transforming between some coordinate systems that have different datums. Sometimes the Well-Known Text (WKT) of one of the coordinate systems in your project references a particular grid shift file that was not bundled with your installation, or the reference itself is missing from the WKT. The steps below describe how to add the missing grid shift information in both of these cases.
Note: Grid shift files can be automatically installed during the PhotoMesh installation process by placing a zip file that includes the required files next to the PhotoMesh.exe file in the installation folder. See "Installing PhotoMesh" in the "Getting Started" chapter for more information.
To add a grid shift file that was not found on your computer, find and install the missing file:
1. Generally, when one of the coordinate systems in your project references a particular grid shift file that was not found on your computer, a notification will display in the coordinate system dialog or in the Error/Message Log with a link to a page with the required file, packaged as a zip file. Download the required zip file.
2. If no zip was made available to you with the missing grid shift file, you can download the required file from one of the following websites with download links to many common grid shift files:
§ https://github.com/OSGeo/proj-datumgrid/tree/master/
§ https://vdatum.noaa.gov/download.php
§ https://raw.githubusercontent.com/OSGeo/proj.4/gh-pages/proj.pdf
§ https://proj.org/resource_files.html#transformation-grids
3. Extract the grid shift file to both the following directories for computers with full PhotoMesh installation, and to only the second directory for computers with only fuser installation:
§ The \PhotoMesh\proj subdirectory of PhotoMesh's installation directory.
§ The \PhotoMesh\Fuser\proj subdirectory of PhotoMesh's installation directory.
4. If a reference to the grid shift file is missing in the WKT, add the following reference within the WKT's VERT_DATUM object that is under the VERT_CS object:
EXTENSION["PROJ4_GRIDS","[Name of Grid Shift File]"
E.g.,
COMPD_CS["RGF93 / Lambert-93 + NGF-IGN69 height",
PROJCS["RGF93 / Lambert-93",
...,
AUTHORITY["EPSG","2154"]],
VERT_CS["NGF-IGN69 height",
VERT_DATUM["Nivellement General de la France - IGN69",2005,
EXTENSION["PROJ4_GRIDS","RAF18.gtx"],
AUTHORITY["EPSG","5119"]],
UNIT["metre",1,AUTHORITY["EPSG","9001"]],
AXIS["Up",UP],AUTHORITY["EPSG","5720"]]
]