Skip to content
Newer
Older
100644 43 lines (36 sloc) 1.47 KB
3454e16 @tmcw Pstate version
tmcw authored
1 #ifndef JIT_DATASOURCE_HPP
2 #define JIT_DATASOURCE_HPP
a3403e4 @tmcw Oh boy
tmcw authored
3
4 // mapnik
5 #include <mapnik/datasource.hpp>
6
cf07dab @tmcw Correct bounds extent parsing from TileJSON
tmcw authored
7 const std::string MERCATOR_PROJ4 = "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over";
8
a3403e4 @tmcw Oh boy
tmcw authored
9 class jit_datasource : public mapnik::datasource
10 {
11 public:
12 // constructor
13 jit_datasource(mapnik::parameters const& params, bool bind=true);
14 virtual ~jit_datasource ();
ce6f298 @springmeyer adapt to mapnik changes upstream
springmeyer authored
15 mapnik::datasource::datasource_t type() const;
a3403e4 @tmcw Oh boy
tmcw authored
16 static std::string name();
17 mapnik::featureset_ptr features(mapnik::query const& q) const;
18 mapnik::featureset_ptr features_at_point(mapnik::coord2d const& pt) const;
19 mapnik::box2d<double> envelope() const;
e194f56 @tmcw Adapt to the new shared_ptr work. Currently fails for me because of b…
tmcw authored
20 mapnik::statistics_ptr get_statistics() const;
ce6f298 @springmeyer adapt to mapnik changes upstream
springmeyer authored
21 boost::optional<mapnik::datasource::geometry_t> get_geometry_type() const;
a3403e4 @tmcw Oh boy
tmcw authored
22 mapnik::layer_descriptor get_descriptor() const;
23 void bind() const;
24
25 private:
26 // recommended naming convention of datasource members:
27 // name_, type_, extent_, and desc_
28 static const std::string name_;
74901c6 @tmcw Add tests for working geometry_type from jit. Fixes #2
tmcw authored
29 mutable std::string geometry_type_string_;
ce6f298 @springmeyer adapt to mapnik changes upstream
springmeyer authored
30 mapnik::datasource::datasource_t type_;
1612a36 @tmcw Hooray, working tests
tmcw authored
31 mutable std::map<std::string, mapnik::parameters> statistics_;
a3403e4 @tmcw Oh boy
tmcw authored
32 mutable mapnik::layer_descriptor desc_;
33 mutable std::string url_;
4de8132 @tmcw Getting up to date
tmcw authored
34 mutable std::string tileurl_;
343f7ae @tmcw Plus basiccurl
tmcw authored
35 mutable std::string thisurl_;
f97b640 @tmcw TileJSON parsing
tmcw authored
36 mutable int minzoom_;
37 mutable int maxzoom_;
a3403e4 @tmcw Oh boy
tmcw authored
38 mutable mapnik::box2d<double> extent_;
39 };
40
41
42 #endif // FILE_DATASOURCE_HPP
Something went wrong with that request. Please try again.