From 136239f88bd83d195bbc230cd2bbeb41db3acb2e Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 17 Jan 2012 09:58:45 -0500 Subject: [PATCH] remove mapnik::point_datasource from c++ and mapnik.PointDatasource from python bindings --- CHANGELOG | 2 ++ bindings/python/mapnik/__init__.py | 1 - bindings/python/mapnik_datasource.cpp | 6 ------ include/mapnik/memory_datasource.hpp | 17 +---------------- src/memory_datasource.cpp | 16 ---------------- 5 files changed, 3 insertions(+), 39 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 49aa4e399..caa88a4ad 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -14,6 +14,8 @@ For a complete change history, see the SVN log. Mapnik 2.1.0 ------------ +- Removed PointDatasource - use more robust MemoryDatasource instead (#1032) + - SQLite - Added support for !intersects! token in sql subselects (#809) allow custom positioning of rtree spatial filter. - New CSV plugin - reads tabular files - autodetecting geo columns, newlines, and delimiters. Uses in-memory featureset for fast rendering and is not designed for large files (#902) diff --git a/bindings/python/mapnik/__init__.py b/bindings/python/mapnik/__init__.py index 66d884bc7..cd8634c01 100644 --- a/bindings/python/mapnik/__init__.py +++ b/bindings/python/mapnik/__init__.py @@ -667,7 +667,6 @@ __all__ = [ 'Path', 'Parameter', 'Parameters', - 'PointDatasource', 'PointSymbolizer', 'PolygonPatternSymbolizer', 'PolygonSymbolizer', diff --git a/bindings/python/mapnik_datasource.cpp b/bindings/python/mapnik_datasource.cpp index e607f1327..fdb127acd 100644 --- a/bindings/python/mapnik_datasource.cpp +++ b/bindings/python/mapnik_datasource.cpp @@ -36,7 +36,6 @@ using mapnik::datasource; -using mapnik::point_datasource; using mapnik::memory_datasource; using mapnik::layer_descriptor; using mapnik::attribute_descriptor; @@ -182,11 +181,6 @@ void export_datasource() def("Describe",&describe); def("CreateDatasource",&create_datasource); - class_, boost::noncopyable>("PointDatasource", init<>()) - .def("add_point",&point_datasource::add_point) - ; - - class_, boost::noncopyable>("MemoryDatasource", init<>()) .def("add_feature",&memory_datasource::push, "Adds a Feature:\n" diff --git a/include/mapnik/memory_datasource.hpp b/include/mapnik/memory_datasource.hpp index 55edc8227..8b665774f 100644 --- a/include/mapnik/memory_datasource.hpp +++ b/include/mapnik/memory_datasource.hpp @@ -49,22 +49,7 @@ public: private: std::vector features_; mapnik::layer_descriptor desc_; -}; - -// This class implements a simple way of displaying point-based data -// TODO -- possible redesign, move into separate file -// - -class MAPNIK_DECL point_datasource : public memory_datasource { -public: - point_datasource() : - feature_id_(1) {} - void add_point(double x, double y, const char* key, const char* value); - inline int type() const { return datasource::Vector; } - -private: - int feature_id_; -}; +}; } #endif // MAPNIK_MEMORY_DATASOURCE_HPP diff --git a/src/memory_datasource.cpp b/src/memory_datasource.cpp index 4ff0c776c..786536be2 100644 --- a/src/memory_datasource.cpp +++ b/src/memory_datasource.cpp @@ -112,20 +112,4 @@ void memory_datasource::clear() features_.clear(); } -// point_datasource - -void point_datasource::add_point(double x, double y, const char* key, const char* value) -{ - // FIXME - - //feature_ptr feature(feature_factory::create(feature_id_)); - // ++feature_id_; - // geometry_type * pt = new geometry_type(Point); - // pt->move_to(x,y); - // feature->add_geometry(pt); - // transcoder tr("utf-8"); - // (*feature)[key] = tr.transcode(value); - // this->push(feature); -} - }