[Geoserver-devel] [JIRA] (GEOS-7363) Crop Coverage in sld

kangming created an issue

GeoServer / BugGEOS-7363

Crop Coverage in sld

Issue Type:

BugBug

Assignee:

Unassigned

Created:

24/Dec/15 4:03 PM

Environment:

geoserver2.7

Priority:

MediumMedium

Reporter:

kangming

I would like to perform a gs:CropCoverage of the Raster Layer which is the result of gs:BarnesSurface

The SLD file is below:

<?xml version=“1.0” encoding=“ISO-8859-1”?>
<StyledLayerDescriptor version=“1.0.0”
xsi:schemaLocation=“http://www.opengis.net/sld StyledLayerDescriptor.xsd”
xmlns=“http://www.opengis.net/sld
xmlns:ogc=“http://www.opengis.net/ogc
xmlns:xlink=“http://www.w3.org/1999/xlink
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>
<NamedLayer>
<Name>CropCoverage</Name>
<UserStyle>
<Title>Crop Coverage</Title>
<FeatureTypeStyle>
<Transformation>
<ogc:Function name=“gs:CropCoverage”>
<!-- crop coverage –>
<ogc:Function name=“parameter”>
<ogc:Literal>coverage</ogc:Literal>

<ogc:Function name=“gs:BarnesSurface”>

<ogc:Function name=“parameter”>
<ogc:Literal>data</ogc:Literal>
</ogc:Function>

<ogc:Function name=“parameter”>
<ogc:Literal>valueAttr</ogc:Literal>
<ogc:Literal>o3_8h</ogc:Literal>
</ogc:Function>

<ogc:Function name=“parameter”>
<ogc:Literal>scale</ogc:Literal>
<ogc:Literal>300000</ogc:Literal>
</ogc:Function>

<ogc:Function name=“parameter”>
<ogc:Literal>convergence</ogc:Literal>
<ogc:Literal>0.2</ogc:Literal>
</ogc:Function>

<ogc:Function name=“parameter”>
<ogc:Literal>passes</ogc:Literal>
<ogc:Literal>3</ogc:Literal>
</ogc:Function>

<ogc:Function name=“parameter”>
<ogc:Literal>minObservations</ogc:Literal>
<ogc:Literal>1</ogc:Literal>
</ogc:Function>

<ogc:Function name=“parameter”>
<ogc:Literal>maxObservationDistance</ogc:Literal>
<ogc:Literal>300000</ogc:Literal>
</ogc:Function>

<ogc:Function name=“parameter”>
<ogc:Literal>pixelsPerCell</ogc:Literal>
<ogc:Literal>10</ogc:Literal>
</ogc:Function>

<ogc:Function name=“parameter”>
<ogc:Literal>queryBuffer</ogc:Literal>
<ogc:Literal>1100000</ogc:Literal>
</ogc:Function>

<ogc:Function name=“parameter”>
<ogc:Literal>outputBBOX</ogc:Literal>
<ogc:Function name=“env”>
<ogc:Literal>wms_bbox</ogc:Literal>
</ogc:Function>
</ogc:Function>

<ogc:Function name=“parameter”>
<ogc:Literal>outputWidth</ogc:Literal>
<ogc:Function name=“env”>
<ogc:Literal>wms_width</ogc:Literal>
</ogc:Function>
</ogc:Function>

<ogc:Function name=“parameter”>
<ogc:Literal>outputHeight</ogc:Literal>
<ogc:Function name=“env”>
<ogc:Literal>wms_height</ogc:Literal>
</ogc:Function>
</ogc:Function>

</ogc:Function>

</ogc:Function>
<ogc:Function name=“parameter”>
<ogc:Literal>cropShape</ogc:Literal>
<ogc:Function name=“env”>
<ogc:Literal>shape</ogc:Literal>
<ogc:Literal>
POLYGON((12679220.5449551 4733685.69206447,12898591.968062 4713152.82010571,13058134.8212306 4439899.46114607,13030214.821926 4052340.79528089,12735060.5435642 4028261.06778929,12483780.5498236 4076471.69742768,12180649.1288033 4330580.49744829,12264409.1267168 4525151.37667656,12264409.1267168 4525151.37667656,12364123.4099472 4728548.57087371,12364123.4099472 4728548.57087371,12679220.5449551 4733685.69206447))
</ogc:Literal>
</ogc:Function>
</ogc:Function>
</ogc:Function>
</Transformation>
<Rule>
<Name>rule1</Name>
<RasterSymbolizer></RasterSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>

I would like to perform a gs:CropCoverage of the Raster Layer which is the result of gs:BarnesSurface

enter image description here

The SLD file is below:

<?xml version=“1.0” encoding=“ISO-8859-1”?>
<StyledLayerDescriptor version=“1.0.0”
xsi:schemaLocation=“http://www.opengis.net/sld StyledLayerDescriptor.xsd”
xmlns=“http://www.opengis.net/sld
xmlns:ogc=“http://www.opengis.net/ogc
xmlns:xlink=“http://www.w3.org/1999/xlink
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>
<NamedLayer>
<Name>CropCoverage</Name>
<UserStyle>
<Title>Crop Coverage</Title>
<FeatureTypeStyle>
<Transformation>
<ogc:Function name=“gs:CropCoverage”>
<!-- crop coverage –>
<ogc:Function name=“parameter”>
<ogc:Literal>coverage</ogc:Literal>

<ogc:Function name=“gs:BarnesSurface”>

<ogc:Function name=“parameter”>
<ogc:Literal>data</ogc:Literal>
</ogc:Function>

<ogc:Function name=“parameter”>
<ogc:Literal>valueAttr</ogc:Literal>
<ogc:Literal>o3_8h</ogc:Literal>
</ogc:Function>

<ogc:Function name=“parameter”>
<ogc:Literal>scale</ogc:Literal>
<ogc:Literal>300000</ogc:Literal>
</ogc:Function>

<ogc:Function name=“parameter”>
<ogc:Literal>convergence</ogc:Literal>
<ogc:Literal>0.2</ogc:Literal>
</ogc:Function>

<ogc:Function name=“parameter”>
<ogc:Literal>passes</ogc:Literal>
<ogc:Literal>3</ogc:Literal>
</ogc:Function>

<ogc:Function name=“parameter”>
<ogc:Literal>minObservations</ogc:Literal>
<ogc:Literal>1</ogc:Literal>
</ogc:Function>

<ogc:Function name=“parameter”>
<ogc:Literal>maxObservationDistance</ogc:Literal>
<ogc:Literal>300000</ogc:Literal>
</ogc:Function>

<ogc:Function name=“parameter”>
<ogc:Literal>pixelsPerCell</ogc:Literal>
<ogc:Literal>10</ogc:Literal>
</ogc:Function>

<ogc:Function name=“parameter”>
<ogc:Literal>queryBuffer</ogc:Literal>
<ogc:Literal>1100000</ogc:Literal>
</ogc:Function>

<ogc:Function name=“parameter”>
<ogc:Literal>outputBBOX</ogc:Literal>
<ogc:Function name=“env”>
<ogc:Literal>wms_bbox</ogc:Literal>
</ogc:Function>
</ogc:Function>

<ogc:Function name=“parameter”>
<ogc:Literal>outputWidth</ogc:Literal>
<ogc:Function name=“env”>
<ogc:Literal>wms_width</ogc:Literal>
</ogc:Function>
</ogc:Function>

<ogc:Function name=“parameter”>
<ogc:Literal>outputHeight</ogc:Literal>
<ogc:Function name=“env”>
<ogc:Literal>wms_height</ogc:Literal>
</ogc:Function>
</ogc:Function>

</ogc:Function>

</ogc:Function>
<ogc:Function name=“parameter”>
<ogc:Literal>cropShape</ogc:Literal>
<ogc:Function name=“env”>
<ogc:Literal>shape</ogc:Literal>
<ogc:Literal>
POLYGON((12679220.5449551 4733685.69206447,12898591.968062 4713152.82010571,13058134.8212306 4439899.46114607,13030214.821926 4052340.79528089,12735060.5435642 4028261.06778929,12483780.5498236 4076471.69742768,12180649.1288033 4330580.49744829,12264409.1267168 4525151.37667656,12264409.1267168 4525151.37667656,12364123.4099472 4728548.57087371,12364123.4099472 4728548.57087371,12679220.5449551 4733685.69206447))
</ogc:Literal>
</ogc:Function>
</ogc:Function>
</ogc:Function>
</Transformation>
<Rule>
<Name>rule1</Name>
<RasterSymbolizer></RasterSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
The Error Info is below:

Error rendering coverage on the fast path java.lang.RuntimeException: Failed to evaluate the process function, error is: java.lang.RuntimeException: java.io.IOException Failed to evaluate the process function, error is: java.lang.RuntimeException: java.io.IOException java.lang.RuntimeException: java.io.IOException java.io.IOExceptionorg.postgresql.util.PSQLException: ERROR: parse error - invalid geometry 建议:“POLYGON ((�” <- parse error at position 12 within geometry ERROR: parse error - invalid geometry 建议:“POLYGON ((�” <- parse error at position 12 within geometry

But It’s OK When I Use below sld to crop a raster:

<?xml version="1.0" encoding="ISO-8859-1"?>



CropCoverage

Crop Coverage coverage cropShape

ogc:LiteralPOLYGON((12679220.5449551 4733685.69206447,12898591.968062 4713152.82010571,13058134.8212306 4439899.46114607,13030214.821926 4052340.79528089,12735060.5435642 4028261.06778929,12483780.5498236 4076471.69742768,12180649.1288033 4330580.49744829,12264409.1267168 4525151.37667656,12264409.1267168 4525151.37667656,12364123.4099472 4728548.57087371,12364123.4099472 4728548.57087371,12679220.5449551 4733685.69206447))</ogc:Literal>

</ogc:Function>
</ogc:Function>


rule1

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v7.1.0-OD-02-030#71001-sha1:2ba8c0f)

Atlassian logo