~ubuntu-branches/ubuntu/trusty/mapnik/trusty-proposed

« back to all changes in this revision

Viewing changes to include/mapnik/image_util.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Sauthier
  • Date: 2009-08-27 00:28:37 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090827002837-ztqzfg2rmclfh4i9
Tags: 0.6.1-0ubuntu1
* New upstream release.
* Change usr/lib to usr/lib* to enable build on 64 bits systems due to new
  configuration in SConstruct in :
  - debian/libmapnik-dev.install
  - debian/libmapnik0.6.install
  - debian/mapnik-plugin-base

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
// boost
33
33
#include <boost/algorithm/string.hpp>
34
 
 
 
34
#include <boost/lexical_cast.hpp>
35
35
// stl
36
36
#include <string>
37
37
 
99
99
      if (is_tiff(filename)) return "tiff";
100
100
      return "unknown";
101
101
   }
102
 
   
 
102
 
 
103
   inline std::string guess_type( const std::string & filename )
 
104
   {
 
105
      std::string::size_type idx = filename.find_last_of(".");
 
106
      if ( idx != std::string::npos ) {
 
107
          return filename.substr( idx + 1 );
 
108
      }
 
109
      return "<unknown>";
 
110
   }
 
111
       
103
112
   template <typename T>
104
113
   double distance(T x0,T y0,T x1,T y1)
105
114
   {
106
115
      double dx = x1-x0;
107
116
      double dy = y1-y0;
108
 
      return sqrt(dx * dx + dy * dy);
 
117
      return std::sqrt(dx * dx + dy * dy);
109
118
   }
110
119
   
111
120
   template <typename Image>