raster layer legend: how to

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

raster layer legend: how to

Martin Landa
Hi,

after some digging in manuals and googling I am still not able to set
up correctly legend for my WMS layer published by MapServer, eg.

https://rain1.fsv.cvut.cz/services/wms?service=wms&version=1.3.0&layer=H_N2_24h&REQUEST=getlegendgraphic&FORMAT=image/png&sld_version=1.1.0

The underlaing TIFF has color table defined:

  Metadata:
    COLOR_TABLE_RULES_COUNT=2
    COLOR_TABLE_RULE_RGB_0=2.000000e+01 1.000000e+02 255 255 255 0 0 200
    COLOR_TABLE_RULE_RGB_1=1.000000e+02 2.200000e+02 0 0 200 0 0 255
    Generated_with=GRASS GIS 7.1.svn
  Color Table (RGB with 256 entries)

I would like to set up legend like:

http://geo102.fsv.cvut.cz/~landa/tmp/wms-legend.png

Thanks for any hits in advance! Martin

--
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: raster layer legend: how to

Martin Landa
Hi,

2017-12-02 16:56 GMT+01:00 Martin Landa <[hidden email]>:
> https://rain1.fsv.cvut.cz/services/wms?service=wms&version=1.3.0&layer=H_N2_24h&REQUEST=getlegendgraphic&FORMAT=image/png&sld_version=1.1.0
>
> I would like to set up legend like:
>
> http://geo102.fsv.cvut.cz/~landa/tmp/wms-legend.png

OK, I was able to add at least legend img statically via

   CLASS
        NAME "H_N2_24h"
        KEYIMAGE "wms-legend.png"
    END # CLASS

and

  LEGEND
      STATUS ON
      KEYSIZE 71 258
  END # LEGEND

But still the image with included legend is somehow small. What
parameter am I missing?

Anyway I am interested how to set up my mapfile to produce such legend
automatically for TIFF data instead of using static image.

Thanks, Ma

--
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users