23.2.5. Raster projections¶
23.2.5.1. Assign projection¶
Applies a coordinate system to a raster dataset.
This algorithm is derived from the GDAL edit utility.
Default menu:
23.2.5.1.1. Parameters¶
Label |
Name |
Type |
Description |
---|---|---|---|
Input layer |
|
[raster] |
Input raster layer |
Desired CRS |
|
[crs] |
The projection (CRS) of the output layer |
23.2.5.1.2. Outputs¶
Label |
Name |
Type |
Description |
---|---|---|---|
Layer with projection |
|
[raster] |
The output raster layer (with the new projection information) |
23.2.5.1.3. Python code¶
Algorithm ID: gdal:assignprojection
import processing
processing.run("algorithm_id", {parameter_dictionary})
The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
23.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:
23.2.5.2.1. Parameters¶
Label |
Name |
Type |
Description |
---|---|---|---|
Input file |
|
[raster] |
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 |
23.2.5.2.2. Outputs¶
Label |
Name |
Type |
Description |
---|---|---|---|
World file |
|
[file] |
Text file with extension |
ESRI Shapefile prj file |
|
[file] |
Text file with |
23.2.5.2.3. Python code¶
Algorithm ID: gdal:extractprojection
import processing
processing.run("algorithm_id", {parameter_dictionary})
The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
23.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:
23.2.5.3.1. Parameters¶
Label |
Name |
Type |
Description |
---|---|---|---|
Input layer |
|
[raster] |
Input raster layer to reproject |
Source CRS Optional |
|
[crs] |
Defines the CRS of the input raster layer |
Target CRS Optional |
|
[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 Optional |
|
[number] 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 Optional |
|
[number] Default: None |
Defines the output file resolution of reprojection result |
Additional creation options Optional |
|
[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). |
Output data type |
|
[enumeration] Default: 0 |
Defines the format of the output raster file. Options:
|
Georeferenced extents of output file to be created Optional |
|
[extent] |
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). |
CRS of the target raster extent Optional |
|
[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 Optional |
|
[string] Default: None |
Add extra GDAL command line options. |
Reprojected |
|
[raster] Default: ‘[Save to temporary file]’ |
Specification of the output raster layer. One of:
The file encoding can also be changed here. |
23.2.5.3.2. Outputs¶
Label |
Name |
Type |
Description |
---|---|---|---|
Reprojected |
|
[raster] Default: |
Reprojected output raster layer |
23.2.5.3.3. Python code¶
Algorithm ID: gdal:warpreproject
import processing
processing.run("algorithm_id", {parameter_dictionary})
The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Using processing algorithms from the console for details on how to run processing algorithms from the Python console.