GeoLocator: How to test GeoTransformers
The GeoLocator is a command line tool that applies a chain of GeoTransformers to a list of points.
When implementing custom GeoTransformers, RPDef Generators, or simply trying to find incorrectly defined parameters of a GeoTransformer, a command line application is a powerful tool. Applying a set of georeferencing transformations to a list of coordinates can help identify the correctness of parameters, as well as the data accuracy.
Syntax
GeoLocator.exe DefXML InputList [-o:OutputList] [-i:RasterID] [-d:{FG|TG|ITG}]
[-p:{G|CC|C|F|I}2{G|CC|C|F|I}] [-t:Terrain] [-e:AverageZ] [-c:X,Y] [-r[n]:Report]
Parameters
DefXML
[required] *.RPDef | *.SDef - Raster process definition file / Sensor Definition file.
Note:
• | May contain relative path to current folder. |
• | When not provided, default extension will be .RPDef. |
InputList
[required] *.csv | *.txt - Comma / space separated text file containing a point per line.
Note:
• | May contain relative path to current folder. |
• | When not provided, default extension will be ".csv". |
• | All lines that do not start with a number will be ignored (except header line, will not appear in the output list). |
• | Following separators are recognized: comma, space, tab, newline. |
-o:OutputList
[optional] *.csv | *.txt - Comma / space separated text file with appended computed coordinates.
Note:
• | May contain relative path to the input list location. |
• | When not provided, default filename / extension will be same as input list file. |
• | If not specified, input list file will be used as output and will be automatically overwritten. |
• | Comma separator will be used to insert extra columns with computed coordinates. |
-i:RasterID
[optional] String identifier of the raster within given RPDef, of which transformation chain should be used.
Note:
• | When not provided, first raster found in the RPDef will be used. |
-d:{FG|TG|ITG}
[optional] Direction of the transformation to be applied.
• | FG means requested transformation is used in the process chain starting from global ground (real world) coordinates, converting them into a virtual object's coordinate system. |
• | TG means requested transformation is used in the process chain that computes global ground (real world) coordinates, in reference to a chosen coordinate system. |
• | ITG means iterative inverse FG transformation used instead of TG transformation. |
Note:
• | When not provided, FG transformation will be applied. |
• | TG option will be automatically replaced by ITG (iterative TG) when not supported by all GTs in the transformation chain. |
-p:{G|CC|C|F|I}2{G|CC|C|F|I}
[optional] Geo-interpretation of both input and output coordinates.
• | G2I means input coordinates are interpreted as ground (3D as first 3 columns in the input list) and output coordinates are interpreted as image (2D inserted as 2 first columns in the output list). |
• | G means 3D ground coordinates. |
• | CC means 2D corrected camera coordinates, or image coordinates for GTs with no intermediar steps. |
• | C means 2D camera coordinates, or image coordinates for GTs with no intermediar steps. |
• | F means 2D film coordinates, or image coordinates for GTs with no intermediar steps. |
• | I means 2D image coordinates. |
Note:
• | When not provided, will use -p:G2I when -d:FG, or else -p:I2G. |
• | 3D input coordinates represent first 3 columns in the input list (X,Y,Z) but for points with Z<-998, elevation will be retrieved from DEM or set to average elevation when no DEM was provided. |
• | Using -p:G2G with -d:TG will result in using (X,Y,Z) from input list interpreted as (X,Y)-image and Z-ground coordinates. |
-t:Terrain
[optional] *.flt - DEM covering AOI, in the same SRS as the first GT to be applied in an FG transformation.
Note:
• | May contain relative path to current folder. |
• | Default filename as DefXML and extension will be ".flt". |
• | Associated *.hdr file must be present in the same path. |
• | When not provided, an average elevation will be used. |
-e:AverageZ
[optional] Average terrain elevation, in the same SRS as the first GT to be applied in an FG transformation.
Note:
• | When not provided, zero will be used. |
-c:X,Y
[optional] Initial ground coordinate used in iterative inverse transformation (TG), in the same SRS as the first GT to be applied in an FG transformation.
Note:
• | Should be considered a requirement when -d:ITG option specified, or -d:TG specified but not supported by all GTs in the transformation chain. |
• | When not provided, will be computed as the middle of given DEM, or both X and Y will be set to zero. |
-r[n]:Report
[optional] *.rpt - Text file to which all reported errors, warnings or other messages are appended.
Notes
• | May contain relative path to the output list location. |
• | When not provided, default extension will be ".rpt". |
• | If -rn option specified and given file exists, its contents are initially destroyed. |