Le labo

Bidouilles et prises de notes en vrac

Accueil > Docs > Serveurs de tuiles

Serveurs de tuiles

jeudi 3 mai 2012, par b_b

De la théorie sur les systèmes de tuiles :

http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames

http://wiki.openstreetmap.org/wiki/QuadTiles

Mapnik, PostgreSQL

Mapnik, PostgreSQL, Python, Apache mod_tile :

http://fr.flossmanuals.net/openstreetmap/ch017_generer-des-cartes-pour-son-site-web

http://geotribu.net/node/262

http://switch2osm.org/serving-tiles/manually-building-a-tile-server/

http://blog.rodolphe.quiedeville.org/index.php?category/OpenStreetMap

http://blog.apps.chicagotribune.com/2011/03/08/making-maps-1/

Tuto complet en 6 articles :

http://blog.lionelmaraval.fr/post/2010/12/01/Construire-son-serveur-cartographique-Pr%C3%A9ambule

Le tuto pointé depuis le wiki osm sur archive.org :

http://web.archive.org/web/20101029041824/http://weait.com/content/build-your-own-openstreetmap-server

This is the method used by, for example, the OSM cycle map. Its main advantage is that nothing needs to run on the webserver - it just needs a directory of image files. So, for example, you can install all the software on your home PC, and transfer the tiles to your webhost when you’re finished.

http://wiki.openstreetmap.org/wiki/Creating_your_own_tiles#Creating_tiles_using_Mapnik_and_generate_tiles.py

https://github.com/nvkelso/geo-how-to/wiki

Autres

TileMill :

http://thomasg77.github.com/tilemill-fr-doc/showdown_view/tilemill-fr.html

In regards to TileMill, you export a map as MBTiles and then can either turn it into flat image files with mbutil that you can put on a web server or S3, or you can use TileStream to serve the MBTiles file dynamically.

http://gis.stackexchange.com/a/8406

MapCache is a server that implements tile caching to speed up access to WMS layers. The primary objectives are to be fast and easily deployable, while offering the essential features (and more !) expected from a tile caching solution.

http://mapserver.org/trunk/mapcache/

I recently tested a feature of MapCache that can let you publish an MBTiles map build with TileMill but without TileStream Server. So all you have to do is to install Apache module Mapcache from Mapserver web site, add your mbtiles map in your config file and publish your map with OpenLayers. I use this tutorial to install MapCache it from trunk.

http://simonmercier.net/blog/?p=873

Landez :

http://blog.mathieu-leplatre.info/tag/landez.html

The flow web app is ok, but a little clunky. It uses the Google Maps API, and with nearly 1000 markers, it loads slowly and interaction is tricky. So I wanted to try a tile-based approach, to improve the speed and visualization, and this seemed like the best opportunity to get into TileMill, part of the MapBox toolset by Development Seed. After going through the tools, I am extremely impressed with what DevSeed is building, and hope I can help out by finding good uses, digging up bugs, and contributing here and there.

So I installed TileMill, updating mapnik in the process. Really nicely designed app, with laser focus on building nice tiles. One of the amazing features is map interactivity, which easily and efficiently turns input data sets into mouseover and infowindow bubbles. The trick it uses is grid renderer, Dane’s extension to mapnik which builds tiled json files, used by the wax library for OpenLayers (and ModestMaps, and GMaps) to define hit areas. Basically, much more efficient than creating markers.

Finally, Dane showed me gridsforkids, a simple sandbox for building image and json tile sets for standalone, offline map apps. I had to grab the “.mml” file created by TileMill, have carto convert that to mapnik xml, and then use the custom generate_tiles.py to build everything. Found a small bug in how TMS is handled there, and had to hack in a few things for my data set, but it basically works (a few problems with the hit areas, still investigating). One way this could go is streamlining the process, where one of the outputs from TileMill was a tar ball bundling all the tools to run the map offline.

http://brainoff.com/weblog/2011/05/05/1674

Le site de Michal Migurski, auteur de TileStache :

http://mike.teczno.com/

Utiliser Tilestache avec MySQL :

http://blog.ajhodges.com/2011/10/tilestache-vector-provider-ogr-and.html

UTFGrids + OpenLayers + TileStache :

http://www.perrygeo.net/wordpress/?p=160

http://build-failed.blogspot.fr/search/label/layers

http://www.mkgeomatics.com/wordpress/?p=389

http://www.itopen.it/2012/01/11/tilestache-vector-simplify-provider/

Bloch - Simplify linework in polygonal geographic datasources.

Inspired by Matthew Bloch’s MapShaper thesis (http://mapshaper.org), Bloch can load OGR-compatible data sources and simplify the linework while preserving topology. The simplify() method accepts tolerances in map units, so simplification can be performed by known amounts with predictable outcomes.

https://github.com/migurski/Bloch

http://gis.stackexchange.com/a/15947

Servir les tuiles cachées par TileStache avec nginx :

http://www.itopen.it/2012/01/17/serving-your-map-tiles-30-times-faster/

Les frontières des pays du monde en GeoJSON :

https://github.com/johan/world.geo.json/tree/master/countries

TileLayer.GeoJSON avec leaflet le ticket, une proposition et mon fork pour que ça fonctionne avec tilestache :

https://github.com/CloudMade/Leaflet/issues/112

https://gist.github.com/1716010

https://gist.github.com/2479540

Utiliser les layers vector GeoJSON de TileStache avec OpenLayers :

DEM-Tools, Python code for working with Digital Elevation Models and tile rendering :

https://github.com/migurski/DEM-Tools

obtenir des infos sur un shapefile ou un GeoJSON avec gdal

ogrinfo -so -al geodiv.json

Cache de tuiles

TILECACHE,GEOWEBCACHE AND MAPPROXY - A TECHNICAL AND USABILITY COMPARISON

http://2010.foss4g.org/presentations_show.php?id=3498

Un simple script php pour faire proxy et cacher les tuiles, testé en local c’est pas la joie. Le script renvoie des images "truncated" lors du premier accès aux tuiles (latence lors de l’écriture du cache).

TileCache et Mapproxy semblent simples à installer et fonctionnent avec python. TileStatche est souvent qualifié de successeur de TileCache.

Installer ubuntu server 11.10 en local sous virtualbox

Voici un tuto complet pour l’installation d’Ubuntu Server avec virtualbox bien pratique comme machine de test. La seule chose à corriger est la configuration réseau de la machine virtuelle pour pouvoir y accéder par ssh depuis la machine hôte. Le plus simple est de configurer l’interface réseau de la machine virtuelle sur Accès par pont et de choisir l’interface réseau que vous utilisez sur la machine hôte (wlan0 si vous êtes en wifi ou eth0 si vous êtes en filaire). Un autre article à ce sujet préconise d’utiliser une interface par pont, mais je n’en ai pas eu l’utilité.