This seems to be a known bug in GDAL working in the background of QGIS about different ways of definition for LCC 1-SP and 2-SP projections:
See
Adding ESRI::
in a gdalwarp command line as described should solve the problem. Or change the shapefiles .prj to
PROJCS["NAD_1983_HARN_WISCRS_Vernon_County_Feet",
GEOGCS["GCS_North_American_1983_HARN",
DATUM["D_North_American_1983_HARN",
SPHEROID["GRS80",6378137,298.257222101],
TOWGS84[0,0,0,0,0,0,0]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Lambert_Conformal_Conic_1SP"],
PARAMETER["latitude_of_origin",43.57503293972223],
PARAMETER["central_meridian",-90.78333333333333],
PARAMETER["scale_factor",1.0000408158],
PARAMETER["false_easting",730000],
PARAMETER["false_northing",155944.768],
UNIT["Foot_US",0.3048006096012192]]
and run gdal_translate -a_srs new.prj src_dataset dst_dataset
on the raster file.
Note that false Easting and Northing are in feet for the .prj file, and always in meters for the +proj string.
UPDATE
I found the DEM at http://relief.ersc.wisc.edu/wisconsinview/form.php and PLSS data at http://www.geocommunicator.gov/GeoComm/lsis_home/home/PLSS_download_WIcounty.htm (in NAD 83)
The PLSS is also imprinted on USGS Topo maps. So I took one township (T13N R02W), and reprojected the shapefile to Vernon WCCS with the parameters given above. The DEM comes in adf format, so I translated that to Vernon WCCS as well:
gdal_translate -a_srs "+proj=lcc +lat_1=43.57503293972223 +lat_0=43.57503293972223 +lon_0=-90.78333333333333 +k_0=1.0000408158 +x_0=222504.44500889 +y_0=47532.0603505207 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs" -of GTiff D:/Karten/shp/Laender/USA/vernon/w001000.adf D:/Karten/shp/Laender/USA/Vernon-DEM.tif
gdalwarp -q -cutline D:/Karten/shp/Laender/USA/T13NR02W.shp -crop_to_cutline -of GTiff D:/Karten/shp/Laender/USA/Vernon-DEM.tif D:/Karten/shp/Laender/USA/Vernon-DEM-clipped.tif
These are actually the command lines generated by QGIS. The result fits to the township extent:
![enter image description here](https://i.stack.imgur.com/ty9Ah.png)
Background is the La Farge Topo from 1965.
The command line in your first screen shot contains -of AIG
. This flag overrides the .tif
extension of the output filename.
According to http://www.gdal.org/frmt_various.html#AIG, this format is read-only.
You might have run into a bug when the file type in the file dialogue does not fit to the filename, or does not get updated correctly. Since you want a Geotiff file, explicitely choose the .tif format, and check if the flag has been corrected in the command line box. By clicking on the pencil next to it, you can change it to edit mode, and change the output format identifier manually.
I can't reproduce your error here, but it might just be a stored preset from another task you did before. https://hub.qgis.org/issues/15285 seems to be a similar case.
Best Answer
After trying around with everything I finally figured out how to solve the problem. It had indeed to do with the CRS. Right click "Set CRS" was not enough here. I had to perform (on the raster) Raster->Projections->Warp, then set the desired CRS again and save as Geotiff.
The mask layer (vector layer) had to be saved again with the same CRS. After that the process worked.
Still weird, because I know, that in 1.7.4 it did work immediately. I can remember pretty well, because that was when I started with QGIS.