[Qgis-user] select elements from a wms layer

José María Michia jose.maria.michia at gmail.com
Thu Nov 20 22:40:41 PST 2008


2008/11/20 Richard Duivenvoorde <rdmailings at duif.net>:
> José María Michia wrote:
>>
>> Hi all
>>
>> I want to export a sub region of a WMS layer, but the selection tool
>> is not enabled when a layer WMS is active.
>>
>> Is it not possible to select elements of a WMS layer?
>
> Hi José,
> what do you exactly mean by 'export a sub region'?

I mean export as GIS format, including geometry and attributes (at
least, an ID or LABEL FIELD).

> A WMS-layer is a flat image. That is whenever you zoomin or pan, a new
> png/gif/jpeg image is requested from a WMS-server
> (http://en.wikipedia.org/wiki/Web_Map_Service) and shown in your map.
> But this means that the underlying data is NOT available for QGIS, while it
> off course is when you are showing shapefile or postgis data.
>
> So there is (besides exporting it to an image) not so much to export I
> think.

Yes. I like the labeling offered by MapServer, and I've used MapServer
for my work. But now, i'm exploring GMT for printed maps. GMT is great
for map production, but no have implented a labeling algorithm.

For the first attempts, I used the labels of MapServer exported in PDF
format. By using Inkscape, I have combined these PDF files with PS
files generated by GMT. Maybe this is the best way of making this.

> It is however possible (if the WMS-layer is 'queryable'), to fire
> getFeatureInfo-requests to the WMS-server. Using the I-tool, you can click
> on the WMS-layer, an x,y is sent to the WMS-server and the server will then
> sent back the attributes of one or more features that are laying on that
> x,y. This is possible because the WMS-server DOES have the data with which
> it 'paints' the map images.
>
> Another option is to use a WFS-layer (mind the F). A webFEATUREserver
> (http://en.wikipedia.org/wiki/Web_Feature_Service) There is a plugin
> available for those.  Sometimes a WMS is also configures as a WFS.
> A WFS will return 'features' (that is the geometric objects including
> attributes) as gml. Qgis is then able to generate a map based on this data,
> and the different objects are selectable.

Querying features, use all elements of the layer, even deleted items
for the cartographic generalization made by MapServer. Therefore, it
is not what I'm looking for.

With WFS I've come close to what I need. The problem is that WFS does
not work with layers of labels. I've changed the geometry type, to
polygon, without style, and with label, and i can display this layer
in QGIS. I've inserted this WFS layer in QGIS. And, at certain scale,
QGIS show only the labels that i want to write out. So, QGIS display
the data that i wish to write to some GIS file. But, QGIS not let me
select elementos from WFS/WMS layers. Selection tools is deactivated.
And i cannot found any way of convert to gis format. Only found a way
to convert it to image.

Using QGIS, with both WMS and WFS layers, the selection tool is
deactivated. I can not select elements of these layers. With other
layer formats, the tool is activated, and I can select elements. Is
correct this behavior?

> If you want to try out a WFS: use this url:
> http://www.rijkswaterstaat.nl/services/geoservices/overzichtskaartnl?service=WFS&typename=NL-prov&version=1.0.0
> you will be able to receive provinces, highways etc from the Netherlands.

Yes, I've configured my ANNOTATION/LABEL layers as WFS and WMS layers.
And is cool, but anyway,

Yes, I have set my ANNOTATIONS/LABEL layers, as WFS/WMS layers, but
still I could not take advantage of this to achieve the objective.

> Regards,
> Richard Duivenvoorde

Thanks Richards, saludos para ti y todos los usuarios de QGIS.



More information about the Qgis-user mailing list