Re: [Qgis-user] Wrong retrieving of wms legend

2016-09-08 Thread Andrea Peri
Hi Richard,

I do some other test.

Firstly.
I try to add a dummy style (a style defined without no any kind of
rendering) and the issu on the legend is disappeared.
This is ok.

But do some other test, and see that the question was not really due
to the absence of a style in rasters, but instead to the
definition of the raster layer inside named-grouped and that are
gerarchically defined.
The gerarchical definition of a raster is available in the OGC and was
adopted from the Inspire when it also expand the use definining the
named-groups. That are different from the more commons unnamed-groups.
AFAIK the named group is actually an unavailable feature in
qgis-server, but is available in the geoserver and mapserver systems.

Well, all our wms layer coming from raster dataset are all defined
using "gerarchical named groups".
This allow for example to serve at low scales using a dataset and at
higher scale using others more detailed dataset and showing all of
them as an unique layer wms (always one unique layer wms for all these
datasets at different details).

So, I notice that if I remove the gerarchical named-group definition
of the rt_ofc.10k54 and define it as a simple wms layer coming from a
raster dataset , and also removing the "dummy style", the
issue of retrieving all the legends is disappearing.

So I guess the real problem is that qgis don't understand well the
gerarchical named-grouped layers.
But I understand that is too difficult to support a feature that is
not available in the server side of him.

So assuming that we keave the wms raster as gerarchically named-group
, the workaround to add a dummy style could be a good compromise.

But my trouble is also that perhaps the workaround of add a dummy
style could affect negativelly other wms clients like arcgis.

So before of all we explore the compatibility of this workaround with
other GIS platform.

Thx for your help to understand this really strange issue.

A.


2016-09-08 14:45 GMT+02:00 Richard Duivenvoorde :
>
> Hi Andrea,
>
> note that I also added a comment at the code which is reponsible for this:
>
> https://github.com/qgis/QGIS/commit/69bed218373b3f93671f65bc3d02c45cbf683a48#comments
>
> Patrick's response there on this (see comment):
>
> "
> IMHO, there is nothing to fix in QGIS, here. If a layer defines no
> style, it's wanted that it inherits the parent layer's style. Have a
> look at chapter 7.2.4.6.5 of the WMS implementation specification:
>
> Style declarations are inherited by child Layers. A child shall not
> redefine a Style with the same Name as one
> inherited from a parent. A child may define a new Style with a new Name
> that is not available for the parent Layer.
>
> This PR is just a workaround for MapServer that is defining a style
> named default for both the parent and the child layers. This was making
> QGIS show 2 default styles for every child layers. Style inheritance was
> already there before. Now at has just a saner behavior in regard to
> non-standard compliant servers.
>
> I'll let you forward that to the user ML. I was not subscribed to it and
> therefore cannot reply directly to the thread.
> "
>
> So in short: mapserver does not define a style for the actual layer, so
> qgis tries to get the style (AND it's legendgraphic) from the parent
> layer/node:
>
> http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsofc&request=GetCapabilities&service=WMS
>
> in this case mapserver's rootnode, which has a legendgraphic with all
> child symbols...
>
> so my fix would be: define a style for the child layer 'rt_ofc.10k54',
> so I do not think it has something to do with the dot in the naming?
>
> Regards,
>
> Richard Duivenvoorde
>
>
> On 03-09-16 20:42, aperi2007 wrote:
>> Hi Richard,
>>
>>
>> I tested also the QGIS 2.8 and the QGIS 2.12 no one of them has this issue.
>>
>>>Bingo: that is the one we are actually retrieving, the parent node's
>>
>>> style and legend.
>>>
>>> So: not sure if that is desired behaviour... at least not for a legend..
>>
>> Ok, now is more clear what is happened.
>>
>> The "rt_ofc" is the name of all the wms service.
>> So apply-ing the value "rt_ofc" to the layers parameter mean ask to the
>> wms server to send the response for ALL the layers available in the
>> service.
>>
>> So the problem more probably is that qgis is failing to parse the
>> layername stopping it at the dot character.
>>
>> The QGIS 2.8 and 2.12 don't fail to parse these wms layersname.
>> So it is due to some evolution put in the last qgis.
>>
>> The "rt_oc" part of the layer name is also the name of all the wms service.
>>
>> This will cause to receive the legend of ALL the layers.
>>
>> A.
>>
>>
>>
>> Il 03/09/2016 20:03, Richard Duivenvoorde ha scritto:
>>> Ok, at first the problem seemed the dot in the layernames:
>>>
>>> This is the GetMap request QGIS fires off:
>>>
>>> http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsofc&map_resolution=91&language=ita&&SERVICE=WMS&VERSIO

[Qgis-user] Sampling points, keeping order

2016-09-08 Thread Carlos Cerdán
Hi list:

I have got a rasters set for montly precipitation, between 1981 and 2015,
with names 1981-01; 1981-02; etc. so, in a files browser, 420 files (36
years x 12 months) are showed, ordered.

I also have a shape of points where I want to sampling points whit such
plugin, but when I use it, fields are ordered randomly, so I'll have to use
table manager plugin to order fields.

Some advice about how to make it directly, keeping order? Does "point
sampling tool" plugin keep order with some way to order layers in QGIS
panel?

As a shape file has limitations about the number of fields (255?) I have to
do it in parts of 10 years. After it, i hope to join these parts in
Spatialite. Is there some way to do it directly in Spatialite?

Greetings

Carlos Cerdán
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] QGIS - help: filled contour lines from raster layer data

2016-09-08 Thread Nicolas Cadieux
Hi,

I am not sure why you get that error but the r.contour.level will give you what 
you need if you select "area" in the v.out.org parameter.  That will give you 
polygons that you can color the fill area. If you have installed the latest 
version of Qgis, your processing toolbox could be a mix of old and new tools.  
If this is the case, I would do complete reinstall deleting all the old plugins.

Nicolas

Envoyé de mon iPad

> Le 8 sept. 2016 à 08:47, KOHLMANN Hannes [via OSGeo.org] 
>  a écrit :
> 
> Hello dear QGis users!
> 
>  
> 
> A collegue and me were wondering if it is possible to create contour lines, 
> or more important for us, FILLED contour lines (areas) for RASTER LAYER data!
> 
> We are both very positive that this once worked and we have done that. Now we 
> cannot find the way to reproduce that anymore.
> 
> On the one hand, we thought that we had done it with the gdal-Contour tool in 
> QGIS (Raster->Extract->Contour), but now we can’t find an option to generate 
> filled contour areas, like
> 
> it is possible with the installable extension „Contour Plugin“ (which is only 
> possible to use with a point vector layer, but this is exactly what we think 
> that we have done to a raster layer file!).
> 
> 1)  Now the question: was that ever possible to do with the gdal-contour 
> plugin? Or not…
> 
>  
> 
> 2)  On the other hand, we also tried to use the GRASS Gis algorithms 
> r.contour.level or r.contour.step, etc in the processing toolbox, but they 
> keep giving us the error message: „environment can only contain strings See 
> log for more details“. What ist he problem here? Does it have to do with the 
> new version Grass Gis 7?
> 
>  
> 
> 3)  Bottom line is: We have got a .dat file, which is a raster layer with 
> valued pixels that we are displaying in spectral colors. Now we want to 
> extract the contour lines and to have a color fill between those contour 
> lines. How would you do this – is there an easy solution, which differs from 
> the numerous tutorials on the web, which seem to be a lot more complicated 
> than what we actually remember to have done?
> 
>  
> 
> Thank you very much in advance, any answer would be very helpful!
> 
>  
> 
> Best regards,
> 
> Hannes Kohlmann
> 
> 
> ___ 
> Qgis-user mailing list 
> [hidden email] 
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user 
> 
> If you reply to this email, your message will be added to the discussion 
> below:
> http://osgeo-org.1560.x6.nabble.com/QGIS-help-filled-contour-lines-from-raster-layer-data-tp5284720.html
> To start a new topic under Quantum GIS - User, email 
> ml-node+s1560n4125267...@n6.nabble.com 
> To unsubscribe from Quantum GIS - User, click here.
> NAML




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/QGIS-help-filled-contour-lines-from-raster-layer-data-tp5284720p5284798.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] [Septima/qgis-qlrbrowser] qlr layers based on shapefiles give a datasource is not valid error (#59)

2016-09-08 Thread Reginald Carlier
Hi Anders,

Thanks. That solved it ☺

Regards,


Reginald Carlier
Deskundige GIS

[http://www.ingelmunster.be/ingelmunster.gif]

Gemeente Ingelmunster, Oostrozebekestraat 4, 8770 Ingelmunster
T +32 51 33 74 39 www.ingelmunster.be

[http://www.ingelmunster.be/fb.jpg] 
[http://www.ingelmunster.be/go.jpg]   
[http://www.ingelmunster.be/in.jpg]   
[http://www.ingelmunster.be/pi.jpg]   
[http://www.ingelmunster.be/tw.jpg] 
Van: Anders Barfod [mailto:notificati...@github.com]
Verzonden: donderdag 8 september 2016 9:27
Aan: Septima/qgis-qlrbrowser
CC: Reginald Carlier; Mention
Onderwerp: Re: [Septima/qgis-qlrbrowser] qlr layers based on shapefiles give a 
datasource is not valid error (#59)


@reginaldc Try setting your path to absolute in 
Project Properties (Ctrl+Shift+P) and save the qlr again.
[https://cloud.githubusercontent.com/assets/7534153/18340588/1865bca8-75a6-11e6-8d2f-9de34f5430ea.png]

Hope it works

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on 
GitHub,
 or mute the 
thread.
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Wrong retrieving of wms legend

2016-09-08 Thread Andrea Peri
Hi Richard,
I forward you explanationto the mapserver-user list.

Meanwhile my problem is
what mean give a style to a set of ortophoot as an unique catalogue ?

AFAIK this interpretation of the OGC specs mean that in a WMS service
can be available ONLY 1 image layers.

This also in qgisserver
A QGIS project service more than one layer WMS is wrong because two
distinct raster wms cannot have the same style.
:)

And the inheritance this mean (afaik).

But this seem quite non-sense.
So more probably the style raccomandation is only for wms where there
a style clear need (like when the dataset is a vector).

A.




2016-09-08 14:45 GMT+02:00 Richard Duivenvoorde :
>
> Hi Andrea,
>
> note that I also added a comment at the code which is reponsible for this:
>
> https://github.com/qgis/QGIS/commit/69bed218373b3f93671f65bc3d02c45cbf683a48#comments
>
> Patrick's response there on this (see comment):
>
> "
> IMHO, there is nothing to fix in QGIS, here. If a layer defines no
> style, it's wanted that it inherits the parent layer's style. Have a
> look at chapter 7.2.4.6.5 of the WMS implementation specification:
>
> Style declarations are inherited by child Layers. A child shall not
> redefine a Style with the same Name as one
> inherited from a parent. A child may define a new Style with a new Name
> that is not available for the parent Layer.
>
> This PR is just a workaround for MapServer that is defining a style
> named default for both the parent and the child layers. This was making
> QGIS show 2 default styles for every child layers. Style inheritance was
> already there before. Now at has just a saner behavior in regard to
> non-standard compliant servers.
>
> I'll let you forward that to the user ML. I was not subscribed to it and
> therefore cannot reply directly to the thread.
> "
>
> So in short: mapserver does not define a style for the actual layer, so
> qgis tries to get the style (AND it's legendgraphic) from the parent
> layer/node:
>
> http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsofc&request=GetCapabilities&service=WMS
>
> in this case mapserver's rootnode, which has a legendgraphic with all
> child symbols...
>
> so my fix would be: define a style for the child layer 'rt_ofc.10k54',
> so I do not think it has something to do with the dot in the naming?
>
> Regards,
>
> Richard Duivenvoorde
>
>
> On 03-09-16 20:42, aperi2007 wrote:
>> Hi Richard,
>>
>>
>> I tested also the QGIS 2.8 and the QGIS 2.12 no one of them has this issue.
>>
>>>Bingo: that is the one we are actually retrieving, the parent node's
>>
>>> style and legend.
>>>
>>> So: not sure if that is desired behaviour... at least not for a legend..
>>
>> Ok, now is more clear what is happened.
>>
>> The "rt_ofc" is the name of all the wms service.
>> So apply-ing the value "rt_ofc" to the layers parameter mean ask to the
>> wms server to send the response for ALL the layers available in the
>> service.
>>
>> So the problem more probably is that qgis is failing to parse the
>> layername stopping it at the dot character.
>>
>> The QGIS 2.8 and 2.12 don't fail to parse these wms layersname.
>> So it is due to some evolution put in the last qgis.
>>
>> The "rt_oc" part of the layer name is also the name of all the wms service.
>>
>> This will cause to receive the legend of ALL the layers.
>>
>> A.
>>
>>
>>
>> Il 03/09/2016 20:03, Richard Duivenvoorde ha scritto:
>>> Ok, at first the problem seemed the dot in the layernames:
>>>
>>> This is the GetMap request QGIS fires off:
>>>
>>> http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsofc&map_resolution=91&language=ita&&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=1063072.194008157123,5185232.179659257643,1388677.251798849553,5543677.86921980232&CRS=EPSG:3857&WIDTH=518&HEIGHT=569&LAYERS=rt_ofc.10k54&STYLES=&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96&TRANSPARENT=TRUE
>>>
>>>
>>> as you see: LAYERS=rt_ofc.10k54
>>>
>>> This is the GetLegendGraphic url created by QGIS:
>>>
>>> http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsofc&map_resolution=91&language=ita&version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=rt_ofc&format=image/png&STYLE=default&&TRANSPARENT=true
>>>
>>>
>>> NOTE: layer=rt_ofc
>>>
>>> (all seen in the debug info on QGIS on Linux (Debug)):
>>>
>>> Which SHOULD be:
>>>
>>> http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsofc&map_resolution=91&language=ita&version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=rt_ofc.10k54&format=image/png&STYLE=default&&TRANSPARENT=true
>>>
>>>
>>> NOTE, I edited: layer=rt_ofc.10k54
>>>
>>> Mmm, not much of an legend, but as least NOT an image of all (vector)
>>> layer legends...
>>>
>>> So crux is: IF a layer parameter has a dot in it's name, only the first
>>> part is used as parameter
>>>
>>> BUT: what is the GetLegendGraphic url advertised by the server:
>>>
>>> http://www502.regione.toscan

Re: [Qgis-user] Linear referencing in QGIS

2016-09-08 Thread Paolo Cavallini
Il 08/09/2016 12:57, Bernhard Ströbl ha scritto:
> Hi Paolo,
> 
> I included the code in a small plugin for you to check it out. It's on
> github: https://github.com/bstroebl/Station
> 
> Could certainly be improved by snapping to the line (snap to segment
> must be turned on).

Thanks Bernhard.
IMHO we should heve in core a similar solution, to make LRS usage smoother.
All the best.

-- 
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Fwd: Wrong retrieving of wms legend

2016-09-08 Thread Andrea Peri
I post the response of Richard.


-- Forwarded message --
From: Richard Duivenvoorde 
Date: 2016-09-08 14:45 GMT+02:00
Subject: Re: [Qgis-user] Wrong retrieving of wms legend
To: aperi2007 , rich...@duif.net
Cc: qgis-user 



Hi Andrea,

note that I also added a comment at the code which is reponsible for this:

https://github.com/qgis/QGIS/commit/69bed218373b3f93671f65bc3d02c45cbf683a48#comments

Patrick's response there on this (see comment):

"
IMHO, there is nothing to fix in QGIS, here. If a layer defines no
style, it's wanted that it inherits the parent layer's style. Have a
look at chapter 7.2.4.6.5 of the WMS implementation specification:

Style declarations are inherited by child Layers. A child shall not
redefine a Style with the same Name as one
inherited from a parent. A child may define a new Style with a new Name
that is not available for the parent Layer.

This PR is just a workaround for MapServer that is defining a style
named default for both the parent and the child layers. This was making
QGIS show 2 default styles for every child layers. Style inheritance was
already there before. Now at has just a saner behavior in regard to
non-standard compliant servers.

I'll let you forward that to the user ML. I was not subscribed to it and
therefore cannot reply directly to the thread.
"

So in short: mapserver does not define a style for the actual layer, so
qgis tries to get the style (AND it's legendgraphic) from the parent
layer/node:

http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsofc&request=GetCapabilities&service=WMS

in this case mapserver's rootnode, which has a legendgraphic with all
child symbols...

so my fix would be: define a style for the child layer 'rt_ofc.10k54',
so I do not think it has something to do with the dot in the naming?

Regards,

Richard Duivenvoorde


On 03-09-16 20:42, aperi2007 wrote:
> Hi Richard,
>
>
> I tested also the QGIS 2.8 and the QGIS 2.12 no one of them has this issue.
>
>>Bingo: that is the one we are actually retrieving, the parent node's
>
>> style and legend.
>>
>> So: not sure if that is desired behaviour... at least not for a legend..
>
> Ok, now is more clear what is happened.
>
> The "rt_ofc" is the name of all the wms service.
> So apply-ing the value "rt_ofc" to the layers parameter mean ask to the
> wms server to send the response for ALL the layers available in the
> service.
>
> So the problem more probably is that qgis is failing to parse the
> layername stopping it at the dot character.
>
> The QGIS 2.8 and 2.12 don't fail to parse these wms layersname.
> So it is due to some evolution put in the last qgis.
>
> The "rt_oc" part of the layer name is also the name of all the wms service.
>
> This will cause to receive the legend of ALL the layers.
>
> A.
>
>
>
> Il 03/09/2016 20:03, Richard Duivenvoorde ha scritto:
>> Ok, at first the problem seemed the dot in the layernames:
>>
>> This is the GetMap request QGIS fires off:
>>
>> http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsofc&map_resolution=91&language=ita&&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=1063072.194008157123,5185232.179659257643,1388677.251798849553,5543677.86921980232&CRS=EPSG:3857&WIDTH=518&HEIGHT=569&LAYERS=rt_ofc.10k54&STYLES=&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96&TRANSPARENT=TRUE
>>
>>
>> as you see: LAYERS=rt_ofc.10k54
>>
>> This is the GetLegendGraphic url created by QGIS:
>>
>> http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsofc&map_resolution=91&language=ita&version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=rt_ofc&format=image/png&STYLE=default&&TRANSPARENT=true
>>
>>
>> NOTE: layer=rt_ofc
>>
>> (all seen in the debug info on QGIS on Linux (Debug)):
>>
>> Which SHOULD be:
>>
>> http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsofc&map_resolution=91&language=ita&version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=rt_ofc.10k54&format=image/png&STYLE=default&&TRANSPARENT=true
>>
>>
>> NOTE, I edited: layer=rt_ofc.10k54
>>
>> Mmm, not much of an legend, but as least NOT an image of all (vector)
>> layer legends...
>>
>> So crux is: IF a layer parameter has a dot in it's name, only the first
>> part is used as parameter
>>
>> BUT: what is the GetLegendGraphic url advertised by the server:
>>
>> http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsofc&request=GetCapabilities&service=WMS
>>
>>
>> Mmm, actually no style/LegendURL advertised :-(
>>
>> https://github.com/qgis/QGIS/blob/master/src/providers/wms/qgswmsprovider.cpp#L249
>>
>>
>> points to pickLegend:
>>
>> https://github.com/qgis/QGIS/blob/master/src/providers/wms/qgswmsprovider.cpp#L227
>>
>>
>> which looks ok:
>>
>> BUT apparently it picks the style of the PARENT-NODE of the layer: THAT
>> one has
>>
>> > xlink:href="http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsofc&map_resolution=

[Qgis-user] QGIS - help: filled contour lines from raster layer data

2016-09-08 Thread KOHLMANN Hannes
Hello dear QGis users!

A collegue and me were wondering if it is possible to create contour lines, or 
more important for us, FILLED contour lines (areas) for RASTER LAYER data!
We are both very positive that this once worked and we have done that. Now we 
cannot find the way to reproduce that anymore.
On the one hand, we thought that we had done it with the gdal-Contour tool in 
QGIS (Raster->Extract->Contour), but now we can't find an option to generate 
filled contour areas, like
it is possible with the installable extension "Contour Plugin" (which is only 
possible to use with a point vector layer, but this is exactly what we think 
that we have done to a raster layer file!).

1)  Now the question: was that ever possible to do with the gdal-contour 
plugin? Or not...


2)  On the other hand, we also tried to use the GRASS Gis algorithms 
r.contour.level or r.contour.step, etc in the processing toolbox, but they keep 
giving us the error message: "environment can only contain strings See log for 
more details". What ist he problem here? Does it have to do with the new 
version Grass Gis 7?


3)  Bottom line is: We have got a .dat file, which is a raster layer with 
valued pixels that we are displaying in spectral colors. Now we want to extract 
the contour lines and to have a color fill between those contour lines. How 
would you do this - is there an easy solution, which differs from the numerous 
tutorials on the web, which seem to be a lot more complicated than what we 
actually remember to have done?


Thank you very much in advance, any answer would be very helpful!

Best regards,
Hannes Kohlmann
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Wrong retrieving of wms legend

2016-09-08 Thread Richard Duivenvoorde

Hi Andrea,

note that I also added a comment at the code which is reponsible for this:

https://github.com/qgis/QGIS/commit/69bed218373b3f93671f65bc3d02c45cbf683a48#comments

Patrick's response there on this (see comment):

"
IMHO, there is nothing to fix in QGIS, here. If a layer defines no
style, it's wanted that it inherits the parent layer's style. Have a
look at chapter 7.2.4.6.5 of the WMS implementation specification:

Style declarations are inherited by child Layers. A child shall not
redefine a Style with the same Name as one
inherited from a parent. A child may define a new Style with a new Name
that is not available for the parent Layer.

This PR is just a workaround for MapServer that is defining a style
named default for both the parent and the child layers. This was making
QGIS show 2 default styles for every child layers. Style inheritance was
already there before. Now at has just a saner behavior in regard to
non-standard compliant servers.

I'll let you forward that to the user ML. I was not subscribed to it and
therefore cannot reply directly to the thread.
"

So in short: mapserver does not define a style for the actual layer, so
qgis tries to get the style (AND it's legendgraphic) from the parent
layer/node:

http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsofc&request=GetCapabilities&service=WMS

in this case mapserver's rootnode, which has a legendgraphic with all
child symbols...

so my fix would be: define a style for the child layer 'rt_ofc.10k54',
so I do not think it has something to do with the dot in the naming?

Regards,

Richard Duivenvoorde


On 03-09-16 20:42, aperi2007 wrote:
> Hi Richard,
> 
> 
> I tested also the QGIS 2.8 and the QGIS 2.12 no one of them has this issue.
> 
>>Bingo: that is the one we are actually retrieving, the parent node's
> 
>> style and legend.
>>
>> So: not sure if that is desired behaviour... at least not for a legend..
> 
> Ok, now is more clear what is happened.
> 
> The "rt_ofc" is the name of all the wms service.
> So apply-ing the value "rt_ofc" to the layers parameter mean ask to the
> wms server to send the response for ALL the layers available in the
> service.
> 
> So the problem more probably is that qgis is failing to parse the
> layername stopping it at the dot character.
> 
> The QGIS 2.8 and 2.12 don't fail to parse these wms layersname.
> So it is due to some evolution put in the last qgis.
> 
> The "rt_oc" part of the layer name is also the name of all the wms service.
> 
> This will cause to receive the legend of ALL the layers.
> 
> A.
> 
> 
> 
> Il 03/09/2016 20:03, Richard Duivenvoorde ha scritto:
>> Ok, at first the problem seemed the dot in the layernames:
>>
>> This is the GetMap request QGIS fires off:
>>
>> http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsofc&map_resolution=91&language=ita&&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=1063072.194008157123,5185232.179659257643,1388677.251798849553,5543677.86921980232&CRS=EPSG:3857&WIDTH=518&HEIGHT=569&LAYERS=rt_ofc.10k54&STYLES=&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96&TRANSPARENT=TRUE
>>
>>
>> as you see: LAYERS=rt_ofc.10k54
>>
>> This is the GetLegendGraphic url created by QGIS:
>>
>> http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsofc&map_resolution=91&language=ita&version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=rt_ofc&format=image/png&STYLE=default&&TRANSPARENT=true
>>
>>
>> NOTE: layer=rt_ofc
>>
>> (all seen in the debug info on QGIS on Linux (Debug)):
>>
>> Which SHOULD be:
>>
>> http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsofc&map_resolution=91&language=ita&version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=rt_ofc.10k54&format=image/png&STYLE=default&&TRANSPARENT=true
>>
>>
>> NOTE, I edited: layer=rt_ofc.10k54
>>
>> Mmm, not much of an legend, but as least NOT an image of all (vector)
>> layer legends...
>>
>> So crux is: IF a layer parameter has a dot in it's name, only the first
>> part is used as parameter
>>
>> BUT: what is the GetLegendGraphic url advertised by the server:
>>
>> http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsofc&request=GetCapabilities&service=WMS
>>
>>
>> Mmm, actually no style/LegendURL advertised :-(
>>
>> https://github.com/qgis/QGIS/blob/master/src/providers/wms/qgswmsprovider.cpp#L249
>>
>>
>> points to pickLegend:
>>
>> https://github.com/qgis/QGIS/blob/master/src/providers/wms/qgswmsprovider.cpp#L227
>>
>>
>> which looks ok:
>>
>> BUT apparently it picks the style of the PARENT-NODE of the layer: THAT
>> one has
>>
>> > xlink:href="http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsofc&map_resolution=91&language=ita&version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=rt_ofc&format=image/png&STYLE=default"/>
>>
>>
>> Bingo: that is the one we are actually retrieving, the parent node's
>> style and lege

Re: [Qgis-user] Linear referencing in QGIS

2016-09-08 Thread Bernhard Ströbl

Hi Paolo,

I included the code in a small plugin for you to check it out. It's on 
github: https://github.com/bstroebl/Station


Could certainly be improved by snapping to the line (snap to segment 
must be turned on).


regards

Bernhard

Am 08.09.2016 um 08:39 schrieb Paolo Cavallini:

Hi Bernhard,

Il 08/09/2016 08:00, Bernhard Ströbl ha scritto:


however I have some Python code here in operation that returns a
"station" on a line by clicking on the line (or near it, as you won't
hit the line without snapping to segment). A "station" is a position on
the line, i.e. the start point of the line is station = 0, the end point
of the line is station = line.length().
Rational was to identify stations on street lines where certain
infrastructure like sewer covers are situated.
Will share if you are interested.


I am, please do.
Thanks.





__ Information from ESET Mail Security, version of virus signature 
database 14089 (20160908) __

The message was checked by ESET Mail Security.
http://www.eset.com


___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Transaction groups in 2.16

2016-09-08 Thread Karl-Magnus Jönsson
Thanks! Found it now :) And it works. However as I'm speaking to the 
developer:) I have a default value for the current user. And I'm getting a SQL 
error when enabling "Evaluate default values on provider side". Actually it 
evaluates OK but when trying to insert the error arises.

Column definition:
anvandare character varying(20) DEFAULT "current_user"(),

Then QGIS tries to insert my user name as a string without '' resulting in not 
finding any column with my user name. 

Karl-Magnus Jönsson │GIS-utvecklare
Miljö- och samhällsbyggnadsförvaltningen, avd. Geografisk information
Kristianstads kommun
291 80 Kristianstad
Besöksadress: Västra Storgatan 12
Tel 044-13 54 16 │ Mobil: 0733-13 54 16 │karl-magnus.jons...@kristianstad.se
www.kristianstad.se

-Ursprungligt meddelande-
Från: Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org] För Matthias Kuhn
Skickat: den 8 september 2016 11:45
Till: qgis-user@lists.osgeo.org
Ämne: Re: [Qgis-user] Transaction groups in 2.16

Hi Karl-Magnus,

it has been moved to project properties.

Matthias

On 09/08/2016 10:16 AM, Karl-Magnus Jönsson wrote:
> Hi!
> 
> I can’t find the option for transaction groups in QGIS  2.16.2. I 
> should be in Settings -> Options -> Data Sources. Is there in 2.14 
> anyway. I’d like to try it out. Anyone who knows about it?
> 
>  
> 
> *Karl-Magnus Jönsson*│GIS-utvecklare
> 
> Miljö- och samhällsbyggnadsförvaltningen, avd. Geografisk information
> 
> Kristianstads kommun
> 
> 291 80 Kristianstad
> 
> Besöksadress: Västra Storgatan 12
> 
> Tel 044-13 54 16 │Mobil: 0733-13 54 16 
> │karl-magnus.jons...@kristianstad.se
> 
> www.kristianstad.se 
> 
>  
> 
> 
> 
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
> 
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Transaction groups in 2.16

2016-09-08 Thread Matthias Kuhn
Hi Karl-Magnus,

it has been moved to project properties.

Matthias

On 09/08/2016 10:16 AM, Karl-Magnus Jönsson wrote:
> Hi!
> 
> I can’t find the option for transaction groups in QGIS  2.16.2. I should
> be in Settings -> Options -> Data Sources. Is there in 2.14 anyway. I’d
> like to try it out. Anyone who knows about it?
> 
>  
> 
> *Karl-Magnus Jönsson*│GIS-utvecklare
> 
> Miljö- och samhällsbyggnadsförvaltningen, avd. Geografisk information
> 
> Kristianstads kommun
> 
> 291 80 Kristianstad
> 
> Besöksadress: Västra Storgatan 12
> 
> Tel 044-13 54 16 │Mobil: 0733-13 54 16 │karl-magnus.jons...@kristianstad.se
> 
> www.kristianstad.se 
> 
>  
> 
> 
> 
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
> 
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Linear referencing in QGIS

2016-09-08 Thread AVICOMARTIN

Hi Bernhard

I do not quite understand what you mean with the m or z picker tool, 
however I have some Python code here in operation that returns a 
"station" on a line by clicking on the line (or near it, as you won't 
hit the line without snapping to segment). A "station" is a position 
on the line, i.e. the start point of the line is station = 0, the end 
point of the line is station = line.length().
Rational was to identify stations on street lines where certain 
infrastructure like sewer covers are situated.

Will share if you are interested.


The same as Paolo Cavalini says.
It seem very useful.


___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Qgis core dump editing in project with relation reference

2016-09-08 Thread AVICOMARTIN

Hi all,

I am testing qgis in a project with a lot of relations (about 168).

It seem work well and I decided use relation reference in some forms but 
doing this, qgis crash (core dump) when edit layers.


I tested some situations (It is not easy because my project it's not 
simple) and finally I think crash is consequence to relation reference 
because after removing all relation references, edit seem stable and not 
crash.


Has someone experienced the same problem or confirm this?


___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Transaction groups in 2.16

2016-09-08 Thread Karl-Magnus Jönsson
Hi!
I can’t find the option for transaction groups in QGIS  2.16.2. I should be in 
Settings -> Options -> Data Sources. Is there in 2.14 anyway. I’d like to try 
it out. Anyone who knows about it?

Karl-Magnus Jönsson │GIS-utvecklare
Miljö- och samhällsbyggnadsförvaltningen, avd. Geografisk information
Kristianstads kommun
291 80 Kristianstad
Besöksadress: Västra Storgatan 12
Tel 044-13 54 16 │ Mobil: 0733-13 54 16 │karl-magnus.jons...@kristianstad.se
www.kristianstad.se

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Linear referencing in QGIS

2016-09-08 Thread Matthias Kuhn
Hi Andreas,

I think a geometry generator symbol should be able to do this.

1) On the point layer join the line layer
2) Generate points from line information plus offset

Matthias

On 09/07/2016 04:51 PM, Neumann, Andreas wrote:
> Hi,
> 
> Yes, I know about LR expressions in the current master versions.
> 
> So one could visualize the events table through a virtual geometry
> column - would that work?
> 
> I will forward all this information to my friend.
> 
> Greetings,
> 
> Andreas
> 
> On 2016-09-07 15:34, Matthias Kuhn wrote:
> 
>> Hi Andreas,
>>
>> In QGIS 2.18 / QGIS 3.0 this should be possible via expressions:
>>
>> https://github.com/qgis/QGIS/commit/e110ba7d54b0ac7d3f63e8ed7eaebb2845f9f38c
>>
>> Best regards
>> Matthias
>>
>> On 09/07/2016 02:24 PM, Neumann, Andreas wrote:
>>> Hi,
>>>
>>> A friend of mine asked me if QGIS can do linear referencing - e.g.
>>> symbolizing road data speed limits along a road, lets say from km 0 to
>>> 0.76 there is a limit of 50 km/h, from 0.76 to 1.23 there is 80 km/h
>>> limit, etc.
>>>
>>> The idea is to symbolize these road segments without having to actually
>>> split the data into bits. And hopefully without having to generate
>>> derived tables that have no link to the original data.
>>>
>>> Is QGIS able to do this, perhaps with a plugin?
>>>
>>> Thanks for any hints,
>>>
>>> Andreas
>>>
>>>  
>>>
>>>
>>> ___
>>> Qgis-user mailing list
>>> Qgis-user@lists.osgeo.org 
>>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>
>> ___
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org 
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
> 
>  
> 
>  
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user