错误提示:
code="internalEror"Rendering process falled, Layers: boylat shp_ 1 org,postgresq!.ut.PsQLException: ERRoR: function upperjisonb) does not existHint: No function matches the given name and arqument types, You might need to add explicit type castsPosition:447ERROR: function upper(jsonb)does not existHint: No function matches the given name and arqument types, You might need to add explicit type casts.Position:447
解决办法:使用JsonPointer Function
函数
//jsonb示例
{
"name": "city name",
"description": "the city description",
"districts": [
{
"name": "district1",
"population": 2000
},
{
"name": "district2",
"population": 5000
}]
"population":
{
"average_age": 35,
"toal": 50000
}
}
使用方法:
jsonPointer(city, '/name').
jsonPointer(city, '/population/average_age').
jsonPointer(city, '/districts/0/name').
在OGC过滤器中可以这样使用:
<Rule>
<Name>Cities</Name>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:Function name="jsonPointer">
<ogc:PropertyName>city</ogc:PropertyName>
<ogc:Literal>/population/average_age</ogc:Literal>
</ogc:Function>
<ogc:Literal>35</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>square</WellKnownName>
<Fill>
<CssParameter name="fill">#FF0000</CssParameter>
</Fill>
</Mark>
<Size>16</Size> </Graphic>
</PointSymbolizer>
</Rule>
参考文档:Geoserver官方文档
中文文档