[ gpsdrive ] GPSdrive SVN, Mapnik and a Patch

Hamish hamish_b at yahoo.com
Thu May 29 05:31:30 AKDT 2008


Mark Wilkinson:
> > > I'm not sure how to measure this... it was enough to throw my
> > > location in plymouth UK, several miles into the english
> > > channel.. guess i'm gonna have to figure it out now :-)
> >
> > It seems to be approx  11' 19.61"  south

for 100-150m I would guess it was bad datum parameters, but for that much something else. 

for error up to half a degree often you might see Degreee Minutes being treated as DDD.MMMM, ie minutes misused as decimal degrees.
if your patch helps, probably not that.


for an explaination of +proj terms used below, see
  http://trac.osgeo.org/proj/wiki/GenParms
and/or
  http://trac.osgeo.org/qgis/ticket/1035#comment:8

============================
+++ src/mapnik.cpp
@@ -38,7 +41,8 @@
 extern int borderlimit;
 
 
-mapnik::projection Proj("+proj=merc +datum=WGS84");
+//mapnik::projection Proj("+proj=merc +datum=WGS84");
+mapnik::projection Proj("+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");
 
 typedef struct {
        int WidthInt;
============================


+datum=WGS84 should expand to specify +ellps=WGS84.

In your corrected version, that is removed and the Earth's major and minor radii are exactly the same (+a,+b), so I would take a wild guess to say that it wants +ellps=sphere for the ellipsoid instead of +datum=WGS84 (thus +ellps=WGS84).

That could possibly explain an error as big as 20km ....?


these should all be redundant by the way, but don't really hurt:
+b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null


any links to what the projection parameters should be from Mapnik? (I assume all this is reprojected using the PROJ.4 library and somewhere a plain text explaination of the projection is given)


+over is a new one for me, I don't know what that does.
overlay? overlap? "end of terms"?


Guenther Meyer wrote:
> I wonder who changed this, the line from your patch for
> setting the projection seems to be the right one; and the only one I
> knew to be right...

Without a ViewCVS web interface (nudge) it is hard to hit the "Annotate" button to see which rev for each line number, but "svn log" might help.
I seem to recall something about the latest version of SVN having a "svn blame" command?  (my debian/etch version is too old for that, so not sure exactly)


Hamish



      



More information about the GPSdrive mailing list