[ gpsdrive ] GPSdrive SVN, Mapnik and a Patch
Hamish
hamish_b at yahoo.com
Thu May 29 05:50:00 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
Hamish:
> 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"?
more ideas:
* there was a change with the new PROJ4 version 4.6.0:
http://thread.gmane.org/gmane.comp.gis.proj-4.devel/2622/
* the "google projection" is as follows, and the likely source of Mapnik's
(from PROJ4's /usr/share/proj/esri.extra file)
#
# Chris' funny epsgish code for the google mercator
#
<900913> +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 +wktext +no_defs <>
Hamish
More information about the GPSdrive
mailing list