Hi,
Geoserver 1.6.3
I have a feature that is a view in postgres on linux that has both a polygon
geometry for a property parcel boundary and the parcel centroid which is
calculated via postgis function. The 2 attributes names are
"parcel-geometry" and "parcel-geometry-centroid". parcel-geometry has a
spatial index on it.
the geometry_column tables looks like this.
oid,f_table_catalog,f_table_schema,f_table_name,f_table_geometry_column,
coord_dimenation,srid,type
390938526;"''";"public";"property_layer";"parcel-geometry";2;-1;"MULTIPOLYGON"
390938527;"''";"public";"property_layer";"parcel-geometry-centroid";2;-1;"POINT"
The Text Symoblizer SLD is pretty simple and work fine under certain cases.
...
<TextSymbolizer>
<Geometry>
<ogc:PropertyName>parcel-geometry-centroid</ogc:PropertyName>
</Geometry>
<Label>
<ogc:PropertyName>formatted-apn</ogc:PropertyName>
</Label>
<CssParameter name="font-family">Verdana</CssParameter>
<CssParameter name="font-style">Normal</CssParameter>
<CssParameter name="font-size">12</CssParameter>
...
Here are the following cases with respect setting the <Geometry> element.
1) Works: If I don't specify the <Geometry> element, the parcel-geometry is
used to place the text label. (I am a bit unsure why, but it has something
to do with the default I suppose). Results in duplicate labels when parcel
geometry spans more that one tile.
2) Works : If I don't specify the <Geometry> element as parcel-geometry.
Works as same as #1.
3) Does NOT work: If I specify the <Geometry> element as
parcel-geometry-centroid, nothing is rendered and I don;t seem to get any
error messages, just a blank .png
I would prefer to use the centroid so as to avoid the duplicate labeling
issue when parcels span more than one tile.
Any thoughts would be appreciated.
Regards,
-Steve
--
View this message in context: http://www.nabble.com/SLD-Using-Different-Geometry-Attributes-tp19211578p19211578.html
Sent from the GeoServer - User mailing list archive at Nabble.com.