[Qgis-user] Selecting rasters with vector layer

Eric Goddard egoddard1010 at gmail.com
Tue Mar 4 08:07:08 PST 2014


Hi Asher,

Sorry, I didn't read the full GDAL page regarding ECW support
(http://www.gdal.org/frmt_ecw.html). ECW is a proprietary format owned
by intergraph. GDAL allows reading and writing of ECW files, but in
order to write ECW files you have to have a licensing key from
Intergraph. On Linux, when configuring the the ECW plugin it asks for
the key, and if the user doesn't have one it is configuring in
read-only mode. I'm assuming you used the OSGeo4Win installer, which I
think configures the ECW support as read only by default. If you do
have a key, I'm not sure how you would go about setting up GDAL ECW
support to recognize it.

>From the gdal ECW page:
The ECW 4.x SDK from ERDAS is only free for image decompression. To
compress images it is necessary to build with the read/write SDK and
to provide an OEM licensing key at runtime which may be purchased from
ERDAS.


Does the third party software you have to use not support any other formats?

On Tue, Mar 4, 2014 at 3:41 AM, Asher Kamiraze <asher.kamiraze at gmail.com> wrote:
> Eric,
>
> I just tried to create a VRT from all ecw images in a folder. Unfortunately,
> it does not work, the command line seems to be rejected when there are too
> many input files. The problem also appear if directly using the gdalbuildvrt
> from the command line. The only solution I found was to build an
> input_file_list with the following command:
>
> cd <to_my_ecw_folder>
> dir /b *.ecw > listin_ecw.txt
> gdalbuildvrt -input_file_list listin_ecw.txt all_ecw.vrt
>
> Then, if I try to save the cropping result as an ECW file, I got the
> following error:
>
> Output driver `ECW' not recognised or does not support
> direct output file creation. The following format drivers are configured
> and support direct output:
> GeoRaster: Oracle Spatial GeoRaster
> VRT: Virtual Raster
> GTiff: GeoTIFF
> NITF: National Imagery Transmission Format
> HFA: Erdas Imagine Images (.img)
> ELAS: ELAS
> MEM: In Memory Raster
> BMP: MS Windows Device Independent Bitmap
> PCIDSK: PCIDSK Database File
> ILWIS: ILWIS Raster Map
> SGI: SGI Image File Format 1.0
> Leveller: Leveller heightfield
> Terragen: Terragen heightfield
> netCDF: Network Common Data Format
> HDF4Image: HDF4 Dataset
> ISIS2: USGS Astrogeology ISIS cube (Version 2)
> ERS: ERMapper .ers Labelled
> RMF: Raster Matrix Format
> RST: Idrisi Raster A.1
> INGR: Intergraph Raster
> GSBG: Golden Software Binary Grid (.grd)
> GS7BG: Golden Software 7 Binary Grid (.grd)
> PNM: Portable Pixmap Format (netpbm)
> ENVI: ENVI .hdr Labelled
> EHdr: ESRI .hdr Labelled
> PAux: PCI .aux Labelled
> MFF: Vexcel MFF Raster
> MFF2: Vexcel MFF2 (HKV) Raster
> BT: VTP .bt (Binary Terrain) 1.3 Format
> LAN: Erdas .LAN/.GIS
> IDA: Image Data and Analysis
> GTX: NOAA Vertical Datum .GTX
> NTv2: NTv2 Datum Grid Shift
> CTable2: CTable2 Datum Grid Shift
> ADRG: ARC Digitized Raster Graphics
> SAGA: SAGA GIS Binary Grid (.sdat)
>
> The generated command line by QGIs is:
>
> gdalwarp -q -cutline "F:\\MY_SHP_PATH\\Commune_Aix-en-Provence.shp"
> -crop_to_cutline -of ECW F:\MY_VRT_PATH\Toutes_dalles_13.vrt
> "F:/MY_OUTPUT_PATH/crop.ecw"
>
> It does not seem to be a "\" "/" issue, since if I choose a .vrt output it
> works fine.
>
> Any idea on how to solve the problem?
>
> I am running QGIS 2.2.0 on 64 bits windows.
>
> Regards
>
>
>
> 2014-03-04 1:51 GMT+01:00 Eric Goddard <egoddard1010 at gmail.com>:
>
>> Yes, you should be able to choose ECW from the files of type drop down in
>> the output file selection dialog and select ECW.
>>
>> Eric
>>
>>
>> On Mon, Mar 3, 2014 at 4:48 PM, Asher Kamiraze <asher.kamiraze at gmail.com>
>> wrote:
>>>
>>> Thanks Eric, sounds really good. Is there a way to save the resulting
>>> file (clipped) as an ECW file? I need to process it later with a 3rd party
>>> software.
>>>
>>> Regards
>>>
>>>
>>> 2014-03-03 23:26 GMT+01:00 Eric Goddard <egoddard1010 at gmail.com>:
>>>
>>>> Hi asher, if you go to raster -> miscellaneous, there is a menu entry
>>>> called build virtual raster catalog. You can use that to virtually mosaic
>>>> all of your ECW files. This tool creates a new file you can load in as a
>>>> raster that references all of the individual ECW files to display them
>>>> seamlessly in qgis without having to spend the time to actually mosaic all
>>>> of them together. Load the resulting vrt file into qgis using add raster and
>>>> clip the vrt to your polygon layer using raster -> extraction -> clipper.
>>>>
>>>> Eric
>>>>
>>>> On Mar 3, 2014 3:53 PM, "Asher Kamiraze" <asher.kamiraze at gmail.com>
>>>> wrote:
>>>>>
>>>>> Hi all,
>>>>>
>>>>> I have a set of more than 200 ecw rasters that I can easily load in
>>>>> QGIS. I also have a vector polygon layer which bounds an area covering a
>>>>> part of the area covered by the whole set of rasters. What I would like to
>>>>> do is to extract only, the raster which are intersected by the vector
>>>>> boundary. As a final goal, I would like to only mosaic thoses images. I did
>>>>> not found a way to easily do this in QGIS. Any idea on how to achieve this?
>>>>>
>>>>> As a workaround, I have opened only the raster intersecting the vector,
>>>>> and would like to mosaic them. However, it does not seem to be a function in
>>>>> QGIS ready to mosaic all opened (or selected) rasters. Any idea on how to
>>>>> automate the process?
>>>>>
>>>>> Hope you could help
>>>>>
>>>>> Regards
>>>>>
>>>>> _______________________________________________
>>>>> Qgis-user mailing list
>>>>> Qgis-user at lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>
>>>
>>
>



More information about the Qgis-user mailing list