+ applied mapnik-skip-projection-if-equal.patch (jonb)
This commit is contained in:
parent
a3e81dd344
commit
65ea5bca98
2 changed files with 7 additions and 0 deletions
|
@ -46,6 +46,7 @@ namespace mapnik {
|
|||
projection const& dest_;
|
||||
bool is_source_latlong_;
|
||||
bool is_dest_latlong_;
|
||||
bool is_source_equal_dest;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ namespace mapnik {
|
|||
#endif
|
||||
is_source_latlong_ = pj_is_latlong(source_.proj_);
|
||||
is_dest_latlong_ = pj_is_latlong(dest_.proj_);
|
||||
is_source_equal_dest = (source_ == dest_);
|
||||
}
|
||||
|
||||
bool proj_transform::forward (double & x, double & y , double & z) const
|
||||
|
@ -47,6 +48,9 @@ namespace mapnik {
|
|||
#ifdef MAPNIK_THREADSAFE
|
||||
mutex::scoped_lock lock(projection::mutex_);
|
||||
#endif
|
||||
if (is_source_equal_dest)
|
||||
return true;
|
||||
|
||||
if (is_source_latlong_)
|
||||
{
|
||||
x *= DEG_TO_RAD;
|
||||
|
@ -73,6 +77,8 @@ namespace mapnik {
|
|||
#ifdef MAPNIK_THREADSAFE
|
||||
mutex::scoped_lock lock(projection::mutex_);
|
||||
#endif
|
||||
if (is_source_equal_dest)
|
||||
return true;
|
||||
|
||||
if (is_dest_latlong_)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue