On Wed, Jul 11, 2018 at 12:01 AM, László Németh <nlaszlo1...@gmail.com>
wrote:

> Hi Andrea,
>
> Thank you for your response but I am not sure if I explained it clearly.
>

You did, my answer is still valid (but I understand you not liking it ;-) )


>
> We reqest the same layers with two different styles in the same WMS
> request (using layers and styles parameter, both comma separated).
> Duplicates are OK, but I would expect to get a "union all” of the features
> from both style filters, but we only get the features of the first style
> but duplicated (features resulted by the second style in the list are
> missing).
>
> So request LAYER=APPLE with STYLE=green results in one, green apple
> feature, request LAYER=APPLE with STYLE=red results in one, red apple
> feature
> and request with LAYER=APPLE,APPLE and STYLE=green,red results in the
> green apple feature twice. Is this the way it should work?
>

The WMS specification says nothing about how GetFeatureInfo should be
implemented, it's completely freeform.
In GeoServer the layers in the list are processed independently, there is
no check for layer repetition or logic to avoid generating
the same feature twice, for both simplicity and efficiency.

In any case, in absence of a firm indication from the WMS spec arguing what
would be the "correct" behavior is pointless,
but even if we agreed it was a bug, it would not change the end result, the
GPL license also states, among other things,
"SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
SERVICING,
REPAIR OR CORRECTION" (all open source licenses have a similar clause, but
the GPL is particular direct in this respect).
I know reading it can be tedious, but it's a good read anyways, for anyone
that still hasn't had a look, here, it's good to know
what you actually get alongside the free software:
https://www.gnu.org/licenses/old-licenses/gpl-2.0.html

As said, implementing the behavior you desire would be possible, but it's
up to you to find the development resources to do so.
It's not going to be a massive change, but not a completely trivial one
either to get it done properly
(e.g., considering for example layers without a stable feature identifier,
rendering transformations making up features on the fly,
changing the old featureinfo engine which can still be activated by a flag,
and so on).

Let me also offer two workarounds:

   - if you have control over the client the easiest thing would be to
   request FeatureInfo as GeoJSON and the remove the duplicates client side
   - if you have control over the server, you can build a single style
   generating the full response by putting the contents of the two existing
   styles as two consequent FeatureTypeStyle elements

Hope this helps

Cheers
Andrea

==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information. == Ing. Andrea Aime @geowolf Technical Lead
GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39
0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549
http://www.geo-solutions.it http://twitter.com/geosolutions_it
------------------------------------------------------- *Con riferimento
alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 -
Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni
circostanza inerente alla presente email (il suo contenuto, gli eventuali
allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i
destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per
errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le
sarei comunque grato se potesse darmene notizia. This email is intended
only for the person or entity to which it is addressed and may contain
information that is privileged, confidential or otherwise protected from
disclosure. We remind that - as provided by European Regulation 2016/679
“GDPR” - copying, dissemination or use of this e-mail or the information
herein by anyone other than the intended recipient is prohibited. If you
have received this email by mistake, please notify us immediately by
telephone or e-mail.*
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to