[ gpsdrive ] maptiler
Hamish
hamish_b at yahoo.com
Thu Mar 12 00:12:22 AKDT 2009
Chris wrote:
> > http://www.maptiler.org/
>
> Being BSB licensed and working with the code, the needed
(BSD? maps on the brain...)
> change can be made (I think) in maptiler>maptiler>gdal2tiles.py
>
> def __init__(self, tileSize=256):
> "Initialize the TMS Global Mercator pyramid"
> self.tileSize = tileSize
> self.initialResolution = 2 * math.pi * 6378137 /
> self.tileSize
> #
> 156543.03392804062 for tileSize 256 pixels
>
> self.originShift = 2 * math.pi * 6378137 / 2.0
> #
> 20037508.342789244
[sorry, can't fix yahoo's braindead line wrapping]
two bits:
the "tile pyramid" generates the same base image at a series of
different resolutions.
I am not sure, but "Global Mercator" makes me pause a bit, if it
is what I think it is. I am worried that it is propogation of the
same nightmare as the 'Osmarender bug' & Google maps & probably
yahoo maps which makes them near impossible to accurately
georeference. ie they are in fact distorted and drawing/taking
positions over them leads to garbage. fine for visual use and very
fast to calculate on the map server, but no good for reuse.
"easy but broken" won out over "correct but need to consult an
expert and do more math" unfortunately. [I'm no expert either,
you'll find those on the proj4 list (each with their own differing
answer :); this is just as far as I understand it]
6378137 is the earth's radius used in meters. (so that code assumes
the earth is a sphere instead of a short and fat ellipsoid, which
can cause ~25km? positioning error in places) yuk
currently for the built-in gpsdrive map downloads NASA data is ok
(comes from a real WMS server) while OSM tile data will always
be distorted, especially the more you zoom out. (Osmarender bug)
the distortion is not really a problem for cars if you are not
driving blind, but on a boat it could actually have you hit a
rock, sink the boat, and kill you. so something to be concerned
about :)
see:
- http://wiki.openstreetmap.org/wiki/Osmarender_bug
- search the PROJ.4 mailing list for "google" and a lot of
surveyors and geodesists swearing and such.
... my point being it needs a lot of testing before it can be
trusted. waypoints/POIs on map grid lines and gpsdrive grid overlay
lines can help establish that trust.
Hamish
More information about the GPSdrive
mailing list