## Data sources
- http://download.geofabrik.de/ (countries, continents...)
- http://openstreetmapdata.com/data (land, water, coastline, preprocessed in shapefiles)
- https://www.mapbox.com/tilemill/docs/manual/mapbox-geodata/ (main boundaries, populated places...)
- relief data: http://srtm.csi.cgiar.org/SELECTION/inputCoord.asp
- some cities: http://metro.teczno.com/
- targeted osm data: http://overpass-turbo.eu
- in shp http://www.openstreetmap.re/osm2gis/
- in shp (and others): http://extract.bbbike.org/
- relief data: http://www.eea.europa.eu/data-and-maps/data/eu-dem
## Accepted formats:
Details: https://www.mapbox.com/tilemill/docs/manual/adding-layers/
- psql
- shp
- csv
- geotiff
- geojson
- kml
- sqlite
- online converter: http://geoconverter.hsr.ch/
- simplifying vectors: http://mapshaper.org/
- know about OSM format http://wiki.openstreetmap.org/wiki/Map_Features
## Style data
### Anatomy of MSS
#thisisanid
, it's unique (only one layer)
.thisiaclass
, it can be shared between layers
#myid[field='value']
this is selector
#myid[field='value'][anotherfield='value']
means AND
#myid[field='value'], #myid[anotherfield='value']
means OR
line-color: #123
this is a symbolizer (or rule)
::attachment
allow to have more than one selector for the
same feature (otherwise, the last to come will win); very often used
for casing or glow effects.
outline/line-color: blue
is a named instance, like attachment, it
allows to have multiple styles of the same type applied on a same
feature
'@secondary_line: #9FA9A8;` this is a variable
Selectors can be nested, and rules are inherited.
Painter algorythm: first rule to come, first rule to be drawn (notable exception: labels!), others will be drawn of top (unless you play with *-allow-overlap). Roughly: layer order, then stylesheet order, then order of the selector, then order of the symbolizer, then order in the data source More about this: https://www.mapbox.com/tilemill/docs/guides/symbol-drawing-order/
Labels and icon algorithm:
- main elements: landuse, roads, buildings
- take zoom into account
- add icons
- add labels
- add custom fonts
- use variables
- understand the drawing order
- understand the text priority drawing order
- use functions
- replace strings in names
- upload to MapBox for quick and dirty prototyping
- export to png / jpeg / tiff
- export to svg
- export to MBTiles
- share your styles (sources!)
## Advanced:
- relief data
- psql
- use version control
- official manual: https://www.mapbox.com/tilemill/docs/manual/carto/
- official guides: https://www.mapbox.com/tilemill/docs/guides/add-shapefile/
- official reference: https://www.mapbox.com/carto/api/2.3.0/
- http://skorasaurus.github.io/carto-manual/