other versions
- jessie 6.4.4-1
- stretch 7.2.0-2
- testing 7.6.0-1
- unstable 7.6.0-1
- experimental 7.6.1-1~exp1
| v.transform(1grass) | Grass User's Manual | v.transform(1grass) |
NAME¶
v.transform - Performs an affine transformation (shift, scale and rotate, or GPCs) on vector map.KEYWORDS¶
vector, transformationSYNOPSIS¶
v.transformFlags:¶
- -q
-
Suppress display of residuals or other information
- -t
-
Shift all z values to bottom=0
- -w
-
Swap coordinates x, y and then apply other parameters
- -m
-
Print the transformation matrix to stdout
- -s
-
Instead of points use transformation parameters (xshift, yshift, zshift, xscale, yscale, zscale, zrot)
- --overwrite
-
Allow output files to overwrite existing files
- --verbose
-
Verbose module output
- --quiet
-
Quiet module output
Parameters:¶
- input=name
-
Name of input vector map
- layer=integer
-
Layer numberA single vector map can be connected to multiple database tables. This number determines which table to use.Default: -1
- output=name
-
Name for output vector map
- pointsfile=name
-
ASCII file holding transform coordinatesIf not given, transformation parameters (xshift, yshift, zshift, xscale, yscale, zscale, zrot) are used instead
- xshift=float
-
Shifting value for x coordinatesDefault: 0.0
- yshift=float
-
Shifting value for y coordinatesDefault: 0.0
- zshift=float
-
Shifting value for z coordinatesDefault: 0.0
- xscale=float
-
Scaling factor for x coordinatesDefault: 1.0
- yscale=float
-
Scaling factor for y coordinatesDefault: 1.0
- zscale=float
-
Scaling factor for z coordinatesDefault: 1.0
- zrot=float
-
Rotation around z axis in degrees counterclockwiseDefault: 0.0
- table=name
-
Name of table containing transformation parameters
- columns=string
-
Name of attribute column(s) used as transformation parametersFormat: parameter:column, e.g. xshift:xs,yshift:ys,zrot:zr
DESCRIPTION¶
v.transform performs an affine transformation (translate and rotate) of a vector map. An affine transform includes one or several linear transformations (scaling, rotation) and translation (shifting). Several linear transformations can be combined in a single operation. The command can be used to georeference unreferenced vector maps or to modify existing geocoded maps.NOTES¶
When using an ASCII table containing source and target coordinate pairs, in each row four coordinate values separated by white space have to be specified. Comments are permitted and have to be indicated by a '#' character. Example for a points file of a linear transformation from XY to UTM coordinates (L: left, R: right, U: upper, L: lower, N, S, W, E):580 585 598020 4920770
580 -600 598020 4920750
Affine Transformation Matrix¶
The affine transfomation matrix can optionally be printed with the '-m' flag. The format of the matrix is:EXAMPLE¶
DXF/DWG drawings¶
Most DXF/DWG drawings are done within XY coordinate space. To transform them to a national grid, we can use 'v.transform' with a 4 point transformation.Extrude 2D vector points to 3D based on attribute column values¶
Spearfish example with manual table editing for vertical shift:Extrude 2D vector points to 3D based on attribute column values¶
Spearfish example with automated elevation extraction for vertical shift:SEE ALSO¶
v.in.ogrAUTHOR¶
Radim Blazek, ITC-irst, Trento, Italy,| GRASS 6.4.4 |