[Geoserver-users] intervals with cql expression on quantity

Hi,

I was trying to generate a legend in geoserver with intervals and values passed with env function, but it seems not to work. There it is my syle:

<sld:ColorMap type=“intervals”>
<sld:ColorMapEntry color=“#d7191c” opacity=“0” quantity=“${env(‘nodata’,-1)}”/>
<sld:ColorMapEntry color=“#d7191c” opacity=“1.0” quantity=“${env(‘low’,0)}”/>

</sld:ColorMap>

The errors provided on the geoserver.log file are:

at org.geoserver.wms.legendgraphic.RasterLayerLegendHelper.parseRequest(RasterLayerLegendHelper.java:196)
at org.geoserver.wms.legendgraphic.RasterLayerLegendHelper.(RasterLayerLegendHelper.java:96)
at org.geoserver.wms.legendgraphic.BufferedImageLegendGraphicBuilder.buildLegendGraphic(BufferedImageLegendGraphicBuilder.java:284)
at org.geoserver.wms.web.data.AbstractStylePage$7$1.getData(AbstractStylePage.java:306)
at org.apache.wicket.markup.html.DynamicWebResource$ResourceState.getLength(DynamicWebResource.java:89)
at org.apache.wicket.markup.html.DynamicWebResource$1.length(DynamicWebResource.java:241)
at org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.configure(ResourceStreamRequestTarget.java:241)
at org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.respond(ResourceStreamRequestTarget.java:150)
at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1267)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1334)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484)
at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)

is there any error in the style code or perhaps this is not supported yet? I ask here because I found something similiar in previous mails, but i haven’t found any solution yet.

Thanks in advance,

José Antonio

We really need the line above the error you include, that tells us what the actual error is

Ian

···

On 3 July 2017 at 17:18, Jose Antonio <islaperejil@anonymised.com> wrote:

Hi,

I was trying to generate a legend in geoserver with intervals and values passed with env function, but it seems not to work. There it is my syle:

<sld:ColorMap type=“intervals”>
<sld:ColorMapEntry color=“#d7191c” opacity=“0” quantity=“${env(‘nodata’,-1)}”/>
<sld:ColorMapEntry color=“#d7191c” opacity=“1.0” quantity=“${env(‘low’,0)}”/>

</sld:ColorMap>

The errors provided on the geoserver.log file are:

at org.geoserver.wms.legendgraphic.RasterLayerLegendHelper.parseRequest(RasterLayerLegendHelper.java:196)
at org.geoserver.wms.legendgraphic.RasterLayerLegendHelper.(RasterLayerLegendHelper.java:96)
at org.geoserver.wms.legendgraphic.BufferedImageLegendGraphicBuilder.buildLegendGraphic(BufferedImageLegendGraphicBuilder.java:284)
at org.geoserver.wms.web.data.AbstractStylePage$7$1.getData(AbstractStylePage.java:306)
at org.apache.wicket.markup.html.DynamicWebResource$ResourceState.getLength(DynamicWebResource.java:89)
at org.apache.wicket.markup.html.DynamicWebResource$1.length(DynamicWebResource.java:241)
at org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.configure(ResourceStreamRequestTarget.java:241)
at org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.respond(ResourceStreamRequestTarget.java:150)
at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1267)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1334)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484)
at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)

is there any error in the style code or perhaps this is not supported yet? I ask here because I found something similiar in previous mails, but i haven’t found any solution yet.

Thanks in advance,

José Antonio


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:

Geoserver-users@anonymised.com.382…sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Ian Turton

Sorry, my mistake when copying and pasting…

2017-07-03 17:40:14,492 ERROR [wicket.RequestCycle] -
java.lang.NullPointerException
at org.geoserver.wms.legendgraphic.RasterLayerLegendHelper.parseRequest(RasterLayerLegendHelper.java:196)
at org.geoserver.wms.legendgraphic.RasterLayerLegendHelper.(RasterLayerLegendHelper.java:96)
at org.geoserver.wms.legendgraphic.BufferedImageLegendGraphicBuilder.buildLegendGraphic(BufferedImageLegendGraphicBuilder.java:284)
at org.geoserver.wms.web.data.AbstractStylePage$7$1.getData(AbstractStylePage.java:306)
at org.apache.wicket.markup.html.DynamicWebResource$ResourceState.getLength(DynamicWebResource.java:89)
at org.apache.wicket.markup.html.DynamicWebResource$1.length(DynamicWebResource.java:241)

···

2017-07-03 18:33 GMT+02:00 Ian Turton <ijturton@anonymised.com>:

We really need the line above the error you include, that tells us what the actual error is

Ian

On 3 July 2017 at 17:18, Jose Antonio <islaperejil@anonymised.com> wrote:

Hi,

I was trying to generate a legend in geoserver with intervals and values passed with env function, but it seems not to work. There it is my syle:

<sld:ColorMap type=“intervals”>
<sld:ColorMapEntry color=“#d7191c” opacity=“0” quantity=“${env(‘nodata’,-1)}”/>
<sld:ColorMapEntry color=“#d7191c” opacity=“1.0” quantity=“${env(‘low’,0)}”/>

</sld:ColorMap>

The errors provided on the geoserver.log file are:

at org.geoserver.wms.legendgraphic.RasterLayerLegendHelper.parseRequest(RasterLayerLegendHelper.java:196)
at org.geoserver.wms.legendgraphic.RasterLayerLegendHelper.(RasterLayerLegendHelper.java:96)
at org.geoserver.wms.legendgraphic.BufferedImageLegendGraphicBuilder.buildLegendGraphic(BufferedImageLegendGraphicBuilder.java:284)
at org.geoserver.wms.web.data.AbstractStylePage$7$1.getData(AbstractStylePage.java:306)
at org.apache.wicket.markup.html.DynamicWebResource$ResourceState.getLength(DynamicWebResource.java:89)
at org.apache.wicket.markup.html.DynamicWebResource$1.length(DynamicWebResource.java:241)
at org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.configure(ResourceStreamRequestTarget.java:241)
at org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.respond(ResourceStreamRequestTarget.java:150)
at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1267)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1334)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484)
at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)

is there any error in the style code or perhaps this is not supported yet? I ask here because I found something similiar in previous mails, but i haven’t found any solution yet.

Thanks in advance,

José Antonio


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:

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

Ian Turton

Jose

Hi,

I forgot to tell you that this error arises when you define de style in geoserver and push the button “preview legend”

Regards,
José Antonio

···

2017-07-03 18:36 GMT+02:00 Jose Antonio <islaperejil@anonymised.com…>:

Sorry, my mistake when copying and pasting…

2017-07-03 17:40:14,492 ERROR [wicket.RequestCycle] -
java.lang.NullPointerException

at org.geoserver.wms.legendgraphic.RasterLayerLegendHelper.parseRequest(RasterLayerLegendHelper.java:196)
at org.geoserver.wms.legendgraphic.RasterLayerLegendHelper.(RasterLayerLegendHelper.java:96)
at org.geoserver.wms.legendgraphic.BufferedImageLegendGraphicBuilder.buildLegendGraphic(BufferedImageLegendGraphicBuilder.java:284)
at org.geoserver.wms.web.data.AbstractStylePage$7$1.getData(AbstractStylePage.java:306)
at org.apache.wicket.markup.html.DynamicWebResource$ResourceState.getLength(DynamicWebResource.java:89)
at org.apache.wicket.markup.html.DynamicWebResource$1.length(DynamicWebResource.java:241)

2017-07-03 18:33 GMT+02:00 Ian Turton <ijturton@anonymised.com>:

We really need the line above the error you include, that tells us what the actual error is

Ian

Jose

On 3 July 2017 at 17:18, Jose Antonio <islaperejil@anonymised.com> wrote:

Hi,

I was trying to generate a legend in geoserver with intervals and values passed with env function, but it seems not to work. There it is my syle:

<sld:ColorMap type=“intervals”>
<sld:ColorMapEntry color=“#d7191c” opacity=“0” quantity=“${env(‘nodata’,-1)}”/>
<sld:ColorMapEntry color=“#d7191c” opacity=“1.0” quantity=“${env(‘low’,0)}”/>

</sld:ColorMap>

The errors provided on the geoserver.log file are:

at org.geoserver.wms.legendgraphic.RasterLayerLegendHelper.parseRequest(RasterLayerLegendHelper.java:196)
at org.geoserver.wms.legendgraphic.RasterLayerLegendHelper.(RasterLayerLegendHelper.java:96)
at org.geoserver.wms.legendgraphic.BufferedImageLegendGraphicBuilder.buildLegendGraphic(BufferedImageLegendGraphicBuilder.java:284)
at org.geoserver.wms.web.data.AbstractStylePage$7$1.getData(AbstractStylePage.java:306)
at org.apache.wicket.markup.html.DynamicWebResource$ResourceState.getLength(DynamicWebResource.java:89)
at org.apache.wicket.markup.html.DynamicWebResource$1.length(DynamicWebResource.java:241)
at org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.configure(ResourceStreamRequestTarget.java:241)
at org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.respond(ResourceStreamRequestTarget.java:150)
at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1267)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1334)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484)
at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)

is there any error in the style code or perhaps this is not supported yet? I ask here because I found something similiar in previous mails, but i haven’t found any solution yet.

Thanks in advance,

José Antonio


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:

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

Ian Turton

Jose