Apply a transform to each vertex of the input VectorData
This application iterates over each vertex in the input vector data file and performs a transformation on this vertex.
It is the equivalent of  that transforms images. For instance, if you extract the envelope of an image with , and you transform this image with , you may want to use this application to operate the same transform on the envelope.
The applied transformation is a 2D similarity. It manages translation, rotation, scaling, and can be centered or not. Note that the support image is used to define the reference coordinate system in which the transform is applied. For instance the input vector data can have WGS84 coordinates, the support image is in UTM, so a translation of 1 pixel along X corresponds to the X pixel size of the input image along the X axis of the UTM coordinates frame. This image can also be in sensor geometry.
Input Vector data
-vd vectorfile Mandatory
Input vector data file to transform
Output Vector data
-out vectorfile Mandatory
Output vector data with
-in image Mandatory
Image defining the reference coordinate system in which the transform is applied. Both projected and sensor images are supported.
Group of parameters to define the transform
-transform.tx float Default value: 0
Translation in the X direction (in pixels)
-transform.ty float Default value: 0
Translation in the Y direction (in pixels)
-transform.ro float Default value: 0
Angle of the rotation (in degrees)
-transform.centerx float Default value: 0
X coordinate of the rotation and scaling center (in physical units)
-transform.centery float Default value: 0
Y coordinate of the rotation and scaling center (in physical units)
-transform.scale float Default value: 1
The scale coefficient to apply
From the command-line:
otbcli_VectorDataTransform -vd qb_RoadExtract_easyClassification.shp -in qb_RoadExtract.tif -out VectorDataTransform.shp -transform.ro 5
import otbApplication app = otbApplication.Registry.CreateApplication("VectorDataTransform") app.SetParameterString("vd", "qb_RoadExtract_easyClassification.shp") app.SetParameterString("in", "qb_RoadExtract.tif") app.SetParameterString("out", "VectorDataTransform.shp") app.SetParameterFloat("transform.ro", 5) app.ExecuteAndWriteOutput()