[ gpsdrive ] Patches

Hamish hamish_b at yahoo.com
Thu Dec 18 18:32:38 AKST 2008


Paul Martin wrote:
--- gpsdrive-trunk/scripts/mapnik/osm-in.xml    2008-12-18 09:49:06.019635700 +0000
+++ gpsdrive-local/scripts/mapnik/osm-in.xml    2008-12-18 09:50:03.491633841 +0000
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE Map>
-<Map bgcolor="#b5d0d0" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +
nadgrids=@null +no_defs +over">
+<Map bgcolor="#b5d0d0" srs="+proj=merc +datum=WGS84  +k=1.0 +units=m +over +no_defs">
   <Style name="mapnik:selection">
     <Rule>
       <Filter>[mapnik:geometry] = 1</Filter>


[sorry if yahoo totally munches that]

I fear this will go on and on, back and forth.
Well, I don't have all the answers, but FYI:
[as I understand it]

---

srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over"

the above is the "google earth projection" which is mercator on a sphere.
the earth's primary and secondary ellipsoid radius (+a,+b, in meters)
arbitrarily uses the same number as WGS84 does for its primary radius (a).
the relationship with WGS84 ends there. I believe this is what osmarender
uses for its projection too. it gets distorted and is only "good" for
visual purposes. i.e. due to high levels of distortion away from the center
it is not very useful for navigation purposes.
see the Osmarander_bug wiki page on the OSM wiki. (which I think is not
fully accurate, but some background..)

---

srs="+proj=merc +datum=WGS84  +k=1.0 +units=m +over +no_defs"

this is mercator, using the WGS84 datum+ellipsoid.

but it looks weird.
  +lon_0 is missing  (maybe +lat_0 too? or is that a noop for merc?)

  AFAICT +datum=WGS84 and +k=1 are incompatible (wgs84 sets the ellipsoid,
  k is the scaling factor which is a function of the ellipsoid's
  eccentricity. and the world (as defined by wgs84) is not a perfect
  sphere.

If not in the proj.osgeo.org docs check the libgeotiff website help for what params +proj=merc needs. (I'd do it but am just about to leave town
and have no time)

read the ongoing threads about all this on the PROJ.4 mailing list.


Hamish



      



More information about the GPSdrive mailing list