2

I'm using Qgis Server and I am experiencing a few problem.

I would like 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 tried to convert raster layer into vector layer : layer quality fail

→ I read that someone have the same problem on CentOS. Source : www.forumsig.org/archive/index.php/t-38101.html

→ I recently discovered the GetCoverage request :

localhost/qgis/qgis_mapserv.fcgi.exe?SERVICE=WCS&VERSION=1.1.0&CRS=EPSG:2154&REQUEST=GetCoverage&map=c:/myprojects/qgis/V3_dev.qgs&BBOX=320000,6300000,550000,6500000&WIDTH=1000&HEIGHT=1000&COVERAGE=ORTHOPHOTO&RESPONSE_CRS=EPSG:2154&FORMAT=image/png

and i obtain : The layer for the COVERAGE 'ORTHOPHOTO' is not found

→ i'm also wondering : Is it possible that some librairie (like gdal) is missing in the OsGeo4W installer ?

Hoping someone can help me :)

PS : Sorry for the french links

2
  • At least your WMS 1.3.0 request must fail because it is using SRS. It is CRS since WMS version 1.1.1. White map feels like a bug in QGIS server, it should send an error message instead. Commented Jun 12, 2014 at 9:52
  • oh ok, i take note of that even if it returns the same thing using SRS or CRS... whatever I also think it's probably a bug in QGIS Server but i am hoping that someone could prove otherwise. Commented Jun 12, 2014 at 11:48

1 Answer 1

2

My problem is solved ! Not as i wanted but i have obtained the result i needed.

So, first, it's not really a bug in QGIS server.According severals sources, the reason why you can't display raster (based on a ECW file) layer in qgis server is due to a paid license : ERDAS ECW/JP2 SDK you can see here : download.intergraph.com/?ProductName=ERDAS%20ECW/JPEG2000%20SDK

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).

But, if you want to try, here is some topic i found about this :

  • the problem : www.forumsig.org/showthread.php/37886-Probl%C3%A8mes-QGIS-Server

  • how to install the library : doc.ubuntu-fr.org/qgis

  • how to install the library : trac.osgeo.org/gdal/wiki/ECW

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 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 what is this lib...

Hope this will help some people.

Bye !

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.