SLD styling rule for first and last geometry feature in PostGIS table

المشرف العام

Administrator
طاقم الإدارة
Writing a SLD file to style a Points layer which I publish as WMS with GeoServer, is it possible to specify a rule that is only applied to the first and last features in the underlying PostGIS table?

The table is sorted by means of that the point features represent a road track which has a start- and endpoint. My goal is to use a specific style for the start- and endpoint, different from how all the other points are styled. However, the table's length is dynamic so that the first feature will always have featureid==1 but the last one is unknown in advance and thus cannot be hard-coded.

Is there any possibility in SLD to filter for the first and last feature in a column? Naturally, the features of interest have the lowest and highest featureIDs out of all features so something like min(featureid) and max(featureid) would also work, if available.

Access to the database table could also be provided if it is possible in any way to filter for the result of a SQL query like SELECT min(featureID).

This part of the documentation refers to functions called startPoint and endPoint but apparently these can only style the start- and endpoint of a linestring, not the first and last point out of a column of points.



أكثر...
 
أعلى