]> Pileus Git - grits/commit
Add Tile Map Service downloading
authorAndy Spencer <andy753421@gmail.com>
Mon, 16 Jan 2012 03:13:00 +0000 (03:13 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 30 Jan 2012 07:16:48 +0000 (07:16 +0000)
commitfe727bbe62d293878e0a75a9cf9f420c0eae03cb
tree181c3f5c75232e966d027e9f8e08400d77fdd687
parent2e58603f1dbf1a6368b241cc0393c060a69856e3
Add Tile Map Service downloading

This uses map tiles directly from openstreetmap.org. The problem with
this is that those tiles are rendered using a Mercator projections which
is non-linear with respect to latitude. Two things must be done to
properly correct for this:

1. Split tiles at the correct location. With the Mercator projection,
   the midpoint of a tile is the midpoint of the longitude but not the
   midpoint of the latitude.

   Correcting this very important because it prevent tiles from being
   drawn in entirely the wrong place.

2. Morph each tile to lat-lon projection when it is drawn. This could
   possibly be done with a OpenGL fragment shader.

   This noticeable when zoomed out so it's not too bad to just ignore
   the issue.. The web based map servers have similar issues with land
   area at high-up zoom levels.

Eventually we'll want to fetch the XML and render the maps locally..
src/data/Makefile.am
src/data/grits-tms.c [new file with mode: 0644]
src/data/grits-tms.h [new file with mode: 0644]
src/grits-viewer.h
src/grits.h
src/plugins/map.c
src/plugins/map.h
src/tile-test.c