2013-09-30 12:32:24 +00:00
|
|
|
/*****************************************************************************
|
|
|
|
*
|
|
|
|
* This file is part of Mapnik (c++ mapping toolkit)
|
|
|
|
*
|
2015-06-16 10:49:16 +00:00
|
|
|
* Copyright (C) 2015 Artem Pavlenko
|
2013-09-30 12:32:24 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*
|
|
|
|
*****************************************************************************/
|
|
|
|
|
2012-06-13 12:30:58 +00:00
|
|
|
#ifndef GEOJSON_FEATURESET_HPP
|
|
|
|
#define GEOJSON_FEATURESET_HPP
|
|
|
|
|
2013-01-04 17:23:06 +00:00
|
|
|
#include <mapnik/feature.hpp>
|
2012-06-13 12:30:58 +00:00
|
|
|
#include "geojson_datasource.hpp"
|
|
|
|
|
2012-06-14 11:16:25 +00:00
|
|
|
#include <vector>
|
|
|
|
#include <deque>
|
|
|
|
|
|
|
|
|
2012-06-13 12:30:58 +00:00
|
|
|
class geojson_featureset : public mapnik::Featureset
|
|
|
|
{
|
|
|
|
public:
|
2014-08-19 21:48:21 +00:00
|
|
|
typedef std::deque<geojson_datasource::item_type> array_type;
|
2012-06-13 12:30:58 +00:00
|
|
|
geojson_featureset(std::vector<mapnik::feature_ptr> const& features,
|
2014-08-19 21:48:21 +00:00
|
|
|
array_type && index_array);
|
2012-06-13 12:30:58 +00:00
|
|
|
virtual ~geojson_featureset();
|
|
|
|
mapnik::feature_ptr next();
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::vector<mapnik::feature_ptr> const& features_;
|
2014-08-19 21:48:21 +00:00
|
|
|
const array_type index_array_;
|
|
|
|
array_type::const_iterator index_itr_;
|
|
|
|
array_type::const_iterator index_end_;
|
2012-06-13 12:30:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // GEOJSON_FEATURESET_HPP
|