Custom legend in GetLegendGraphic

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Custom legend in GetLegendGraphic

Kolosov Sergey
Hello!

I've stumbled with custom legend and can't make it work for some time.

I've made my own legend (png file) and then added this legend to a style via "Add legend" button in the style editor. Legend was correctly added, width/height and format were auto-detected and legend appeared after click on "Preview legend" link in the style editor.

Next my expectation was that I'll see my png image in GetLegendGraphic response, but GeoServer returned image based on SLD style and ignored my png.

Am I missing something? Should it work in GetLegendGraphic at all?

Thanks in advance!

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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Custom legend in GetLegendGraphic

GeoServer - User mailing list
Hello!

I have the same issue. Can someone help please?



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html

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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Custom legend in GetLegendGraphic

geowolf
Both mails have little to no context... what version of GeoServer? Where is the legend stored?
Is the style the default one or a supplementary one? Can you share the configuration?
What does the GetLegendGraphic look like?

I don't think it's possible to provide any guidance without an answer to _all_ the above questions.

Cheers
Andrea


On Thu, Sep 6, 2018 at 4:00 PM Ann17 via Geoserver-users <[hidden email]> wrote:
Hello!

I have the same issue. Can someone help please?



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html

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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users


--

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



_______________________________________________
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Custom legend in GetLegendGraphic

Kolosov Sergey
In reply to this post by Kolosov Sergey
Hi Andrea,

GeoServer 2.13.2.
Legend (png file) is in the 'www' directory in GEOSERVER_DATA_DIR.
Style is the default one.

How to reproduce: I've created new data folder and copied default raster style in the new one named 'test_legend'. Then I added legend to the style via 'Add legend' button and provided path to legend file 'http://localhost:8080/geoserver/www/legend/heightmap.png'. Clicking on 'Auto-detect image size and type' filled width, height and format of the legend. After that I've saved the legend and assigned it to the layer 'nurc:mosaic'.

Important note: by clicking on the 'Preview legend' button in the style editor I can see legend 'heightmap.png' 123x767, but in the layer editor on the Publish tab under Default style I see default  bluish image 20x20.

The legend request URL is:
Result of the requested URL is the default bluish style 20x20 instead of the image 'heightmap.png' 123x767


_______________________________________________
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Custom legend in GetLegendGraphic

Daniele Romagnoli-3
Hi Sergey,
I think that you have hit the same problem I have found time ago:

Is that the same bug?

Cheers,
Daniele

On Mon, Sep 10, 2018 at 5:06 PM, Sergey Kolosov <[hidden email]> wrote:
Hi Andrea,

GeoServer 2.13.2.
Legend (png file) is in the 'www' directory in GEOSERVER_DATA_DIR.
Style is the default one.

How to reproduce: I've created new data folder and copied default raster style in the new one named 'test_legend'. Then I added legend to the style via 'Add legend' button and provided path to legend file 'http://localhost:8080/geoserver/www/legend/heightmap.png'. Clicking on 'Auto-detect image size and type' filled width, height and format of the legend. After that I've saved the legend and assigned it to the layer 'nurc:mosaic'.

Important note: by clicking on the 'Preview legend' button in the style editor I can see legend 'heightmap.png' 123x767, but in the layer editor on the Publish tab under Default style I see default  bluish image 20x20.

The legend request URL is:
Result of the requested URL is the default bluish style 20x20 instead of the image 'heightmap.png' 123x767


_______________________________________________
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users




--
Regards,
Daniele Romagnoli
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.
==

Ing. Daniele Romagnoli
Senior Software Engineer

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:      +39 0584 1660272


-------------------------------------------------------

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.


_______________________________________________
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Custom legend in GetLegendGraphic

Simone Giannecchini
A fix is undergoing.

Regards,
Simone Giannecchini
==
GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information.
==
Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
mob:   +39  333 8128928

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.

On Mon, Sep 10, 2018 at 6:26 PM Daniele Romagnoli
<[hidden email]> wrote:

>
> Hi Sergey,
> I think that you have hit the same problem I have found time ago:
> https://osgeo-org.atlassian.net/browse/GEOS-7636
>
> Is that the same bug?
>
> Cheers,
> Daniele
>
> On Mon, Sep 10, 2018 at 5:06 PM, Sergey Kolosov <[hidden email]> wrote:
>>
>> Hi Andrea,
>>
>> GeoServer 2.13.2.
>> Legend (png file) is in the 'www' directory in GEOSERVER_DATA_DIR.
>> Style is the default one.
>> Configuration: https://drive.google.com/open?id=1Ntlg4WTpsEgKj5pm81Gb98ckoMHa1qZj
>>
>> How to reproduce: I've created new data folder and copied default raster style in the new one named 'test_legend'. Then I added legend to the style via 'Add legend' button and provided path to legend file 'http://localhost:8080/geoserver/www/legend/heightmap.png'. Clicking on 'Auto-detect image size and type' filled width, height and format of the legend. After that I've saved the legend and assigned it to the layer 'nurc:mosaic'.
>>
>> Important note: by clicking on the 'Preview legend' button in the style editor I can see legend 'heightmap.png' 123x767, but in the layer editor on the Publish tab under Default style I see default  bluish image 20x20.
>>
>> The legend request URL is:
>> http://localhost:8080/geoserver/nurc/wms?SERVICE=wms&REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&LAYER=mosaic
>> Result of the requested URL is the default bluish style 20x20 instead of the image 'heightmap.png' 123x767
>>
>>
>> _______________________________________________
>> 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
>>
>>
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>
>
>
> --
> Regards,
> Daniele Romagnoli
> ==
> GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.
> ==
>
> Ing. Daniele Romagnoli
> Senior Software Engineer
>
> GeoSolutions S.A.S.
> Via di Montramito 3/A
> 55054  Massarosa (LU)
> Italy
> phone: +39 0584 962313
> fax:      +39 0584 1660272
>
> 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.
> _______________________________________________
> 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
>
>
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users


_______________________________________________
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Custom legend in GetLegendGraphic

Kolosov Sergey
Hello!

Daniele, yes, that's it. Somehow I couldn't find it by myself.

Simone, thank you for fixing!

пн, 10 сент. 2018 г. в 19:30, Simone Giannecchini <[hidden email]>:
A fix is undergoing.

Regards,
Simone Giannecchini
==
GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information.
==
Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
mob:   +39  333 8128928

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.

On Mon, Sep 10, 2018 at 6:26 PM Daniele Romagnoli
<[hidden email]> wrote:
>
> Hi Sergey,
> I think that you have hit the same problem I have found time ago:
> https://osgeo-org.atlassian.net/browse/GEOS-7636
>
> Is that the same bug?
>
> Cheers,
> Daniele
>
> On Mon, Sep 10, 2018 at 5:06 PM, Sergey Kolosov <[hidden email]> wrote:
>>
>> Hi Andrea,
>>
>> GeoServer 2.13.2.
>> Legend (png file) is in the 'www' directory in GEOSERVER_DATA_DIR.
>> Style is the default one.
>> Configuration: https://drive.google.com/open?id=1Ntlg4WTpsEgKj5pm81Gb98ckoMHa1qZj
>>
>> How to reproduce: I've created new data folder and copied default raster style in the new one named 'test_legend'. Then I added legend to the style via 'Add legend' button and provided path to legend file 'http://localhost:8080/geoserver/www/legend/heightmap.png'. Clicking on 'Auto-detect image size and type' filled width, height and format of the legend. After that I've saved the legend and assigned it to the layer 'nurc:mosaic'.
>>
>> Important note: by clicking on the 'Preview legend' button in the style editor I can see legend 'heightmap.png' 123x767, but in the layer editor on the Publish tab under Default style I see default  bluish image 20x20.
>>
>> The legend request URL is:
>> http://localhost:8080/geoserver/nurc/wms?SERVICE=wms&REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&LAYER=mosaic
>> Result of the requested URL is the default bluish style 20x20 instead of the image 'heightmap.png' 123x767
>>
>>
>> _______________________________________________
>> 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
>>
>>
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>
>
>
> --
> Regards,
> Daniele Romagnoli
> ==
> GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.
> ==
>
> Ing. Daniele Romagnoli
> Senior Software Engineer
>
> GeoSolutions S.A.S.
> Via di Montramito 3/A
> 55054  Massarosa (LU)
> Italy
> phone: +39 0584 962313
> fax:      +39 0584 1660272
>
> 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.
> _______________________________________________
> 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
>
>
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users


_______________________________________________
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users