[Qgis-user] [processing] gdal warp -te confusion

Andreas Plesch andreasplesch at netscape.net
Tue Jun 13 15:29:53 PDT 2017


Responding to myself, for a complete record in the list archive.

I found that the warnings can be turned off in the Processing Options,
which corresponds to the
processing.core.ProcessingConfig.ProcessingConfig class

ProcessingConfig.getSetting(settingskey) returns the current value of the
setting, and
ProcessingConfig.setSettingValue(settingskey, value) modifies the setting.

This way a warning can be temporarily disabled and then restored.

Seems to work well,

-Andreas


On Sun, Jun 11, 2017 at 6:40 PM, Andreas Plesch <andreasplesch at netscape.net>
wrote:

> I am using the gdal warp (reproject) processing algorithm in 2.18.9 with
> the 'Set georeferenced extents of output file' option, eg. the -te command
> line switch.
>
> I am warping from unprojected to UTM coordinates.
>
> Here is a correctly constructed console call
> gdalwarp -ot Float32 -t_srs EPSG:32611 -r near -of GTiff -te 222749.290374
> 3763741.53271 317609.171896 3877346.18124 -co COMPRESS=DEFLATE -co
> PREDICTOR=1 -co ZLEVEL=6 -wo OPTIMIZE_SIZE=TRUE C:\Users\andreas\Documents\
> x3d\n35w120\grdn35w120_clipped_600x700.tif "[temporary file]"
>
> (Sometimes the shown console command does not seem to get updated
> properly, but the executed command seems to be always correct)
>
> When I now 'Run' the algo, there is this warning:
>
> 'Extent parameters must use the same CRS as the input layers.
> Your input layers do not have the same extent as the project, so the
> extent might be in a wrong CRS if you have selected it from the canvas.'
>
> The project crs is the warp destination crs (UTM).
>
> The warning is misleading since gdalwarp by default will use the _target_
> crs:
> *-te* *xmin ymin xmax ymax*:set georeferenced extents of output file to
> be created (in target SRS by default, or in the SRS specified with -te_srs)
>
> Furthermore, the extent parameters can be in any srs if the -te_srs option
> is used.
>
> So to me the warning is quite irritating.
>
> Additionally, I am using the algorithm in a model where I know the inputs
> for the extents are correct. Is there a way to silence these wanrings in
> models ?
>
> THanks,
>
> Andreas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20170613/4577d7df/attachment.html>


More information about the Qgis-user mailing list