问题描述
在wgs84中,我将raindata作为点shapefile:
点之间的距离为11km,而数据的边界框为450 * 300km。
我想在Geoserver中将此数据可视化,而不是作为点而是作为插值多边形。可以使用SLD中的vec:BarnesSurface
完成。
有关更多信息,请访问https://docs.boundlessgeo.com/suite/1.1.0/cartography/rt/barnes.html
我在弄清楚在SLD中使用什么值时遇到了麻烦。 我找不到关于此的很多文档。
根据我的数据,scale
,maxObservationdistance
或pixelsPerCell
的逻辑值是什么?
这是我的SLD:
<?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>Barnes surface</Name>
<UserStyle>
<Title>Barnes Surface</Title>
<Abstract>A style that produces a Barnes surface using a rendering transformation</Abstract>
<FeatureTypestyle>
<Transformation>
<ogc:Function name="vec:BarnesSurface">
<ogc:Function name="parameter">
<ogc:Literal>data</ogc:Literal>
</ogc:Function>
<ogc:Function name="parameter">
<ogc:Literal>valueAttr</ogc:Literal>
<ogc:Literal>rain</ogc:Literal>
</ogc:Function>
<ogc:Function name="parameter">
<ogc:Literal>scale</ogc:Literal>
<ogc:Literal>0.05</ogc:Literal>
</ogc:Function>
<ogc:Function name="parameter">
<ogc:Literal>convergence</ogc:Literal>
<ogc:Literal>0.3</ogc:Literal>
</ogc:Function>
<ogc:Function name="parameter">
<ogc:Literal>passes</ogc:Literal>
<ogc:Literal>2</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>0.2</ogc:Literal>
</ogc:Function>
<ogc:Function name="parameter">
<ogc:Literal>pixelsPerCell</ogc:Literal>
<ogc:Literal>50</ogc:Literal>
</ogc:Function>
<ogc:Function name="parameter">
<ogc:Literal>queryBuffer</ogc:Literal>
<ogc:Literal>0</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>
</Transformation>
<Rule>
<RasterSymbolizer>
<!-- specify geometry attribute of input to pass validation -->
<Geometry><ogc:PropertyName>geom</ogc:PropertyName></Geometry>
<Opacity>0.8</Opacity>
<ColorMap type="ramp" >
<ColorMapEntry color="#FF0000" quantity="0" label="0" opacity="0" />
<ColorMapEntry color="#EBFBFF" quantity="0.1" label="0.1" />
<ColorMapEntry color="#0000FF" quantity="300" label="300" />
</ColorMap>
</RasterSymbolizer>
</Rule>
</FeatureTypestyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
此SLD不能提供预期的结果,并且图层预览非常慢。
我尝试更改scale
和/或maxObservationdistance
,但不确定什么是逻辑值。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)