convert to degrees if projection is geographic
This commit is contained in:
parent
24c605e807
commit
f3a3ce04db
1 changed files with 16 additions and 6 deletions
|
@ -82,6 +82,11 @@ namespace mapnik {
|
||||||
p = pj_fwd(p,proj_);
|
p = pj_fwd(p,proj_);
|
||||||
x = p.u;
|
x = p.u;
|
||||||
y = p.v;
|
y = p.v;
|
||||||
|
if (pj_is_latlong(proj_))
|
||||||
|
{
|
||||||
|
x *=RAD_TO_DEG;
|
||||||
|
y *=RAD_TO_DEG;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void projection::inverse(double & x,double & y) const
|
void projection::inverse(double & x,double & y) const
|
||||||
|
@ -89,6 +94,11 @@ namespace mapnik {
|
||||||
#ifdef MAPNIK_THREADSAFE
|
#ifdef MAPNIK_THREADSAFE
|
||||||
mutex::scoped_lock lock(mutex_);
|
mutex::scoped_lock lock(mutex_);
|
||||||
#endif
|
#endif
|
||||||
|
if (pj_is_latlong(proj_))
|
||||||
|
{
|
||||||
|
x *=DEG_TO_RAD;
|
||||||
|
y *=DEG_TO_RAD;
|
||||||
|
}
|
||||||
projUV p;
|
projUV p;
|
||||||
p.u = x;
|
p.u = x;
|
||||||
p.v = y;
|
p.v = y;
|
||||||
|
|
Loading…
Reference in a new issue