[Qgis-user] seting up a wms server problems
Ricardo Filipe Soares Garcia da
ricardo.garcia.silva at gmail.com
Mon Nov 9 10:56:57 PST 2009
Hi Micha, David and list
I have the WMS working fine now! Micha's tip of adding an EXTENT field
at the LAYER level solved it. Thanks a lot!
On Mon, Nov 9, 2009 at 6:43 PM, David Fawcett <david.fawcett at gmail.com> wrote:
> Ricardo,
>
> This is probably a better question for the MapServer list, but I will
> give it a shot:
>
> I would suggest creating a WMS request and testing it directly in a
> browser. In your example URL[2], you are making a mode=map request,
> not a WMS request. If you get this to work, you know that you have a
> working WMS server.
>
> I am wondering if the issue with the WMS request not working is due to
> the spatial reference system used by your QGIS project.
>
> David.
>
> On Sat, Nov 7, 2009 at 9:20 PM, Ricardo Filipe Soares Garcia da
> <ricardo.garcia.silva at gmail.com> wrote:
>> Hello list
>>
>> I've been trying to set up a wms server on my laptop for testing
>> purposes but I can't seem to make it work.
>> I'm using mapserver, having installed version 5.4.2 as supplied by the
>> ubuntugis-unstable repository for ubuntu 9.10, which is my operating
>> system.
>> I created the mapfile[1], tested the GetCapabilities request through a
>> web browser (it came out without any warnings) and I can see my map
>> through shp2img and also through a web browser[2]. However, I cannot
>> see it through Qgis. I am defining my wms server with the following
>> connection string:
>>
>> http://pig/cgi-bin/mapserv?map=/home/ricardo/Public/public_html/pig/mapfiles/teste.map
>>
>> ('pig' is just the name I gave to my apache virtual host, so that is
>> why it is there, instead of 'localhost')
>>
>> I can connect to the server and see the available layers, but when I
>> select one layer to be loaded Qgis acts like it loaded the layer but I
>> get only a blank image that is not even showing up in the place that
>> it was supposed to.
>>
>> Maybe this question would be better suited for the mapserver
>> mailing-list but I can see the map through a browser, so I am guessing
>> that my mistake is in the definition of the wms server inside Qgis...
>>
>> Please note that I can use the default wms servers that come with Qgis
>> (the JPL, Lizardtech and DMSolutions) without any problem.
>>
>> As a side note, I tried the same thing with Kosmo and the result was
>> the same. I can see the available layers but when I load a layer the
>> result is just a blank image. Through Kosmo I can even see the legend
>> of the map, which appears fine, showing my 2 classes and their color..
>>
>> Thanks for helping me out
>>
>>
>> [1] - mapfile named teste.map follows:
>>
>> # testes para mapfile para PIG
>> map
>> name "nomeServWMS"
>> status on
>> size 800 600
>> extent -89082.193 -100704.460 -88936.384 -100604.0546
>> units meters
>> imagecolor 255 0 255
>> imagetype png
>> projection
>> "init=epsg:27492"
>> end
>> web
>> imagepath "/home/ricardo/Public/public_html/pig/temp_images/"
>> imageurl "/temp_images"
>> log testes.log
>> header "/home/ricardo/Public/public_html/pig/templates/header.html"
>> template "/home/ricardo/Public/public_html/pig/templates/blank.html"
>> footer "/home/ricardo/Public/public_html/pig/templates/footer.html"
>> metadata
>> wms_title "titulo do servico"
>> wms_abstract "pequena descricao do servico wms"
>> wms_onlineresource
>> "http://pig/cgi-bin/mapserv?map=/home/ricardo/Public/public_html/pig/mapfiles/teste.map&"
>> wms_srs "epsg:27492"
>> end
>> end
>> layer
>> name salasP1
>> type polygon
>> status on
>> connectiontype postgis
>> connection "host=localhost dbname=pigTeste user=gisuser
>> password=resusig"
>> #data "the_geom from (select * from sala where pi_gid=1) as
>> salaP1 using unique sa_gid using srid=27492"
>> data "the_geom from salasp1 using unique sa_gid using srid=27492"
>> template "../templates/blank.html"
>> dump true
>> projection
>> "init=epsg:27492"
>> end
>> metadata
>> wms_title "salasP1tit"
>> wms_abstract "Breve descricao"
>> wms_keywordlist "teste"
>> wms_srs "epsg:27492"
>> wms_include_items "all"
>> gml_include_items "all"
>> wms_feature_info_mime_type "text/plain"
>> end
>> classitem "tipo"
>> class
>> name "WC"
>> expression "Casa de banho"
>> style
>> color 232 232 232
>> outlinecolor 0 0 0
>> end
>> end
>> class
>> name "Sala"
>> expression "Sala"
>> style
>> color 255 0 0
>> outlinecolor 0 0 0
>> end
>> end
>> end
>> end
>>
>>
>> [2] - calling it as
>> http://pig/cgi-bin/mapserv?map=/home/ricardo/Public/public_html/pig/mapfiles/teste.map&service=wms&mode=map&layer=salasP1
>>
>> --
>> ___________________________ ___ __
>> Ricardo Garcia Silva
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>
--
___________________________ ___ __
Ricardo Garcia Silva
More information about the Qgis-user
mailing list