Developer’s Corner: Customizable arrow in GeoServer
Blog ‐
Posted on 29.06.2015by simone giannecchini
Dear Reader,
Today we want to share a recent development in GeoServer: an arrow mark whose proportions can be customized to get the type of arrow you’re looking for.
The general syntax for this arrow mark is the following:
All parameters are ratios, and they are all optional. By default the arrow is the usual 1 by 1 mark, whose actual size you can control in SLD via the Mark size attribute. In particular, the parameters and their default values are:
t: thickness of the arrow base, between 0 and 1, default is 0.2
hr: height over width ratio, a positive number, default is 2
ab: arrow head base ratio, between 0 and 1, default is 0.5
The values can be modified to change the proportions of the arrow, for example, varying t between 0 and 1 results in the following arrows:
Changing the height to width ratio will generate arrows that are wider or thinner:
Finally, changing the arrow head base will move the position where the head of the arrow starts:
Playing with all the three parameters will allow you to get the arrow of the desired proportions. Now, what if your desired characteristic is just having a long arrow? Since size is controlled by the mark size attribute, you’ll have to make a big arrow whose height ratio makes for a thin one, and maybe push up a bit the arrow base, like in this example:
This website uses cookies to improve your experience, check this page for details . We'll assume you're ok with this, but you can opt-out if you wish. AcceptRejectLeave
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.