Discussion:
[Geoserver-users] intervals with cql expression on quantity
Jose Antonio
2017-07-03 16:18:49 UTC
Permalink
*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.<init>(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*
Ian Turton
2017-07-03 16:33:41 UTC
Permalink
We really need the line above the error you include, that tells us what the
actual error is

Ian
Post by Jose Antonio
*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.<init>(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
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/
userlist-guidelines.html
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Ian Turton
Jose Antonio
2017-07-03 16:36:08 UTC
Permalink
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.<init>(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)
Post by Ian Turton
We really need the line above the error you include, that tells us what
the actual error is
Ian
Post by Jose Antonio
*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.<init>(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
http://www.ianturton.com/talks/foss4g.html#/
http://geoserver.org/comm/userlist-guidelines.html
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Ian Turton
--
Jose
Jose Antonio
2017-07-03 17:10:28 UTC
Permalink
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
Post by Jose Antonio
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.<init>
(RasterLayerLegendHelper.java:96)
at org.geoserver.wms.legendgraphic.BufferedImageLegendGraphicBuil
der.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)
Post by Ian Turton
We really need the line above the error you include, that tells us what
the actual error is
Ian
Post by Jose Antonio
*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.<init>(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
http://www.ianturton.com/talks/foss4g.html#/
http://geoserver.org/comm/userlist-guidelines.html
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Ian Turton
--
Jose
--
Jose
Loading...