27.2.5. Raster projections
27.2.5.1. Assign projection
Applies a coordinate system to a raster dataset.
This algorithm is derived from the GDAL edit utility.
Default menu:
参数
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
输入图层 |
|
[栅格] |
Input raster layer |
Desired CRS |
|
[crs] |
The projection (CRS) of the output layer |
输出
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
Layer with projection |
|
[栅格] |
The output raster layer (with the new projection information) |
Python代码
Algorithm ID: gdal:assignprojection
import processing
processing.run("algorithm_id", {parameter_dictionary})
当你在数据处理工具箱某个算法前悬停时,算法 id 将会展现。*参数字*将会提供参数的名称与数值。参考详见`数据处理_控制台`以获取如何从Python控制台中运行数据处理算法。
27.2.5.2. Extract projection
Extracts the projection of a raster file and writes it into a world
file with extension .wld
.
This algorithm is derived from the GDAL srsinfo utility.
Default menu:
参数
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
Input file |
|
[栅格] |
Input raster
The raster layer has to be file based, as the algorithm
uses the path to the raster file as the location of the
generated |
Create also .prj file |
|
[boolean] Default: False |
If this is activated a |
输出
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
World file |
|
[file] |
Text file with extension |
ESRI Shapefile prj file |
|
[file] |
Text file with |
Python代码
Algorithm ID: gdal:extractprojection
import processing
processing.run("algorithm_id", {parameter_dictionary})
当你在数据处理工具箱某个算法前悬停时,算法 id 将会展现。*参数字*将会提供参数的名称与数值。参考详见`数据处理_控制台`以获取如何从Python控制台中运行数据处理算法。
27.2.5.3. Warp (reproject)
Reprojects a raster layer into another Coordinate Reference System (CRS). The output file resolution and the resampling method can be chosen.
This algorithm is derived from the GDAL warp utility.
Default menu:
参数
Basic parameters
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
输入图层 |
|
[栅格] |
Input raster layer to reproject |
Source CRS 可选 |
|
[crs] |
Defines the CRS of the input raster layer |
Target CRS 可选 |
|
[crs] Default: |
The CRS of the output layer |
Resampling method to use |
|
[enumeration] Default: 0 |
Pixel value resampling method to use. Options:
|
Nodata value for output bands 可选 |
|
[数字] Default: None |
Sets nodata value for output bands. If not provided, then nodata values will be copied from the source dataset. |
Output file resolution in target georeferenced units 可选 |
|
[数字] Default: None |
Defines the output file resolution of reprojection result |
Reprojected |
|
[栅格] 默认: |
Specification of the output raster layer. One of:
|
Advanced parameters
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
Additional creation options 可选 |
|
[string] Default: '' |
For adding one or more creation options that control the raster to be created (colors, block size, file compression...). For convenience, you can rely on predefined profiles (see GDAL driver options section). Batch Process and Model Designer: separate multiple options with a pipe
character ( |
Output data type |
|
[enumeration] Default: 0 |
Defines the format of the output raster file. Options:
Available options depend on the GDAL version built with QGIS (see menu) |
Georeferenced extents of output file to be created 可选 |
|
[范围] |
Sets the georeferenced extent of the output file to be created (in the Target CRS by default. In the CRS of the target raster extent, if specified). Available methods are:
|
CRS of the target raster extent 可选 |
|
[crs] |
Specifies the CRS in which to interpret the coordinates given for the extent of the output file. This must not be confused with the target CRS of the output dataset. It is instead a convenience e.g. when knowing the output coordinates in a geodetic long/lat CRS, but wanting a result in a projected coordinate system. |
Use multithreaded warping implementation |
|
[boolean] Default: False |
Two threads will be used to process chunks of the image and perform input/output operations simultaneously. Note that the computation itself is not multithreaded. |
Additional command-line parameters 可选 |
|
[string] Default: None |
Add extra GDAL command line options. |
输出
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
Reprojected |
|
[栅格] 默认: |
Reprojected output raster layer |
Python代码
Algorithm ID: gdal:warpreproject
import processing
processing.run("algorithm_id", {parameter_dictionary})
当你在数据处理工具箱某个算法前悬停时,算法 id 将会展现。*参数字*将会提供参数的名称与数值。参考详见`数据处理_控制台`以获取如何从Python控制台中运行数据处理算法。