Opened 20 years ago
Closed 20 years ago
#566 closed defect (fixed)
handling wms_sld_url as a local file on disk
Reported by: | tomkralidis | Owned by: | mapserverbugs |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | WMS Server | Version: | 4.1 |
Severity: | normal | Keywords: | |
Cc: |
Description
As discussed with Assefa, in toying with 4.1, I find that one can define layer objects with "wms_sld_url". So this means I have serve up some data and have it styled by a SLD URL. There should also be functionality to point to a local file as well, something like "wms_sld_file", or reuse "wms_sld_url" and have the code decipher whether it's looking for a file on disk or a URL. My main goal here would be to allow a user to set styles for local data with local SLD documents.
Change History (6)
comment:2 by , 20 years ago
I see your point. Just want to make sure that functionality between MapServer classes and SLD definintions can be interchangeable, i.e. will MapServer classes be able to convert to SLD via GetStyles? Also this would be useful for someone who has converted to MapServer with a bunch of data and SLD documents. I wouldn't want to convert SLD to MapServer classes manually.
comment:3 by , 20 years ago
The GetStyles is not implemented but could very well be. I am going to add it pretty soon. There are already functions that generate an sld from mapserver classes. Right now they are available through mapscript (generatelayer on map and layer object). It is a matter of wrapping these functions for a GetStyles request.
comment:4 by , 20 years ago
> Also this would be useful for someone who has converted to MapServer with a > bunch of data and SLD documents. I wouldn't want to convert SLD to MapServer > classes manually. Maybe that person could use a PHP script to convert the SLDs to MapServer LAYER/CALSS definitions? That would be better than processing the SLDs at runtime.
comment:5 by , 20 years ago
Good point. Perhaps we could have a utility in the MapServer dist which does this instead?
comment:6 by , 20 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
2 points in this bug : - the GetStyles request has been implemented (returns an SLD based on classes defined in the layers) - there is also a couple of php functions applySLD and applySLDURL that converts an sld to classes. The matching between the sld document and the map file is done using the layer's name. We have used this function for few applications to "convert" sld to classes. Marking this as fixed.
Note:
See TracTickets
for help on using tickets.