[Geoserver-devel] Bug in GetLegendGraphic countMatched-feature when using MaxScaleDenominator in SLD

Hi GeoServer-team,

I have tested the new „return feature count“-feature in the GetLegendGraphic-request. It is a great feature, thank you for that!

But I think that there is a bug, if you have defined a „MaxScaleDenominator“ in your SLD-rule. If you specify the „MaxScaleDenominator“, the returned feature count in the generated legend is always „0“. The map-view for this SLD-rule (GetMap-request) works fine and displays the features correctly according to the scale.

The returned feature count works also correctly if you use the „minScaleDenominator“.

Is this a known bug?

Best regards,

Paul

P.S.: My SLD (maxScale2000:returns always feature count 0; minScale2000:returns correct feature count):

<?xml version="1.0" encoding="ISO-8859-1"?>

Count_Test

Count_Test

Count_Test

maxScale2000

maxScale2000

2000

circle

#00FFFF

1

10

minScale2000

minScale2000

2000

circle

#734C00

1

9

Hi Paul,
do you have the request too? If you have scale dependencies you need to also pass along a bbox and
a width/height so that the code can compute the target scale denominator

Cheers
Andrea

···

On Thu, Sep 14, 2017 at 11:29 AM, Biskup, Paul <Paul.Biskup@anonymised.com> wrote:

Hi GeoServer-team,

I have tested the new „return feature count“-feature in the GetLegendGraphic-request. It is a great feature, thank you for that!

But I think that there is a bug, if you have defined a „MaxScaleDenominator“ in your SLD-rule. If you specify the „MaxScaleDenominator“, the returned feature count in the generated legend is always „0“. The map-view for this SLD-rule (GetMap-request) works fine and displays the features correctly according to the scale.

The returned feature count works also correctly if you use the „minScaleDenominator“.

Is this a known bug?

Best regards,

Paul

P.S.: My SLD (maxScale2000:returns always feature count 0; minScale2000:returns correct feature count):

<?xml version="1.0" encoding="ISO-8859-1"?>

Count_Test

Count_Test

Count_Test

maxScale2000

maxScale2000

2000

circle

#00FFFF

1

10

minScale2000

minScale2000

2000

circle

#734C00

1

9


Check out the vibrant tech community on one of the world’s most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


Geoserver-devel mailing list
Geoserver-devel@anonymised.com.366…sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Regards,

Andrea Aime

==
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

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

Hi Andrea,

sure, here are the requests:

Scale: 1500:

http://xxx/geoserver/ows?SERVICE=WMS&REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=20&HEIGHT=20&LAYER=POINT_LAYER&SCALE=1500&EXCEPTIONS=application/json&BBOX=2567457.5047403597,5466971.456006,2567701.1052275603,5467324.67671244&SRS=EPSG:31466&FORMAT_OPTIONS=layout:legend&LEGEND_OPTIONS=countMatched:true;fontAntiAliasing:true;forceLabels:on&STYLE=Count_Test

returns in GetLegendGraphics-image: „maxScale (0)“

Scale: 2500:

http://xxx/geoserver/ows?SERVICE=WMS&REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=20&HEIGHT=20&LAYER=POINT_LAYER&SCALE=2500&EXCEPTIONS=application/json&BBOX=2567347.737958326,5466819.978984294,2567753.7387703275,5467408.680161696&SRS=EPSG:31466&FORMAT_OPTIONS=layout:legend&LEGEND_OPTIONS=countMatched:true;fontAntiAliasing:true;forceLabels:on&STYLE=Count_Test

returns in GetLegendGraphics-image: „minScale (261)“

Regards,

Paul

···

Hi Paul,

do you have the request too? If you have scale dependencies you need to also pass along a bbox and

a width/height so that the code can compute the target scale denominator

Cheers

Andrea

On Thu, Sep 14, 2017 at 11:29 AM, Biskup, Paul <Paul.Biskup@…3654…> wrote:

Hi GeoServer-team,

I have tested the new „return feature count“-feature in the GetLegendGraphic-request. It is a great feature, thank you for that!

But I think that there is a bug, if you have defined a „MaxScaleDenominator“ in your SLD-rule. If you specify the „MaxScaleDenominator“, the returned feature count in the generated legend is always „0“. The map-view for this SLD-rule (GetMap-request) works fine and displays the features correctly according to the scale.

The returned feature count works also correctly if you use the „minScaleDenominator“.

Is this a known bug?

Best regards,

Paul

P.S.: My SLD (maxScale2000:returns always feature count 0; minScale2000:returns correct feature count):

<?xml version="1.0" encoding="ISO-8859-1"?>

Count_Test

Count_Test

Count_Test

maxScale2000

maxScale2000

2000

circle

#00FFFF

1

10

minScale2000

minScale2000

2000

circle

#734C00

1

9


Check out the vibrant tech community on one of the world’s most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Regards,

Andrea Aime

==
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

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

Ok,
then yes, it looks like a bug. Can you open a ticket with everything required to reproduce (style, data, request)?

Cheers
Andrea

···

On Thu, Sep 14, 2017 at 12:02 PM, Biskup, Paul <Paul.Biskup@anonymised.com> wrote:

Hi Andrea,

sure, here are the requests:

Scale: 1500:

http://xxx/geoserver/ows?SERVICE=WMS&REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=20&HEIGHT=20&LAYER=POINT_LAYER&SCALE=1500&EXCEPTIONS=application/json&BBOX=2567457.5047403597,5466971.456006,2567701.1052275603,5467324.67671244&SRS=EPSG:31466&FORMAT_OPTIONS=layout:legend&LEGEND_OPTIONS=countMatched:true;fontAntiAliasing:true;forceLabels:on&STYLE=Count_Test

returns in GetLegendGraphics-image: „maxScale (0)“

Scale: 2500:

http://xxx/geoserver/ows?SERVICE=WMS&REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=20&HEIGHT=20&LAYER=POINT_LAYER&SCALE=2500&EXCEPTIONS=application/json&BBOX=2567347.737958326,5466819.978984294,2567753.7387703275,5467408.680161696&SRS=EPSG:31466&FORMAT_OPTIONS=layout:legend&LEGEND_OPTIONS=countMatched:true;fontAntiAliasing:true;forceLabels:on&STYLE=Count_Test

returns in GetLegendGraphics-image: „minScale (261)“

Regards,

Paul

Von: andrea.aime@anonymised.com [mailto:andrea.aime@anonymised.com] Im Auftrag von Andrea Aime
Gesendet: Donnerstag, 14. September 2017 11:48
An: Biskup, Paul <Paul.Biskup@anonymised.com>
Cc: geoserver-devel@anonymised.comsourceforge.net
Betreff: Re: [Geoserver-devel] Bug in GetLegendGraphic countMatched-feature when using MaxScaleDenominator in SLD

Hi Paul,

do you have the request too? If you have scale dependencies you need to also pass along a bbox and

a width/height so that the code can compute the target scale denominator

Cheers

Andrea

On Thu, Sep 14, 2017 at 11:29 AM, Biskup, Paul <Paul.Biskup@anonymised.com654…> wrote:

Hi GeoServer-team,

I have tested the new „return feature count“-feature in the GetLegendGraphic-request. It is a great feature, thank you for that!

But I think that there is a bug, if you have defined a „MaxScaleDenominator“ in your SLD-rule. If you specify the „MaxScaleDenominator“, the returned feature count in the generated legend is always „0“. The map-view for this SLD-rule (GetMap-request) works fine and displays the features correctly according to the scale.

The returned feature count works also correctly if you use the „minScaleDenominator“.

Is this a known bug?

Best regards,

Paul

P.S.: My SLD (maxScale2000:returns always feature count 0; minScale2000:returns correct feature count):

<?xml version="1.0" encoding="ISO-8859-1"?>

Count_Test

Count_Test

Count_Test

maxScale2000

maxScale2000

2000

circle

#00FFFF

1

10

minScale2000

minScale2000

2000

circle

#734C00

1

9


Check out the vibrant tech community on one of the world’s most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Regards,

Andrea Aime

==
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

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

Regards,

Andrea Aime

==
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

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

Yes, I’ll open a ticket.

Regards,

Paul

···

Hi Paul,

do you have the request too? If you have scale dependencies you need to also pass along a bbox and

a width/height so that the code can compute the target scale denominator

Cheers

Andrea

On Thu, Sep 14, 2017 at 11:29 AM, Biskup, Paul <Paul.Biskup@…3654…> wrote:

Hi GeoServer-team,

I have tested the new „return feature count“-feature in the GetLegendGraphic-request. It is a great feature, thank you for that!

But I think that there is a bug, if you have defined a „MaxScaleDenominator“ in your SLD-rule. If you specify the „MaxScaleDenominator“, the returned feature count in the generated legend is always „0“. The map-view for this SLD-rule (GetMap-request) works fine and displays the features correctly according to the scale.

The returned feature count works also correctly if you use the „minScaleDenominator“.

Is this a known bug?

Best regards,

Paul

P.S.: My SLD (maxScale2000:returns always feature count 0; minScale2000:returns correct feature count):

<?xml version="1.0" encoding="ISO-8859-1"?>

Count_Test

Count_Test

Count_Test

maxScale2000

maxScale2000

2000

circle

#00FFFF

1

10

minScale2000

minScale2000

2000

circle

#734C00

1

9


Check out the vibrant tech community on one of the world’s most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Regards,

Andrea Aime

==
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

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.