[Qgis-user] Clipping ecw to mask not working

Michael Dufty MDufty at mbsenvironmental.com.au
Mon Aug 7 06:27:37 PDT 2023


I just installed the latest update to Qgis (3.32.1-3) and noticed there was a GDAL update so I tried clipping an ecw to mask and it appears to work now.



From: Michael Dufty
Sent: Thursday, July 27, 2023 12:53 PM
To: qgis-user at lists.osgeo.org
Subject: RE: [Qgis-user] Clipping ecw to mask not working

To respond to Kirk and Andrea’s comments.
Yes it works fine on geotiff, including geotiff created be exporting the ecw using qgis.  Not always a desirable workaround when dealing with very big ecws.
It is on Windows 10.
GDAL 3.7.1-1 from OSGEO installer
The ecw displays fine in QGIS.  Output layer is set to Byte to match the source
Would be good to know if it works for anyone else.

I thought I would try with a QGIS/GDAL generated ecw  to see if that helps, but don’t seem to be able to generate an ecw either.
If I use the export layer command to generate one it says it ran successfully but no file is generated.
If I use translate(convert format) it does give error messages as below.  Not sure if it is the same issue.
Is GDAL now using the newer ecw sdk that doesn’t support unlicensed writing?  Might need to go back to Manifold for these things.

QGIS version: 3.32.1-Lima
QGIS code revision: 4a078ecf63
Qt version: 5.15.3
Python version: 3.9.5
GDAL version: 3.7.1
GEOS version: 3.12.0-CAPI-1.18.0
PROJ version: Rel. 9.2.1, June 1st, 2023
PDAL version: 2.5.5 (git-version: a7569c)
Algorithm started at: 2023-07-27T12:43:23
Algorithm 'Translate (convert format)' starting…
Input parameters:
{ 'COPY_SUBDATASETS' : False, 'DATA_TYPE' : 0, 'EXTRA' : '', 'INPUT' : 'W:/Catalyst/GIS Common/Spatial Data/Aerial Imagery/croptest.tif', 'NODATA' : None, 'OPTIONS' : '', 'OUTPUT' : 'W:/Catalyst/GIS Common/Spatial Data/Aerial Imagery/croptest.ecw', 'TARGET_CRS' : None }

GDAL command:
gdal_translate -of ECW "W:\\Catalyst\\GIS Common\\Spatial Data\\Aerial Imagery\\croptest.tif" "W:/Catalyst/GIS Common/Spatial Data/Aerial Imagery/croptest.ecw"
GDAL command output:
ERROR 1: None of ECW_ENCODE_KEY and ECW_ENCODE_COMPANY were provided.
Both are required.
Process returned error code 1
Execution completed in 0.10 seconds
Results:
{'OUTPUT': 'W:/Catalyst/GIS Common/Spatial Data/Aerial Imagery/croptest.ecw'}

Loading resulting layers
The following layers were not correctly generated.
• W:/Catalyst/GIS Common/Spatial Data/Aerial Imagery/croptest.ecw
You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.




Michael Dufty


From: QGIS-User <qgis-user-bounces at lists.osgeo.org<mailto:qgis-user-bounces at lists.osgeo.org>> On Behalf Of Kirk Schmidt via QGIS-User
Sent: Thursday, July 27, 2023 12:00 AM
To: qgis-user at lists.osgeo.org<mailto:qgis-user at lists.osgeo.org>
Subject: Re: [Qgis-user] Clipping ecw to mask not working


Hi Michael:

Enhance Compression Wavelet (ECW) is a proprietary compression format.  I would try exporting your image as a geotiff to see if it is being read correctly and does not have internal write protection on it.

Kirk Schmidt
On 7/26/2023 2:02 AM, Michael Dufty via QGIS-User wrote:
I'm having issues trying to clip ecw images to a mask layer.
Using raster-extraction-clip raster to mask layer.
Default parameters.
The tool runs extremely quickly (successfullyin 0.12 seconds), but produces a raster entirely black (0,0,0 for all pixels).  With the correct extent of the mask layer.
If I tick the box to create an alpha output band it produces an entirely transparent result.

Source and mask layers both in EPSG 28350

Anyone else having this issue?  I cannot see any bug reports.
Tried in 328.8, 3.28.9, 3.32.0 and 3.32.1 with same result.

Seems to work fine if input raster is a tif.



_______________________________________________

QGIS-User mailing list

QGIS-User at lists.osgeo.org<mailto:QGIS-User at lists.osgeo.org>

List info: https://lists.osgeo.org/mailman/listinfo/qgis-user

Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

--

Kirk Schmidt, MScF, BScF, RPF

General Manager

Nortek Resource Solutions Inc.

26 Church Road

Sutherlands River, NS

B0K 1W0

Tel (902) 922.3607

Email: kirk at nortekresources.com<mailto:kirk at nortekresources.com>

Web: www.nortekresources.com<http://www.nortekresources.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20230807/06754662/attachment-0001.htm>


More information about the QGIS-User mailing list