go-spatial / tegola-openseamap

OpenSeaMap implementation using Tegola
MIT License
7 stars 1 forks source link

Nautical spritesheet #1

Open PetersonGIS opened 6 years ago

PetersonGIS commented 6 years ago

Source Icons

Sea charts are icon-heavy, with much of the usefulness of the chart embedded as information in these icons as shapes and colors. The 224 SVG files found here will be the foundation for our spritesheet to house these icons.

Process

A custom exporter for Mapbox GL is used with TexturePacker software to export to the desired format. This makes it easy to recreate and/or add on to the spritesheet as needed.

Issues

PetersonGIS commented 6 years ago

The spritesheet names use underscores. For example, green_red_green. The database uses semicolons instead. For example, green;red;green.

Styling is easiest when sprite names match the database so one or the other will need to change to match eventually.

Use sql replace in the config.toml?

PetersonGIS commented 6 years ago

Also need to replace ", " with "_" And replace" " with "_"in the shape column.

erictheise commented 6 years ago

Keep 'em coming, @PetersonGIS, these are great.

PetersonGIS commented 6 years ago

We can do the replacement in the config.toml like this: ` [[providers.layers]]

name = "beacon_cardinal"
geometry_fieldname = "geometry"
id_fieldname = "osm_id"
sql = "SELECT ST_AsBinary(geometry) AS geometry, osm_id, type, name, category, REPLACE(colour, ';', '_') as colour2, colour_pattern, construction, elevation, height, reflectivity, shape, daymark_category, daymark_colour, daymark_colour_pattern, daymark_shape, topmark_category, topmark_colour, topmark_colour_pattern, topmark_shape FROM osm_beacon_cardinal WHERE geometry && !BBOX!"`