Merge remote-tracking branch 'origin/feature_impl' into feature_impl
Conflicts: include/mapnik/feature.hpp
This commit is contained in:
commit
9f763b8cf6
7 changed files with 5 additions and 50 deletions
|
@ -14,6 +14,8 @@ For a complete change history, see the SVN log.
|
||||||
Mapnik 2.1.0
|
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.
|
- 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)
|
- 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)
|
||||||
|
|
|
@ -667,7 +667,6 @@ __all__ = [
|
||||||
'Path',
|
'Path',
|
||||||
'Parameter',
|
'Parameter',
|
||||||
'Parameters',
|
'Parameters',
|
||||||
'PointDatasource',
|
|
||||||
'PointSymbolizer',
|
'PointSymbolizer',
|
||||||
'PolygonPatternSymbolizer',
|
'PolygonPatternSymbolizer',
|
||||||
'PolygonSymbolizer',
|
'PolygonSymbolizer',
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
|
|
||||||
|
|
||||||
using mapnik::datasource;
|
using mapnik::datasource;
|
||||||
using mapnik::point_datasource;
|
|
||||||
using mapnik::memory_datasource;
|
using mapnik::memory_datasource;
|
||||||
using mapnik::layer_descriptor;
|
using mapnik::layer_descriptor;
|
||||||
using mapnik::attribute_descriptor;
|
using mapnik::attribute_descriptor;
|
||||||
|
@ -182,11 +181,6 @@ void export_datasource()
|
||||||
def("Describe",&describe);
|
def("Describe",&describe);
|
||||||
def("CreateDatasource",&create_datasource);
|
def("CreateDatasource",&create_datasource);
|
||||||
|
|
||||||
class_<point_datasource, bases<datasource>, boost::noncopyable>("PointDatasource", init<>())
|
|
||||||
.def("add_point",&point_datasource::add_point)
|
|
||||||
;
|
|
||||||
|
|
||||||
|
|
||||||
class_<memory_datasource, bases<datasource>, boost::noncopyable>("MemoryDatasource", init<>())
|
class_<memory_datasource, bases<datasource>, boost::noncopyable>("MemoryDatasource", init<>())
|
||||||
.def("add_feature",&memory_datasource::push,
|
.def("add_feature",&memory_datasource::push,
|
||||||
"Adds a Feature:\n"
|
"Adds a Feature:\n"
|
||||||
|
|
|
@ -46,10 +46,9 @@
|
||||||
|
|
||||||
namespace mapnik {
|
namespace mapnik {
|
||||||
|
|
||||||
|
|
||||||
typedef boost::shared_ptr<raster> raster_ptr;
|
typedef boost::shared_ptr<raster> raster_ptr;
|
||||||
typedef std::string key_type;
|
typedef std::string key_type;
|
||||||
typedef std::map<key_type,int> map_type;
|
typedef std::map<key_type,std::size_t> map_type;
|
||||||
typedef boost::associative_property_map<map_type> base_type;
|
typedef boost::associative_property_map<map_type> base_type;
|
||||||
|
|
||||||
class feature_impl;
|
class feature_impl;
|
||||||
|
@ -88,8 +87,7 @@ class feature_impl : private boost::noncopyable
|
||||||
{
|
{
|
||||||
friend class feature_kv_iterator;
|
friend class feature_kv_iterator;
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
typedef mapnik::value value_type;
|
typedef mapnik::value value_type;
|
||||||
typedef std::vector<value_type> cont_type;
|
typedef std::vector<value_type> cont_type;
|
||||||
|
|
||||||
|
|
|
@ -49,22 +49,7 @@ public:
|
||||||
private:
|
private:
|
||||||
std::vector<feature_ptr> features_;
|
std::vector<feature_ptr> features_;
|
||||||
mapnik::layer_descriptor desc_;
|
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
|
#endif // MAPNIK_MEMORY_DATASOURCE_HPP
|
||||||
|
|
|
@ -94,13 +94,6 @@ shape_file& shape_io::shp()
|
||||||
return shp_;
|
return shp_;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
shape_file& shape_io::shx()
|
|
||||||
{
|
|
||||||
return shx_;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
dbf_file& shape_io::dbf()
|
dbf_file& shape_io::dbf()
|
||||||
{
|
{
|
||||||
return dbf_;
|
return dbf_;
|
||||||
|
|
|
@ -112,20 +112,4 @@ void memory_datasource::clear()
|
||||||
features_.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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue