m.gcp.filter
Filter Ground Control Points (GCPs).
m.gcp.filter [-bdu] group=name order=integer threshold=float [iterations=integer] [--verbose] [--quiet] [--qq] [--ui]
Example:
m.gcp.filter group=name order=integer threshold=float
grass.script.run_command("m.gcp.filter", group, order, threshold, iterations=None, flags=None, verbose=False, quiet=False, superquiet=False)
Example:
gs.run_command("m.gcp.filter", group="name", order=integer, threshold=float)
Parameters
group=name [required]
Name of input imagery group
order=integer [required]
Rectification polynomial order
Allowed values: 1-3
threshold=float [required]
Filtering threshold in CRS units
iterations=integer
Maximum number of iterations
-b
Use backward transformations (default: forward transformations)
-d
Use GCP deviation (default: RMS)
-u
Update GCPs
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--qq
Very quiet module output
--ui
Force launching GUI dialog
group : str, required
Name of input imagery group
Used as: input, group, name
order : int, required
Rectification polynomial order
Allowed values: 1-3
threshold : float, required
Filtering threshold in CRS units
iterations : int, optional
Maximum number of iterations
flags : str, optional
Allowed values: b, d, u
b
Use backward transformations (default: forward transformations)
d
Use GCP deviation (default: RMS)
u
Update GCPs
verbose: bool, optional
Verbose module output
Default: False
quiet: bool, optional
Quiet module output
Default: False
superquiet: bool, optional
Very quiet module output
Default: False
DESCRIPTION
m.gcp.filter filters GCPs using the distance between the computed coordinates and the actual coordinates of each GCP. The result of the filtering (number of points to use after filtering, number of points filtered out, final RMS error) is printed out.
The transformation equations are computed anew for each iteration. The GCP with the largest distance between the computed coordinates and the actual coordinates is deactivated and the next iteration is started. Filtering stops when the overall RMS error is below the given threshold or when the number of active GCPs is equal to the required minimum number of points or when the optional maximum number of iterations (option iterations) has been reached. With the -d flag, the largest GCP error is used instead of the overall RMS error.
m.gcp.filter uses by default the results of forward transformations (source to target) for filtering. With the -b flag, the results of backward transformations (target to source) are used.
The status of GCPs (active / inactive) is only updated with the -u flag. GCPs that have been filtered out will be deactivated, not deleted.
NOTES
The transformations are:
order=1:
e = [E0 E1][1].[1]
[E2 0][e] [n]
n = [N0 N1][1].[1]
[N2 0][e] [n]
order=2:
e = [E0 E1 E3][1 ] [1 ]
[E2 E4 0][e ].[n ]
[E5 0 0][e²] [n²]
n = [N0 N1 N3][1 ] [1 ]
[N2 N4 0][e ].[n ]
[N5 0 0][e²] [n²]
order=3:
e = [E0 E1 E3 E6][1 ] [1 ]
[E2 E4 E7 0][e ].[n ]
[E5 E8 0 0][e²] [n²]
[E9 0 0 0][e³] [n³]
n = [N0 N1 N3 N6][1 ] [1 ]
[N2 N4 N7 0][e ].[n ]
[N5 N8 0 0][e²] [n²]
[N9 0 0 0][e³] [n³]
["." = dot-product, (AE).N = N'EA.]
In other words, order=1 and order=2 are equivalent to order=3 with the higher coefficients equal to zero.
SEE ALSO
AUTHOR
Markus Metz
SOURCE CODE
Available at: m.gcp.filter source code
(history)
Latest change: Thursday Mar 20 21:36:57 2025 in commit 7286ecf