Bug report #10578
ECW support disabled in QGIS server
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | QGIS Server | ||
Affected QGIS version: | 2.2.0 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | wontfix |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 18985 |
Description
I tried to display some raster layers ( for basemap) with other vector layers but I only obtain a white backgroung.
My situation :
I have one project ( qjs file) containing all the layer i want to retrieve with this url :
localhost/qgis/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&SRS=EPSG:2154&REQUEST=GetMap&map=c:/myprojects/qgis/V3_dev.qgs&BBOX=320000,6300000,550000,6500000&WIDTH=1000&HEIGHT=1000&LAYERS=ORTHOPHOTO&FORMAT=image/png
ORTHOPHOTO is the group containing some raster layers : http://nsa34.casimages.com/img/2014/06/12/140612095507246249.png
But the only thing i got is a perfect white picture, no errors. There is no problem with Bbox or EPSG because i can easily display vector layer. I tested to directly select ortho1 (included in ORTHOPHOTO) but same result.
I'm quite puzzled because i read that since the 2.2 version of qgis, raster layer could be use in qgis server. Source (chapter Qgis Server) : http://docs.qgis.org/2.2/fr/docs/user_manual/preamble/whats_new.html
My configuration :
→ Windows 7 x64
→ Packages installed with OsGeo4w following this tuto : hub.qgis.org/projects/quantum-gis/wiki/QGIS_Server_Tutorial (qgis server / gdal / fcgid)
→ Apache 2.4.9 with ''fcgid_module'' (and ''cgi_module'' too)
→ The V3_dev OWS properties : nsa34.casimages.com/img/2014/06/12/140612102742321017.png
What i tried :
→ Some re-installation
→ With the GetCapabilities request i can see the group ORTHOPHOTO queryable.
→ Qgis server on a ubuntu VM but same result.
→ I read that someone have the same problem on CentOS. Source : www.forumsig.org/archive/index.php/t-38101.html
Bug or not ?
PS : Sorry for the french links
History
#1 Updated by Giovanni Manghi over 10 years ago
Hi,
what is the CRS of your rasters? it is one of the CRSs that QGIS knowns or is a custom one (added manually or automatically by QGIS)?
#2 Updated by Giovanni Manghi over 10 years ago
- Status changed from Open to Feedback
#3 Updated by Jonathan Gautron over 10 years ago
Hi Giovanni !
The CRS is : EPSG:2154 - RGF93 / Lambert-93 which is available in the list of CRS mundial list prposed by QGIS.
All layers (raster / vector) have the same CRS in the project.
#4 Updated by Giovanni Manghi over 10 years ago
Jonathan Gautron wrote:
Hi Giovanni !
The CRS is : EPSG:2154 - RGF93 / Lambert-93 which is available in the list of CRS mundial list prposed by QGIS.
All layers (raster / vector) have the same CRS in the project.
please attach one of your rasters (or part of it, anyway something to replicate the issue). thanks!.
#5 Updated by Jonathan Gautron over 10 years ago
- File SCREG_0340_6400_L93.ecw added
I attached one of the .ecw file i use. It is not one of the ORTHOPHOTO layer (i prefer not to link a 3Gb file) but i can't display this one neither with QGIS Server.
#6 Updated by Paolo Cavallini over 10 years ago
ECW is not usable on severs unless you own a licence
#7 Updated by Giovanni Manghi over 10 years ago
Jonathan Gautron wrote:
I attached one of the .ecw file i use. It is not one of the ORTHOPHOTO layer (i prefer not to link a 3Gb file) but i can't display this one neither with QGIS Server.
It seems really that you cannot use ECW:
I tested also with other samples (in other CRSs) and it does not work. Make a geotiff from the ecw and it works. I'm not sure how the driver is aware that you are using it with a server, but anyway Paolo is right.
You may want also to pay attention to other details:
- when loading your ecw in QGIS it loads with a custom CRS, not exatcly with EPSG:2154. This caused me trouble in the past.
- when using qgis server on Windows when you specify the "?map=" parameter be sure to use forward and not backward slashes in the path
#8 Updated by Jürgen Fischer over 10 years ago
mapserver is by default built with ECW support disabled. Disable MAPSERVER_SKIP_ECW
in cmake if you have a ECW server license.
#9 Updated by Jürgen Fischer over 10 years ago
Jürgen Fischer wrote:
mapserver is by default built with ECW support disabled. Disable
MAPSERVER_SKIP_ECW
in cmake if you have a ECW server license.
Sorry, only the debian and osgeo4w packages disable ECW by default.
#10 Updated by Jonathan Gautron over 10 years ago
Thanks for all your answers.
Indeed, if i can't display ECW-raster layer with qgis-server is about a paid license : ERDAS ECW/JP2 SDK, that you can see here : download.intergraph.com/?ProductName=ERDAS%20ECW/JPEG2000%20SDK. This is license which allows you to add ECW support to your GDAL lib (it's called the "Server Read-Only End User" license).
You have to know that i haven't tested this solution because it's sounded too tedious for what i want (and secondarily i don't want to pay something without knowing if it will work).
So ! This is not the solution a choosed. I think you get that the problem is about ECW files and not about the entire rasters layers. Starting from here, i simply used a tif file instead of ecw as a raster and everything goes well !
Two solutions to get tif file :
-> you can convert ECW file into tif with QGIS Desktop (Menu -> Raster -> Conversion -> Convertir) : it's a very long process if you have a heavy ECW file. For example, it takes me 10mn to convert a 900Mo ECW to a 10GB tif
-> you can download tif map directly online (Example : professionnels.ign.fr/catalogue )
I realise i'm not so clear about the first point (about paid license etc). It's due to i don't really understand the whole thing...
If someone want to inquire i let you the links which helps me to understand the problem a little :
http://www.forumsig.org/showthread.php/37886-Probl%C3%A8mes-QGIS-Server
http://trac.osgeo.org/gdal/wiki/ECW
Hope this will help some people.
Bye !
#11 Updated by Jürgen Fischer over 10 years ago
- Subject changed from QGIS Server : raster layer issue to ECW support disabled in QGIS server
- Status changed from Feedback to Closed
- Resolution set to invalid
#12 Updated by Jürgen Fischer over 10 years ago
- Resolution changed from invalid to wontfix