{"action":"created","issue":{"url":"https://api.github.com/repos/terranodo/tegola-openseamap/issues/8","repository_url":"https://api.github.com/repos/terranodo/tegola-openseamap","labels_url":"https://api.github.com/repos/terranodo/tegola-openseamap/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/terranodo/tegola-openseamap/issues/8/comments","events_url":"https://api.github.com/repos/terranodo/tegola-openseamap/issues/8/events","html_url":"https://github.com/terranodo/tegola-openseamap/issues/8","id":295902006,"number":8,"title":"Config syntax for abbreviations","user":{"login":"PetersonGIS","id":5266205,"avatar_url":"https://avatars0.githubusercontent.com/u/5266205?v=4","gravatar_id":"","url":"https://api.github.com/users/PetersonGIS","html_url":"https://github.com/PetersonGIS","followers_url":"https://api.github.com/users/PetersonGIS/followers","following_url":"https://api.github.com/users/PetersonGIS/following{/other_user}","gists_url":"https://api.github.com/users/PetersonGIS/gists{/gist_id}","starred_url":"https://api.github.com/users/PetersonGIS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PetersonGIS/subscriptions","organizations_url":"https://api.github.com/users/PetersonGIS/orgs","repos_url":"https://api.github.com/users/PetersonGIS/repos","events_url":"https://api.github.com/users/PetersonGIS/events{/privacy}","received_events_url":"https://api.github.com/users/PetersonGIS/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2018-02-09T15:10:12Z","updated_at":"2018-02-09T19:42:39Z","closed_at":null,"author_association":"COLLABORATOR","body":"Labels for the lights require a color abbreviation. Currently, on my local set-up, these labels are styled like this:\r\n\r\n`{multiple}{character}.{colourabbrev}.{period}s({category})`\r\n\r\nwhere colourabbrev is \r\nWG (white_green)\r\nR (red)\r\nG (green)\r\n\r\nWe need to add colourabbrev to the config sql for the seamark_light_points table. This is what I've been using, and it works, but I am not sure it is the best way to do it. Especially since there is more than just these three colours:\r\n\r\n`replace(replace(replace(colour,'white;green','WG'), 'red','R'), 'green','G') AS colourabbrev, `\r\n\r\nPutting this here as an issue to get input from others on the best way to do this.\r\n\r\nAccording to [taginfo](https://taginfo.openstreetmap.org/keys/seamark:light:colour#values) the most frequent colors are: red, green, white, yellow. But there are a total of 23 unique colors that could potentially be in the db. \r\n\r\nIf this is too onerous to put in the config then there is the possibility that we deal with this in the style.json with expressions.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/terranodo/tegola-openseamap/issues/comments/364541380","html_url":"https://github.com/terranodo/tegola-openseamap/issues/8#issuecomment-364541380","issue_url":"https://api.github.com/repos/terranodo/tegola-openseamap/issues/8","id":364541380,"user":{"login":"erictheise","id":317680,"avatar_url":"https://avatars1.githubusercontent.com/u/317680?v=4","gravatar_id":"","url":"https://api.github.com/users/erictheise","html_url":"https://github.com/erictheise","followers_url":"https://api.github.com/users/erictheise/followers","following_url":"https://api.github.com/users/erictheise/following{/other_user}","gists_url":"https://api.github.com/users/erictheise/gists{/gist_id}","starred_url":"https://api.github.com/users/erictheise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erictheise/subscriptions","organizations_url":"https://api.github.com/users/erictheise/orgs","repos_url":"https://api.github.com/users/erictheise/repos","events_url":"https://api.github.com/users/erictheise/events{/privacy}","received_events_url":"https://api.github.com/users/erictheise/received_events","type":"User","site_admin":false},"created_at":"2018-02-09T19:42:39Z","updated_at":"2018-02-09T19:42:39Z","author_association":"COLLABORATOR","body":"@PetersonGIS, my instinct is to convert the color strings to the representation we've been talking about and to put logic in the style so that if what's there is either a single uppercase (G) or uppercase+lowercase (Vi), render the colour. If it's an empty string, render yellow and pretend it's white (aargh), if it's uppercase+uppercase, render magenta."}}
{"actor":{"display_login":"erictheise"}}