Removed unused resolution data from grids
This commit is contained in:
parent
c245c208ee
commit
fe01d52845
4 changed files with 5 additions and 28 deletions
|
@ -67,8 +67,8 @@ void export_grid()
|
||||||
class_<mapnik::grid,std::shared_ptr<mapnik::grid> >(
|
class_<mapnik::grid,std::shared_ptr<mapnik::grid> >(
|
||||||
"Grid",
|
"Grid",
|
||||||
"This class represents a feature hitgrid.",
|
"This class represents a feature hitgrid.",
|
||||||
init<int,int,std::string,unsigned>(
|
init<int,int,std::string>(
|
||||||
( boost::python::arg("width"), boost::python::arg("height"),boost::python::arg("key")="__id__", boost::python::arg("resolution")=1 ),
|
( boost::python::arg("width"), boost::python::arg("height"),boost::python::arg("key")="__id__"),
|
||||||
"Create a mapnik.Grid object\n"
|
"Create a mapnik.Grid object\n"
|
||||||
))
|
))
|
||||||
.def("painted",&painted)
|
.def("painted",&painted)
|
||||||
|
|
|
@ -61,7 +61,6 @@ private:
|
||||||
unsigned height_;
|
unsigned height_;
|
||||||
std::string key_;
|
std::string key_;
|
||||||
data_type data_;
|
data_type data_;
|
||||||
unsigned int resolution_;
|
|
||||||
std::string id_name_;
|
std::string id_name_;
|
||||||
bool painted_;
|
bool painted_;
|
||||||
std::set<std::string> names_;
|
std::set<std::string> names_;
|
||||||
|
@ -71,7 +70,7 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
hit_grid(int width, int height, std::string const& key, unsigned int resolution);
|
hit_grid(int width, int height, std::string const& key);
|
||||||
|
|
||||||
hit_grid(hit_grid<T> const& rhs);
|
hit_grid(hit_grid<T> const& rhs);
|
||||||
|
|
||||||
|
@ -126,16 +125,6 @@ public:
|
||||||
key_ = key;
|
key_ = key;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline unsigned int get_resolution() const
|
|
||||||
{
|
|
||||||
return resolution_;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void set_resolution(unsigned int res)
|
|
||||||
{
|
|
||||||
resolution_ = res;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline data_type const& data() const
|
inline data_type const& data() const
|
||||||
{
|
{
|
||||||
return data_;
|
return data_;
|
||||||
|
@ -164,7 +153,7 @@ public:
|
||||||
inline mapnik::grid_view get_view(unsigned x, unsigned y, unsigned w, unsigned h)
|
inline mapnik::grid_view get_view(unsigned x, unsigned y, unsigned w, unsigned h)
|
||||||
{
|
{
|
||||||
return mapnik::grid_view(x,y,w,h,
|
return mapnik::grid_view(x,y,w,h,
|
||||||
data_,key_,id_name_,resolution_,names_,f_keys_,features_);
|
data_,key_,id_name_,names_,f_keys_,features_);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -55,7 +55,6 @@ public:
|
||||||
T const& data,
|
T const& data,
|
||||||
std::string const& key,
|
std::string const& key,
|
||||||
std::string const& id_name,
|
std::string const& id_name,
|
||||||
unsigned resolution,
|
|
||||||
std::set<std::string> const& names,
|
std::set<std::string> const& names,
|
||||||
feature_key_type const& f_keys,
|
feature_key_type const& f_keys,
|
||||||
feature_type const& features
|
feature_type const& features
|
||||||
|
@ -66,7 +65,6 @@ public:
|
||||||
height_(height),
|
height_(height),
|
||||||
data_(data),
|
data_(data),
|
||||||
key_(key),
|
key_(key),
|
||||||
resolution_(resolution),
|
|
||||||
id_name_(id_name),
|
id_name_(id_name),
|
||||||
names_(names),
|
names_(names),
|
||||||
f_keys_(f_keys),
|
f_keys_(f_keys),
|
||||||
|
@ -88,7 +86,6 @@ public:
|
||||||
height_(rhs.height_),
|
height_(rhs.height_),
|
||||||
data_(rhs.data_),
|
data_(rhs.data_),
|
||||||
key_(rhs.key_),
|
key_(rhs.key_),
|
||||||
resolution_(rhs.resolution_),
|
|
||||||
id_name_(rhs.id_name_),
|
id_name_(rhs.id_name_),
|
||||||
names_(rhs.names_),
|
names_(rhs.names_),
|
||||||
f_keys_(rhs.f_keys_),
|
f_keys_(rhs.f_keys_),
|
||||||
|
@ -104,7 +101,6 @@ public:
|
||||||
height_ = rhs.height_;
|
height_ = rhs.height_;
|
||||||
data_ = rhs.data_;
|
data_ = rhs.data_;
|
||||||
key_ = rhs.key_;
|
key_ = rhs.key_;
|
||||||
resolution_ = rhs.resolution_;
|
|
||||||
id_name_ = rhs.id_name_;
|
id_name_ = rhs.id_name_;
|
||||||
names_ = rhs.names_;
|
names_ = rhs.names_;
|
||||||
f_keys_ = rhs.f_keys_;
|
f_keys_ = rhs.f_keys_;
|
||||||
|
@ -177,11 +173,6 @@ public:
|
||||||
return key_;
|
return key_;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline unsigned int get_resolution() const
|
|
||||||
{
|
|
||||||
return resolution_;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned x_;
|
unsigned x_;
|
||||||
unsigned y_;
|
unsigned y_;
|
||||||
|
@ -189,7 +180,6 @@ private:
|
||||||
unsigned height_;
|
unsigned height_;
|
||||||
T const& data_;
|
T const& data_;
|
||||||
std::string const& key_;
|
std::string const& key_;
|
||||||
unsigned int resolution_;
|
|
||||||
std::string const& id_name_;
|
std::string const& id_name_;
|
||||||
std::set<std::string> const& names_;
|
std::set<std::string> const& names_;
|
||||||
feature_key_type const& f_keys_;
|
feature_key_type const& f_keys_;
|
||||||
|
|
|
@ -37,12 +37,11 @@ template <typename T>
|
||||||
const typename hit_grid<T>::value_type hit_grid<T>::base_mask = std::numeric_limits<typename T::type>::min();
|
const typename hit_grid<T>::value_type hit_grid<T>::base_mask = std::numeric_limits<typename T::type>::min();
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
hit_grid<T>::hit_grid(int width, int height, std::string const& key, unsigned int resolution)
|
hit_grid<T>::hit_grid(int width, int height, std::string const& key)
|
||||||
: width_(width),
|
: width_(width),
|
||||||
height_(height),
|
height_(height),
|
||||||
key_(key),
|
key_(key),
|
||||||
data_(width,height),
|
data_(width,height),
|
||||||
resolution_(resolution),
|
|
||||||
id_name_("__id__"),
|
id_name_("__id__"),
|
||||||
painted_(false),
|
painted_(false),
|
||||||
names_(),
|
names_(),
|
||||||
|
@ -60,7 +59,6 @@ hit_grid<T>::hit_grid(hit_grid<T> const& rhs)
|
||||||
height_(rhs.height_),
|
height_(rhs.height_),
|
||||||
key_(rhs.key_),
|
key_(rhs.key_),
|
||||||
data_(rhs.data_),
|
data_(rhs.data_),
|
||||||
resolution_(rhs.resolution_),
|
|
||||||
id_name_("__id__"),
|
id_name_("__id__"),
|
||||||
painted_(rhs.painted_),
|
painted_(rhs.painted_),
|
||||||
names_(rhs.names_),
|
names_(rhs.names_),
|
||||||
|
|
Loading…
Reference in a new issue