[MapServer-dev] RFC 138 - Reference SLD files in Mapfiles

Tamas Szekeres szekerest at gmail.com
Mon Feb 12 06:38:32 PST 2024


Hi Seth,

That seems to be a great addition, +1 from me.

I see you don't want to support to read SLD from online sources at this
stage, but it would be relatively easy to allow specifying the SLD string
directly in the feature attribute, since in some cases it is easier to
store the data and the style at the same place. For example when the data
is coming from a database table or view, it may be challenging to keep the
database and the external files in sync. As soon as we can identify that
the style string is SLD (for example it ends with </StyledLayerDescriptor>)
we could probably call msSLDApplySLD from msLayerGetFeatureStyle directly
(not requiring to read the content from a file at all)

Best regards,

Tamas



Seth G via MapServer-dev <mapserver-dev at lists.osgeo.org> ezt írta (időpont:
2024. febr. 10., Szo, 0:04):

> Hi all,
>
> I've added a new RFC - MS RFC 138: Reference SLD files in Mapfiles at
> https://mapserver.org/development/rfc/ms-rfc-138.html
> This would allow SLD files to be referenced in a Mapfile using the
> STYLEITEM (similar to how JS files are referenced):
>
>     LAYER
>       STYLEITEM "sld://mysldfile.xml" # uses SHAPEPATH and if not set then
> relative path to the Mapfile or absolute path
>       CLASS # define an empty CLASS here
>       END
>     END
>
> It will make it easier to export Mapfiles from other application such as
> QGIS, and to share styles e.g. between MapServer and GeoServer. More
> details are in the RFC.
> Feedback and comments appreciated.
>
> I'll start with my +1,
>
> Seth
>
> --
> web:https://geographika.net & https://mapserverstudio.net
> twitter: @geographika
> _______________________________________________
> MapServer-dev mailing list
> MapServer-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20240212/2613f172/attachment.htm>


More information about the MapServer-dev mailing list