2

Case scenario:

I need to create symbology that takes fill, stroke and stroke width with information from the database. Problem arises with custom defined symbols like the one on the image. There are lot of them.

One of the solution that came to my mind was to create font and style that font. But that approach is not possible because I can only set fill to the font, not stroke and stroke width. Next idea was to use SVG and somehow try to dynamically set fill, stroke and stroke width. But I had no success. I tried the approach at How to create svg symbols that have modifiable fill color, stroke color and stroke width? but with no success.

Is there a way to do this using GeoServer?

enter image description here

4
  • You should be able to do this with SLD using Filters. If you can share the data (or a sample of the data), perhaps we could come up with an example.
    – BradHards
    Jan 26, 2015 at 5:55
  • I now it can be done with Filers but I it is almost impossible to create so many different rules. I would need to create all possible combinations for fill, stroke, stroke-width, font type, etc. etc. Unfortunately I do not have access to this data any more but I have solved it by creating a web service that dynamically creates SVG based on URL parameters. URL is generated from SLD dinamicaly from database. Good thing is that Geoserver has very good caching of symbols and there is very little overhead of this approach. Jan 26, 2015 at 7:36
  • Maybe you could add that as an answer and close this out. Not sure how else it could be answered / closed.
    – BradHards
    Jan 26, 2015 at 8:06
  • no problem, I have added my last comment as an answer to this question. Jan 26, 2015 at 11:57

1 Answer 1

1

Eventually I have solved this problem by creating a web service that dynamically creates SVG based on URL parameters. URL is generated from SLD dynamically from database. Good thing is that Geoserver has very good caching of symbols and there is very little overhead of this approach. Of course, web service also caches symbols local so that it doesn’t have to recreate already requested symbols again and again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.