Skip to content

Latest commit

 

History

History

gpc-transform

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

gpc-trfm Tool

gpc-trfm – Build an affine transform and calculate coordinates for- and backward.

INSTALLATION

Call the tool , the resulting binary will be in the directory build. You will need BLAS and GSL.

SYNOPSIS

gpc-trfm [-h -d -i -s CHAR] -p sx sy dx dy -p sx sy dx dy -p sx sy dx dy [-p ...] -c x y [-c x y ...]

DESCRIPTION

gpc-trfm is a simple-minded tool which creates an affine transform from a set of at least 3 pass points (-p) an calculates the coordinates given by the tag -c using an forward or inverse (-i) transformation.

GENERAL OPTIONS

  • -h, --help Show help message
  • -i Calculate the inverse coordinates given by option -c
  • -d Show debug messages
  • -s Output column separator as character default [space]
  • -t List transformations parser friendly
  • -p sx sy dx dy -p sx sy dx dy ... Pass points at least 3 with: sx sy source point dx dy destination point
  • -c x y -c x y Coordinates to transform

EXAMPLES

gpc-trfm -s "|" -p 1 0 10 0 -p 0 1 0 10 -p 1 1 10 10 -c 1 1 -c 1 0

gpc-trfm -i -p 1 0 10 0 -p 0 1 0 10 -p 1 1 10 10 -c 1 1 -c 1 0

OUTPUT

Parser friendly form

gpc-trfm -t -s "|" -p 1 0 10 0 -p 0 1 0 10 -p 1 1 10 10 -c 1 1 -c 1 0

 # TOOL: GPC TRANSFORM
 TRFMX:|10.000000|0.000000|0.000000
 TRFMY:|0.000000|10.000000|0.000000
 ITRFMX:|0.100000|0.000000|0.000000
 ITRFMY:|0.000000|0.100000|0.000000
 # HEAD: SRC.X SRC.Y TRFM.X TRFM.Y ERROR.X ERROR.Y
 COORD:|1.000000|1.000000|10.000000|10.000000|0.000000|0.000000
 COORD:|1.000000|0.000000|10.000000|0.000000|0.000000|0.000000
 # EOF

Human friendly form

gpc-trfm -p 1 0 10 0 -p 0 1 0 10 -p 1 1 10 10 -c 1 1 -c 1 0

 # TOOL: GPC TRANSFORM
 # TRFM:  X = 10.000000 * x + 0.000000 * y + 0.000000
 # TRFM:  Y = 0.000000 * x + 10.000000 * y + 0.000000
 # ITRFM: X = 0.100000 * x + 0.000000 * y + 0.000000
 # ITRFM: Y = 0.000000 * x + 0.100000 * y + 0.000000
 # HEAD: SRC.X SRC.Y TRFM.X TRFM.Y ERROR.X ERROR.Y
 COORD: 1.000000 1.000000 10.000000 10.000000 0.000000 0.000000
 COORD: 1.000000 0.000000 10.000000 0.000000 0.000000 0.000000
 # EOF

License

Alexander Weidauer alex.weidauer@huckfinn.de All Rights Reserved

gpc-trfm.c is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

gpc-trfm.c is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with gpc-trfm.c. If not, see http://www.gnu.org/licenses/.