1

I'm using the QGIS Warp (Reproject) tool to reproject a raster from WGS84 to a Lambert Conformal Conic custom projection in QGIS 3.2.2. The call to the GDAL/OGR console is the following:

gdalwarp -t_srs "+proj=lcc  +lat_1=13.31666666666667  +lat_2=14.25  +lat_0=13.783333  +lon_0=-89 +x_0=500000 +y_0=295809.184 +ellps=clrk66 +units=m +no_defs +towgs84=0,125,194,0,0,0,0 +wktext" -r near -ot Int16 -of GTiff C:/n13_w090_1arc_v3.tif "C:/Users/HP COREi5/Documents/n13_w090_1arc_v3_nad27.tif"

The result I get is the following:

Processing algorithm…
Algorithm 'Warp (reproject)' starting…
Input parameters:
{ 'DATA_TYPE' : 1, 'INPUT' : 'C:/n13_w090_1arc_v3.tif', 'MULTITHREADING' : 
False, 'NODATA' : None, 'OPTIONS' : '', 'OUTPUT' : 'C:/Users/HP 
COREi5/Documents/n13_w090_1arc_v3_nad27.tif', 'RESAMPLING' : 0, 'SOURCE_CRS' 
: None, 'TARGET_CRS' : 'USER:100057', 'TARGET_EXTENT' : None, 
'TARGET_EXTENT_CRS' : None, 'TARGET_RESOLUTION' : None }

GDAL command:
gdalwarp -t_srs "+proj=lcc +lat_1=13.31666666666667 +lat_2=14.25 
+lat_0=13.783333 +lon_0=-89 
+x_0=500000 +y_0=295809.184 +ellps=clrk66 +units=m +no_defs 
+towgs84=0,125,194,0,0,0,0 
+wktext" -r near -ot Int16 -of GTiff C:/n13_w090_1arc_v3.tif "C:/Users/HP 
COREi5/Documents/n13_w090_1arc_v3_nad27.tif"
GDAL command output:


FAILURE: No target filename specified.

Usage: gdalwarp [--help-general] [--formats]

[-s_srs srs_def] [-t_srs srs_def] [-to "NAME=VALUE"] [-novshiftgrid]

[-order n | -tps | -rpc | -geoloc] [-et err_threshold]

[-refine_gcps tolerance [minimum_gcps]]

[-te xmin ymin xmax ymax] [-tr xres yres] [-tap] [-ts width height]

[-ovr level|AUTO|AUTO-n|NONE] [-wo "NAME=VALUE"] [-ot Byte/Int16/...] [-wt 
Byte/Int16]

[-srcnodata "value [value...]"] [-dstnodata "value [value...]"] -dstalpha

[-r resampling_method] [-wm memory_in_mb] [-multi] [-q]

[-cutline datasource] [-cl layer] [-cwhere expression]

[-csql statement] [-cblend dist_in_pixels] [-crop_to_cutline]

[-of format] [-co "NAME=VALUE"]* [-overwrite]

[-nomd] [-cvmd meta_conflict_value] [-setci] [-oo NAME=VALUE]*

[-doo NAME=VALUE]*

srcfile* dstfile



Available resampling methods:

near (default), bilinear, cubic, cubicspline, lanczos, average, mode, max, 
min, med, Q1, Q3.

Execution completed in 0.18 seconds
Results:
{'OUTPUT': <QgsProcessingOutputLayerDefinition {'sink':C:/Users/HP 
COREi5/Documents/n13_w090_1arc_v3_nad27.tif, 'createOptions': 
{'fileEncoding': 'System'}}>}

Loading resulting layers
The following layers were not correctly generated.<ul><li>C:/Users/HP 
COREi5/Documents/n13_w090_1arc_v3_nad27.tif</li></ul>You can check the 'Log 
Messages Panel' in QGIS main window to find more information about the 
execution of the algorithm.

If I type the same GDAL/OGR call in the OSGeo4W Shell it runs without problems.

Does anyone know if there is a workaround in QGIS?

2
  • Most likely the whitespace in the path is the problem. Try with a different output folder.
    – Matte
    Sep 16 '18 at 8:27
  • I tried with a path with no spaces and the result is the same,
    – Ernesto561
    Sep 16 '18 at 8:31
1

It seems the problem is related to the custom coordinate system I´m using. I had an error in the definition of my CRS, with a newline character that didn't cause problems when reprojecting vector files, but caused problems when running a GDAL tool. Thanks to @AndreJ for testing the tool with a custom CRS.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.