VectorDataReprojection¶
使用支持图像投影参考或用户指定的地图投影重新投影矢量数据
描述¶
使用支持图像作为投影参考或向给定地图投影的用户重新投影矢量数据。如果给定图像关键字列表,则可以将其添加到重新投影的矢量数据中。
参数¶
输入数据¶
Input vector data -in.vd filename [dtype] Mandatory
The input vector data to reproject
Use image keywords list -in.kwl image
Optional input image to fill vector data with image metadata.
输出数据¶
Output vector data -out.vd filename [dtype] Mandatory
The reprojected vector data
Output Projection choice -out.proj [image|user] Default value: image
- Use image projection ref
Vector data will be reprojected in image projection ref. - User defined projection
使用图像投影参考选项¶
Image used to get projection map -out.proj.image.in image Mandatory
Projection map will be found using image metadata
用户定义的投影选项¶
Map Projection -out.proj.user.map [utm|lambert2|lambert93|wgs|epsg] Default value: utm
Defines the map projection to be used.
- Universal Trans-Mercator (UTM)
A system of transverse mercator projections dividing the surface of Earth between 80S and 84N latitude. - Lambert II Etendu
This is a Lambert Conformal Conic projection mainly used in France. - Lambert93
This is a Lambert 93 projection mainly used in France. - WGS 84
This is a Geographical projection - EPSG Code
This code is a generic way of identifying map projections, and allows specifying a large amount of them. See www.spatialreference.org to find which EPSG code is associated to your projection;
通用跨墨卡托(UTM)选项¶
Zone number -out.proj.user.map.utm.zone int Default value: 31
The zone number ranges from 1 to 60 and allows defining the transverse mercator projection (along with the hemisphere)
Northern Hemisphere -out.proj.user.map.utm.northhem bool Default value: false
The transverse mercator projections are defined by their zone number as well as the hemisphere. Activate this parameter if your image is in the northern hemisphere.
EPSG代码选项¶
EPSG Code -out.proj.user.map.epsg.code int Default value: 4326
See www.spatialreference.org to find which EPSG code is associated to your projection
高程管理¶
这组参数允许管理高程值。
DEM directory -elev.dem directory
This parameter allows selecting a directory containing Digital Elevation Model files. Note that this directory should contain only DEM files. Unexpected behaviour might occurs if other images are found in this directory. Input DEM tiles should be in a raster format supported by GDAL.
Geoid File -elev.geoid filename [dtype]
Use a geoid grid to get the height above the ellipsoid in case there is no DEM available, no coverage for some points or pixels with no_data in the DEM tiles. A version of the geoid can be found on the OTB website (egm96.grd and egm96.grd.hdr at https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/tree/master/Data/Input/DEM).
Default elevation -elev.default float Default value: 0
This parameter allows setting the default height above ellipsoid when there is no DEM available, no coverage for some points or pixels with no_data in the DEM tiles, and no geoid file has been set. This is also used by some application as an average elevation value.
实例¶
从命令行执行以下操作:
otbcli_VectorDataReprojection -in.vd VectorData_QB1.shp -out.proj image -out.proj.image.in ROI_QB_MUL_1.tif -out.vd reprojected_vd.shp
来自Python的评论:
import otbApplication
app = otbApplication.Registry.CreateApplication("VectorDataReprojection")
app.SetParameterString("in.vd", "VectorData_QB1.shp")
app.SetParameterString("out.proj","image")
app.SetParameterString("out.proj.image.in", "ROI_QB_MUL_1.tif")
app.SetParameterString("out.vd", "reprojected_vd.shp")
app.ExecuteAndWriteOutput()