convert to degrees if projection is geographic

This commit is contained in:
Artem Pavlenko 2008-02-20 12:44:34 +00:00
parent 24c605e807
commit f3a3ce04db

View file

@ -82,6 +82,11 @@ namespace mapnik {
p = pj_fwd(p,proj_);
x = p.u;
y = p.v;
if (pj_is_latlong(proj_))
{
x *=RAD_TO_DEG;
y *=RAD_TO_DEG;
}
}
void projection::inverse(double & x,double & y) const
@ -89,6 +94,11 @@ namespace mapnik {
#ifdef MAPNIK_THREADSAFE
mutex::scoped_lock lock(mutex_);
#endif
if (pj_is_latlong(proj_))
{
x *=DEG_TO_RAD;
y *=DEG_TO_RAD;
}
projUV p;
p.u = x;
p.v = y;