Hi,
I've been using the gs:Contour WPS process for extracting contour on Float
images and it works perfectly.
But now that i'm trying to extract only one contour from an input image
(which is stored as Byte and only contain two values, 0 and 1), I seem to
have some difficulties understanding the "Why is it not working ?"
At first, I tried creating the appropriate SLD with only one level defined
(like below)
<ogc:Function name="parameter">
<ogc:Literal>levels</ogc:Literal>
<ogc:Literal>1.0</ogc:Literal>
</ogc:Function>
but I get the following exception on GeoServer side :
Caused by: java.security.InvalidParameterException: Could not convert the
value 1.0 into the expected type double for parameter levels
I don't know why this exception is thrown but I guess it disappear when I
add another level :
<ogc:Function name="parameter">
<ogc:Literal>levels</ogc:Literal>
<ogc:Literal>0.0</ogc:Literal>
<ogc:Literal>1.0</ogc:Literal>
</ogc:Function>
This way, no exception is thrown but a visual result that is really not what
I was expecting. See for yourself :
Layer with simple style (orange is 1) :
<http://osgeo-org.1560.x6.nabble.com/file/n5210483/1.png>
Layer with contour style as described above (levels 0.0 and 1.0) :
<http://osgeo-org.1560.x6.nabble.com/file/n5210483/2.png>
When zooming in, the levels values appears on the map and as you can see, I
only have contours for level 1.0 :
<http://osgeo-org.1560.x6.nabble.com/file/n5210483/3.png>
I tried simplify or smooth parameters hoping that it would change the result
but no luck.
I also tried specifying intervals instead of levels : it create the exact
same output as in the screenshots above.
So here is my question : is it possible to extract only 1 contour on a
binary image ? If it is, please tell me how...
Thanks for your consideration,
Cyril
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Extracting-contours-gs-Contour-on-binary-images-tp5210483.html
Sent from the GeoServer - User mailing list archive at Nabble.com.