5

I have created a .QGS file with one PostGIS layer which is the alaska.shp file that comes from the samples. It was loaded via the shp2pgsql utility. When looking at my qgs project referencing the postgis layer, I see the alaska shape, everything appears good.

Then I copy my .QGS file to my cgi-bin directory (along with the qgis_mapserve.fcgi file) to set up my WMS. Then I create a new project in Quantum GIS (1.7.2) and add WMS layer. I connect to my WMS and select the layer I want to import...so far so good. But after I add the WMS layer to my new QGIS project, I see nothing. The layer is checked "on" to render, and "render" is checked in the bottom right of Quantum GIS.

Is there some way to tell if I have something set up wrong?

7
  • It is the QGIS project defined in the same CRS as the QGIS sample data? is OTFR on? What CRS has the WMS layer you added? The QGIS sample data is kind of particular as it crosses the date line, and this is always source of problems.
    – gioman
    Commented Dec 5, 2011 at 9:50
  • The alaska shape file has a CRS of USER:100000 CRS when I load it in. I tried changing everything to using a known CRS for each layer and it still would not render anything. I turned OTFR on with no change. The status bar of QGIS says "Getting map via WMS."..but nothing ever loads.
    – Steve Horn
    Commented Dec 5, 2011 at 15:20
  • The Alaska shapefile in the QGIS sample dataset opens with CRS "EPSG:2964 - NAD27 / Alaska Albers". If you reproject it to WGS84 you will se that a few polygons of the shape do cross the dateline, creating problems when using the original CRS and adding data from other sources (ex: WMS). Just set the project CRS to something that do not cross the dateline and use OTFR, then you should be fine.
    – gioman
    Commented Dec 5, 2011 at 16:15
  • I am facing the same problem, nothing loads, I am trying with several WMS services, different CRS's: EPSG:4326, EPSG:102067. If I select the layer item in the legend and try "Zoom to layer extent" , the map window zooms correctly to the area, i.e. I guess the application communicates correctly with the WMS service, it just dos not display the requested map. Thanks for any suggestion. Best Regards, Vlad
    – user5176
    Commented Dec 16, 2011 at 11:41
  • 1
    What OS are you using?
    – Rayner
    Commented Jan 3, 2013 at 11:01

4 Answers 4

4

In the QGIS WMS connection dialogue there is a checkbox telling QGIS to ignore the service URL advertised by QGIS server. Checking this option should solve the problem. (Source: QGIS Mailinglist)

It's generally a good idea to have this option ticked. There has been talk about setting it by default.

1
  • Hi Anita, first off... you do some sterling work on your blog, keep it up :-) However, the 2 boxes you mention in your post on getting QGis working on Win7 (and I assume the tick your on about here) didn't work for me, in fact they didn't appear to make any difference. In general, there seems to be much more problems running QGis and it's various components on a 64 bit OS than on a 32 bit, so maybe that has something to do with it.
    – shawty
    Commented Jan 19, 2015 at 11:20
1

After much frustration, I re-installed QGIS on windows, and it worked! Not sure what was the issue (I was re-installing the same version - 1.8) but I don't encounter this problem any more.

1
  • Good..so reinstall is one more workaround..thanks for sharing : )
    – Sunil
    Commented Jan 7, 2013 at 11:53
0

Not a full answer I know, but I've just been wrestling with this one for a couple of days and I've got past the error reported in the original question, but have now unfortunately hit another snag I need to solve.

However in an effort to help those coming here from Google with this error (This was one of the first pages it offered me) here's what I had to do to get past the "No CRS matching" thing.

  • 1) Make sure that your source project is set up correctly

It turns out my biggest issue was the QGis project I was trying to serve. I'd set it up as I set up most of my projects, on the General tab I gave it a name, then on the CRS tab I ticked allow on the fly conversions and set my root projection, in my case WGS84.

However, after playing about in here and setting lots of other settings, I started to also change things in the OWS server tab, as soon as I started to do this I started to get better responses when trying to serve my project.

For the record, the following images show the settings I made

OWS Properties 1

OWS Properties 2

I also changed my co-ordinate projection system for the entire project to match my first layer (A shape file of UK Counties) which was EPSG:27700 (OSGB36)

  • 2) Make sure you set the properties of the project your loading the WMS Layer into

The last piece of the puzzle for me was setting the project properties on the new project I was loading into, once I set the new one to do on the fly conversions and set it's co-ordinate system to the same as the WMS, my add WMS layer dialog suddenly stopped showing the error given.

Addendum

While it's not strictly part of this answer, but in the spirit of completeness, I'm now at the point where QGis accepts my WMS Layer, but sits for ever "Downloading Tiles" with the blue circle wait cursor spinning away, Not sure yet if it's my source QGis project, my set up of the QGis server (Which by the way I have working under IIS7) or if it's the empty project setup and/or settings in me adding the layer.

However, given this and the adventures I also had setting up "mapserver" under IIS over the weekend, you can be sure that at least one blog post will come out of it all, very soon.

For now however, I hope this provides some valuable extra information for those trying to solve this problem.

Shawty

Update

Never found out why I was getting the sitting waiting thing, I suspect my Map Script file wasn't quite right. Anyway, I'm pleased to say that after a bit of fiddling with my mapscript file I managed to serve a shape file up as a wms layer in QGis, and since then I've even gone on to serve up the entire 250k Miniscale UK Ordnance Survey Raster both as a WMS layer in QGis and an interactive WMS layer using openlayers, the serving is performed using Mapserver off an IIS7 webserver instance, I'll add another update once I write the full story up on my blog.

0

Make sure that the Browser Panel is also open in QGIS when you are trying to open the WMS layer. Double click on the layer you want from the Browser panel to open it. Directly loading the layer from Raster->Add WMS layer does not work for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.