diff --git a/bindings/python/mapnik/__init__.py b/bindings/python/mapnik/__init__.py index 2ed760e73..d5c2b4a0c 100644 --- a/bindings/python/mapnik/__init__.py +++ b/bindings/python/mapnik/__init__.py @@ -485,10 +485,11 @@ def Ogr(**keywords): Required keyword arguments: file -- path to OGR supported dataset - layer -- name of layer to use within datasource (optional if layer_by_index is used) + layer -- name of layer to use within datasource (optional if layer_by_index or layer_by_sql is used) Optional keyword arguments: - layer_by_index -- choose layer by index number instead of by layer name. + layer_by_index -- choose layer by index number instead of by layer name or sql. + layer_by_sql -- choose layer by sql query number instead of by layer name or index. base -- path prefix (default None) encoding -- file encoding (default 'utf-8') multiple_geometries -- boolean, direct the Mapnik wkb reader to interpret as multigeometries (default False) diff --git a/demo/c++/rundemo.cpp b/demo/c++/rundemo.cpp index 4216dd677..8f4ba0a3a 100644 --- a/demo/c++/rundemo.cpp +++ b/demo/c++/rundemo.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/demo/viewer/about_dialog.cpp b/demo/viewer/about_dialog.cpp index 3594c63e1..5f6fa88f5 100644 --- a/demo/viewer/about_dialog.cpp +++ b/demo/viewer/about_dialog.cpp @@ -1,5 +1,6 @@ /* This file is part of Mapnik (c++ mapping toolkit) - * Copyright (C) 2007 Artem Pavlenko + * + * Copyright (C) 2011 Artem Pavlenko * * Mapnik is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/demo/viewer/about_dialog.hpp b/demo/viewer/about_dialog.hpp index 13d71dda2..b70e27330 100644 --- a/demo/viewer/about_dialog.hpp +++ b/demo/viewer/about_dialog.hpp @@ -1,5 +1,6 @@ /* This file is part of Mapnik (c++ mapping toolkit) - * Copyright (C) 2007 Artem Pavlenko + * + * Copyright (C) 2011 Artem Pavlenko * * Mapnik is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/demo/viewer/info_dialog.cpp b/demo/viewer/info_dialog.cpp index 89652c33e..92b3599d3 100644 --- a/demo/viewer/info_dialog.cpp +++ b/demo/viewer/info_dialog.cpp @@ -1,5 +1,6 @@ - /* This file is part of Mapnik (c++ mapping toolkit) - * Copyright (C) 2007 Artem Pavlenko +/* This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2011 Artem Pavlenko * * Mapnik is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -35,6 +36,6 @@ info_dialog::info_dialog(QVector > const& info, QWidget * QTableWidgetItem *keyItem = new QTableWidgetItem(info[i].first); QTableWidgetItem *valueItem = new QTableWidgetItem(info[i].second); ui.tableWidget->setItem(i,0,keyItem); - ui.tableWidget->setItem(i,1,valueItem); + ui.tableWidget->setItem(i,1,valueItem); } } diff --git a/demo/viewer/info_dialog.hpp b/demo/viewer/info_dialog.hpp index f9fda8b03..81d550c8b 100644 --- a/demo/viewer/info_dialog.hpp +++ b/demo/viewer/info_dialog.hpp @@ -1,5 +1,6 @@ /* This file is part of Mapnik (c++ mapping toolkit) - * Copyright (C) 2007 Artem Pavlenko + * + * Copyright (C) 2011 Artem Pavlenko * * Mapnik is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/demo/viewer/layer_info_dialog.cpp b/demo/viewer/layer_info_dialog.cpp index ec23b1ec4..c223146b4 100644 --- a/demo/viewer/layer_info_dialog.cpp +++ b/demo/viewer/layer_info_dialog.cpp @@ -1,5 +1,6 @@ /* This file is part of Mapnik (c++ mapping toolkit) - * Copyright (C) 2007 Artem Pavlenko + * + * Copyright (C) 2011 Artem Pavlenko * * Mapnik is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -28,15 +29,15 @@ layer_info_dialog::layer_info_dialog(mapnik::layer& lay, QWidget *parent) : QDialog(parent) { ui.setupUi(this); - + ui.tableWidget->setHorizontalHeaderItem(0,new QTableWidgetItem("Name")); ui.tableWidget->setHorizontalHeaderItem(1,new QTableWidgetItem("Value")); - + // Layer name ui.layerNameEdit->setText(QString(lay.name().c_str())); // Named Styles : TODO!!! - + // Datasource mapnik::datasource_ptr ds = lay.datasource(); if (ds) @@ -57,10 +58,10 @@ layer_info_dialog::layer_info_dialog(mapnik::layer& lay, QWidget *parent) QTableWidgetItem *keyItem = new QTableWidgetItem(QString(pos->first.c_str())); QTableWidgetItem *valueItem = new QTableWidgetItem(QString((*result).c_str())); ui.tableWidget->setItem(index,0,keyItem); - ui.tableWidget->setItem(index,1,valueItem); + ui.tableWidget->setItem(index,1,valueItem); ++index; } - } + } } } diff --git a/demo/viewer/layer_info_dialog.hpp b/demo/viewer/layer_info_dialog.hpp index d9ecb8a90..4fb8730fa 100644 --- a/demo/viewer/layer_info_dialog.hpp +++ b/demo/viewer/layer_info_dialog.hpp @@ -1,5 +1,6 @@ /* This file is part of Mapnik (c++ mapping toolkit) - * Copyright (C) 2007 Artem Pavlenko + * + * Copyright (C) 2011 Artem Pavlenko * * Mapnik is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/demo/viewer/layerdelegate.cpp b/demo/viewer/layerdelegate.cpp index b06a129ef..fbaf101ed 100644 --- a/demo/viewer/layerdelegate.cpp +++ b/demo/viewer/layerdelegate.cpp @@ -1,5 +1,6 @@ /* This file is part of Mapnik (c++ mapping toolkit) - * Copyright (C) 2007 Artem Pavlenko + * + * Copyright (C) 2011 Artem Pavlenko * * Mapnik is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -37,7 +38,7 @@ void LayerDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, else painter->setBrush(QBrush(QColor(255, 0, 0, 64))); - + painter->drawRoundRect(option.rect,4,4); if (option.state & QStyle::State_Selected) diff --git a/demo/viewer/layerdelegate.hpp b/demo/viewer/layerdelegate.hpp index d747ebe7a..a5442a6fc 100644 --- a/demo/viewer/layerdelegate.hpp +++ b/demo/viewer/layerdelegate.hpp @@ -1,5 +1,6 @@ /* This file is part of Mapnik (c++ mapping toolkit) - * Copyright (C) 2007 Artem Pavlenko + * + * Copyright (C) 2011 Artem Pavlenko * * Mapnik is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -32,11 +33,11 @@ class QPainter; class LayerDelegate : public QAbstractItemDelegate { Q_OBJECT - + public: LayerDelegate(QObject *parent = 0); void paint(QPainter *painter, const QStyleOptionViewItem &option, - const QModelIndex &index) const; + const QModelIndex &index) const; QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index ) const; }; diff --git a/demo/viewer/layerlistmodel.cpp b/demo/viewer/layerlistmodel.cpp index b8ae00766..b6dae0d20 100644 --- a/demo/viewer/layerlistmodel.cpp +++ b/demo/viewer/layerlistmodel.cpp @@ -1,5 +1,6 @@ /* This file is part of Mapnik (c++ mapping toolkit) - * Copyright (C) 2007 Artem Pavlenko + * + * Copyright (C) 2011 Artem Pavlenko * * Mapnik is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -61,7 +62,7 @@ QVariant LayerListModel::data(QModelIndex const& index,int role) const { if (map_->layers().at(index.row()).isActive()) return QVariant(Qt::Checked); - else + else return QVariant(Qt::Unchecked); } else @@ -75,7 +76,7 @@ QVariant LayerListModel::headerData(int section, Qt::Orientation orientation, { if (role != Qt::DisplayRole) return QVariant(); - + if (orientation == Qt::Horizontal) return QString("TODO Column %1").arg(section); else @@ -86,22 +87,22 @@ bool LayerListModel::setData(const QModelIndex &index, const QVariant &value, int role) { if (!map_) return false; - + if (index.isValid() && role == Qt::CheckStateRole) { - int status = value.toInt(); + int status = value.toInt(); std::vector & layers = const_cast& >(map_->layers()); layers.at(index.row()).setActive(status); emit dataChanged(index, index); return true; - } + } return false; } Qt::ItemFlags LayerListModel::flags(QModelIndex const& index) const { Qt::ItemFlags flags = QAbstractItemModel::flags(index); - + if (index.isValid()) flags |= Qt::ItemIsUserCheckable; return flags; @@ -121,4 +122,4 @@ boost::optional LayerListModel::map_layer(int i) - + diff --git a/demo/viewer/layerlistmodel.hpp b/demo/viewer/layerlistmodel.hpp index 30f126ba5..52720a9ca 100644 --- a/demo/viewer/layerlistmodel.hpp +++ b/demo/viewer/layerlistmodel.hpp @@ -1,5 +1,6 @@ /* This file is part of Mapnik (c++ mapping toolkit) - * Copyright (C) 2007 Artem Pavlenko + * + * Copyright (C) 2011 Artem Pavlenko * * Mapnik is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -36,10 +37,10 @@ class LayerListModel : public QAbstractListModel int rowCount(const QModelIndex &parent = QModelIndex()) const; QVariant data(const QModelIndex &index, int role) const; QVariant headerData(int section, Qt::Orientation orientation, - int role = Qt::DisplayRole) const; + int role = Qt::DisplayRole) const; bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); - Qt::ItemFlags flags(QModelIndex const& index) const; + Qt::ItemFlags flags(QModelIndex const& index) const; boost::optional map_layer(int i); private: diff --git a/demo/viewer/layerwidget.cpp b/demo/viewer/layerwidget.cpp index c5402b53d..4affb0a2c 100644 --- a/demo/viewer/layerwidget.cpp +++ b/demo/viewer/layerwidget.cpp @@ -1,5 +1,6 @@ /* This file is part of Mapnik (c++ mapping toolkit) - * Copyright (C) 2007 Artem Pavlenko + * + * Copyright (C) 2011 Artem Pavlenko * * Mapnik is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -41,7 +42,7 @@ LayerTab::LayerTab(QWidget* parent) void LayerTab::paintEvent(QPaintEvent *e) { - QListView::paintEvent(e); + QListView::paintEvent(e); } void LayerTab::dataChanged(const QModelIndex &topLeft, @@ -55,7 +56,7 @@ void LayerTab::dataChanged(const QModelIndex &topLeft, void LayerTab::selectionChanged(const QItemSelection & selected, const QItemSelection &) { QModelIndexList list = selected.indexes(); - if (list.size() != 0) + if (list.size() != 0) { std::cout << "SELECTED LAYER ->" << list[0].row() << "\n"; emit layerSelected(list[0].row()); @@ -69,7 +70,7 @@ void LayerTab::layerInfo() if (indexes.size() > 0) { qDebug("id = %d",indexes[0].row()); - + } } @@ -81,7 +82,7 @@ void LayerTab::layerInfo2(QModelIndex const& index) unsigned i = index.row(); LayerListModel * model = static_cast(this->model()); boost::optional layer = model->map_layer(i); - + if (layer) { layer_info_dialog dlg(*layer,this); @@ -91,7 +92,7 @@ void LayerTab::layerInfo2(QModelIndex const& index) StyleTab::StyleTab(QWidget*) { - + } void StyleTab::contextMenuEvent(QContextMenuEvent * event ) diff --git a/demo/viewer/layerwidget.hpp b/demo/viewer/layerwidget.hpp index 38ab77e7b..a62a91e10 100644 --- a/demo/viewer/layerwidget.hpp +++ b/demo/viewer/layerwidget.hpp @@ -1,5 +1,6 @@ /* This file is part of Mapnik (c++ mapping toolkit) - * Copyright (C) 2006 Artem Pavlenko + * + * Copyright (C) 2011 Artem Pavlenko * * Mapnik is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -33,10 +34,10 @@ class LayerTab : public QListView void paintEvent(QPaintEvent *e); signals: void update_mapwidget(); - void layerSelected(int) const; + void layerSelected(int) const; public slots: - void layerInfo(); - void layerInfo2(QModelIndex const&); + void layerInfo(); + void layerInfo2(QModelIndex const&); protected slots: void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight); void selectionChanged(const QItemSelection & selected, const QItemSelection &); @@ -51,4 +52,4 @@ protected: void contextMenuEvent(QContextMenuEvent * event ); }; -#endif +#endif diff --git a/demo/viewer/main.cpp b/demo/viewer/main.cpp index d4b785f7b..21f639815 100644 --- a/demo/viewer/main.cpp +++ b/demo/viewer/main.cpp @@ -1,5 +1,6 @@ /* This file is part of Mapnik (c++ mapping toolkit) - * Copyright (C) 2006 Artem Pavlenko + * + * Copyright (C) 2011 Artem Pavlenko * * Mapnik is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -34,13 +35,13 @@ int main( int argc, char **argv ) { using mapnik::datasource_cache; using mapnik::freetype_engine; - + QCoreApplication::setOrganizationName("Mapnik"); QCoreApplication::setOrganizationDomain("mapnik.org"); QCoreApplication::setApplicationName("Viewer"); - + QSettings settings("viewer.ini",QSettings::IniFormat); - + // register input plug-ins QString plugins_dir = settings.value("mapnik/plugins_dir", QVariant("/usr/local/lib/mapnik2/input/")).toString(); @@ -54,8 +55,8 @@ int main( int argc, char **argv ) freetype_engine::register_fonts(font_dir.toStdString()); } settings.endArray(); - - QApplication app( argc, argv ); + + QApplication app( argc, argv ); MainWindow window; window.show(); if (argc > 1) window.open(argv[1]); @@ -82,5 +83,5 @@ int main( int argc, char **argv ) double scaling_factor = QString(argv[3]).toDouble(&ok); if (ok) window.set_scaling_factor(scaling_factor); } - return app.exec(); + return app.exec(); } diff --git a/demo/viewer/mainwindow.cpp b/demo/viewer/mainwindow.cpp index a4da2a683..d8cda56e1 100644 --- a/demo/viewer/mainwindow.cpp +++ b/demo/viewer/mainwindow.cpp @@ -1,5 +1,6 @@ /* This file is part of Mapnik (c++ mapping toolkit) - * Copyright (C) 2006 Artem Pavlenko + * + * Copyright (C) 2011 Artem Pavlenko * * Mapnik is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -47,42 +48,42 @@ MainWindow::MainWindow() : filename_(), default_extent_(-20037508.3428,-20037508.3428,20037508.3428,20037508.3428) -{ +{ mapWidget_ = new MapWidget(this); - QSplitter *splitter = new QSplitter(this); + QSplitter *splitter = new QSplitter(this); QTabWidget *tabWidget=new QTabWidget; layerTab_ = new LayerTab; layerTab_->setFocusPolicy(Qt::NoFocus); layerTab_->setIconSize(QSize(16,16)); - - //LayerDelegate *delegate = new LayerDelegate(this); + + //LayerDelegate *delegate = new LayerDelegate(this); //layerTab_->setItemDelegate(delegate); //layerTab_->setItemDelegate(new QItemDelegate(this)); //layerTab_->setViewMode(QListView::IconMode); - + layerTab_->setFlow(QListView::TopToBottom); tabWidget->addTab(layerTab_,tr("Layers")); // Styles tab styleTab_ = new StyleTab; - tabWidget->addTab(styleTab_,tr("Styles")); + tabWidget->addTab(styleTab_,tr("Styles")); splitter->addWidget(tabWidget); splitter->addWidget(mapWidget_); QList list; list.push_back(200); list.push_back(600); splitter->setSizes(list); - + mapWidget_->setFocusPolicy(Qt::StrongFocus); mapWidget_->setFocus(); - + //setCentralWidget(mapWidget_); setCentralWidget(splitter); createActions(); createMenus(); createToolBars(); createContextMenu(); - + setWindowTitle(tr("Mapnik Viewer")); status=new QStatusBar(this); status->showMessage(tr("")); @@ -91,11 +92,11 @@ MainWindow::MainWindow() //connect mapview to layerlist connect(mapWidget_, SIGNAL(mapViewChanged()),layerTab_, SLOT(update())); - // slider + // slider connect(slider_,SIGNAL(valueChanged(int)),mapWidget_,SLOT(zoomToLevel(int))); - // + // connect(layerTab_,SIGNAL(update_mapwidget()),mapWidget_,SLOT(updateMap())); - connect(layerTab_,SIGNAL(layerSelected(int)), + connect(layerTab_,SIGNAL(layerSelected(int)), mapWidget_,SLOT(layerSelected(int))); } @@ -128,21 +129,21 @@ void MainWindow::open(QString const& path) { filename_ = path; } - + if (!filename_.isEmpty()) { - + load_map_file(filename_); setWindowTitle(tr("%1 - Mapnik Viewer").arg(filename_)); } - + } void MainWindow::reload() { if (!filename_.isEmpty()) { - + mapnik::box2d bbox = mapWidget_->getMap()->get_current_extent(); load_map_file(filename_); mapWidget_->zoomToBox(bbox); @@ -157,7 +158,7 @@ void MainWindow::save() initialPath, tr("%1 Files (*.xml)") .arg(QString("Mapnik definition"))); - if (!filename.isEmpty()) + if (!filename.isEmpty()) { std::cout<<"saving "<< filename.toStdString() << std::endl; mapnik::save_map(*mapWidget_->getMap(),filename.toStdString()); @@ -166,16 +167,16 @@ void MainWindow::save() void MainWindow::load_map_file(QString const& filename) { - std::cout<<"loading "<< filename.toStdString() << std::endl; + std::cout<<"loading "<< filename.toStdString() << std::endl; unsigned width = mapWidget_->width(); unsigned height = mapWidget_->height(); - boost::shared_ptr map(new mapnik::Map(width,height)); + boost::shared_ptr map(new mapnik::Map(width,height)); mapWidget_->setMap(map); - try - { + try + { mapnik::load_map(*map,filename.toStdString()); } - catch (mapnik::config_error & ex) + catch (mapnik::config_error & ex) { std::cout << ex.what() << "\n"; } @@ -195,7 +196,7 @@ void MainWindow::zoom_to_box() void MainWindow::pan() { - mapWidget_->setTool(MapWidget::Pan); + mapWidget_->setTool(MapWidget::Pan); } void MainWindow::info() @@ -240,7 +241,7 @@ void MainWindow::export_as() tr("%1 Files (*.%2);;All Files (*)") .arg(QString(fileFormat.toUpper())) .arg(QString(fileFormat))); - if (!fileName.isEmpty()) + if (!fileName.isEmpty()) { QPixmap const& pix = mapWidget_->pixmap(); pix.save(fileName); @@ -248,8 +249,8 @@ void MainWindow::export_as() } void MainWindow::print() -{ - +{ + //Q_ASSERT(mapWidget_->pixmap()); //QPrintDialog dialog(&printer, this); //if (dialog.exec()) { @@ -264,31 +265,31 @@ void MainWindow::print() } void MainWindow::createActions() -{ +{ //exportAct = new QAction(tr("&Export as ..."),this); //exportAct->setShortcut(tr("Ctrl+E")); //connect(exportAct, SIGNAL(triggered()), this, SLOT(export_as())); zoomAllAct = new QAction(QIcon(":/images/home.png"),tr("Zoom All"),this); connect(zoomAllAct, SIGNAL(triggered()), this, SLOT(zoom_all())); - + zoomBoxAct = new QAction(QIcon(":/images/zoombox.png"),tr("Zoom To Box"),this); zoomBoxAct->setCheckable(true); connect(zoomBoxAct, SIGNAL(triggered()), this, SLOT(zoom_to_box())); - + panAct = new QAction(QIcon(":/images/pan.png"),tr("Pan"),this); panAct->setCheckable(true); connect(panAct, SIGNAL(triggered()), this, SLOT(pan())); - + infoAct = new QAction(QIcon(":/images/info.png"),tr("Info"),this); infoAct->setCheckable(true); connect(infoAct, SIGNAL(triggered()), this, SLOT(info())); - + toolsGroup=new QActionGroup(this); toolsGroup->addAction(zoomBoxAct); toolsGroup->addAction(panAct); toolsGroup->addAction(infoAct); zoomBoxAct->setChecked(true); - + openAct=new QAction(tr("Open Map definition"),this); connect(openAct,SIGNAL(triggered()),this,SLOT(open())); saveAct=new QAction(tr("Save Map definition"),this); @@ -302,27 +303,27 @@ void MainWindow::createActions() connect(panUpAct, SIGNAL(triggered()), this, SLOT(pan_up())); panDownAct = new QAction(QIcon(":/images/down.png"),tr("&Pan Down"),this); connect(panDownAct, SIGNAL(triggered()), this, SLOT(pan_down())); - + reloadAct = new QAction(QIcon(":/images/reload.png"),tr("Reload"),this); connect(reloadAct, SIGNAL(triggered()), this, SLOT(reload())); - + layerInfo = new QAction(QIcon(":/images/info.png"),tr("&Layer info"),layerTab_); connect(layerInfo, SIGNAL(triggered()), layerTab_,SLOT(layerInfo())); connect(layerTab_, SIGNAL(doubleClicked(QModelIndex const&)), layerTab_,SLOT(layerInfo2(QModelIndex const&))); - foreach (QByteArray format, QImageWriter::supportedImageFormats()) + foreach (QByteArray format, QImageWriter::supportedImageFormats()) { QString text = tr("%1...").arg(QString(format).toUpper()); - + QAction *action = new QAction(text, this); action->setData(format); connect(action, SIGNAL(triggered()), this, SLOT(export_as())); exportAsActs.append(action); } - + printAct = new QAction(QIcon(":/images/print.png"),tr("&Print ..."),this); printAct->setShortcut(tr("Ctrl+E")); connect(printAct, SIGNAL(triggered()), this, SLOT(print())); - + exitAct = new QAction(tr("E&xit"), this); exitAct->setShortcut(tr("Ctrl+Q")); connect(exitAct, SIGNAL(triggered()), this, SLOT(close())); @@ -335,8 +336,8 @@ void MainWindow::createMenus() { exportMenu = new QMenu(tr("&Export As"), this); foreach (QAction *action, exportAsActs) - exportMenu->addAction(action); - + exportMenu->addAction(action); + fileMenu = new QMenu(tr("&File"),this); fileMenu->addAction(openAct); fileMenu->addAction(saveAct); @@ -345,7 +346,7 @@ void MainWindow::createMenus() fileMenu->addSeparator(); fileMenu->addAction(exitAct); menuBar()->addMenu(fileMenu); - + helpMenu = new QMenu(tr("&Help"), this); helpMenu->addAction(aboutAct); menuBar()->addMenu(helpMenu); @@ -377,10 +378,10 @@ void MainWindow::createToolBars() void MainWindow::set_default_extent(double x0,double y0, double x1, double y1) { - try + try { boost::shared_ptr map_ptr = mapWidget_->getMap(); - if (map_ptr) + if (map_ptr) { mapnik::projection prj(map_ptr->srs()); prj.forward(x0,y0); @@ -401,7 +402,7 @@ void MainWindow::set_scaling_factor(double scaling_factor) void MainWindow::zoom_all() { boost::shared_ptr map_ptr = mapWidget_->getMap(); - if (map_ptr) + if (map_ptr) { map_ptr->zoom_all(); mapnik::box2d const& ext = map_ptr->get_current_extent(); diff --git a/demo/viewer/mainwindow.hpp b/demo/viewer/mainwindow.hpp index 2d70210d5..64080cdd1 100644 --- a/demo/viewer/mainwindow.hpp +++ b/demo/viewer/mainwindow.hpp @@ -1,5 +1,6 @@ /* This file is part of Mapnik (c++ mapping toolkit) - * Copyright (C) 2006 Artem Pavlenko + * + * Copyright (C) 2011 Artem Pavlenko * * Mapnik is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -67,7 +68,7 @@ private: void createToolBars(); void createContextMenu(); void load_map_file(QString const& filename); - + QString currentPath; QString filename_; diff --git a/demo/viewer/mapwidget.cpp b/demo/viewer/mapwidget.cpp index d9c72c043..eafdb7adc 100644 --- a/demo/viewer/mapwidget.cpp +++ b/demo/viewer/mapwidget.cpp @@ -1,5 +1,6 @@ /* This file is part of Mapnik (c++ mapping toolkit) - * Copyright (C) 2006 Artem Pavlenko + * + * Copyright (C) 2011 Artem Pavlenko * * Mapnik is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -63,7 +64,7 @@ double scales [] = {279541132.014, 1066.36479192, 533.182395962}; -MapWidget::MapWidget(QWidget *parent) +MapWidget::MapWidget(QWidget *parent) : QWidget(parent), map_(), selected_(1), @@ -90,9 +91,9 @@ void MapWidget::setTool(eTool tool) } void MapWidget::paintEvent(QPaintEvent*) -{ +{ QPainter painter(this); - + if (drag_) { if (cur_tool_ == ZoomToBox) @@ -119,7 +120,7 @@ void MapWidget::paintEvent(QPaintEvent*) } painter.end(); } - + void MapWidget::resizeEvent(QResizeEvent * ev) { if (map_) @@ -128,10 +129,10 @@ void MapWidget::resizeEvent(QResizeEvent * ev) updateMap(); } } - + void MapWidget::mousePressEvent(QMouseEvent* e) { - if (e->button()==Qt::LeftButton) + if (e->button()==Qt::LeftButton) { if (cur_tool_ == ZoomToBox || cur_tool_==Pan) { @@ -142,17 +143,17 @@ void MapWidget::mousePressEvent(QMouseEvent* e) else if (cur_tool_==Info) { if (map_) - { + { QVector > info; - + projection map_proj(map_->srs()); // map projection double scale_denom = scale_denominator(*map_,map_proj.is_geographic()); CoordTransform t(map_->width(),map_->height(),map_->get_current_extent()); - + for (unsigned index = 0; index < map_->layer_count();++index) { if (int(index) != selectedLayer_) continue; - + layer & layer = map_->layers()[index]; if (!layer.isVisible(scale_denom)) continue; std::string name = layer.name(); @@ -163,11 +164,11 @@ void MapWidget::mousePressEvent(QMouseEvent* e) mapnik::proj_transform prj_trans(map_proj,layer_proj); //std::auto_ptr data(new mapnik::memory_datasource); mapnik::featureset_ptr fs = map_->query_map_point(index,x,y); - + if (fs) { feature_ptr feat = fs->next(); - if (feat) + if (feat) { std::map const& props = feat->props(); std::map::const_iterator itr=props.begin(); @@ -180,10 +181,10 @@ void MapWidget::mousePressEvent(QMouseEvent* e) } } typedef mapnik::coord_transform2 path_type; - + for (unsigned i=0; inum_geometries();++i) { - mapnik::geometry_type & geom = feat->get_geometry(i); + mapnik::geometry_type & geom = feat->get_geometry(i); path_type path(t,geom,prj_trans); if (geom.num_points() > 0) { @@ -208,7 +209,7 @@ void MapWidget::mousePressEvent(QMouseEvent* e) } } } - + if (info.size() > 0) { info_dialog info_dlg(info,this); @@ -216,34 +217,34 @@ void MapWidget::mousePressEvent(QMouseEvent* e) break; } } - + // remove annotation layer map_->layers().erase(remove_if(map_->layers().begin(), map_->layers().end(), bind(&layer::name,_1) == "*annotations*") , map_->layers().end()); } - } + } } - else if (e->button()==Qt::RightButton) - { + else if (e->button()==Qt::RightButton) + { //updateMap(); } } - + void MapWidget::mouseMoveEvent(QMouseEvent* e) -{ +{ if (cur_tool_ == ZoomToBox || cur_tool_==Pan) { end_x_ = e->x(); end_y_ = e->y(); update(); - } + } } void MapWidget::mouseReleaseEvent(QMouseEvent* e) { - if (e->button()==Qt::LeftButton) + if (e->button()==Qt::LeftButton) { end_x_ = e->x(); end_y_ = e->y(); @@ -252,7 +253,7 @@ void MapWidget::mouseReleaseEvent(QMouseEvent* e) drag_=false; if (map_) { - CoordTransform t(map_->width(),map_->height(),map_->get_current_extent()); + CoordTransform t(map_->width(),map_->height(),map_->get_current_extent()); box2d box = t.backward(box2d(start_x_,start_y_,end_x_,end_y_)); map_->zoom_to_box(box); updateMap(); @@ -267,7 +268,7 @@ void MapWidget::mouseReleaseEvent(QMouseEvent* e) int cy = int(0.5 * map_->height()); int dx = end_x_ - start_x_; int dy = end_y_ - start_y_; - map_->pan(cx - dx ,cy - dy); + map_->pan(cx - dx ,cy - dy); updateMap(); } } @@ -275,10 +276,10 @@ void MapWidget::mouseReleaseEvent(QMouseEvent* e) } -void MapWidget::keyPressEvent(QKeyEvent *e) +void MapWidget::keyPressEvent(QKeyEvent *e) { std::cout << "key pressed:"<< e->key()<<"\n"; - switch (e->key()) { + switch (e->key()) { case Qt::Key_Minus: zoomOut(); break; @@ -294,10 +295,10 @@ void MapWidget::keyPressEvent(QKeyEvent *e) break; case Qt::Key_Down: panDown(); - break; + break; case Qt::Key_Left: panLeft(); - break; + break; case Qt::Key_Right: panRight(); break; @@ -309,7 +310,7 @@ void MapWidget::keyPressEvent(QKeyEvent *e) break; case 51: zoomToLevel(12); - break; + break; case 52: zoomToLevel(13); break; @@ -318,7 +319,7 @@ void MapWidget::keyPressEvent(QKeyEvent *e) break; case 54: zoomToLevel(15); - break; + break; case 55: zoomToLevel(16); break; @@ -327,12 +328,12 @@ void MapWidget::keyPressEvent(QKeyEvent *e) break; case 57: zoomToLevel(18); - break; + break; default: QWidget::keyPressEvent(e); } - - + + } void MapWidget::zoomToBox(mapnik::box2d const& bbox) @@ -344,7 +345,7 @@ void MapWidget::zoomToBox(mapnik::box2d const& bbox) } } -void MapWidget::defaultView() +void MapWidget::defaultView() { if (map_) { @@ -354,7 +355,7 @@ void MapWidget::defaultView() } } -void MapWidget::zoomIn() +void MapWidget::zoomIn() { if (map_) { @@ -363,7 +364,7 @@ void MapWidget::zoomIn() } } -void MapWidget::zoomOut() +void MapWidget::zoomOut() { if (map_) { @@ -406,12 +407,12 @@ void MapWidget::panLeft() } void MapWidget::panRight() -{ +{ if (map_) { double cx = 0.5*map_->width(); double cy = 0.5*map_->height(); - map_->pan(int(cx + cx * 0.25),int(cy)); + map_->pan(int(cx + cx * 0.25),int(cy)); updateMap(); } } @@ -425,11 +426,11 @@ void MapWidget::zoomToLevel(int level) std::cerr << "scale denominator = " << scale_denom << "\n"; mapnik::box2d ext = map_->get_current_extent(); double width = static_cast(map_->width()); - double height= static_cast(map_->height()); + double height= static_cast(map_->height()); mapnik::coord2d pt = ext.center(); double res = scale_denom * 0.00028; - + mapnik::box2d box(pt.x - 0.5 * width * res, pt.y - 0.5 * height*res, pt.x + 0.5 * width * res, @@ -439,37 +440,37 @@ void MapWidget::zoomToLevel(int level) } } -void MapWidget::export_to_file(unsigned ,unsigned ,std::string const&,std::string const&) +void MapWidget::export_to_file(unsigned ,unsigned ,std::string const&,std::string const&) { //image_32 image(width,height); //agg_renderer renderer(map,image); //renderer.apply(); //image.saveToFile(filename,type); } - + void MapWidget::set_scaling_factor(double scaling_factor) { scaling_factor_ = scaling_factor; } -void MapWidget::updateMap() -{ +void MapWidget::updateMap() +{ if (map_) { unsigned width=map_->width(); unsigned height=map_->height(); - + image_32 buf(width,height); - try + try { mapnik::agg_renderer ren(*map_,buf,scaling_factor_); ren.apply(); - + QImage image((uchar*)buf.raw_data(),width,height,QImage::Format_ARGB32); pix_=QPixmap::fromImage(image.rgbSwapped()); projection prj(map_->srs()); // map projection - + box2d ext = map_->get_current_extent(); double x0 = ext.minx(); double y0 = ext.miny(); diff --git a/demo/viewer/mapwidget.hpp b/demo/viewer/mapwidget.hpp index e2d3c13d3..92cbe7322 100644 --- a/demo/viewer/mapwidget.hpp +++ b/demo/viewer/mapwidget.hpp @@ -1,5 +1,6 @@ /* This file is part of Mapnik (c++ mapping toolkit) - * Copyright (C) 2007 Artem Pavlenko + * + * Copyright (C) 2011 Artem Pavlenko * * Mapnik is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -32,19 +33,19 @@ #include #include -class MapWidget : public QWidget +class MapWidget : public QWidget { Q_OBJECT - - public: - enum eTool + + public: + enum eTool { ZoomToBox = 1, Pan, Info, }; - -private: + +private: boost::shared_ptr map_; int selected_; QPixmap pix_; @@ -64,7 +65,7 @@ public: void setTool(eTool tool); boost::shared_ptr getMap(); inline QPixmap const& pixmap() const { return pix_;} - void setMap(boost::shared_ptr map); + void setMap(boost::shared_ptr map); void defaultView(); void zoomToBox(mapnik::box2d const& box); void zoomIn(); @@ -80,7 +81,7 @@ public slots: void layerSelected(int); signals: void mapViewChanged(); -protected: +protected: void paintEvent(QPaintEvent* ev); void resizeEvent(QResizeEvent* ev); void mousePressEvent(QMouseEvent* e); @@ -89,8 +90,8 @@ protected: void keyPressEvent(QKeyEvent *e); void export_to_file(unsigned width, unsigned height, - std::string const& filename, - std::string const& type); + std::string const& filename, + std::string const& type); }; #endif // MAP_WIDGET_HPP diff --git a/demo/viewer/styles_model.cpp b/demo/viewer/styles_model.cpp index aae9aa9ba..4a0fd0116 100644 --- a/demo/viewer/styles_model.cpp +++ b/demo/viewer/styles_model.cpp @@ -1,5 +1,6 @@ /* This file is part of Mapnik (c++ mapping toolkit) - * Copyright (C) 2007 Artem Pavlenko + * + * Copyright (C) 2011 Artem Pavlenko * * Mapnik is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -38,60 +39,60 @@ class node : private boost::noncopyable virtual QIcon icon() const=0; virtual ~node_base() {} }; - + template struct wrap : public node_base { wrap(T const& obj) : obj_(obj) {} - + ~wrap() {} - + QString name () const { return obj_.name(); } - + QIcon icon() const { return obj_.icon(); } - + T obj_; }; - + public: - template + template node ( T const& obj, node * parent=0) : impl_(new wrap(obj)), parent_(parent) {} - + QString name() const { return impl_->name(); } - + QIcon icon() const { return impl_->icon(); } - + unsigned num_children() const { return children_.count(); } - + node * child(unsigned row) const { return children_.value(row); } - + node * parent() const { return parent_; } - + node * add_child(node * child) { children_.push_back(child); @@ -104,12 +105,12 @@ public: else return 0; } - - ~node() + + ~node() { qDeleteAll(children_); } - + private: boost::scoped_ptr impl_; QList children_; @@ -124,7 +125,7 @@ struct symbolizer_info : public boost::static_visitor boost::ignore_unused_variable_warning(sym); return QString("PointSymbolizer"); } - + QString operator() (mapnik::line_symbolizer const& sym) const { boost::ignore_unused_variable_warning(sym); @@ -148,19 +149,19 @@ struct symbolizer_info : public boost::static_visitor boost::ignore_unused_variable_warning(sym); return QString("PolygonSymbolizer"); } - + QString operator() (mapnik::text_symbolizer const& sym) const { boost::ignore_unused_variable_warning(sym); return QString("TextSymbolizer"); } - + QString operator() (mapnik::shield_symbolizer const& sym) const { boost::ignore_unused_variable_warning(sym); return QString("ShieldSymbolizer"); } - + template QString operator() (T const& ) const { @@ -200,14 +201,14 @@ struct symbolizer_icon : public boost::static_visitor QPixmap pix(48,16); pix.fill(); QPainter painter(&pix); - mapnik::stroke const& strk = sym.get_stroke(); + mapnik::stroke const& strk = sym.get_stroke(); mapnik::color const& col = strk.get_color(); QPen pen(QColor(col.red(),col.green(),col.blue(),col.alpha())); pen.setWidth(strk.get_width()); painter.setPen(pen); painter.drawLine(0,7,47,7); //painter.drawLine(7,15,12,0); - //painter.drawLine(12,0,8,15); + //painter.drawLine(12,0,8,15); return QIcon(pix); } @@ -224,13 +225,13 @@ public: symbolizer_node(mapnik::symbolizer const & sym) : sym_(sym) {} ~symbolizer_node(){} - - QString name() const + + QString name() const { //return QString("Symbolizer:fixme"); return boost::apply_visitor(symbolizer_info(),sym_); } - + QIcon icon() const { return boost::apply_visitor(symbolizer_icon(),sym_);//QIcon(":/images/filter.png"); @@ -248,15 +249,15 @@ public: QString name() const { mapnik::expression_ptr filter = rule_.get_filter(); - + return QString(mapnik::to_expression_string(*filter).c_str()); - } - + } + QIcon icon() const { return QIcon(":/images/filter.png"); } - + private: QString name_; mapnik::rule const& rule_; @@ -268,19 +269,19 @@ public: style_node(QString name, mapnik::feature_type_style const& style) : name_(name), style_(style) {} - + ~style_node() {} - + QString name() const { return name_; } - + QIcon icon() const { return QIcon(":/images/style.png"); } - + private: QString name_; mapnik::feature_type_style const& style_; @@ -292,26 +293,26 @@ public: explicit map_node(boost::shared_ptr map) : map_(map) {} ~map_node() {} - + QString name() const { return QString("Map"); } - + QIcon icon() const { return QIcon(":/images/map.png"); } - + private: boost::shared_ptr map_; }; StyleModel::StyleModel(boost::shared_ptr map, QObject * parent) : QAbstractItemModel(parent), - root_(new node(map_node(map))) + root_(new node(map_node(map))) { - typedef std::map style_type; + typedef std::map style_type; style_type const & styles = map->styles(); style_type::const_iterator itr = styles.begin(); style_type::const_iterator end = styles.end(); @@ -329,22 +330,22 @@ StyleModel::StyleModel(boost::shared_ptr map, QObject * parent) rule_n->add_child(new node(symbolizer_node(*itr3),rule_n)); } } - } + } } StyleModel::~StyleModel() {} -// interface +// interface QModelIndex StyleModel::index (int row, int col, QModelIndex const& parent) const { // qDebug("index() row=%d col=%d parent::internalId() = %lld", row,col,parent.internalId()); node * parent_node; - + if (!parent.isValid()) parent_node = root_.get(); else parent_node = static_cast(parent.internalPointer()); - + node * child_node = parent_node->child(row); if (child_node) return createIndex(row,col,child_node); @@ -358,7 +359,7 @@ QModelIndex StyleModel::parent (QModelIndex const& index) const node * parent_node = child_node->parent(); if (parent_node == root_.get()) return QModelIndex(); - + return createIndex(parent_node->row(),0,parent_node); } @@ -389,7 +390,7 @@ QVariant StyleModel::data(const QModelIndex & index, int role) const { if (role == Qt::DisplayRole) { - + return QVariant(cur_node->name()); } else if ( role == Qt::DecorationRole) diff --git a/demo/viewer/styles_model.hpp b/demo/viewer/styles_model.hpp index 621a3fd33..fc7626484 100644 --- a/demo/viewer/styles_model.hpp +++ b/demo/viewer/styles_model.hpp @@ -1,5 +1,6 @@ /* This file is part of Mapnik (c++ mapping toolkit) - * Copyright (C) 2007 Artem Pavlenko + * + * Copyright (C) 2011 Artem Pavlenko * * Mapnik is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -32,11 +33,11 @@ class StyleModel : public QAbstractItemModel public: StyleModel(boost::shared_ptr map, QObject * parent=0); ~StyleModel(); - // interface + // interface QModelIndex index (int row, int col, QModelIndex const& parent = QModelIndex()) const; QModelIndex parent (QModelIndex const& child) const; int rowCount( QModelIndex const& parent = QModelIndex()) const; - int columnCount( QModelIndex const& parent = QModelIndex()) const; + int columnCount( QModelIndex const& parent = QModelIndex()) const; QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const; private: //boost::shared_ptr map_; diff --git a/include/mapnik/agg_pattern_source.hpp b/include/mapnik/agg_pattern_source.hpp index 1a9046d7d..0f24ddaf4 100644 --- a/include/mapnik/agg_pattern_source.hpp +++ b/include/mapnik/agg_pattern_source.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,15 +19,16 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id$ #ifndef MAPNIK_AGG_PATTERN_SOURCE_HPP #define MAPNIK_AGG_PATTERN_SOURCE_HPP // mapnik #include + // boost #include + // agg #include "agg_color_rgba.h" @@ -61,4 +62,4 @@ private: }; } -#endif //MAPNIK_AGG_PATTERN_SOURCE_HPP +#endif // MAPNIK_AGG_PATTERN_SOURCE_HPP diff --git a/include/mapnik/agg_rasterizer.hpp b/include/mapnik/agg_rasterizer.hpp index 44ee4eee5..49ac23b81 100644 --- a/include/mapnik/agg_rasterizer.hpp +++ b/include/mapnik/agg_rasterizer.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,12 +19,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id$ #ifndef MAPNIK_AGG_RASTERIZER_HPP #define MAPNIK_AGG_RASTERIZER_HPP +// boost #include + +// agg #include "agg_rasterizer_scanline_aa.h" namespace mapnik { @@ -33,4 +35,4 @@ struct rasterizer : agg::rasterizer_scanline_aa<>, boost::noncopyable {}; } -#endif //MAPNIK_AGG_RASTERIZER_HPP +#endif // MAPNIK_AGG_RASTERIZER_HPP diff --git a/include/mapnik/agg_renderer.hpp b/include/mapnik/agg_renderer.hpp index 3e5e218a5..1a74dd461 100644 --- a/include/mapnik/agg_renderer.hpp +++ b/include/mapnik/agg_renderer.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,10 +20,8 @@ * *****************************************************************************/ -//$Id$ - -#ifndef AGG_RENDERER_HPP -#define AGG_RENDERER_HPP +#ifndef MAPNIK_AGG_RENDERER_HPP +#define MAPNIK_AGG_RENDERER_HPP // mapnik #include @@ -134,4 +132,4 @@ private: }; } -#endif //AGG_RENDERER_HPP +#endif // MAPNIK_AGG_RENDERER_HPP diff --git a/include/mapnik/arrow.hpp b/include/mapnik/arrow.hpp index d070427f6..93a56db67 100644 --- a/include/mapnik/arrow.hpp +++ b/include/mapnik/arrow.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,10 +20,8 @@ * *****************************************************************************/ -//$Id$ - -#ifndef ARROW_HPP -#define ARROW_HPP +#ifndef MAPNIK_ARROW_HPP +#define MAPNIK_ARROW_HPP #include @@ -44,4 +42,4 @@ private: }; } -#endif // ARROW_HPP +#endif // MAPNIK_ARROW_HPP diff --git a/include/mapnik/attribute.hpp b/include/mapnik/attribute.hpp index 7a34c30ab..196874392 100644 --- a/include/mapnik/attribute.hpp +++ b/include/mapnik/attribute.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,8 +20,6 @@ * *****************************************************************************/ -//$Id$ - #ifndef MAPNIK_ATTRIBUTE_HPP #define MAPNIK_ATTRIBUTE_HPP diff --git a/include/mapnik/attribute_collector.hpp b/include/mapnik/attribute_collector.hpp index 9f386a582..b9b62a89c 100644 --- a/include/mapnik/attribute_collector.hpp +++ b/include/mapnik/attribute_collector.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,20 +20,20 @@ * *****************************************************************************/ -//$Id$ - -#ifndef ATTRIBUTE_COLLECTOR_HPP -#define ATTRIBUTE_COLLECTOR_HPP +#ifndef MAPNIK_ATTRIBUTE_COLLECTOR_HPP +#define MAPNIK_ATTRIBUTE_COLLECTOR_HPP // mapnik #include #include #include #include + // boost #include #include #include + // stl #include #include @@ -271,4 +271,4 @@ private: } // namespace mapnik -#endif //ATTRIBUTE_COLLECTOR_HPP +#endif // MAPNIK_ATTRIBUTE_COLLECTOR_HPP diff --git a/include/mapnik/attribute_descriptor.hpp b/include/mapnik/attribute_descriptor.hpp index 72e15839c..7ba2e665d 100644 --- a/include/mapnik/attribute_descriptor.hpp +++ b/include/mapnik/attribute_descriptor.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,10 +20,8 @@ * *****************************************************************************/ -//$Id$ - -#ifndef ATTRIBUTE_DESCRIPTOR -#define ATTRIBUTE_DESCRIPTOR +#ifndef MAPNIK_ATTRIBUTE_DESCRIPTOR_HPP +#define MAPNIK_ATTRIBUTE_DESCRIPTOR_HPP #include @@ -118,4 +116,4 @@ operator << (std::basic_ostream& out, } -#endif // ATTRIBUTE_DESCRIPTOR_HPP +#endif // MAPNIK_ATTRIBUTE_DESCRIPTOR_HPP diff --git a/include/mapnik/box2d.hpp b/include/mapnik/box2d.hpp index b9e21ad35..16d7f85c4 100644 --- a/include/mapnik/box2d.hpp +++ b/include/mapnik/box2d.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,16 +20,16 @@ * *****************************************************************************/ -//$Id: box2d.hpp 39 2005-04-10 20:39:53Z pavlenko $ - #ifndef MAPNIK_BOX2D_HPP #define MAPNIK_BOX2D_HPP // mapnik #include #include + // boost #include + // stl #include diff --git a/include/mapnik/cairo_renderer.hpp b/include/mapnik/cairo_renderer.hpp index 60a79b144..821ed1334 100644 --- a/include/mapnik/cairo_renderer.hpp +++ b/include/mapnik/cairo_renderer.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2008 Tom Hughes + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,14 +20,10 @@ * *****************************************************************************/ -//$Id$ - #if defined(HAVE_CAIRO) -#ifndef CAIRO_RENDERER_HPP -#define CAIRO_RENDERER_HPP - - +#ifndef MAPNIK_CAIRO_RENDERER_HPP +#define MAPNIK_CAIRO_RENDERER_HPP // mapnik #include @@ -152,6 +148,6 @@ public: }; } -#endif +#endif // MAPNIK_CAIRO_RENDERER_HPP -#endif //CAIRO_RENDERER_HPP +#endif diff --git a/include/mapnik/color.hpp b/include/mapnik/color.hpp index a923d3223..37c10cc93 100644 --- a/include/mapnik/color.hpp +++ b/include/mapnik/color.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,10 +20,8 @@ * *****************************************************************************/ -//$Id: color.hpp 39 2005-04-10 20:39:53Z pavlenko $ - -#ifndef COLOR_HPP -#define COLOR_HPP +#ifndef MAPNIK_COLOR_HPP +#define MAPNIK_COLOR_HPP // mapnik #include @@ -32,6 +30,7 @@ //boost #include #include + // stl #include @@ -141,4 +140,4 @@ public: } -#endif //COLOR_HPP +#endif // MAPNIK_COLOR_HPP diff --git a/include/mapnik/color_factory.hpp b/include/mapnik/color_factory.hpp index 15a3e07a8..c27af5fa4 100644 --- a/include/mapnik/color_factory.hpp +++ b/include/mapnik/color_factory.hpp @@ -20,8 +20,6 @@ * *****************************************************************************/ -//$Id$ - #ifndef MAPNIK_COLOR_FACTORY_HPP #define MAPNIK_COLOR_FACTORY_HPP @@ -120,4 +118,4 @@ public: #endif -#endif //MAPNIK_COLOR_FACTORY_HPP +#endif // MAPNIK_COLOR_FACTORY_HPP diff --git a/include/mapnik/config.hpp b/include/mapnik/config.hpp index 75a96fa2e..a79ade04d 100644 --- a/include/mapnik/config.hpp +++ b/include/mapnik/config.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,8 +20,8 @@ * *****************************************************************************/ -#ifndef CONFIG_HPP -#define CONFIG_HPP +#ifndef MAPNIK_CONFIG_HPP +#define MAPNIK_CONFIG_HPP // Windows DLL support @@ -47,4 +47,5 @@ #endif #define PROJ_ENVELOPE_POINTS 20 -#endif // CONFIG_HPP + +#endif // MAPNIK_CONFIG_HPP diff --git a/include/mapnik/config_error.hpp b/include/mapnik/config_error.hpp index 933b101ed..c43169e50 100644 --- a/include/mapnik/config_error.hpp +++ b/include/mapnik/config_error.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,8 +20,8 @@ * *****************************************************************************/ -#ifndef MAPNIK_CONFIG_ERROR_INCLUDED -#define MAPNIK_CONFIG_ERROR_INCLUDED +#ifndef MAPNIK_CONFIG_ERROR_HPP +#define MAPNIK_CONFIG_ERROR_HPP #include #include @@ -54,4 +54,4 @@ protected: }; } -#endif // MAPNIK_CONFIG_ERROR_INCLUDED +#endif // MAPNIK_CONFIG_ERROR_HPP diff --git a/include/mapnik/coord.hpp b/include/mapnik/coord.hpp index 6a5fe529d..340929801 100644 --- a/include/mapnik/coord.hpp +++ b/include/mapnik/coord.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,12 +20,13 @@ * *****************************************************************************/ -//$Id: coord.hpp 39 2005-04-10 20:39:53Z pavlenko $ - -#ifndef COORD_HPP -#define COORD_HPP +#ifndef MAPNIK_COORD_HPP +#define MAPNIK_COORD_HPP +// boost #include + +// stl #include #include @@ -187,4 +188,4 @@ operator << (std::basic_ostream& out, } } -#endif // COORD_HPP +#endif // MAPNIK_COORD_HPP diff --git a/include/mapnik/coord_array.hpp b/include/mapnik/coord_array.hpp index 45c76cab7..410e8e5d0 100644 --- a/include/mapnik/coord_array.hpp +++ b/include/mapnik/coord_array.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,13 +20,12 @@ * *****************************************************************************/ -//$Id: coord_array.hpp 39 2005-04-10 20:39:53Z pavlenko $ - -#ifndef COORD_ARRAY_HPP -#define COORD_ARRAY_HPP +#ifndef MAPNIK_COORD_ARRAY_HPP +#define MAPNIK_COORD_ARRAY_HPP //mapnik #include + // stl #include @@ -89,4 +88,4 @@ private: } -#endif //COORD_ARRAY_HPP +#endif // MAPNIK_COORD_ARRAY_HPP diff --git a/include/mapnik/css_color_grammar.hpp b/include/mapnik/css_color_grammar.hpp index 8e04011de..28166b5fb 100644 --- a/include/mapnik/css_color_grammar.hpp +++ b/include/mapnik/css_color_grammar.hpp @@ -20,22 +20,23 @@ * *****************************************************************************/ -//$Id$ - #ifndef MAPNIK_CSS_COLOR_GRAMMAR_HPP #define MAPNIK_CSS_COLOR_GRAMMAR_HPP // mapnik #include + // spirit2 #include #include #include + // phoenix #include #include #include #include + // fusion #include #include @@ -387,4 +388,4 @@ struct css_color_grammar : qi::grammar } -#endif //MAPNIK_CSS_COLOR_GRAMMAR_HPP +#endif // MAPNIK_CSS_COLOR_GRAMMAR_HPP diff --git a/include/mapnik/css_color_grammar_deprecated.hpp b/include/mapnik/css_color_grammar_deprecated.hpp index 1fdd44fb9..336dd2f56 100644 --- a/include/mapnik/css_color_grammar_deprecated.hpp +++ b/include/mapnik/css_color_grammar_deprecated.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2009 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,22 +20,23 @@ * *****************************************************************************/ -//$Id$ - -#ifndef MAPNIK_CSS_COLOR_GRAMMAR_HPP -#define MAPNIK_CSS_COLOR_GRAMMAR_HPP +#ifndef MAPNIK_CSS_COLOR_GRAMMAR_DEPRECATED_HPP +#define MAPNIK_CSS_COLOR_GRAMMAR_DEPRECATED_HPP // mapnik #include + // spirit2 #include #include #include + // phoenix #include #include #include #include + // fusion #include @@ -45,7 +46,6 @@ // stl #include - //BOOST_FUSION_ADAPT_CLASS( // mapnik::color, // (unsigned, unsigned, obj.red(), obj.set_red(val)) @@ -417,4 +417,4 @@ struct css_color_grammar : qi::grammar } -#endif //MAPNIK_CSS_COLOR_GRAMMAR_HPP +#endif // MAPNIK_CSS_COLOR_GRAMMAR_DEPRECATED_HPP diff --git a/include/mapnik/ctrans.hpp b/include/mapnik/ctrans.hpp index c0996f2b8..6fc2297f4 100644 --- a/include/mapnik/ctrans.hpp +++ b/include/mapnik/ctrans.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,10 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id$ -#ifndef CTRANS_HPP -#define CTRANS_HPP +#ifndef MAPNIK_CTRANS_HPP +#define MAPNIK_CTRANS_HPP // mapnik #include @@ -518,4 +517,4 @@ public: }; } -#endif //CTRANS_HPP +#endif // MAPNIK_CTRANS_HPP diff --git a/include/mapnik/datasource.hpp b/include/mapnik/datasource.hpp index f2d34e724..0495ab450 100644 --- a/include/mapnik/datasource.hpp +++ b/include/mapnik/datasource.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,10 +20,9 @@ * *****************************************************************************/ -//$Id: datasource.hpp 43 2005-04-22 18:52:47Z pavlenko $ +#ifndef MAPNIK_DATASOURCE_HPP +#define MAPNIK_DATASOURCE_HPP -#ifndef DATASOURCE_HPP -#define DATASOURCE_HPP // mapnik #include #include @@ -31,9 +30,11 @@ #include #include #include + // boost #include #include + // stl #include #include @@ -142,6 +143,7 @@ typedef boost::shared_ptr datasource_ptr; delete ds; \ } \ // + } -#endif //DATASOURCE_HPP +#endif // MAPNIK_DATASOURCE_HPP diff --git a/include/mapnik/datasource_cache.hpp b/include/mapnik/datasource_cache.hpp index 4a063c826..08cb18a47 100644 --- a/include/mapnik/datasource_cache.hpp +++ b/include/mapnik/datasource_cache.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,18 +20,18 @@ * *****************************************************************************/ -//$Id: datasource_cache.hpp 39 2005-04-10 20:39:53Z pavlenko $ - -#ifndef DATASOURCE_CACHE_HPP -#define DATASOURCE_CACHE_HPP +#ifndef MAPNIK_DATASOURCE_CACHE_HPP +#define MAPNIK_DATASOURCE_CACHE_HPP // mapnik #include #include #include #include + // boost #include + // stl #include @@ -57,4 +57,4 @@ public: }; } -#endif //DATASOURCE_CACHE_HPP +#endif // MAPNIK_DATASOURCE_CACHE_HPP diff --git a/include/mapnik/distance.hpp b/include/mapnik/distance.hpp index ca1b276b7..5c1b8f7eb 100644 --- a/include/mapnik/distance.hpp +++ b/include/mapnik/distance.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,10 +20,8 @@ * *****************************************************************************/ -//$Id$ - -#ifndef DISTANCE_HPP -#define DISTANCE_HPP +#ifndef MAPNIK_DISTANCE_HPP +#define MAPNIK_DISTANCE_HPP #include @@ -52,4 +50,4 @@ public: */ } -#endif // GEO_UTILS_HPP +#endif // MAPNIK_DISTANCE_HPP diff --git a/include/mapnik/ellipsoid.hpp b/include/mapnik/ellipsoid.hpp index 14ea28f50..82c3e7231 100644 --- a/include/mapnik/ellipsoid.hpp +++ b/include/mapnik/ellipsoid.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,8 +20,6 @@ * *****************************************************************************/ -//$Id$ - #ifndef MAPNIK_ELLIPSOID_HPP #define MAPNIK_ELLIPSOID_HPP diff --git a/include/mapnik/enumeration.hpp b/include/mapnik/enumeration.hpp index f93cffc2c..19ffc2828 100644 --- a/include/mapnik/enumeration.hpp +++ b/include/mapnik/enumeration.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,11 +20,13 @@ * *****************************************************************************/ -#ifndef MAPNIK_ENUMERATION_INCLUDED -#define MAPNIK_ENUMERATION_INCLUDED +#ifndef MAPNIK_ENUMERATION_HPP +#define MAPNIK_ENUMERATION_HPP +// mapnik #include +// stl #include #include #include @@ -325,4 +327,4 @@ operator>>(std::istream & is, mapnik::enumeration & e) template <> std::string name ::our_name_ = #name; \ template <> bool name ::our_verified_flag_( name ::verify(__FILE__, __LINE__)); -#endif // MAPNIK_ENUMERATION_INCLUDED +#endif // MAPNIK_ENUMERATION_HPP diff --git a/include/mapnik/expression_evaluator.hpp b/include/mapnik/expression_evaluator.hpp index ad8cfad30..3c1fe7c3b 100644 --- a/include/mapnik/expression_evaluator.hpp +++ b/include/mapnik/expression_evaluator.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2009 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,8 +20,6 @@ * *****************************************************************************/ -//$Id$ - #ifndef MAPNIK_EXPRESSION_EVALUATOR_HPP #define MAPNIK_EXPRESSION_EVALUATOR_HPP @@ -104,4 +102,4 @@ struct evaluate : boost::static_visitor } -#endif //MAPNIK_EXPRESSION_EVALUATOR_HPP +#endif // MAPNIK_EXPRESSION_EVALUATOR_HPP diff --git a/include/mapnik/expression_grammar.hpp b/include/mapnik/expression_grammar.hpp index 8f6a4f1e2..8f91aaf52 100644 --- a/include/mapnik/expression_grammar.hpp +++ b/include/mapnik/expression_grammar.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2009 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,8 +20,6 @@ * *****************************************************************************/ -//$Id$ - #ifndef MAPNIK_EXPRESSIONS_GRAMMAR_HPP #define MAPNIK_EXPRESSIONS_GRAMMAR_HPP @@ -34,12 +32,15 @@ #include #include #include -//spirit2 + +// spirit2 #include #include -//fusion + +// fusion #include -//phoenix + +// phoenix #include #include #include diff --git a/include/mapnik/expression_node.hpp b/include/mapnik/expression_node.hpp index e8bbda615..c83ed795d 100644 --- a/include/mapnik/expression_node.hpp +++ b/include/mapnik/expression_node.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2009 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,12 +20,13 @@ * *****************************************************************************/ -#ifndef MAPNIK_EXPRESSION_NODE_HPP -#define MAPNIK_EXPRESSION_NODE_HPP +#ifndef MAPNIK_EXPRESSION_NODE_HPP +#define MAPNIK_EXPRESSION_NODE_HPP // mapnik #include #include + // boost #include #include diff --git a/include/mapnik/expression_string.hpp b/include/mapnik/expression_string.hpp index e55ebbf53..1f8279a87 100644 --- a/include/mapnik/expression_string.hpp +++ b/include/mapnik/expression_string.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2009 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,14 +20,13 @@ * *****************************************************************************/ -//$Id$ - #ifndef MAPNIK_EXPRESSION_STRING_HPP #define MAPNIK_EXPRESSION_STRING_HPP // mapnik #include #include + // stl #include diff --git a/include/mapnik/factory.hpp b/include/mapnik/factory.hpp index 28baa9327..71d09d703 100644 --- a/include/mapnik/factory.hpp +++ b/include/mapnik/factory.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,13 +20,12 @@ * *****************************************************************************/ -//$Id: factory.hpp 39 2005-04-10 20:39:53Z pavlenko $ - -#ifndef FACTORY_HPP -#define FACTORY_HPP +#ifndef MAPNIK_FACTORY_HPP +#define MAPNIK_FACTORY_HPP // mapnik #include + // stl #include #include @@ -89,4 +88,4 @@ public: }; } -#endif //FACTORY_HPP +#endif // MAPNIK_FACTORY_HPP diff --git a/include/mapnik/fastmath.hpp b/include/mapnik/fastmath.hpp index 78259e5a9..c5b086727 100644 --- a/include/mapnik/fastmath.hpp +++ b/include/mapnik/fastmath.hpp @@ -20,8 +20,8 @@ * *****************************************************************************/ -#ifndef FASTMATH_HPP -#define FASTMATH_HPP +#ifndef MAPNIK_FASTMATH_HPP +#define MAPNIK_FASTMATH_HPP /* Timings: * fast_sin(not inlined) 8.95s @@ -109,4 +109,4 @@ static inline double fast_atan2(double y, double x) return result; } -#endif // FASTMATH_HPP +#endif // MAPNIK_FASTMATH_HPP diff --git a/include/mapnik/feature.hpp b/include/mapnik/feature.hpp index f36aa7d0e..087776799 100644 --- a/include/mapnik/feature.hpp +++ b/include/mapnik/feature.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,10 +20,9 @@ * *****************************************************************************/ -//$Id: feature.hpp 40 2005-04-13 20:20:46Z pavlenko $ +#ifndef MAPNIK_FEATURE_HPP +#define MAPNIK_FEATURE_HPP -#ifndef FEATURE_HPP -#define FEATURE_HPP // mapnik #include #include @@ -36,9 +35,9 @@ #else #include #endif - #include #include + // stl #include @@ -181,4 +180,4 @@ inline std::ostream& operator<< (std::ostream & out,Feature const& f) } } -#endif //FEATURE_HPP +#endif // MAPNIK_FEATURE_HPP diff --git a/include/mapnik/feature_factory.hpp b/include/mapnik/feature_factory.hpp index 2383e3b50..dd550a16d 100644 --- a/include/mapnik/feature_factory.hpp +++ b/include/mapnik/feature_factory.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,12 +20,13 @@ * *****************************************************************************/ -//$Id$ - -#ifndef FEATURE_FACTORY_HPP -#define FEATURE_FACTORY_HPP +#ifndef MAPNIK_FEATURE_FACTORY_HPP +#define MAPNIK_FEATURE_FACTORY_HPP +// mapnik #include + +// boost #include //#include @@ -39,8 +40,7 @@ struct feature_factory //return boost::allocate_shared(boost::fast_pool_allocator(),fid); return boost::make_shared(fid); } - }; } -#endif //FEATURE_FACTORY_HPP +#endif // MAPNIK_FEATURE_FACTORY_HPP diff --git a/include/mapnik/feature_layer_desc.hpp b/include/mapnik/feature_layer_desc.hpp index 8ae1363f5..14adb6d4e 100644 --- a/include/mapnik/feature_layer_desc.hpp +++ b/include/mapnik/feature_layer_desc.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,14 +20,13 @@ * *****************************************************************************/ -//$Id$ - -#ifndef FEATURE_LAYER_DESC_HPP -#define FEATURE_LAYER_DESC_HPP +#ifndef MAPNIK_FEATURE_LAYER_DESC_HPP +#define MAPNIK_FEATURE_LAYER_DESC_HPP // mapnik #include +// stl #include #include #include @@ -106,4 +105,4 @@ operator << (std::basic_ostream& out, } } -#endif //FEATURE_LAYER_DESC_HPP +#endif // MAPNIK_FEATURE_LAYER_DESC_HPP diff --git a/include/mapnik/feature_style_processor.hpp b/include/mapnik/feature_style_processor.hpp index 6c944d979..d0e1b3b99 100644 --- a/include/mapnik/feature_style_processor.hpp +++ b/include/mapnik/feature_style_processor.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,10 +20,8 @@ * *****************************************************************************/ -//$Id$ - -#ifndef FEATURE_STYLE_PROCESSOR_HPP -#define FEATURE_STYLE_PROCESSOR_HPP +#ifndef MAPNIK_FEATURE_STYLE_PROCESSOR_HPP +#define MAPNIK_FEATURE_STYLE_PROCESSOR_HPP #include #include @@ -74,4 +72,4 @@ private: }; } -#endif //FEATURE_STYLE_PROCESSOR_HPP +#endif // MAPNIK_FEATURE_STYLE_PROCESSOR_HPP diff --git a/include/mapnik/feature_type_style.hpp b/include/mapnik/feature_type_style.hpp index 829d36c82..d1a0fc6e1 100644 --- a/include/mapnik/feature_type_style.hpp +++ b/include/mapnik/feature_type_style.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,14 +20,14 @@ * *****************************************************************************/ -//$Id$ +#ifndef MAPNIK_FEATURE_TYPE_STYLE_HPP +#define MAPNIK_FEATURE_TYPE_STYLE_HPP -#ifndef FEATURE_TYPE_STYLE_HPP -#define FEATURE_TYPE_STYLE_HPP // mapnik #include #include #include + // stl #include @@ -69,4 +69,4 @@ public: }; } -#endif //FEATURE_TYPE_STYLE_HPP +#endif // MAPNIK_FEATURE_TYPE_STYLE_HPP diff --git a/include/mapnik/fill.hpp b/include/mapnik/fill.hpp index 2762e8806..a802c4925 100644 --- a/include/mapnik/fill.hpp +++ b/include/mapnik/fill.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,17 +20,16 @@ * *****************************************************************************/ -//$Id$ - -#ifndef FILL_HPP -#define FILL_HPP +#ifndef MAPNIK_FILL_HPP +#define MAPNIK_FILL_HPP namespace mapnik { + class fill { - }; + } -#endif //FILL_HPP +#endif // MAPNIK_FILL_HPP diff --git a/include/mapnik/filter_factory.hpp b/include/mapnik/filter_factory.hpp index 79709c4f6..3e25c4014 100644 --- a/include/mapnik/filter_factory.hpp +++ b/include/mapnik/filter_factory.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006-2009 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,14 +20,13 @@ * *****************************************************************************/ -//$Id$ - #ifndef MAPNIK_FILTER_FACTORY_HPP #define MAPNIK_FILTER_FACTORY_HPP // mapnik #include #include + // stl #include @@ -41,4 +40,4 @@ MAPNIK_DECL expression_ptr parse_expression (std::string const& wkt); } -#endif //MAPNIK_FILTER_FACTORY_HPP +#endif // MAPNIK_FILTER_FACTORY_HPP diff --git a/include/mapnik/filter_featureset.hpp b/include/mapnik/filter_featureset.hpp index 866f33583..37b57803f 100644 --- a/include/mapnik/filter_featureset.hpp +++ b/include/mapnik/filter_featureset.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,11 +20,10 @@ * *****************************************************************************/ -//$Id$ - #ifndef MAPNIK_FILTER_FEATURESET_HPP #define MAPNIK_FILTER_FEATURESET_HPP +// mapnik #include namespace mapnik { @@ -54,4 +53,4 @@ private: }; } -#endif //MAPNIK_FILTER_FEATURESET_HPP +#endif // MAPNIK_FILTER_FEATURESET_HPP diff --git a/include/mapnik/font_engine_freetype.hpp b/include/mapnik/font_engine_freetype.hpp index eaa464ace..5754e6471 100644 --- a/include/mapnik/font_engine_freetype.hpp +++ b/include/mapnik/font_engine_freetype.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,10 +20,9 @@ * *****************************************************************************/ -//$Id$ +#ifndef MAPNIK_FONT_ENGINE_FREETYPE_HPP +#define MAPNIK_FONT_ENGINE_FREETYPE_HPP -#ifndef FONT_ENGINE_FREETYPE_HPP -#define FONT_ENGINE_FREETYPE_HPP // mapnik #include #include @@ -50,7 +49,6 @@ extern "C" #include #endif - // stl #include #include @@ -602,4 +600,4 @@ private: }; } -#endif // FONT_ENGINE_FREETYPE_HPP +#endif // MAPNIK_FONT_ENGINE_FREETYPE_HPP diff --git a/include/mapnik/font_set.hpp b/include/mapnik/font_set.hpp index 7ce08db5e..11c73a316 100644 --- a/include/mapnik/font_set.hpp +++ b/include/mapnik/font_set.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,10 +20,8 @@ * *****************************************************************************/ -//$Id$ - -#ifndef FONT_SET_HPP -#define FONT_SET_HPP +#ifndef MAPNIK_FONT_SET_HPP +#define MAPNIK_FONT_SET_HPP // mapnik #include @@ -52,4 +50,4 @@ private: }; } -#endif //FONT_SET_HPP +#endif // MAPNIK_FONT_SET_HPP diff --git a/include/mapnik/gamma.hpp b/include/mapnik/gamma.hpp index c24dfa44a..5267c3e89 100644 --- a/include/mapnik/gamma.hpp +++ b/include/mapnik/gamma.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,10 +20,8 @@ * *****************************************************************************/ -//$Id: gamma.hpp 39 2005-04-10 20:39:53Z pavlenko $ - -#ifndef GAMMA_HPP -#define GAMMA_HPP +#ifndef MAPNIK_GAMMA_HPP +#define MAPNIK_GAMMA_HPP #include @@ -50,4 +48,4 @@ struct MAPNIK_DECL gamma }; } -#endif //GAMMA_HPP +#endif // MAPNIK_GAMMA_HPP diff --git a/include/mapnik/geom_util.hpp b/include/mapnik/geom_util.hpp index f01b678e8..87c91e02a 100644 --- a/include/mapnik/geom_util.hpp +++ b/include/mapnik/geom_util.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,15 +20,16 @@ * *****************************************************************************/ -//$Id: geom_util.hpp 39 2005-04-10 20:39:53Z pavlenko $ +#ifndef MAPNIK_GEOM_UTIL_HPP +#define MAPNIK_GEOM_UTIL_HPP -#ifndef GEOM_UTIL_HPP -#define GEOM_UTIL_HPP // mapnik #include #include + // boost #include + // stl #include @@ -217,4 +218,4 @@ struct filter_at_point }; } -#endif //GEOM_UTIL_HPP +#endif // MAPNIK_GEOM_UTIL_HPP diff --git a/include/mapnik/geometry.hpp b/include/mapnik/geometry.hpp index 33153b9e9..f083d5102 100644 --- a/include/mapnik/geometry.hpp +++ b/include/mapnik/geometry.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,15 +20,14 @@ * *****************************************************************************/ -//$Id: geometry.hpp 39 2005-04-10 20:39:53Z pavlenko $ - -#ifndef GEOMETRY_HPP -#define GEOMETRY_HPP +#ifndef MAPNIK_GEOMETRY_HPP +#define MAPNIK_GEOMETRY_HPP // mapnik #include #include #include + // boost #include #include @@ -392,4 +391,4 @@ typedef boost::ptr_vector geometry_containter; } -#endif //GEOMETRY_HPP +#endif // MAPNIK_GEOMETRY_HPP diff --git a/include/mapnik/global.hpp b/include/mapnik/global.hpp index 55eb6f1b1..f834552c7 100644 --- a/include/mapnik/global.hpp +++ b/include/mapnik/global.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,14 +20,13 @@ * *****************************************************************************/ -//$Id$ - -#ifndef GLOBAL_HPP -#define GLOBAL_HPP +#ifndef MAPNIK_GLOBAL_HPP +#define MAPNIK_GLOBAL_HPP // boost #include #include + // stl #include @@ -183,4 +182,4 @@ inline double round (double val) -#endif //GLOBAL_HPP +#endif // MAPNIK_GLOBAL_HPP diff --git a/include/mapnik/glyph_symbolizer.hpp b/include/mapnik/glyph_symbolizer.hpp index a45830a08..25daf62b8 100644 --- a/include/mapnik/glyph_symbolizer.hpp +++ b/include/mapnik/glyph_symbolizer.hpp @@ -1,5 +1,27 @@ -#ifndef GLYPH_SYMBOLIZER_HPP -#define GLYPH_SYMBOLIZER_HPP +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2011 Artem Pavlenko + * + * 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 + * + *****************************************************************************/ + +#ifndef MAPNIK_GLYPH_SYMBOLIZER_HPP +#define MAPNIK_GLYPH_SYMBOLIZER_HPP // mapnik #include @@ -190,4 +212,4 @@ private: } // end mapnik namespace -#endif +#endif // MAPNIK_GLYPH_SYMBOLIZER_HPP diff --git a/include/mapnik/gradient.hpp b/include/mapnik/gradient.hpp index a1d029e38..896765133 100644 --- a/include/mapnik/gradient.hpp +++ b/include/mapnik/gradient.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,11 +19,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id$ -#ifndef GRADIENT_HPP -#define GRADIENT_HPP +#ifndef MAPNIK_GRADIENT_HPP +#define MAPNIK_GRADIENT_HPP +// agg #include // mapnik @@ -104,4 +104,4 @@ private: }; } -#endif //GRADIENT_HPP +#endif // MAPNIK_GRADIENT_HPP diff --git a/include/mapnik/graphics.hpp b/include/mapnik/graphics.hpp index 421e29287..6774da392 100644 --- a/include/mapnik/graphics.hpp +++ b/include/mapnik/graphics.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,10 +20,8 @@ * *****************************************************************************/ -//$Id: graphics.hpp 39 2005-04-10 20:39:53Z pavlenko $ - -#ifndef GRAPHICS_HPP -#define GRAPHICS_HPP +#ifndef MAPNIK_GRAPHICS_HPP +#define MAPNIK_GRAPHICS_HPP // mapnik #include @@ -520,4 +518,5 @@ public: } }; } -#endif //GRAPHICS_HPP + +#endif // MAPNIK_GRAPHICS_HPP diff --git a/include/mapnik/hextree.hpp b/include/mapnik/hextree.hpp index c9f1265e5..9c42d5798 100644 --- a/include/mapnik/hextree.hpp +++ b/include/mapnik/hextree.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,10 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id$ -#ifndef _HEXTREE_HPP_ -#define _HEXTREE_HPP_ +#ifndef MAPNIK_HEXTREE_HPP +#define MAPNIK_HEXTREE_HPP // mapnik #include @@ -455,4 +454,4 @@ private: }; } // namespace mapnik -#endif // _HEXTREE_HPP_ +#endif // MAPNIK_HEXTREE_HPP diff --git a/include/mapnik/hit_test_filter.hpp b/include/mapnik/hit_test_filter.hpp index 702d7d250..67c3837ca 100644 --- a/include/mapnik/hit_test_filter.hpp +++ b/include/mapnik/hit_test_filter.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,11 +20,10 @@ * *****************************************************************************/ -//$Id$ - -#ifndef HIT_TEST_FILTER_HPP -#define HIT_TEST_FILTER_HPP +#ifndef MAPNIK_HIT_TEST_FILTER_HPP +#define MAPNIK_HIT_TEST_FILTER_HPP +// mapnik #include namespace mapnik { @@ -54,4 +53,4 @@ private: }; } -#endif // HIT_TEST_FILTER_HPP +#endif // MAPNIK_HIT_TEST_FILTER_HPP diff --git a/include/mapnik/image_compositing.hpp b/include/mapnik/image_compositing.hpp index adf5df9ab..dcd35676e 100644 --- a/include/mapnik/image_compositing.hpp +++ b/include/mapnik/image_compositing.hpp @@ -20,10 +20,8 @@ * *****************************************************************************/ -//$Id$ - -#ifndef IMAGE_COMPOSITING_HPP -#define IMAGE_COMPOSITING_HPP +#ifndef MAPNIK_IMAGE_COMPOSITING_HPP +#define MAPNIK_IMAGE_COMPOSITING_HPP // agg #include "agg_rendering_buffer.h" @@ -186,4 +184,4 @@ void composite(T1 & im, T2 & im2, composite_mode_e mode) } -#endif // IMAGE_COMPOSITING_HPP +#endif // MAPNIK_IMAGE_COMPOSITING_HPP diff --git a/include/mapnik/image_data.hpp b/include/mapnik/image_data.hpp index 3b8de2bea..d381f1393 100644 --- a/include/mapnik/image_data.hpp +++ b/include/mapnik/image_data.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,12 +20,13 @@ * *****************************************************************************/ -//$Id: image_data.hpp 39 2005-04-10 20:39:53Z pavlenko $ - -#ifndef IMAGE_DATA_HPP -#define IMAGE_DATA_HPP +#ifndef MAPNIK_IMAGE_DATA_HPP +#define MAPNIK_IMAGE_DATA_HPP +// mapnik #include + +// stl #include #include @@ -139,4 +140,4 @@ typedef ImageData image_data_32; typedef ImageData image_data_8; } -#endif //IMAGE_DATA_HPP +#endif // MAPNIK_IMAGE_DATA_HPP diff --git a/include/mapnik/image_reader.hpp b/include/mapnik/image_reader.hpp index 36074ea9f..144863c1e 100644 --- a/include/mapnik/image_reader.hpp +++ b/include/mapnik/image_reader.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,13 +20,13 @@ * *****************************************************************************/ -//$Id: image_reader.hpp 39 2005-04-10 20:39:53Z pavlenko $ +#ifndef MAPNIK_IMAGE_READER_HPP +#define MAPNIK_IMAGE_READER_HPP -#ifndef IMAGE_READER_HPP -#define IMAGE_READER_HPP // mapnik #include #include + // stl #include #include @@ -63,4 +63,4 @@ MAPNIK_DECL image_reader* get_image_reader(const std::string& file); } -#endif //IMAGE_READER_HPP +#endif // MAPNIK_IMAGE_READER_HPP diff --git a/include/mapnik/image_util.hpp b/include/mapnik/image_util.hpp index 2f8aff77d..3f621dff8 100644 --- a/include/mapnik/image_util.hpp +++ b/include/mapnik/image_util.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,10 +20,8 @@ * *****************************************************************************/ -//$Id: image_util.hpp 39 2005-04-10 20:39:53Z pavlenko $ - -#ifndef IMAGE_UTIL_HPP -#define IMAGE_UTIL_HPP +#ifndef MAPNIK_IMAGE_UTIL_HPP +#define MAPNIK_IMAGE_UTIL_HPP // mapnik #include @@ -298,4 +296,4 @@ template MAPNIK_DECL std::string save_to_string > (ima } -#endif //IMAGE_UTIL_HPP +#endif // MAPNIK_IMAGE_UTIL_HPP diff --git a/include/mapnik/image_view.hpp b/include/mapnik/image_view.hpp index 45498b204..c942d17d2 100644 --- a/include/mapnik/image_view.hpp +++ b/include/mapnik/image_view.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,11 +20,8 @@ * *****************************************************************************/ -//$Id$ - -#ifndef IMAGE_VIEW_HPP -#define IMAGE_VIEW_HPP - +#ifndef MAPNIK_IMAGE_VIEW_HPP +#define MAPNIK_IMAGE_VIEW_HPP namespace mapnik { @@ -107,5 +104,5 @@ private: }; } -#endif // IMAGE_VIEW_HPP +#endif // MAPNIK_IMAGE_VIEW_HPP diff --git a/include/mapnik/jpeg_io.hpp b/include/mapnik/jpeg_io.hpp index 33a7fba74..f5d96bc71 100644 --- a/include/mapnik/jpeg_io.hpp +++ b/include/mapnik/jpeg_io.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,8 +20,6 @@ * *****************************************************************************/ -//$Id$ - #ifndef MAPNIK_JPEG_IO_HPP #define MAPNIK_JPEG_IO_HPP diff --git a/include/mapnik/label_collision_detector.hpp b/include/mapnik/label_collision_detector.hpp index b9da67595..48de5f647 100644 --- a/include/mapnik/label_collision_detector.hpp +++ b/include/mapnik/label_collision_detector.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,13 +20,12 @@ * *****************************************************************************/ -//$Id$ - -#ifndef LABEL_COLLISION_DETECTOR_HPP -#define LABEL_COLLISION_DETECTOR_HPP +#ifndef MAPNIK_LABEL_COLLISION_DETECTOR_HPP +#define MAPNIK_LABEL_COLLISION_DETECTOR_HPP // mapnik #include + // stl #include #include @@ -233,4 +232,4 @@ public: }; } -#endif // LABEL_COLLISION_DETECTOR_HPP +#endif // MAPNIK_LABEL_COLLISION_DETECTOR_HPP diff --git a/include/mapnik/label_placement.hpp b/include/mapnik/label_placement.hpp index c1bdbad96..a667516a9 100644 --- a/include/mapnik/label_placement.hpp +++ b/include/mapnik/label_placement.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,10 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id$ -#ifndef LABEL_PLACEMENT_HPP -#define LABEL_PLACEMENT_HPP +#ifndef MAPNIK_LABEL_PLACEMENT_HPP +#define MAPNIK_LABEL_PLACEMENT_HPP namespace mapnik { @@ -51,4 +50,4 @@ public: }; } -#endif //LABEL_PLACEMENT_HPP +#endif // MAPNIK_LABEL_PLACEMENT_HPP diff --git a/include/mapnik/layer.hpp b/include/mapnik/layer.hpp index d4d4c7ea4..337bc1872 100644 --- a/include/mapnik/layer.hpp +++ b/include/mapnik/layer.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,10 +19,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id: layer.hpp 39 2005-04-10 20:39:53Z pavlenko $ -#ifndef LAYER_HPP -#define LAYER_HPP +#ifndef MAPNIK_LAYER_HPP +#define MAPNIK_LAYER_HPP + // mapnik #include #include @@ -217,4 +217,4 @@ private: }; } -#endif //LAYER_HPP +#endif // MAPNIK_LAYER_HPP diff --git a/include/mapnik/libxml2_loader.hpp b/include/mapnik/libxml2_loader.hpp index d81e14187..c4e5ca893 100644 --- a/include/mapnik/libxml2_loader.hpp +++ b/include/mapnik/libxml2_loader.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,11 +20,13 @@ * *****************************************************************************/ -#ifndef LIBXML2_LOADER_INCLUDED -#define LIBXML2_LOADER_INCLUDED +#ifndef MAPNIK_LIBXML2_LOADER_HPP +#define MAPNIK_LIBXML2_LOADER_HPP +// boost #include +// stl #include namespace mapnik @@ -33,4 +35,4 @@ void read_xml2( std::string const & filename, boost::property_tree::ptree & pt); void read_xml2_string( std::string const & str, boost::property_tree::ptree & pt, std::string const & base_path=""); } -#endif // LIBXML2_LOADER_INCLUDED +#endif // MAPNIK_LIBXML2_LOADER_HPP diff --git a/include/mapnik/line_pattern_symbolizer.hpp b/include/mapnik/line_pattern_symbolizer.hpp index 88cea4082..8a65bf043 100644 --- a/include/mapnik/line_pattern_symbolizer.hpp +++ b/include/mapnik/line_pattern_symbolizer.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,10 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id: polygon_symbolizer.hpp 39 2005-04-10 20:39:53Z pavlenko $ -#ifndef LINE_PATTERN_SYMBOLIZER_HPP -#define LINE_PATTERN_SYMBOLIZER_HPP +#ifndef MAPNIK_LINE_PATTERN_SYMBOLIZER_HPP +#define MAPNIK_LINE_PATTERN_SYMBOLIZER_HPP // mapnik #include @@ -38,4 +37,4 @@ struct MAPNIK_DECL line_pattern_symbolizer : }; } -#endif // LINE_PATTERN_SYMBOLIZER_HPP +#endif // MAPNIK_LINE_PATTERN_SYMBOLIZER_HPP diff --git a/include/mapnik/line_symbolizer.hpp b/include/mapnik/line_symbolizer.hpp index e76eccbb2..39df6685d 100644 --- a/include/mapnik/line_symbolizer.hpp +++ b/include/mapnik/line_symbolizer.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,11 +19,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id: line_symbolizer.hpp 39 2005-04-10 20:39:53Z pavlenko $ -#ifndef LINE_SYMBOLIZER_HPP -#define LINE_SYMBOLIZER_HPP +#ifndef MAPNIK_LINE_SYMBOLIZER_HPP +#define MAPNIK_LINE_SYMBOLIZER_HPP +// mapnik #include #include #include @@ -82,4 +82,4 @@ private: }; } -#endif //LINE_SYMBOLIZER_HPP +#endif // MAPNIK_LINE_SYMBOLIZER_HPP diff --git a/include/mapnik/load_map.hpp b/include/mapnik/load_map.hpp index 84d35a19f..3a22c6f93 100644 --- a/include/mapnik/load_map.hpp +++ b/include/mapnik/load_map.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,16 +19,18 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -// $Id$ -#ifndef MAP_LOADER_HPP -#define MAP_LOADER_HPP +#ifndef MAPNIK_LOAD_MAP_HPP +#define MAPNIK_LOAD_MAP_HPP #ifdef HAVE_CONFIG_H #include #endif +// mapnik #include + +// stl #include namespace mapnik @@ -37,4 +39,4 @@ MAPNIK_DECL void load_map(Map & map, std::string const& filename, bool strict = MAPNIK_DECL void load_map_string(Map & map, std::string const& str, bool strict = false, std::string const& base_path=""); } -#endif // LOAD_MAP_HPP +#endif // MAPNIK_LOAD_MAP_HPP diff --git a/include/mapnik/map.hpp b/include/mapnik/map.hpp index 9cc58116f..2be677e24 100644 --- a/include/mapnik/map.hpp +++ b/include/mapnik/map.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,10 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id: map.hpp 39 2005-04-10 20:39:53Z pavlenko $ -#ifndef MAP_HPP -#define MAP_HPP +#ifndef MAPNIK_MAP_HPP +#define MAPNIK_MAP_HPP #ifdef HAVE_CONFIG_H #include @@ -461,4 +460,4 @@ private: DEFINE_ENUM(aspect_fix_mode_e,Map::aspect_fix_mode); } -#endif //MAP_HPP +#endif // MAPNIK_MAP_HPP diff --git a/include/mapnik/mapped_memory_cache.hpp b/include/mapnik/mapped_memory_cache.hpp index b143a6f30..d6bb27f5c 100644 --- a/include/mapnik/mapped_memory_cache.hpp +++ b/include/mapnik/mapped_memory_cache.hpp @@ -20,21 +20,19 @@ * *****************************************************************************/ -//$Id$ - -#ifndef MEMORY_REGION_CACHE_HPP -#define MEMORY_REGION_CACHE_HPP +#ifndef MAPNIK_MAPPED_MEMORY_CACHE_HPP +#define MAPNIK_MAPPED_MEMORY_CACHE_HPP // mapnik #include #include + // boost #include #include #include #include #include - #ifdef MAPNIK_THREADSAFE #include #endif @@ -61,5 +59,5 @@ struct MAPNIK_DECL mapped_memory_cache : } -#endif // MAPNIK_MARKER_CACHE_HPP +#endif // MAPNIK_MAPPED_MEMORY_CACHE_HPP diff --git a/include/mapnik/marker.hpp b/include/mapnik/marker.hpp index 1fd9918ca..571180ecd 100644 --- a/include/mapnik/marker.hpp +++ b/include/mapnik/marker.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,18 +20,19 @@ * *****************************************************************************/ -//$Id: image_data.hpp 39 2005-04-10 20:39:53Z pavlenko $ - -#ifndef MARKER_HPP -#define MARKER_HPP +#ifndef MAPNIK_MARKER_HPP +#define MAPNIK_MARKER_HPP +// mapnik #include #include #include #include #include +// agg #include "agg_path_storage.h" + // boost #include #include @@ -39,6 +40,7 @@ #include #include +// stl #include #include @@ -125,4 +127,4 @@ private: } -#endif //MARKER_HPP +#endif // MAPNIK_MARKER_HPP diff --git a/include/mapnik/marker_cache.hpp b/include/mapnik/marker_cache.hpp index 9c8c620fb..7595334ea 100644 --- a/include/mapnik/marker_cache.hpp +++ b/include/mapnik/marker_cache.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2009 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,8 +20,6 @@ * *****************************************************************************/ -//$Id$ - #ifndef MAPNIK_MARKER_CACHE_HPP #define MAPNIK_MARKER_CACHE_HPP @@ -32,8 +30,10 @@ #include #include #include + // agg #include "agg_path_storage.h" + // boost #include #include diff --git a/include/mapnik/markers_placement.hpp b/include/mapnik/markers_placement.hpp index d2519af61..259fd4ae4 100644 --- a/include/mapnik/markers_placement.hpp +++ b/include/mapnik/markers_placement.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Hermann Kraus + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,13 +20,19 @@ * *****************************************************************************/ -#ifndef MARKERS_PLACEMENT_HPP -#define MARKERS_PLACEMENT_HPP +#ifndef MAPNIK_MARKERS_PLACEMENT_HPP +#define MAPNIK_MARKERS_PLACEMENT_HPP +// agg #include "agg_basics.h" + +// mapnik #include +// boost #include + +// stl #include namespace mapnik { @@ -242,5 +248,7 @@ template box2d markers_placement(x1_, y1_, x2_, y2_); } -} /* end namespace */ -#endif // MARKERS_PLACEMENT_HPP + +} + +#endif // MAPNIK_MARKERS_PLACEMENT_HPP diff --git a/include/mapnik/markers_symbolizer.hpp b/include/mapnik/markers_symbolizer.hpp index 507519157..09d568cca 100644 --- a/include/mapnik/markers_symbolizer.hpp +++ b/include/mapnik/markers_symbolizer.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,10 +20,8 @@ * *****************************************************************************/ -//$Id$ - -#ifndef MARKERS_SYMBOLIZER_HPP -#define MARKERS_SYMBOLIZER_HPP +#ifndef MAPNIK_MARKERS_SYMBOLIZER_HPP +#define MAPNIK_MARKERS_SYMBOLIZER_HPP //mapnik #include @@ -92,4 +90,4 @@ private: } -#endif // MARKERS_SYMBOLIZER_HPP +#endif // MAPNIK_MARKERS_SYMBOLIZER_HPP diff --git a/include/mapnik/memory.hpp b/include/mapnik/memory.hpp index 71ac50d9f..ecdb05dcc 100644 --- a/include/mapnik/memory.hpp +++ b/include/mapnik/memory.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,11 +19,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id: memory.hpp 39 2005-04-10 20:39:53Z pavlenko $ -#ifndef MEMORY_HPP -#define MEMORY_HPP +#ifndef MAPNIK_MEMORY_HPP +#define MAPNIK_MEMORY_HPP +// stl #include #include @@ -85,4 +85,4 @@ public: }; } -#endif //MEMORY_HPP +#endif // MAPNIK_MEMORY_HPP diff --git a/include/mapnik/memory_datasource.hpp b/include/mapnik/memory_datasource.hpp index f344ff1d7..4a51b46a2 100644 --- a/include/mapnik/memory_datasource.hpp +++ b/include/mapnik/memory_datasource.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,13 +20,14 @@ * *****************************************************************************/ -//$Id$ - -#ifndef MEMORY_DATASOURCE_HPP -#define MEMORY_DATASOURCE_HPP +#ifndef MAPNIK_MEMORY_DATASOURCE_HPP +#define MAPNIK_MEMORY_DATASOURCE_HPP +// mapnik #include #include + +// stl #include namespace mapnik { @@ -65,4 +66,4 @@ private: }; } -#endif // MEMORY_DATASOURCE_HPP +#endif // MAPNIK_MEMORY_DATASOURCE_HPP diff --git a/include/mapnik/memory_featureset.hpp b/include/mapnik/memory_featureset.hpp index 116e1f350..2b6557521 100644 --- a/include/mapnik/memory_featureset.hpp +++ b/include/mapnik/memory_featureset.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,11 +20,13 @@ * *****************************************************************************/ -//$Id$ -#ifndef MEMORY_FEATURESET_HPP -#define MEMORY_FEATURESET_HPP +#ifndef MAPNIK_MEMORY_FEATURESET_HPP +#define MAPNIK_MEMORY_FEATURESET_HPP +// mapnik #include + +// boost #include namespace mapnik { @@ -73,4 +75,4 @@ private: }; } -#endif // MEMORY_FEATURESET_HPP +#endif // MAPNIK_MEMORY_FEATURESET_HPP diff --git a/include/mapnik/metawriter.hpp b/include/mapnik/metawriter.hpp index 3549e4f8e..3b2838b5d 100644 --- a/include/mapnik/metawriter.hpp +++ b/include/mapnik/metawriter.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Hermann Kraus + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,21 +20,21 @@ * *****************************************************************************/ +#ifndef MAPNIK_METAWRITER_HPP +#define MAPNIK_METAWRITER_HPP -#ifndef METAWRITER_HPP -#define METAWRITER_HPP - -// Mapnik +// mapnik #include #include #include -// Boost +// boost #include #include #include #include -// STL + +// stl #include #include @@ -139,4 +139,4 @@ typedef std::pair metawriter_with_propert } -#endif +#endif // MAPNIK_METAWRITER_HPP diff --git a/include/mapnik/metawriter_factory.hpp b/include/mapnik/metawriter_factory.hpp index d9c4fffe0..cb0150fd4 100644 --- a/include/mapnik/metawriter_factory.hpp +++ b/include/mapnik/metawriter_factory.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2011 MapQuest + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,9 +20,8 @@ * *****************************************************************************/ - -#ifndef METAWRITER_FACTORY_HPP -#define METAWRITER_FACTORY_HPP +#ifndef MAPNIK_METAWRITER_FACTORY_HPP +#define MAPNIK_METAWRITER_FACTORY_HPP // mapnik #include @@ -51,5 +50,5 @@ void metawriter_save( } -#endif /* METAWRITER_FACTORY_HPP */ +#endif // MAPNIK_METAWRITER_FACTORY_HPP diff --git a/include/mapnik/metawriter_inmem.hpp b/include/mapnik/metawriter_inmem.hpp index 278ffea44..5fb00d624 100644 --- a/include/mapnik/metawriter_inmem.hpp +++ b/include/mapnik/metawriter_inmem.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2011 MapQuest + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,9 +20,8 @@ * *****************************************************************************/ - -#ifndef METAWRITER_INMEM_HPP -#define METAWRITER_INMEM_HPP +#ifndef MAPNIK_METAWRITER_INMEM_HPP +#define MAPNIK_METAWRITER_INMEM_HPP // mapnik #include @@ -117,4 +116,4 @@ typedef boost::shared_ptr metawriter_inmem_ptr; } -#endif /* METAWRITER_INMEM_HPP */ +#endif // MAPNIK_METAWRITER_INMEM_HPP diff --git a/include/mapnik/metawriter_json.hpp b/include/mapnik/metawriter_json.hpp index f46a7393c..eb7ae8ca9 100644 --- a/include/mapnik/metawriter_json.hpp +++ b/include/mapnik/metawriter_json.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Hermann Kraus + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,9 +20,8 @@ * *****************************************************************************/ - -#ifndef METAWRITER_JSON_HPP -#define METAWRITER_JSON_HPP +#ifndef MAPNIK_METAWRITER_JSON_HPP +#define MAPNIK_METAWRITER_JSON_HPP // mapnik #include @@ -150,4 +149,4 @@ typedef boost::shared_ptr metawriter_json_ptr; } -#endif +#endif // MAPNIK_METAWRITER_JSON_HPP diff --git a/include/mapnik/octree.hpp b/include/mapnik/octree.hpp index fc08302aa..755fbb3cc 100644 --- a/include/mapnik/octree.hpp +++ b/include/mapnik/octree.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,10 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id$ -#ifndef _OCTREE_HPP_ -#define _OCTREE_HPP_ +#ifndef MAPNIK_OCTREE_HPP +#define MAPNIK_OCTREE_HPP // mapnik #include @@ -303,6 +302,7 @@ public: private: node * root_; }; + } // namespace mapnik -#endif /* _OCTREE_HPP_ */ +#endif // MAPNIK_OCTREE_HPP diff --git a/include/mapnik/palette.hpp b/include/mapnik/palette.hpp index 18b433b30..ea1f66a33 100644 --- a/include/mapnik/palette.hpp +++ b/include/mapnik/palette.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,11 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id$ - -#ifndef _PALETTE_HPP_ -#define _PALETTE_HPP_ +#ifndef MAPNIK_PALETTE_HPP +#define MAPNIK_PALETTE_HPP // mapnik #include @@ -164,5 +162,5 @@ private: } // namespace mapnik -#endif // _PALETTE_HPP_ +#endif // MAPNIK_PALETTE_HPP diff --git a/include/mapnik/params.hpp b/include/mapnik/params.hpp index 4590d3b38..97f4fd4f6 100644 --- a/include/mapnik/params.hpp +++ b/include/mapnik/params.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,15 +19,17 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id: params.hpp 39 2005-04-10 20:39:53Z pavlenko $ -#ifndef PARAMS_HPP -#define PARAMS_HPP +#ifndef MAPNIK_PARAMS_HPP +#define MAPNIK_PARAMS_HPP +// mapnik #include #include #include #include + +// stl #include #include @@ -100,4 +102,4 @@ public: }; } -#endif //PARAMS_HPP +#endif // MAPNIK_PARAMS_HPP diff --git a/include/mapnik/parse_path.hpp b/include/mapnik/parse_path.hpp index 4434ec2bf..250a175ef 100644 --- a/include/mapnik/parse_path.hpp +++ b/include/mapnik/parse_path.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -28,10 +28,12 @@ #include #include #include + // boost #include #include #include + // stl #include #include @@ -140,4 +142,4 @@ typedef mapnik::path_processor path_processor_type; } -#endif //MAPNIK_PARSE_PATH_HPP +#endif // MAPNIK_PARSE_PATH_HPP diff --git a/include/mapnik/path_expression_grammar.hpp b/include/mapnik/path_expression_grammar.hpp index eae2ed7aa..632745dad 100644 --- a/include/mapnik/path_expression_grammar.hpp +++ b/include/mapnik/path_expression_grammar.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2009 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,8 +20,6 @@ * *****************************************************************************/ -//$Id$ - #ifndef MAPNIK_PATH_EXPRESSIONS_GRAMMAR_HPP #define MAPNIK_PATH_EXPRESSIONS_GRAMMAR_HPP @@ -29,22 +27,26 @@ #include #include #include + // boost #include #include -//spirit2 +// spirit2 #include #include -//fusion + +// fusion #include -//phoenix + +// phoenix #include #include #include #include #include #include + // stl #include #include @@ -56,11 +58,9 @@ namespace qi = boost::spirit::qi; namespace phoenix = boost::phoenix; namespace standard_wide = boost::spirit::standard_wide; -// using standard_wide::space_type; using standard_wide::space; - template struct path_expression_grammar : qi::grammar(), space_type> { @@ -92,8 +92,6 @@ struct path_expression_grammar : qi::grammar str; }; - } #endif // MAPNIK_PATH_EXPRESSIONS_GRAMMAR_HPP - diff --git a/include/mapnik/placement_finder.hpp b/include/mapnik/placement_finder.hpp index 2a605d15b..bf8869ec4 100644 --- a/include/mapnik/placement_finder.hpp +++ b/include/mapnik/placement_finder.hpp @@ -2,8 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko - * Copyright (C) 2006 10East Corp. + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -21,11 +20,10 @@ * *****************************************************************************/ -//$Id$ - -#ifndef __PLACEMENT_FINDER__ -#define __PLACEMENT_FINDER__ +#ifndef MAPNIK_PLACEMENT_FINDER_HPP +#define MAPNIK_PLACEMENT_FINDER_HPP +// mapnik #include #include #include @@ -34,6 +32,7 @@ #include #include +// stl #include namespace mapnik @@ -145,7 +144,7 @@ private: DetectorT & detector_; box2d const& dimensions_; }; + } -#endif - +#endif // MAPNIK_PLACEMENT_FINDER_HPP diff --git a/include/mapnik/plugin.hpp b/include/mapnik/plugin.hpp index 8d800f4a8..5ccd3ca78 100644 --- a/include/mapnik/plugin.hpp +++ b/include/mapnik/plugin.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,14 +20,15 @@ * *****************************************************************************/ -//$Id: plugin.hpp 39 2005-04-10 20:39:53Z pavlenko $ +#ifndef MAPNIK_PLUGIN_HPP +#define MAPNIK_PLUGIN_HPP -#ifndef PLUGIN_HPP -#define PLUGIN_HPP // boost #include + // stl #include + // ltdl #include @@ -46,4 +47,4 @@ public: }; } -#endif //PLUGIN_HPP +#endif // MAPNIK_PLUGIN_HPP diff --git a/include/mapnik/png_io.hpp b/include/mapnik/png_io.hpp index 5c85c1404..fd47535b3 100644 --- a/include/mapnik/png_io.hpp +++ b/include/mapnik/png_io.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,16 +20,16 @@ * *****************************************************************************/ -//$Id$ - #ifndef MAPNIK_PNG_IO_HPP #define MAPNIK_PNG_IO_HPP +// mapnik #include #include #include #include +// zlib #include extern "C" diff --git a/include/mapnik/point_symbolizer.hpp b/include/mapnik/point_symbolizer.hpp index e47ea4fc1..c1f7c1382 100644 --- a/include/mapnik/point_symbolizer.hpp +++ b/include/mapnik/point_symbolizer.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,7 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id: image_symbolizer.hpp 39 2005-04-10 20:39:53Z pavlenko $ #ifndef MAPNIK_POINT_SYMBOLIZER_HPP #define MAPNIK_POINT_SYMBOLIZER_HPP diff --git a/include/mapnik/polygon_pattern_symbolizer.hpp b/include/mapnik/polygon_pattern_symbolizer.hpp index 0c389e36d..e1ffc39b9 100644 --- a/include/mapnik/polygon_pattern_symbolizer.hpp +++ b/include/mapnik/polygon_pattern_symbolizer.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,10 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id$ -#ifndef POLYGON_PATTERN_SYMBOLIZER_HPP -#define POLYGON_PATTERN_SYMBOLIZER_HPP +#ifndef MAPNIK_POLYGON_PATTERN_SYMBOLIZER_HPP +#define MAPNIK_POLYGON_PATTERN_SYMBOLIZER_HPP // mapnik #include @@ -57,4 +56,4 @@ private: }; } -#endif //POLYGON_PATTERN_SYMBOLIZER_HPP +#endif // MAPNIK_POLYGON_PATTERN_SYMBOLIZER_HPP diff --git a/include/mapnik/polygon_symbolizer.hpp b/include/mapnik/polygon_symbolizer.hpp index d6695ba3b..809ceced3 100644 --- a/include/mapnik/polygon_symbolizer.hpp +++ b/include/mapnik/polygon_symbolizer.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,10 +20,8 @@ * *****************************************************************************/ -//$Id: polygon_symbolizer.hpp 39 2005-04-10 20:39:53Z pavlenko $ - -#ifndef POLYGON_SYMBOLIZER_HPP -#define POLYGON_SYMBOLIZER_HPP +#ifndef MAPNIK_POLYGON_SYMBOLIZER_HPP +#define MAPNIK_POLYGON_SYMBOLIZER_HPP // mapnik #include @@ -122,4 +120,4 @@ private: }; } -#endif // POLYGON_SYMBOLIZER_HPP +#endif // MAPNIK_POLYGON_SYMBOLIZER_HPP diff --git a/include/mapnik/pool.hpp b/include/mapnik/pool.hpp index 7459fd719..518744a9c 100644 --- a/include/mapnik/pool.hpp +++ b/include/mapnik/pool.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,17 +20,15 @@ * *****************************************************************************/ -//$Id: pool.hpp 39 2005-04-10 20:39:53Z pavlenko $ - -#ifndef POOL_HPP -#define POOL_HPP +#ifndef MAPNIK_POOL_HPP +#define MAPNIK_POOL_HPP // mapnik #include + // boost #include #include - #ifdef MAPNIK_THREADSAFE #include #endif @@ -164,5 +162,7 @@ public: return size; } }; + } -#endif //POOL_HPP + +#endif // MAPNIK_POOL_HPP diff --git a/include/mapnik/proj_transform.hpp b/include/mapnik/proj_transform.hpp index 83430bf57..8c156a0a8 100644 --- a/include/mapnik/proj_transform.hpp +++ b/include/mapnik/proj_transform.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,10 +20,8 @@ * *****************************************************************************/ -//$Id$ - -#ifndef PROJ_TRANSFORM_HPP -#define PROJ_TRANSFORM_HPP +#ifndef MAPNIK_PROJ_TRANSFORM_HPP +#define MAPNIK_PROJ_TRANSFORM_HPP // mapnik #include @@ -62,4 +60,4 @@ private: }; } -#endif // PROJ_TRANSFORM_HPP +#endif // MAPNIK_PROJ_TRANSFORM_HPP diff --git a/include/mapnik/projection.hpp b/include/mapnik/projection.hpp index 33a534dcd..26d64466a 100644 --- a/include/mapnik/projection.hpp +++ b/include/mapnik/projection.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,10 +20,8 @@ * *****************************************************************************/ -//$Id$ - -#ifndef PROJECTION_HPP -#define PROJECTION_HPP +#ifndef MAPNIK_PROJECTION_HPP +#define MAPNIK_PROJECTION_HPP // mapnik #include @@ -35,8 +33,8 @@ #if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 480 #include #endif - #include + // stl #include #include @@ -85,6 +83,7 @@ private: static boost::mutex mutex_; #endif }; + } -#endif //PROJECTION_HPP +#endif // MAPNIK_PROJECTION_HPP diff --git a/include/mapnik/ptree_helpers.hpp b/include/mapnik/ptree_helpers.hpp index 88a75f458..c97ce4d55 100644 --- a/include/mapnik/ptree_helpers.hpp +++ b/include/mapnik/ptree_helpers.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,17 +20,20 @@ * *****************************************************************************/ -#ifndef MAPNIK_CONFIG_HELPERS_INCLUDED -#define MAPNIK_CONFIG_HELPERS_INCLUDED +#ifndef MAPNIK_PTREE_HELPERS_HPP +#define MAPNIK_PTREE_HELPERS_HPP +// mapnik #include #include #include +// boost #include #include #include +// stl #include #include @@ -422,6 +425,7 @@ inline boost::optional get_optional(const boost::property_tree::ptree & n return result; } + } // end of namespace mapnik -#endif // MAPNIK_CONFIG_HELPERS_INCLUDED +#endif // MAPNIK_PTREE_HELPERS_HPP diff --git a/include/mapnik/quad_tree.hpp b/include/mapnik/quad_tree.hpp index 0c9af81d0..63b305c73 100644 --- a/include/mapnik/quad_tree.hpp +++ b/include/mapnik/quad_tree.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,15 +19,17 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id$ -#ifndef QUAD_TREE_HPP -#define QUAD_TREE_HPP +#ifndef MAPNIK_QUAD_TREE_HPP +#define MAPNIK_QUAD_TREE_HPP + // mapnik #include + // boost #include #include + // stl #include #include @@ -220,4 +222,4 @@ private: }; } -#endif +#endif // MAPNIK_QUAD_TREE_HPP diff --git a/include/mapnik/query.hpp b/include/mapnik/query.hpp index d43c8b722..db607c587 100644 --- a/include/mapnik/query.hpp +++ b/include/mapnik/query.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,10 +20,8 @@ * *****************************************************************************/ -//$Id$ - -#ifndef QUERY_HPP -#define QUERY_HPP +#ifndef MAPNIK_QUERY_HPP +#define MAPNIK_QUERY_HPP //mapnik #include @@ -123,7 +121,7 @@ public: return names_; } }; + } - -#endif //QUERY_HPP +#endif // MAPNIK_QUERY_HPP diff --git a/include/mapnik/raster.hpp b/include/mapnik/raster.hpp index 5449294cd..cd26af27a 100644 --- a/include/mapnik/raster.hpp +++ b/include/mapnik/raster.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,11 +19,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id: raster.hpp 39 2005-04-10 20:39:53Z pavlenko $ -#ifndef RASTER_HPP -#define RASTER_HPP +#ifndef MAPNIK_RASTER_HPP +#define MAPNIK_RASTER_HPP +// mapnik #include namespace mapnik { @@ -37,5 +37,5 @@ struct raster }; } -#endif //RASTER_HPP +#endif // MAPNIK_RASTER_HPP diff --git a/include/mapnik/raster_colorizer.hpp b/include/mapnik/raster_colorizer.hpp index e0e0796ca..fcf0bb333 100644 --- a/include/mapnik/raster_colorizer.hpp +++ b/include/mapnik/raster_colorizer.hpp @@ -3,7 +3,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,7 +20,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id$ /** \brief Raster Colouriser * @@ -35,9 +34,8 @@ * */ - -#ifndef RASTER_COLORIZER_HPP -#define RASTER_COLORIZER_HPP +#ifndef MAPNIK_RASTER_COLORIZER_HPP +#define MAPNIK_RASTER_COLORIZER_HPP // mapnik #include @@ -214,14 +212,9 @@ private: }; - - - - - typedef boost::shared_ptr raster_colorizer_ptr; } // mapnik namespace -#endif //RASTER_COLORIZER_HPP +#endif // MAPNIK_RASTER_COLORIZER_HPP diff --git a/include/mapnik/raster_symbolizer.hpp b/include/mapnik/raster_symbolizer.hpp index 2bc4cad32..76366b4a8 100644 --- a/include/mapnik/raster_symbolizer.hpp +++ b/include/mapnik/raster_symbolizer.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,10 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id$ -#ifndef RASTER_SYMBOLIZER_HPP -#define RASTER_SYMBOLIZER_HPP +#ifndef MAPNIK_RASTER_SYMBOLIZER_HPP +#define MAPNIK_RASTER_SYMBOLIZER_HPP // mapnik #include @@ -159,4 +158,4 @@ private: }; } -#endif //RASTER_SYMBOLIZER_HPP +#endif // MAPNIK_RASTER_SYMBOLIZER_HPP diff --git a/include/mapnik/rule.hpp b/include/mapnik/rule.hpp index a5f111a4d..53780dfc4 100644 --- a/include/mapnik/rule.hpp +++ b/include/mapnik/rule.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,8 +20,8 @@ * *****************************************************************************/ -#ifndef RULE_HPP -#define RULE_HPP +#ifndef MAPNIK_RULE_HPP +#define MAPNIK_RULE_HPP // mapnik #include @@ -327,4 +327,4 @@ private: } -#endif //RULE_HPP +#endif // MAPNIK_RULE_HPP diff --git a/include/mapnik/save_map.hpp b/include/mapnik/save_map.hpp index f28746dc2..65ca13dac 100644 --- a/include/mapnik/save_map.hpp +++ b/include/mapnik/save_map.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,22 +19,22 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -// $Id$ -#ifndef SAVE_MAP_HPP -#define SAVE_MAP_HPP +#ifndef MAPNIK_SAVE_MAP_HPP +#define MAPNIK_SAVE_MAP_HPP + // mapnik #include + // stl #include namespace mapnik { class Map; + MAPNIK_DECL void save_map(Map const& map, std::string const& filename, bool explicit_defaults = false); - MAPNIK_DECL std::string save_map_to_string(Map const& map, bool explicit_defaults = false); - } -#endif // SAVE_MAP_HPP +#endif // MAPNIK_SAVE_MAP_HPP diff --git a/include/mapnik/scale_denominator.hpp b/include/mapnik/scale_denominator.hpp index 31562bc9e..c42b15788 100644 --- a/include/mapnik/scale_denominator.hpp +++ b/include/mapnik/scale_denominator.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,10 +20,10 @@ * *****************************************************************************/ -//$Id$ #ifndef MAPNIK_SCALE_DENOMINATOR_HPP #define MAPNIK_SCALE_DENOMINATOR_HPP +// mapnik #include namespace mapnik { diff --git a/include/mapnik/segment.hpp b/include/mapnik/segment.hpp index 1836eb69c..12fa2a74b 100644 --- a/include/mapnik/segment.hpp +++ b/include/mapnik/segment.hpp @@ -20,8 +20,6 @@ * *****************************************************************************/ -//$Id$ - #ifndef MAPNIK_SEGMENT_HPP #define MAPNIK_SEGMENT_HPP @@ -41,4 +39,4 @@ static bool y_order(segment_t const& first,segment_t const& second) } -#endif //MAPNIK_SEGMENT_HPP +#endif // MAPNIK_SEGMENT_HPP diff --git a/include/mapnik/shield_symbolizer.hpp b/include/mapnik/shield_symbolizer.hpp index b373608cb..b8b3bfe47 100644 --- a/include/mapnik/shield_symbolizer.hpp +++ b/include/mapnik/shield_symbolizer.hpp @@ -2,8 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko - * Copyright (C) 2006 10East Corp. + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,7 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id$ #ifndef MAPNIK_SHIELD_SYMBOLIZER_HPP #define MAPNIK_SHIELD_SYMBOLIZER_HPP @@ -62,4 +60,4 @@ private: }; } -#endif // SHIELD_SYMBOLIZER_HPP +#endif // MAPNIK_SHIELD_SYMBOLIZER_HPP diff --git a/include/mapnik/sql_utils.hpp b/include/mapnik/sql_utils.hpp index c208d3b11..666cf1dbd 100644 --- a/include/mapnik/sql_utils.hpp +++ b/include/mapnik/sql_utils.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,10 +20,8 @@ * *****************************************************************************/ -//$Id: sql_utils.hpp 39 2005-04-10 20:39:53Z pavlenko $ - -#ifndef SQL_UTILS_HPP -#define SQL_UTILS_HPP +#ifndef MAPNIK_SQL_UTILS_HPP +#define MAPNIK_SQL_UTILS_HPP // boost #include @@ -196,4 +194,4 @@ inline std::string numeric2string(const char* buf) } -#endif //SQL_UTILS_HPP +#endif // MAPNIK_SQL_UTILS_HPP diff --git a/include/mapnik/stroke.hpp b/include/mapnik/stroke.hpp index 194878886..36b6a882c 100644 --- a/include/mapnik/stroke.hpp +++ b/include/mapnik/stroke.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,13 +19,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id$ -#ifndef STROKE_HPP -#define STROKE_HPP +#ifndef MAPNIK_STROKE_HPP +#define MAPNIK_STROKE_HPP + // mapnik #include #include + // stl #include @@ -107,4 +108,4 @@ private: }; } -#endif //STROKE_HPP +#endif // MAPNIK_STROKE_HPP diff --git a/include/mapnik/style_factory.hpp b/include/mapnik/style_factory.hpp index aa372d76a..fb0982f40 100644 --- a/include/mapnik/style_factory.hpp +++ b/include/mapnik/style_factory.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,10 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id: style_factory.hpp 39 2005-04-10 20:39:53Z pavlenko $ -#ifndef STYLE_FACTORY_HPP -#define STYLE_FACTORY_HPP +#ifndef MAPNIK_STYLE_FACTORY_HPP +#define MAPNIK_STYLE_FACTORY_HPP //#include @@ -34,4 +33,4 @@ class style_factory } -#endif //STYLE_FACTORY_HPP +#endif // MAPNIK_STYLE_FACTORY_HPP diff --git a/include/mapnik/svg/svg_converter.hpp b/include/mapnik/svg/svg_converter.hpp index a875feefc..74689971c 100644 --- a/include/mapnik/svg/svg_converter.hpp +++ b/include/mapnik/svg/svg_converter.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,15 +20,16 @@ * *****************************************************************************/ -// $Id$ - #ifndef MAPNIK_SVG_CONVERTER_HPP #define MAPNIK_SVG_CONVERTER_HPP + // mapnik #include #include + // boost #include + // agg #include "agg_path_storage.h" #include "agg_conv_transform.h" @@ -37,6 +38,7 @@ #include "agg_conv_curve.h" #include "agg_color_rgba.h" #include "agg_bounding_rect.h" + // stl #include @@ -327,5 +329,4 @@ typedef svg_converter #include +// stl #include namespace mapnik { namespace svg { diff --git a/include/mapnik/svg/svg_path_adapter.hpp b/include/mapnik/svg/svg_path_adapter.hpp index e8d9b6240..86e6f728f 100644 --- a/include/mapnik/svg/svg_path_adapter.hpp +++ b/include/mapnik/svg/svg_path_adapter.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,17 +19,18 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id$ -#ifndef MAPNIK_SVG_PATH_ADAPTER -#define MAPNIK_SVG_PATH_ADAPTER +#ifndef MAPNIK_SVG_PATH_ADAPTER_HPP +#define MAPNIK_SVG_PATH_ADAPTER_HPP // mapnik #include + // agg #include "agg_math.h" #include "agg_array.h" #include "agg_bezier_arc.h" + // stl #include #include diff --git a/include/mapnik/svg/svg_path_attributes.hpp b/include/mapnik/svg/svg_path_attributes.hpp index a1a7250b7..66df711fb 100644 --- a/include/mapnik/svg/svg_path_attributes.hpp +++ b/include/mapnik/svg/svg_path_attributes.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,16 +20,16 @@ * *****************************************************************************/ -// $Id$ - #ifndef MAPNIK_SVG_PATH_ATTRIBUTES_HPP #define MAPNIK_SVG_PATH_ATTRIBUTES_HPP +// agg #include "agg_math_stroke.h" #include "agg_color_rgba.h" #include "agg_pixfmt_rgba.h" #include "agg_trans_affine.h" +// mapnik #include namespace mapnik { diff --git a/include/mapnik/svg/svg_path_commands.hpp b/include/mapnik/svg/svg_path_commands.hpp index b5e01b5da..ab6bcee46 100644 --- a/include/mapnik/svg/svg_path_commands.hpp +++ b/include/mapnik/svg/svg_path_commands.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,12 +20,13 @@ * *****************************************************************************/ -#ifndef SVG_COMMANDS_HPP -#define SVG_COMMANDS_HPP +#ifndef MAPNIK_SVG_PATH_COMMANDS_HPP +#define MAPNIK_SVG_PATH_COMMANDS_HPP // mapnik #include -// + +// boost #include #include #include @@ -262,4 +263,4 @@ namespace mapnik { namespace svg { }} -#endif // SVG_COMMANDS_HPP +#endif // MAPNIK_SVG_COMMANDS_HPP diff --git a/include/mapnik/svg/svg_path_grammar.hpp b/include/mapnik/svg/svg_path_grammar.hpp index 3cc078d2f..5411db679 100644 --- a/include/mapnik/svg/svg_path_grammar.hpp +++ b/include/mapnik/svg/svg_path_grammar.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,11 +20,12 @@ * *****************************************************************************/ -#ifndef SVG_PATH_GRAMMAR_HPP -#define SVG_PATH_GRAMMAR_HPP +#ifndef MAPNIK_SVG_PATH_GRAMMAR_HPP +#define MAPNIK_SVG_PATH_GRAMMAR_HPP // mapnik #include + // spirit #include #include @@ -152,4 +153,4 @@ namespace mapnik { namespace svg { }} -#endif // SVG_PATH_GRAMMAR_HPP +#endif // MAPNIK_SVG_PATH_GRAMMAR_HPP diff --git a/include/mapnik/svg/svg_path_iterator.hpp b/include/mapnik/svg/svg_path_iterator.hpp index 30bb847f8..5f5ad6395 100644 --- a/include/mapnik/svg/svg_path_iterator.hpp +++ b/include/mapnik/svg/svg_path_iterator.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/include/mapnik/svg/svg_path_parser.hpp b/include/mapnik/svg/svg_path_parser.hpp index d836deffc..4d249cb9d 100644 --- a/include/mapnik/svg/svg_path_parser.hpp +++ b/include/mapnik/svg/svg_path_parser.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,8 +20,8 @@ * *****************************************************************************/ -#ifndef SVG_PATH_PARSER_HPP -#define SVG_PATH_PARSER_HPP +#ifndef MAPNIK_SVG_PATH_PARSER_HPP +#define MAPNIK_SVG_PATH_PARSER_HPP #include #include @@ -42,5 +42,4 @@ bool MAPNIK_DECL parse_transform(const char * wkt, TransformType & tr); }} - -#endif // SVG_PATH_PARSER_HPP +#endif // MAPNIK_SVG_PATH_PARSER_HPP diff --git a/include/mapnik/svg/svg_points_grammar.hpp b/include/mapnik/svg/svg_points_grammar.hpp index 77e1a2480..e6deb843d 100644 --- a/include/mapnik/svg/svg_points_grammar.hpp +++ b/include/mapnik/svg/svg_points_grammar.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/include/mapnik/svg/svg_renderer.hpp b/include/mapnik/svg/svg_renderer.hpp index e13e36a7c..4ffe11cd3 100644 --- a/include/mapnik/svg/svg_renderer.hpp +++ b/include/mapnik/svg/svg_renderer.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/include/mapnik/svg/svg_storage.hpp b/include/mapnik/svg/svg_storage.hpp index bd6df64d3..f3600646a 100644 --- a/include/mapnik/svg/svg_storage.hpp +++ b/include/mapnik/svg/svg_storage.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,12 +20,13 @@ * *****************************************************************************/ -// $Id$ - #ifndef MAPNIK_SVG_STORAGE_HPP #define MAPNIK_SVG_STORAGE_HPP +// mapnik #include + +// boost #include namespace mapnik { diff --git a/include/mapnik/svg/svg_transform_grammar.hpp b/include/mapnik/svg/svg_transform_grammar.hpp index 8f8c7f03f..9d9bab750 100644 --- a/include/mapnik/svg/svg_transform_grammar.hpp +++ b/include/mapnik/svg/svg_transform_grammar.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,15 +20,15 @@ * *****************************************************************************/ -//$Id$ - -#ifndef SVG_TRANSFORM_GRAMMAR_HPP -#define SVG_TRANSFORM_GRAMMAR_HPP +#ifndef MAPNIK_SVG_TRANSFORM_GRAMMAR_HPP +#define MAPNIK_SVG_TRANSFORM_GRAMMAR_HPP // mapnik #include + // agg #include + // spirit #include #include @@ -260,4 +260,4 @@ namespace mapnik { namespace svg { }} -#endif // SVG_TRANSFORM_GRAMMAR_HPP +#endif // MAPNIK_SVG_TRANSFORM_GRAMMAR_HPP diff --git a/include/mapnik/svg_renderer.hpp b/include/mapnik/svg_renderer.hpp index 15c7ebdc9..3459d0eb3 100644 --- a/include/mapnik/svg_renderer.hpp +++ b/include/mapnik/svg_renderer.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,15 +20,12 @@ * *****************************************************************************/ -//$Id$ - -#ifndef SVG_RENDERER_HPP -#define SVG_RENDERER_HPP +#ifndef MAPNIK_SVG_RENDERER_HPP +#define MAPNIK_SVG_RENDERER_HPP // mapnik #include #include - #include #include @@ -150,4 +147,4 @@ namespace mapnik }; } -#endif //SVG_RENDERER_HPP +#endif // MAPNIK_SVG_RENDERER_HPP diff --git a/include/mapnik/symbolizer.hpp b/include/mapnik/symbolizer.hpp index c4b46cde3..546c4c1fe 100644 --- a/include/mapnik/symbolizer.hpp +++ b/include/mapnik/symbolizer.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,7 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id: symbolizer.hpp 39 2005-04-10 20:39:53Z pavlenko $ #ifndef MAPNIK_SYMBOLIZER_HPP #define MAPNIK_SYMBOLIZER_HPP @@ -105,4 +104,4 @@ protected: }; } -#endif //MAPNIK_SYMBOLIZER_HPP +#endif // MAPNIK_SYMBOLIZER_HPP diff --git a/include/mapnik/text_path.hpp b/include/mapnik/text_path.hpp index cd9a4c275..eeebd97c4 100644 --- a/include/mapnik/text_path.hpp +++ b/include/mapnik/text_path.hpp @@ -2,8 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko - * Copyright (C) 2006 10East Corp. + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -21,13 +20,14 @@ * *****************************************************************************/ -//$Id$ - -#ifndef __TEXT_PATH_H__ -#define __TEXT_PATH_H__ +#ifndef MAPNIK_TEXT_PATH_HPP +#define MAPNIK_TEXT_PATH_HPP +// boost #include #include + +// uci #include namespace mapnik @@ -180,6 +180,4 @@ struct text_path : boost::noncopyable typedef boost::shared_ptr text_path_ptr; } -#endif - - +#endif // MAPNIK_TEXT_PATH_HPP diff --git a/include/mapnik/text_placements.hpp b/include/mapnik/text_placements.hpp index 56b0c04de..47c088636 100644 --- a/include/mapnik/text_placements.hpp +++ b/include/mapnik/text_placements.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2011 Hermann Kraus + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,18 +19,19 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#ifndef TEXT_PLACEMENTS_HPP -#define TEXT_PLACEMENTS_HPP -//mapnik +#ifndef MAPNIK_TEXT_PLACEMENTS_HPP +#define MAPNIK_TEXT_PLACEMENTS_HPP + +// mapnik #include #include -//stl +// stl #include #include -//boost +// boost #include #include #include @@ -176,7 +177,6 @@ private: }; - } //namespace -#endif // TEXT_PLACEMENTS_HPP +#endif // MAPNIK_TEXT_PLACEMENTS_HPP diff --git a/include/mapnik/text_placements_simple.hpp b/include/mapnik/text_placements_simple.hpp index 9b11c6abe..fe0e541ca 100644 --- a/include/mapnik/text_placements_simple.hpp +++ b/include/mapnik/text_placements_simple.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2011 Hermann Kraus + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,8 +19,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#ifndef TEXT_PLACEMENTS_SIMPLE_HPP -#define TEXT_PLACEMENTS_SIMPLE_HPP + +#ifndef MAPNIK_TEXT_PLACEMENTS_SIMPLE_HPP +#define MAPNIK_TEXT_PLACEMENTS_SIMPLE_HPP + +// mapnik #include namespace mapnik { @@ -70,6 +73,6 @@ private: text_placements_simple const* parent_; }; - } //namespace -#endif + +#endif // MAPNIK_TEXT_PLACEMENTS_SIMPLE_HPP diff --git a/include/mapnik/text_symbolizer.hpp b/include/mapnik/text_symbolizer.hpp index 98c0e5181..e4d57d8ed 100644 --- a/include/mapnik/text_symbolizer.hpp +++ b/include/mapnik/text_symbolizer.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,8 +20,6 @@ * *****************************************************************************/ -//$Id$ - #ifndef MAPNIK_TEXT_SYMBOLIZER_HPP #define MAPNIK_TEXT_SYMBOLIZER_HPP @@ -154,4 +152,4 @@ private: }; } -#endif //MAPNIK_TEXT_SYMBOLIZER_HPP +#endif // MAPNIK_TEXT_SYMBOLIZER_HPP diff --git a/include/mapnik/timer.hpp b/include/mapnik/timer.hpp index 4791b8772..e747e9e7b 100644 --- a/include/mapnik/timer.hpp +++ b/include/mapnik/timer.hpp @@ -20,9 +20,10 @@ * *****************************************************************************/ -#ifndef MAPNIK_TIMER_INCLUDED -#define MAPNIK_TIMER_INCLUDED +#ifndef MAPNIK_TIMER_HPP +#define MAPNIK_TIMER_HPP +// stl #include #include #include @@ -121,4 +122,4 @@ private: }; }; -#endif // MAPNIK_TIMER_INCLUDED +#endif // MAPNIK_TIMER_HPP diff --git a/include/mapnik/unicode.hpp b/include/mapnik/unicode.hpp index 6f79e8f38..1d9cb077d 100644 --- a/include/mapnik/unicode.hpp +++ b/include/mapnik/unicode.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,18 +20,20 @@ * *****************************************************************************/ -//$Id$ -#ifndef UNICODE_HPP -#define UNICODE_HPP +#ifndef MAPNIK_UNICODE_HPP +#define MAPNIK_UNICODE_HPP //mapnik #include + // icu #include #include + // boost #include #include + // stl #include @@ -49,4 +51,4 @@ private: }; } -#endif // UNICODE_HPP +#endif // MAPNIK_UNICODE_HPP diff --git a/include/mapnik/utils.hpp b/include/mapnik/utils.hpp index a6ec6fdb5..b6acd5e58 100644 --- a/include/mapnik/utils.hpp +++ b/include/mapnik/utils.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,10 +20,8 @@ * *****************************************************************************/ -//$Id: utils.hpp 39 2005-04-10 20:39:53Z pavlenko $ - -#ifndef UTILS_HPP -#define UTILS_HPP +#ifndef MAPNIK_UTILS_HPP +#define MAPNIK_UTILS_HPP #ifdef MAPNIK_THREADSAFE #include @@ -165,9 +163,8 @@ template class CreatePolicy> T* singleton::pInstance_=0; template class CreatePolicy> bool singleton::destroyed_=false; - + template class CreatePolicy> bool singleton::destroyed_=false; + } - -#endif //UTILS_HPP +#endif // MAPNIK_UTILS_HPP diff --git a/include/mapnik/value.hpp b/include/mapnik/value.hpp index 46fb7b05f..f6ac076d0 100644 --- a/include/mapnik/value.hpp +++ b/include/mapnik/value.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,10 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id$ -#ifndef VALUE_HPP -#define VALUE_HPP +#ifndef MAPNIK_VALUE_HPP +#define MAPNIK_VALUE_HPP // mapnik #include @@ -30,17 +29,18 @@ #include // boost - #include #include #include #include + // stl #include #include #include #include #include + // uci #include #include @@ -823,4 +823,4 @@ operator << (std::basic_ostream& out, } } -#endif //VALUE_HPP +#endif // MAPNIK_VALUE_HPP diff --git a/include/mapnik/value_error.hpp b/include/mapnik/value_error.hpp index a83631f5d..22a692946 100644 --- a/include/mapnik/value_error.hpp +++ b/include/mapnik/value_error.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,8 +20,8 @@ * *****************************************************************************/ -#ifndef MAPNIK_VALUE_ERROR_INCLUDED -#define MAPNIK_VALUE_ERROR_INCLUDED +#ifndef MAPNIK_VALUE_ERROR_HPP +#define MAPNIK_VALUE_ERROR_HPP #include #include @@ -54,4 +54,4 @@ protected: }; } -#endif // MAPNIK_VALUE_ERROR_INCLUDED +#endif // MAPNIK_VALUE_ERROR_HPP diff --git a/include/mapnik/version.hpp b/include/mapnik/version.hpp index defeb9da1..dd69d20bd 100644 --- a/include/mapnik/version.hpp +++ b/include/mapnik/version.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2009 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,14 +19,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id$ #ifndef MAPNIK_VERSION_HPP #define MAPNIK_VERSION_HPP #define MAPNIK_VERSION 200000 -#endif //MAPNIK_VERSION_HPP - - - +#endif // MAPNIK_VERSION_HPP diff --git a/include/mapnik/vertex.hpp b/include/mapnik/vertex.hpp index 4227cd10d..ca76b48dc 100644 --- a/include/mapnik/vertex.hpp +++ b/include/mapnik/vertex.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,10 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id: vertex.hpp 39 2005-04-10 20:39:53Z pavlenko $ -#ifndef VERTEX_HPP -#define VERTEX_HPP +#ifndef MAPNIK_VERTEX_HPP +#define MAPNIK_VERTEX_HPP #include #include @@ -109,4 +108,4 @@ operator << (std::basic_ostream& out, } -#endif // VERTEX_HPP +#endif // MAPNIK_VERTEX_HPP diff --git a/include/mapnik/vertex_transform.hpp b/include/mapnik/vertex_transform.hpp index 3a333bdfc..1f6ac72c3 100644 --- a/include/mapnik/vertex_transform.hpp +++ b/include/mapnik/vertex_transform.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,10 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id: vertex_transform.hpp 39 2005-04-10 20:39:53Z pavlenko $ -#ifndef VERTEX_TRANSFORM_HPP -#define VERTEX_TRANSFORM_HPP +#ifndef MAPNIK_VERTEX_TRANSFORM_HPP +#define MAPNIK_VERTEX_TRANSFORM_HPP // mapnik #include @@ -90,4 +89,4 @@ struct view_transform,box2d,Trans> }; } -#endif //VERTEX_TRANSFORM_HPP +#endif // MAPNIK_VERTEX_TRANSFORM_HPP diff --git a/include/mapnik/vertex_vector.hpp b/include/mapnik/vertex_vector.hpp index 72f7e1d0a..43adc1cde 100644 --- a/include/mapnik/vertex_vector.hpp +++ b/include/mapnik/vertex_vector.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,17 +24,17 @@ // author of Anti-Grain Geometry (http://www.antigrain.com). I have used // the datastructure from AGG as a template for my own. +#ifndef MAPNIK_VERTEX_VECTOR_HPP +#define MAPNIK_VERTEX_VECTOR_HPP -//$Id: vertex_vector.hpp 39 2005-04-10 20:39:53Z pavlenko $ - -#ifndef VERTEX_VECTOR_HPP -#define VERTEX_VECTOR_HPP // mapnik #include #include + // boost #include #include + // stl #include #include @@ -143,4 +143,4 @@ private: } -#endif //VERTEX_VECTOR_HPP +#endif // MAPNIK_VERTEX_VECTOR_HPP diff --git a/include/mapnik/warp.hpp b/include/mapnik/warp.hpp index 32ea74445..4fc30877d 100644 --- a/include/mapnik/warp.hpp +++ b/include/mapnik/warp.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006-2011 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,11 +19,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id$ -#ifndef WARP_HPP -#define WARP_HPP +#ifndef MAPNIK_WARP_HPP +#define MAPNIK_WARP_HPP +// mapnik #include #include @@ -38,4 +38,5 @@ void reproject_raster(raster &target, raster const& source, std::string scaling_method_name); } -#endif //WARP_HPP + +#endif // MAPNIK_WARP_HPP diff --git a/include/mapnik/wkb.hpp b/include/mapnik/wkb.hpp index 6b733b528..77c7c04c6 100644 --- a/include/mapnik/wkb.hpp +++ b/include/mapnik/wkb.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,11 +20,10 @@ * *****************************************************************************/ -//$Id: wkb.hpp 39 2005-04-10 20:39:53Z pavlenko $ - -#ifndef WKB_HPP -#define WKB_HPP +#ifndef MAPNIK_WKB_HPP +#define MAPNIK_WKB_HPP +// mapnik #include #include #include @@ -66,4 +65,4 @@ private: }; } -#endif //WKB_HPP +#endif // MAPNIK_WKB_HPP diff --git a/plugins/input/geos/geos_datasource.cpp b/plugins/input/geos/geos_datasource.cpp index 5270ab185..e67298392 100644 --- a/plugins/input/geos/geos_datasource.cpp +++ b/plugins/input/geos/geos_datasource.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,16 +19,16 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -// $Id$ +#include "geos_datasource.hpp" +#include "geos_featureset.hpp" + +// stl #include #include #include #include -#include "geos_datasource.hpp" -#include "geos_featureset.hpp" - // mapnik #include #include @@ -44,17 +44,9 @@ // geos #include -using std::clog; -using std::endl; - using boost::lexical_cast; using boost::bad_lexical_cast; -using mapnik::datasource; -using mapnik::parameters; - -DATASOURCE_PLUGIN(geos_datasource) - using mapnik::box2d; using mapnik::coord2d; using mapnik::query; @@ -62,9 +54,12 @@ using mapnik::featureset_ptr; using mapnik::layer_descriptor; using mapnik::attribute_descriptor; using mapnik::datasource_exception; +using mapnik::datasource; +using mapnik::parameters; using mapnik::filter_in_box; using mapnik::filter_at_point; +DATASOURCE_PLUGIN(geos_datasource) void geos_notice(const char* fmt, ...) { @@ -90,17 +85,17 @@ void geos_error(const char* fmt, ...) geos_datasource::geos_datasource(parameters const& params, bool bind) - : datasource(params), - extent_(), - extent_initialized_(false), - type_(datasource::Vector), - desc_(*params.get("type"), *params.get("encoding","utf-8")), - geometry_data_(""), - geometry_data_name_("name"), - geometry_id_(1) + : datasource(params), + extent_(), + extent_initialized_(false), + type_(datasource::Vector), + desc_(*params.get("type"), *params.get("encoding", "utf-8")), + geometry_data_(""), + geometry_data_name_("name"), + geometry_id_(1) { boost::optional geometry = params.get("wkt"); - if (!geometry) throw datasource_exception("missing parameter"); + if (! geometry) throw datasource_exception("missing parameter"); geometry_string_ = *geometry; multiple_geometries_ = *params_.get("multiple_geometries",false); @@ -153,7 +148,7 @@ void geos_datasource::bind() const if (! extent_initialized_) { #ifdef MAPNIK_DEBUG - clog << "GEOS Plugin: initializing extent from geometry" << endl; + std::clog << "GEOS Plugin: initializing extent from geometry" << std::endl; #endif if (GEOSGeomTypeId(*geometry_) == GEOS_POINT) @@ -167,7 +162,7 @@ void geos_datasource::bind() const GEOSCoordSeq_getX(cs, 0, &x); GEOSCoordSeq_getY(cs, 0, &y); - extent_.init(x,y,x,y); + extent_.init(x, y, x, y); extent_initialized_ = true; } else @@ -177,7 +172,7 @@ void geos_datasource::bind() const { #ifdef MAPNIK_DEBUG char* wkt = GEOSGeomToWKT(*envelope); - clog << "GEOS Plugin: getting coord sequence from: " << wkt << endl; + std::clog << "GEOS Plugin: getting coord sequence from: " << wkt << std::endl; GEOSFree(wkt); #endif @@ -188,7 +183,7 @@ void geos_datasource::bind() const if (cs != NULL) { #ifdef MAPNIK_DEBUG - clog << "GEOS Plugin: iterating boundary points" << endl; + std::clog << "GEOS Plugin: iterating boundary points" << std::endl; #endif double x, y; @@ -196,8 +191,8 @@ void geos_datasource::bind() const miny = std::numeric_limits::max(), maxx = -std::numeric_limits::max(), maxy = -std::numeric_limits::max(); - unsigned int num_points; + unsigned int num_points; GEOSCoordSeq_getSize(cs, &num_points); for (unsigned int i = 0; i < num_points; ++i) @@ -211,7 +206,7 @@ void geos_datasource::bind() const if (y > maxy) maxy = y; } - extent_.init(minx,miny,maxx,maxy); + extent_.init(minx, miny, maxx, maxy); extent_initialized_ = true; } } @@ -220,7 +215,9 @@ void geos_datasource::bind() const } if (! extent_initialized_) + { throw datasource_exception("GEOS Plugin: cannot determine extent for geometry"); + } is_bound_ = true; } @@ -237,21 +234,21 @@ int geos_datasource::type() const box2d geos_datasource::envelope() const { - if (!is_bound_) bind(); + if (! is_bound_) bind(); return extent_; } layer_descriptor geos_datasource::get_descriptor() const { - if (!is_bound_) bind(); + if (! is_bound_) bind(); return desc_; } featureset_ptr geos_datasource::features(query const& q) const { - if (!is_bound_) bind(); + if (! is_bound_) bind(); const mapnik::box2d extent = q.get_bbox(); @@ -265,7 +262,7 @@ featureset_ptr geos_datasource::features(query const& q) const << "))"; #ifdef MAPNIK_DEBUG - clog << "GEOS Plugin: using extent: " << s.str() << endl; + std::clog << "GEOS Plugin: using extent: " << s.str() << std::endl; #endif return boost::make_shared(*geometry_, @@ -279,13 +276,13 @@ featureset_ptr geos_datasource::features(query const& q) const featureset_ptr geos_datasource::features_at_point(coord2d const& pt) const { - if (!is_bound_) bind(); + if (! is_bound_) bind(); std::ostringstream s; s << "POINT(" << pt.x << " " << pt.y << ")"; #ifdef MAPNIK_DEBUG - clog << "GEOS Plugin: using point: " << s.str() << endl; + std::clog << "GEOS Plugin: using point: " << s.str() << std::endl; #endif return boost::make_shared(*geometry_, @@ -296,4 +293,3 @@ featureset_ptr geos_datasource::features_at_point(coord2d const& pt) const desc_.get_encoding(), multiple_geometries_); } - diff --git a/plugins/input/geos/geos_datasource.hpp b/plugins/input/geos/geos_datasource.hpp index b675b8972..2ba154df0 100644 --- a/plugins/input/geos/geos_datasource.hpp +++ b/plugins/input/geos/geos_datasource.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,7 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id$ #ifndef GEOS_DATASOURCE_HPP #define GEOS_DATASOURCE_HPP @@ -36,28 +35,28 @@ class geos_datasource : public mapnik::datasource { - public: - geos_datasource(mapnik::parameters const& params, bool bind=true); - virtual ~geos_datasource (); - int type() const; - static std::string name(); - mapnik::featureset_ptr features(mapnik::query const& q) const; - mapnik::featureset_ptr features_at_point(mapnik::coord2d const& pt) const; - mapnik::box2d envelope() const; - mapnik::layer_descriptor get_descriptor() const; - void bind() const; - private: - mutable mapnik::box2d extent_; - mutable bool extent_initialized_; - int type_; - mutable mapnik::layer_descriptor desc_; - mutable geos_feature_ptr geometry_; - mutable std::string geometry_data_; - mutable std::string geometry_data_name_; - mutable int geometry_id_; - std::string geometry_string_; - bool multiple_geometries_; +public: + geos_datasource(mapnik::parameters const& params, bool bind = true); + virtual ~geos_datasource (); + int type() const; + static std::string name(); + mapnik::featureset_ptr features(mapnik::query const& q) const; + mapnik::featureset_ptr features_at_point(mapnik::coord2d const& pt) const; + mapnik::box2d envelope() const; + mapnik::layer_descriptor get_descriptor() const; + void bind() const; + +private: + mutable mapnik::box2d extent_; + mutable bool extent_initialized_; + int type_; + mutable mapnik::layer_descriptor desc_; + mutable geos_feature_ptr geometry_; + mutable std::string geometry_data_; + mutable std::string geometry_data_name_; + mutable int geometry_id_; + std::string geometry_string_; + bool multiple_geometries_; }; - #endif // GEOS_DATASOURCE_HPP diff --git a/plugins/input/geos/geos_feature_ptr.hpp b/plugins/input/geos/geos_feature_ptr.hpp index 377436f3c..1425822d6 100644 --- a/plugins/input/geos/geos_feature_ptr.hpp +++ b/plugins/input/geos/geos_feature_ptr.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/plugins/input/geos/geos_featureset.cpp b/plugins/input/geos/geos_featureset.cpp index 4d961bc08..51335b3d5 100644 --- a/plugins/input/geos/geos_featureset.cpp +++ b/plugins/input/geos/geos_featureset.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,8 +19,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id$ +// stl #include #include @@ -35,12 +35,8 @@ #include #include -// ogr #include "geos_featureset.hpp" -using std::clog; -using std::endl; - using mapnik::query; using mapnik::box2d; using mapnik::coord2d; @@ -59,14 +55,14 @@ geos_featureset::geos_featureset(GEOSGeometry* geometry, const std::string& field_name, const std::string& encoding, bool multiple_geometries) - : geometry_(geometry), - tr_(new transcoder(encoding)), - extent_(extent), - identifier_(identifier), - field_(field), - field_name_(field_name), - multiple_geometries_(multiple_geometries), - already_rendered_(false) + : geometry_(geometry), + tr_(new transcoder(encoding)), + extent_(extent), + identifier_(identifier), + field_(field), + field_name_(field_name), + multiple_geometries_(multiple_geometries), + already_rendered_(false) { } @@ -84,12 +80,12 @@ feature_ptr geos_featureset::next() { bool render_geometry = true; - if (*extent_ != NULL && GEOSisValid(*extent_) && !GEOSisEmpty(*extent_)) + if (*extent_ != NULL && GEOSisValid(*extent_) && ! GEOSisEmpty(*extent_)) { const int type = GEOSGeomTypeId(*extent_); render_geometry = false; - switch ( type ) + switch (type) { case GEOS_POINT: if (GEOSIntersects(*extent_, geometry_)) @@ -97,6 +93,7 @@ feature_ptr geos_featureset::next() render_geometry = true; } break; + case GEOS_POLYGON: if (GEOSContains(*extent_, geometry_) || GEOSWithin(geometry_, *extent_) @@ -105,9 +102,10 @@ feature_ptr geos_featureset::next() render_geometry = true; } break; - default: + + default: #ifdef MAPNIK_DEBUG - clog << "GEOS Plugin: unknown extent geometry_type=" << type << endl; + std::clog << "GEOS Plugin: unknown extent geometry_type=" << type << std::endl; #endif break; } @@ -138,4 +136,3 @@ feature_ptr geos_featureset::next() return feature_ptr(); } - diff --git a/plugins/input/geos/geos_featureset.hpp b/plugins/input/geos/geos_featureset.hpp index 3b284a92d..8a4cd1e16 100644 --- a/plugins/input/geos/geos_featureset.hpp +++ b/plugins/input/geos/geos_featureset.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,7 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id$ #ifndef GEOS_FEATURESET_HPP #define GEOS_FEATURESET_HPP @@ -40,28 +39,28 @@ class geos_featureset : public mapnik::Featureset { public: - geos_featureset(GEOSGeometry* geometry, - GEOSGeometry* extent, - int identifier, - const std::string& field, - const std::string& field_name, - const std::string& encoding, - bool multiple_geometries); - virtual ~geos_featureset(); - mapnik::feature_ptr next(); + geos_featureset(GEOSGeometry* geometry, + GEOSGeometry* extent, + int identifier, + const std::string& field, + const std::string& field_name, + const std::string& encoding, + bool multiple_geometries); + virtual ~geos_featureset(); + mapnik::feature_ptr next(); private: - GEOSGeometry* geometry_; - boost::scoped_ptr tr_; - geos_feature_ptr extent_; - int identifier_; - std::string field_; - std::string field_name_; - bool multiple_geometries_; - bool already_rendered_; + GEOSGeometry* geometry_; + boost::scoped_ptr tr_; + geos_feature_ptr extent_; + int identifier_; + std::string field_; + std::string field_name_; + bool multiple_geometries_; + bool already_rendered_; - geos_featureset(const geos_featureset&); - const geos_featureset& operator=(const geos_featureset&); + geos_featureset(const geos_featureset&); + const geos_featureset& operator=(const geos_featureset&); }; #endif // GEOS_FEATURESET_HPP diff --git a/plugins/input/ogr/ogr_datasource.cpp b/plugins/input/ogr/ogr_datasource.cpp index 23d522a7c..1580455b4 100644 --- a/plugins/input/ogr/ogr_datasource.cpp +++ b/plugins/input/ogr/ogr_datasource.cpp @@ -56,7 +56,7 @@ ogr_datasource::ogr_datasource(parameters const& params, bool bind) : datasource(params), extent_(), type_(datasource::Vector), - desc_(*params.get("type"), *params.get("encoding","utf-8")), + desc_(*params.get("type"), *params.get("encoding", "utf-8")), indexed_(false) { boost::optional file = params.get("file"); @@ -66,7 +66,7 @@ ogr_datasource::ogr_datasource(parameters const& params, bool bind) throw datasource_exception("missing or parameter"); } - multiple_geometries_ = *params.get("multiple_geometries",false); + multiple_geometries_ = *params.get("multiple_geometries", false); if (string) { @@ -95,6 +95,9 @@ ogr_datasource::~ogr_datasource() { if (is_bound_) { + // free layer before destroying the datasource + layer_.free_layer(); + OGRDataSource::DestroyDataSource (dataset_); } } @@ -122,19 +125,27 @@ void ogr_datasource::bind() const } // initialize layer - boost::optional layer_by_name = params_.get("layer"); boost::optional layer_by_index = params_.get("layer_by_index"); + boost::optional layer_by_sql = params_.get("layer_by_sql"); - if (layer_by_name && layer_by_index) + int passed_parameters = 0; + passed_parameters += layer_by_name ? 1 : 0; + passed_parameters += layer_by_index ? 1 : 0; + passed_parameters += layer_by_sql ? 1 : 0; + + if (passed_parameters > 1) { - throw datasource_exception("OGR Plugin: you can only select an ogr layer by name ('layer' parameter) or by number ('layer_by_index' parameter), do not supply both parameters" ); + throw datasource_exception("OGR Plugin: you can only select an ogr layer by name " + "('layer' parameter), by number ('layer_by_index' parameter), " + "or by sql ('layer_by_sql' parameter), " + "do not supply 2 or more of them at the same time" ); } if (layer_by_name) { - layerName_ = *layer_by_name; - layer_ = dataset_->GetLayerByName(layerName_.c_str()); + layer_name_ = *layer_by_name; + layer_.layer_by_name(dataset_, layer_name_); } else if (layer_by_index) { @@ -149,21 +160,19 @@ void ogr_datasource::bind() const throw datasource_exception(s.str()); } - OGRLayer* ogr_layer = dataset_->GetLayer(*layer_by_index); - if (ogr_layer) - { - OGRFeatureDefn* def = ogr_layer->GetLayerDefn(); - if (def != 0) - { - layerName_ = def->GetName(); - layer_ = ogr_layer; - } - } + layer_.layer_by_index(dataset_, *layer_by_index); + layer_name_ = layer_.layer_name(); + } + else if (layer_by_sql) + { + layer_.layer_by_sql(dataset_, *layer_by_sql); + layer_name_ = layer_.layer_name(); } else { std::ostringstream s; - s << "OGR Plugin: missing or parameter, available layers are: "; + s << "OGR Plugin: missing or or " + << "parameter, available layers are: "; unsigned num_layers = dataset_->GetLayerCount(); bool layer_found = false; @@ -186,7 +195,7 @@ void ogr_datasource::bind() const throw datasource_exception(s.str()); } - if (! layer_) + if (! layer_.is_valid()) { std::string s("OGR Plugin: "); @@ -198,15 +207,22 @@ void ogr_datasource::bind() const { s += "cannot find layer by index number '" + *layer_by_index; } + else if (layer_by_sql) + { + s += "cannot find layer by sql query '" + *layer_by_sql; + } s += "' in dataset '" + dataset_name_ + "'"; throw datasource_exception(s); } + // work with real OGR layer + OGRLayer* layer = layer_.layer(); + // initialize envelope OGREnvelope envelope; - layer_->GetExtent(&envelope); + layer->GetExtent(&envelope); extent_.init(envelope.MinX, envelope.MinY, envelope.MaxX, envelope.MaxY); // scan for index file @@ -220,7 +236,7 @@ void ogr_datasource::bind() const } index_name_ = dataset_name_.substr(0, breakpoint) + ".ogrindex"; - std::ifstream index_file (index_name_.c_str(), std::ios::in | std::ios::binary); + std::ifstream index_file(index_name_.c_str(), std::ios::in | std::ios::binary); if (index_file) { indexed_ = true; @@ -237,7 +253,7 @@ void ogr_datasource::bind() const #endif // deal with attributes descriptions - OGRFeatureDefn* def = layer_->GetLayerDefn(); + OGRFeatureDefn* def = layer->GetLayerDefn(); if (def != 0) { const int fld_count = def->GetFieldCount(); @@ -323,39 +339,16 @@ featureset_ptr ogr_datasource::features(query const& q) const { if (! is_bound_) bind(); - if (dataset_ && layer_) + if (dataset_ && layer_.is_valid()) { -#if 0 - // TODO - actually filter fields! - // http://trac.osgeo.org/gdal/wiki/rfc29_desired_fields - // http://trac.osgeo.org/gdal/wiki/rfc28_sqlfunc - - std::ostringstream s; - - s << "select "; - std::set const& props = q.property_names(); - std::set::const_iterator pos = props.begin(); - std::set::const_iterator end = props.end(); - while (pos != end) - { - s << ",\"" << *pos << "\""; - ++pos; - } - s << " from " << layerName_ ; - - // execute existing SQL - OGRLayer* layer = dataset_->ExecuteSQL(s.str(), poly); - - // layer must be freed - dataset_->ReleaseResultSet(layer); -#endif + OGRLayer* layer = layer_.layer(); if (indexed_) { filter_in_box filter(q.get_bbox()); return featureset_ptr(new ogr_index_featureset(*dataset_, - *layer_, + *layer, filter, index_name_, desc_.get_encoding(), @@ -364,12 +357,13 @@ featureset_ptr ogr_datasource::features(query const& q) const else { return featureset_ptr(new ogr_featureset (*dataset_, - *layer_, + *layer, q.get_bbox(), desc_.get_encoding(), multiple_geometries_)); } } + return featureset_ptr(); } @@ -377,14 +371,16 @@ featureset_ptr ogr_datasource::features_at_point(coord2d const& pt) const { if (!is_bound_) bind(); - if (dataset_ && layer_) + if (dataset_ && layer_.is_valid()) { + OGRLayer* layer = layer_.layer(); + if (indexed_) { filter_at_point filter(pt); return featureset_ptr(new ogr_index_featureset (*dataset_, - *layer_, + *layer, filter, index_name_, desc_.get_encoding(), @@ -397,11 +393,12 @@ featureset_ptr ogr_datasource::features_at_point(coord2d const& pt) const point.setY (pt.y); return featureset_ptr(new ogr_featureset (*dataset_, - *layer_, + *layer, point, desc_.get_encoding(), multiple_geometries_)); } } + return featureset_ptr(); } diff --git a/plugins/input/ogr/ogr_datasource.hpp b/plugins/input/ogr/ogr_datasource.hpp index 28552873b..23228432f 100644 --- a/plugins/input/ogr/ogr_datasource.hpp +++ b/plugins/input/ogr/ogr_datasource.hpp @@ -34,12 +34,13 @@ // ogr #include +#include "ogr_layer_ptr.hpp" + class ogr_datasource : public mapnik::datasource { public: ogr_datasource(mapnik::parameters const& params, bool bind=true); virtual ~ogr_datasource (); - int type() const; static std::string name(); mapnik::featureset_ptr features(mapnik::query const& q) const; @@ -54,8 +55,8 @@ private: std::string dataset_name_; mutable std::string index_name_; mutable OGRDataSource* dataset_; - mutable OGRLayer* layer_; - mutable std::string layerName_; + mutable ogr_layer_ptr layer_; + mutable std::string layer_name_; mutable mapnik::layer_descriptor desc_; bool multiple_geometries_; mutable bool indexed_; diff --git a/plugins/input/ogr/ogr_feature_ptr.hpp b/plugins/input/ogr/ogr_feature_ptr.hpp index 2dc9c7309..ed87bb9cf 100644 --- a/plugins/input/ogr/ogr_feature_ptr.hpp +++ b/plugins/input/ogr/ogr_feature_ptr.hpp @@ -29,15 +29,17 @@ class ogr_feature_ptr { public: - ogr_feature_ptr (OGRFeature* const feat) - : feat_ (feat) + ogr_feature_ptr(OGRFeature* const feat) + : feat_(feat) { } - ~ogr_feature_ptr () + ~ogr_feature_ptr() { if (feat_ != NULL) - OGRFeature::DestroyFeature (feat_); + { + OGRFeature::DestroyFeature(feat_); + } } OGRFeature* operator*() diff --git a/plugins/input/ogr/ogr_index_featureset.cpp b/plugins/input/ogr/ogr_index_featureset.cpp index 407578ad4..a67881b9c 100644 --- a/plugins/input/ogr/ogr_index_featureset.cpp +++ b/plugins/input/ogr/ogr_index_featureset.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2007 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/plugins/input/ogr/ogr_layer_ptr.hpp b/plugins/input/ogr/ogr_layer_ptr.hpp new file mode 100644 index 000000000..8fdc85971 --- /dev/null +++ b/plugins/input/ogr/ogr_layer_ptr.hpp @@ -0,0 +1,194 @@ +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2011 Artem Pavlenko + * + * 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 + * + *****************************************************************************/ + +#ifndef OGR_LAYER_PTR_HPP +#define OGR_LAYER_PTR_HPP + +// stl +#include +#include +#include + +// ogr +#include + +class ogr_layer_ptr +{ +public: + ogr_layer_ptr() + : datasource_(NULL), + layer_(NULL), + owns_layer_(false), + is_valid_(false) + { + } + + ~ogr_layer_ptr() + { + free_layer(); + } + + void free_layer() + { + if (owns_layer_ && layer_ != NULL && datasource_ != NULL) + { + datasource_->ReleaseResultSet(layer_); + } + + datasource_ = NULL; + layer_ = NULL; + layer_name_ = ""; + owns_layer_ = false; + is_valid_ = false; + } + + void layer_by_name(OGRDataSource* const datasource, + const std::string& layer_name) + { + free_layer(); + + datasource_ = datasource; + + OGRLayer* ogr_layer = datasource_->GetLayerByName(layer_name.c_str()); + if (ogr_layer) + { + layer_name_ = layer_name; + layer_ = ogr_layer; + is_valid_ = true; + +#ifdef MAPNIK_DEBUG + std::clog << "OGR Plugin: layer_from_name layer is " << layer_name_ << std::endl; +#endif + } + +#ifdef MAPNIK_DEBUG + debug_print_last_error(); +#endif + } + + void layer_by_index(OGRDataSource* const datasource, + int layer_index) + { + free_layer(); + + datasource_ = datasource; + + OGRLayer* ogr_layer = datasource_->GetLayer(layer_index); + if (ogr_layer) + { + OGRFeatureDefn* def = ogr_layer->GetLayerDefn(); + if (def != 0) + { + layer_ = ogr_layer; + layer_name_ = def->GetName(); + is_valid_ = true; + +#ifdef MAPNIK_DEBUG + std::clog << "OGR Plugin: layer_from_index layer is " << layer_name_ << std::endl; +#endif + } + } + +#ifdef MAPNIK_DEBUG + debug_print_last_error(); +#endif + } + + void layer_by_sql(OGRDataSource* const datasource, + const std::string& layer_sql) + { + free_layer(); + + datasource_ = datasource; + owns_layer_ = true; + + // TODO - actually filter fields! + // http://trac.osgeo.org/gdal/wiki/rfc29_desired_fields + // http://trac.osgeo.org/gdal/wiki/rfc28_sqlfunc + + OGRGeometry* spatial_filter = NULL; + const char* sql_dialect = NULL; + OGRLayer* ogr_layer = datasource_->ExecuteSQL(layer_sql.c_str(), spatial_filter, sql_dialect); + + if (ogr_layer) + { + OGRFeatureDefn* def = ogr_layer->GetLayerDefn(); + if (def != 0) + { + layer_ = ogr_layer; + layer_name_ = def->GetName(); + is_valid_ = true; + +#ifdef MAPNIK_DEBUG + std::clog << "OGR Plugin: layer_from_sql layer is " << layer_name_ << std::endl; +#endif + } + } + +#ifdef MAPNIK_DEBUG + debug_print_last_error(); +#endif + } + + const std::string& layer_name() const + { + return layer_name_; + } + + OGRLayer* layer() const + { + return layer_; + } + + bool is_valid() const + { + return is_valid_; + } + +private: + +#ifdef MAPNIK_DEBUG + void debug_print_last_error() + { + if (! is_valid_) + { + const std::string err = CPLGetLastErrorMsg(); + if (err.size() == 0) + { + std::clog << "OGR Plugin: error getting layer" << std::endl; + } + else + { + std::clog << "OGR Plugin: " << err << std::endl; + } + } + } +#endif + + OGRDataSource* datasource_; + OGRLayer* layer_; + std::string layer_name_; + bool owns_layer_; + bool is_valid_; +}; + +#endif // OGR_LAYER_PTR_HPP diff --git a/plugins/input/postgis/connection.hpp b/plugins/input/postgis/connection.hpp index 6a8239cbe..1a056dfa4 100644 --- a/plugins/input/postgis/connection.hpp +++ b/plugins/input/postgis/connection.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,17 +20,14 @@ * *****************************************************************************/ -//$Id: connection.hpp 17 2005-03-08 23:58:43Z pavlenko $ - #ifndef CONNECTION_HPP #define CONNECTION_HPP #include #include -extern "C" -{ -#include "libpq-fe.h" +extern "C" { + #include "libpq-fe.h" } #include "resultset.hpp" diff --git a/plugins/input/postgis/connection_manager.hpp b/plugins/input/postgis/connection_manager.hpp index 35bba4f2a..9ec259495 100644 --- a/plugins/input/postgis/connection_manager.hpp +++ b/plugins/input/postgis/connection_manager.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,8 +20,6 @@ * *****************************************************************************/ -//$Id: connection_manager.hpp 17 2005-03-08 23:58:43Z pavlenko $ - #ifndef CONNECTION_MANAGER_HPP #define CONNECTION_MANAGER_HPP diff --git a/plugins/input/postgis/postgis_datasource.cpp b/plugins/input/postgis/postgis_datasource.cpp index b02dc9c17..343cdd9e1 100644 --- a/plugins/input/postgis/postgis_datasource.cpp +++ b/plugins/input/postgis/postgis_datasource.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,17 +20,15 @@ * *****************************************************************************/ -//$Id: postgis.cc 44 2005-04-22 18:53:54Z pavlenko $ +#include "connection_manager.hpp" +#include "postgis_datasource.hpp" +#include "postgis_featureset.hpp" // mapnik #include #include #include -#include "connection_manager.hpp" -#include "postgis_datasource.hpp" -#include "postgis_featureset.hpp" - // boost #include #include diff --git a/plugins/input/postgis/postgis_datasource.hpp b/plugins/input/postgis/postgis_datasource.hpp index eade5781f..f371f86a1 100644 --- a/plugins/input/postgis/postgis_datasource.hpp +++ b/plugins/input/postgis/postgis_datasource.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/plugins/input/postgis/postgis_featureset.cpp b/plugins/input/postgis/postgis_featureset.cpp index 98dc8c928..801815173 100644 --- a/plugins/input/postgis/postgis_featureset.cpp +++ b/plugins/input/postgis/postgis_featureset.cpp @@ -20,7 +20,9 @@ * *****************************************************************************/ -//$Id$ +#include "postgis_featureset.hpp" +#include "resultset.hpp" +#include "cursorresultset.hpp" // mapnik #include @@ -29,10 +31,6 @@ #include #include -#include "postgis_featureset.hpp" -#include "resultset.hpp" -#include "cursorresultset.hpp" - // boost #include #include diff --git a/plugins/input/postgis/resultset.hpp b/plugins/input/postgis/resultset.hpp index 25cc20148..340258e9e 100644 --- a/plugins/input/postgis/resultset.hpp +++ b/plugins/input/postgis/resultset.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,15 +20,11 @@ * *****************************************************************************/ -//$Id: resultset.hpp 17 2005-03-08 23:58:43Z pavlenko $ - - #ifndef RESULTSET_HPP #define RESULTSET_HPP -extern "C" -{ -#include "libpq-fe.h" +extern "C" { + #include "libpq-fe.h" } class IResultSet diff --git a/plugins/input/raster/raster_datasource.cpp b/plugins/input/raster/raster_datasource.cpp index 20b363650..ea28bb3d1 100644 --- a/plugins/input/raster/raster_datasource.cpp +++ b/plugins/input/raster/raster_datasource.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,7 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id: raster_datasource.cc 44 2005-04-22 18:53:54Z pavlenko $ // boost #include @@ -33,12 +32,6 @@ #include "raster_info.hpp" #include "raster_datasource.hpp" -using mapnik::datasource; -using mapnik::parameters; -using mapnik::image_reader; - -DATASOURCE_PLUGIN(raster_datasource) - using boost::lexical_cast; using boost::bad_lexical_cast; using mapnik::layer_descriptor; @@ -46,11 +39,16 @@ using mapnik::featureset_ptr; using mapnik::query; using mapnik::coord2d; using mapnik::datasource_exception; +using mapnik::datasource; +using mapnik::parameters; +using mapnik::image_reader; + +DATASOURCE_PLUGIN(raster_datasource) raster_datasource::raster_datasource(const parameters& params, bool bind) - : datasource(params), - desc_(*params.get("type"),"utf-8"), - extent_initialized_(false) + : datasource(params), + desc_(*params.get("type"), "utf-8"), + extent_initialized_(false) { #ifdef MAPNIK_DEBUG std::clog << "Raster Plugin: Initializing..." << std::endl; @@ -69,7 +67,7 @@ raster_datasource::raster_datasource(const parameters& params, bool bind) tile_size_ = *params_.get("tile_size", 256); tile_stride_ = *params_.get("tile_stride", 1); - format_=*params_.get("format","tiff"); + format_ = *params_.get("format","tiff"); boost::optional lox = params_.get("lox"); boost::optional loy = params_.get("loy"); @@ -88,7 +86,9 @@ raster_datasource::raster_datasource(const parameters& params, bool bind) } if (! extent_initialized_) + { throw datasource_exception("Raster Plugin: valid or are required"); + } if (bind) { @@ -102,42 +102,46 @@ void raster_datasource::bind() const if (multi_tiles_) { - boost::optional x_width = params_.get("x_width"); - boost::optional y_width = params_.get("y_width"); + boost::optional x_width = params_.get("x_width"); + boost::optional y_width = params_.get("y_width"); - if (!x_width) - throw datasource_exception("Raster Plugin: x-width parameter not supplied for multi-tiled data source."); + if (! x_width) + { + throw datasource_exception("Raster Plugin: x-width parameter not supplied for multi-tiled data source."); + } - if (!y_width) - throw datasource_exception("Raster Plugin: y-width parameter not supplied for multi-tiled data source."); + if (! y_width) + { + throw datasource_exception("Raster Plugin: y-width parameter not supplied for multi-tiled data source."); + } - width_ = x_width.get() * tile_size_; - height_ = y_width.get() * tile_size_; + width_ = x_width.get() * tile_size_; + height_ = y_width.get() * tile_size_; } else { - if (! boost::filesystem::exists(filename_)) - throw datasource_exception("Raster Plugin: " + filename_ + " does not exist"); + if (! boost::filesystem::exists(filename_)) + { + throw datasource_exception("Raster Plugin: " + filename_ + " does not exist"); + } - try - { - std::auto_ptr reader(mapnik::get_image_reader(filename_, format_)); - if (reader.get()) - { - width_ = reader->width(); - height_ = reader->height(); - } - } - catch (mapnik::image_reader_exception const& ex) - { - std::cerr << "Raster Plugin: image reader exception caught: " << ex.what() << std::endl; - throw; - } - catch (...) - { - std::cerr << "Raster Plugin: exception caught" << std::endl; - throw; - } + try + { + std::auto_ptr reader(mapnik::get_image_reader(filename_, format_)); + if (reader.get()) + { + width_ = reader->width(); + height_ = reader->height(); + } + } + catch (mapnik::image_reader_exception const& ex) + { + throw datasource_exception("Raster Plugin: image reader exception: " + std::string(ex.what())); + } + catch (...) + { + throw datasource_exception("Raster Plugin: image reader unknown exception caught"); + } } #ifdef MAPNIK_DEBUG @@ -193,6 +197,7 @@ featureset_ptr raster_datasource::features(query const& q) const #endif tiled_multi_file_policy policy(filename_, format_, tile_size_, extent_, q.get_bbox(), width_, height_, tile_stride_); + return boost::make_shared >(policy, extent_, q); } else if (width * height > 512*512) @@ -202,6 +207,7 @@ featureset_ptr raster_datasource::features(query const& q) const #endif tiled_file_policy policy(filename_, format_, 256, extent_, q.get_bbox(), width_, height_); + return boost::make_shared >(policy, extent_, q); } else @@ -212,13 +218,16 @@ featureset_ptr raster_datasource::features(query const& q) const raster_info info(filename_, format_, extent_, width_, height_); single_file_policy policy(info); + return boost::make_shared >(policy, extent_, q); } } featureset_ptr raster_datasource::features_at_point(coord2d const&) const { - std::clog << "Raster Plugin: ##WARNING: feature_at_point not supported for raster.input" << std::endl; +#ifdef MAPNIK_DEBUG + std::clog << "Raster Plugin: feature_at_point not supported for raster.input" << std::endl; +#endif + return featureset_ptr(); } - diff --git a/plugins/input/raster/raster_datasource.hpp b/plugins/input/raster/raster_datasource.hpp index d88c45a96..51c723ffe 100644 --- a/plugins/input/raster/raster_datasource.hpp +++ b/plugins/input/raster/raster_datasource.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,7 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id: raster_datasource.hh 44 2005-04-22 18:53:54Z pavlenko $ #ifndef RASTER_DATASOURCE_HPP #define RASTER_DATASOURCE_HPP @@ -31,31 +30,30 @@ class raster_datasource : public mapnik::datasource { - private: - mapnik::layer_descriptor desc_; - std::string filename_; - std::string format_; - mapnik::box2d extent_; - bool extent_initialized_; - bool multi_tiles_; - unsigned tile_size_; - unsigned tile_stride_; - mutable unsigned width_; - mutable unsigned height_; - public: - raster_datasource(const mapnik::parameters& params, bool bind=true); - virtual ~raster_datasource(); - int type() const; - static std::string name(); - mapnik::featureset_ptr features(const mapnik::query& q) const; - mapnik::featureset_ptr features_at_point(mapnik::coord2d const& pt) const; - mapnik::box2d envelope() const; - mapnik::layer_descriptor get_descriptor() const; - void bind() const; - private: - //no copying - raster_datasource(const raster_datasource&); - raster_datasource& operator=(const raster_datasource&); +public: + raster_datasource(const mapnik::parameters& params, bool bind=true); + virtual ~raster_datasource(); + int type() const; + static std::string name(); + mapnik::featureset_ptr features(const mapnik::query& q) const; + mapnik::featureset_ptr features_at_point(mapnik::coord2d const& pt) const; + mapnik::box2d envelope() const; + mapnik::layer_descriptor get_descriptor() const; + void bind() const; +private: + mapnik::layer_descriptor desc_; + std::string filename_; + std::string format_; + mapnik::box2d extent_; + bool extent_initialized_; + bool multi_tiles_; + unsigned tile_size_; + unsigned tile_stride_; + mutable unsigned width_; + mutable unsigned height_; + //no copying + raster_datasource(const raster_datasource&); + raster_datasource& operator=(const raster_datasource&); }; -#endif //RASTER_DATASOURCE_HPP +#endif // RASTER_DATASOURCE_HPP diff --git a/plugins/input/raster/raster_featureset.cpp b/plugins/input/raster/raster_featureset.cpp index 1c463a92b..88800ebe1 100644 --- a/plugins/input/raster/raster_featureset.cpp +++ b/plugins/input/raster/raster_featureset.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -25,10 +25,11 @@ #include #include -#include "raster_featureset.hpp" - +// boost #include +#include "raster_featureset.hpp" + using mapnik::query; using mapnik::CoordTransform; using mapnik::image_reader; @@ -42,101 +43,108 @@ template raster_featureset::raster_featureset(LookupPolicy const& policy, box2d const& extent, query const& q) - : policy_(policy), - feature_id_(1), - extent_(extent), - bbox_(q.get_bbox()), - curIter_(policy_.begin()), - endIter_(policy_.end()) -{} + : policy_(policy), + feature_id_(1), + extent_(extent), + bbox_(q.get_bbox()), + curIter_(policy_.begin()), + endIter_(policy_.end()) +{ +} template -raster_featureset::~raster_featureset() {} +raster_featureset::~raster_featureset() +{ +} template feature_ptr raster_featureset::next() { - if (curIter_!=endIter_) - { - feature_ptr feature(feature_factory::create(feature_id_)); - ++feature_id_; - try - { - std::auto_ptr reader(mapnik::get_image_reader(curIter_->file(),curIter_->format())); + if (curIter_ != endIter_) + { + feature_ptr feature(feature_factory::create(feature_id_)); + ++feature_id_; + + try + { + std::auto_ptr reader(mapnik::get_image_reader(curIter_->file(),curIter_->format())); #ifdef MAPNIK_DEBUG - std::clog << "Raster Plugin: READER = " << curIter_->format() << " " << curIter_->file() - << " size(" << curIter_->width() << "," << curIter_->height() << ")" << std::endl; + std::clog << "Raster Plugin: READER = " << curIter_->format() << " " << curIter_->file() + << " size(" << curIter_->width() << "," << curIter_->height() << ")" << std::endl; #endif - if (reader.get()) - { - int image_width = policy_.img_width(reader->width()); - int image_height = policy_.img_height(reader->height()); - - if (image_width>0 && image_height>0) + if (reader.get()) { - CoordTransform t(image_width,image_height,extent_,0,0); - box2d intersect=bbox_.intersect(curIter_->envelope()); - box2d ext=t.forward(intersect); - box2d rem=policy_.transform(ext); - if ( ext.width()>0.5 && ext.height()>0.5 ) - { - //select minimum raster containing whole ext - int x_off = static_cast(floor(ext.minx())); - int y_off = static_cast(floor(ext.miny())); - int end_x = static_cast(ceil(ext.maxx())); - int end_y = static_cast(ceil(ext.maxy())); - //clip to available data - if (x_off < 0) - x_off = 0; - if (y_off < 0) - y_off = 0; - if (end_x > image_width) - end_x = image_width; - if (end_y > image_height) - end_y = image_height; - int width = end_x - x_off; - int height = end_y - y_off; - //calculate actual box2d of returned raster - box2d feature_raster_extent(rem.minx() + x_off, rem.miny() + y_off, - rem.maxx() + x_off + width, rem.maxy() + y_off + height); - intersect = t.backward(feature_raster_extent); + int image_width = policy_.img_width(reader->width()); + int image_height = policy_.img_height(reader->height()); + + if (image_width > 0 && image_height > 0) + { + CoordTransform t(image_width, image_height, extent_, 0, 0); + box2d intersect = bbox_.intersect(curIter_->envelope()); + box2d ext = t.forward(intersect); + box2d rem = policy_.transform(ext); + if (ext.width() > 0.5 && ext.height() > 0.5 ) + { + // select minimum raster containing whole ext + int x_off = static_cast(floor(ext.minx())); + int y_off = static_cast(floor(ext.miny())); + int end_x = static_cast(ceil(ext.maxx())); + int end_y = static_cast(ceil(ext.maxy())); - image_data_32 image(width,height); - reader->read(x_off,y_off,image); - feature->set_raster(boost::make_shared(intersect,image)); - } + // clip to available data + if (x_off < 0) + x_off = 0; + if (y_off < 0) + y_off = 0; + if (end_x > image_width) + end_x = image_width; + if (end_y > image_height) + end_y = image_height; + int width = end_x - x_off; + int height = end_y - y_off; + + // calculate actual box2d of returned raster + box2d feature_raster_extent(rem.minx() + x_off, + rem.miny() + y_off, + rem.maxx() + x_off + width, + rem.maxy() + y_off + height); + intersect = t.backward(feature_raster_extent); + + image_data_32 image(width,height); + reader->read(x_off, y_off, image); + feature->set_raster(boost::make_shared(intersect, image)); + } + } } - } - } - catch (mapnik::image_reader_exception const& ex) - { - std::cerr << "Raster Plugin: image reader exception caught:" << ex.what() << std::endl; - } - catch (...) - { - std::cerr << "Raster Plugin: exception caught" << std::endl; - } + } + catch (mapnik::image_reader_exception const& ex) + { + std::cerr << "Raster Plugin: image reader exception caught:" << ex.what() << std::endl; + } + catch (...) + { + std::cerr << "Raster Plugin: exception caught" << std::endl; + } - ++curIter_; - return feature; - } - return feature_ptr(); + ++curIter_; + return feature; + } + return feature_ptr(); } -std::string -tiled_multi_file_policy::interpolate(std::string const &pattern, int x, int y) const +std::string tiled_multi_file_policy::interpolate(std::string const& pattern, int x, int y) const { - // TODO: make from some sort of configurable interpolation - int tms_y = tile_stride_ * ((image_height_ / tile_size_) - y - 1); - int tms_x = tile_stride_ * x; - std::string xs = (boost::format("%03d/%03d/%03d") % (tms_x / 1000000) % ((tms_x / 1000) % 1000) % (tms_x % 1000)).str(); - std::string ys = (boost::format("%03d/%03d/%03d") % (tms_y / 1000000) % ((tms_y / 1000) % 1000) % (tms_y % 1000)).str(); - std::string rv(pattern); - boost::algorithm::replace_all(rv, "${x}", xs); - boost::algorithm::replace_all(rv, "${y}", ys); - return rv; + // TODO: make from some sort of configurable interpolation + int tms_y = tile_stride_ * ((image_height_ / tile_size_) - y - 1); + int tms_x = tile_stride_ * x; + std::string xs = (boost::format("%03d/%03d/%03d") % (tms_x / 1000000) % ((tms_x / 1000) % 1000) % (tms_x % 1000)).str(); + std::string ys = (boost::format("%03d/%03d/%03d") % (tms_y / 1000000) % ((tms_y / 1000) % 1000) % (tms_y % 1000)).str(); + std::string rv(pattern); + boost::algorithm::replace_all(rv, "${x}", xs); + boost::algorithm::replace_all(rv, "${y}", ys); + return rv; } template class raster_featureset; diff --git a/plugins/input/raster/raster_featureset.hpp b/plugins/input/raster/raster_featureset.hpp index 4c2bb9816..7936edc4e 100644 --- a/plugins/input/raster/raster_featureset.hpp +++ b/plugins/input/raster/raster_featureset.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,14 +19,16 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ + #ifndef RASTER_FEATURESET_HPP #define RASTER_FEATURESET_HPP -#include - #include "raster_datasource.hpp" #include "raster_info.hpp" +// stl +#include + // boost #include #include @@ -42,19 +44,19 @@ public: const single_file_policy* p_; public: explicit const_iterator(const single_file_policy* p) - :status_(start), - p_(p) {} + : status_(start), + p_(p) {} const_iterator() - :status_(end){} + : status_(end) {} const_iterator(const const_iterator& other) - :status_(other.status_), - p_(other.p_) {} + : status_(other.status_), + p_(other.p_) {} const_iterator& operator++() { - status_=end; + status_ = end; return *this; } @@ -70,12 +72,12 @@ public: bool operator!=(const const_iterator& itr) { - return status_!=itr.status_; + return status_ != itr.status_; } }; explicit single_file_policy(const raster_info& info) - :info_(info) {} + : info_(info) {} const_iterator begin() { @@ -96,213 +98,226 @@ public: return const_iterator(); } - inline int img_width(int reader_width) const - { - return reader_width; - } + inline int img_width(int reader_width) const + { + return reader_width; + } - inline int img_height(int reader_height) const - { - return reader_height; - } + inline int img_height(int reader_height) const + { + return reader_height; + } - inline box2d transform(box2d &) const - { - return box2d(0, 0, 0, 0); - } + inline box2d transform(box2d &) const + { + return box2d(0, 0, 0, 0); + } }; class tiled_file_policy { public: - typedef std::vector::const_iterator const_iterator; + typedef std::vector::const_iterator const_iterator; - tiled_file_policy(std::string const& file, std::string const& format, unsigned tile_size, - box2d extent, box2d bbox,unsigned width, unsigned height) - { - - double lox = extent.minx(); - double loy = extent.miny(); + tiled_file_policy(std::string const& file, + std::string const& format, + unsigned tile_size, + box2d extent, + box2d bbox, + unsigned width, + unsigned height) + { + double lox = extent.minx(); + double loy = extent.miny(); - int max_x = int(std::ceil(double(width)/double(tile_size))); - int max_y = int(std::ceil(double(height)/double(tile_size))); + int max_x = int(std::ceil(double(width) / double(tile_size))); + int max_y = int(std::ceil(double(height) / double(tile_size))); - double pixel_x = extent.width()/double(width); - double pixel_y = extent.height()/double(height); + double pixel_x = extent.width() / double(width); + double pixel_y = extent.height() / double(height); #ifdef MAPNIK_DEBUG - std::clog << "Raster Plugin: PIXEL SIZE("<< pixel_x << "," << pixel_y << ")" << std::endl; + std::clog << "Raster Plugin: PIXEL SIZE("<< pixel_x << "," << pixel_y << ")" << std::endl; #endif - box2d e = bbox.intersect(extent); + box2d e = bbox.intersect(extent); - for (int x = 0 ; x < max_x ; ++x) - { - for (int y = 0 ; y < max_y ; ++y) - { - double x0 = lox + x*tile_size*pixel_x; - double y0 = loy + y*tile_size*pixel_y; - double x1 = x0 + tile_size*pixel_x; - double y1 = y0 + tile_size*pixel_y; - - if (e.intersects(box2d(x0,y0,x1,y1))) + for (int x = 0; x < max_x; ++x) + { + for (int y = 0; y < max_y; ++y) { - box2d tile_box = e.intersect(box2d(x0,y0,x1,y1)); - raster_info info(file,format,tile_box,tile_size,tile_size); - infos_.push_back(info); + double x0 = lox + x * tile_size * pixel_x; + double y0 = loy + y * tile_size * pixel_y; + double x1 = x0 + tile_size * pixel_x; + double y1 = y0 + tile_size * pixel_y; + + if (e.intersects(box2d(x0, y0, x1, y1))) + { + box2d tile_box = e.intersect(box2d(x0,y0,x1,y1)); + raster_info info(file,format,tile_box,tile_size,tile_size); + infos_.push_back(info); + } } - } - } + } #ifdef MAPNIK_DEBUG - std::clog << "Raster Plugin: INFO SIZE=" << infos_.size() << " " << file << std::endl; + std::clog << "Raster Plugin: INFO SIZE=" << infos_.size() << " " << file << std::endl; #endif - } + } - const_iterator begin() - { - return infos_.begin(); - } + const_iterator begin() + { + return infos_.begin(); + } - const_iterator end() - { - return infos_.end(); - } + const_iterator end() + { + return infos_.end(); + } - inline int img_width(int reader_width) const - { - return reader_width; - } + inline int img_width(int reader_width) const + { + return reader_width; + } - inline int img_height(int reader_height) const - { - return reader_height; - } + inline int img_height(int reader_height) const + { + return reader_height; + } - inline box2d transform(box2d &) const - { - return box2d(0, 0, 0, 0); - } + inline box2d transform(box2d&) const + { + return box2d(0, 0, 0, 0); + } private: - std::vector infos_; + std::vector infos_; }; class tiled_multi_file_policy { public: - typedef std::vector::const_iterator const_iterator; + typedef std::vector::const_iterator const_iterator; - tiled_multi_file_policy(std::string const& file_pattern, std::string const& format, unsigned tile_size, - box2d extent, box2d bbox,unsigned width, unsigned height, - unsigned tile_stride) - : image_width_(width), image_height_(height), tile_size_(tile_size), tile_stride_(tile_stride) - { - - double lox = extent.minx(); - double loy = extent.miny(); + tiled_multi_file_policy(std::string const& file_pattern, + std::string const& format, + unsigned tile_size, + box2d extent, + box2d bbox, + unsigned width, + unsigned height, + unsigned tile_stride) + : image_width_(width), + image_height_(height), + tile_size_(tile_size), + tile_stride_(tile_stride) + { + double lox = extent.minx(); + double loy = extent.miny(); - int max_x = int(std::ceil(double(width)/double(tile_size))); - int max_y = int(std::ceil(double(height)/double(tile_size))); + //int max_x = int(std::ceil(double(width) / double(tile_size))); + //int max_y = int(std::ceil(double(height) / double(tile_size))); - double pixel_x = extent.width()/double(width); - double pixel_y = extent.height()/double(height); + double pixel_x = extent.width() / double(width); + double pixel_y = extent.height() / double(height); #ifdef MAPNIK_DEBUG - std::clog << "Raster Plugin: PIXEL SIZE("<< pixel_x << "," << pixel_y << ")" << std::endl; + std::clog << "Raster Plugin: PIXEL SIZE("<< pixel_x << "," << pixel_y << ")" << std::endl; #endif - // intersection of query with extent => new query - box2d e = bbox.intersect(extent); + // intersection of query with extent => new query + box2d e = bbox.intersect(extent); - const int x_min = int(std::floor((e.minx() - lox) / (tile_size * pixel_x))); - const int y_min = int(std::floor((e.miny() - loy) / (tile_size * pixel_y))); - const int x_max = int(std::ceil((e.maxx() - lox) / (tile_size * pixel_x))); - const int y_max = int(std::ceil((e.maxy() - loy) / (tile_size * pixel_y))); + const int x_min = int(std::floor((e.minx() - lox) / (tile_size * pixel_x))); + const int y_min = int(std::floor((e.miny() - loy) / (tile_size * pixel_y))); + const int x_max = int(std::ceil((e.maxx() - lox) / (tile_size * pixel_x))); + const int y_max = int(std::ceil((e.maxy() - loy) / (tile_size * pixel_y))); - for (int x = x_min ; x < x_max ; ++x) - { - for (int y = y_min ; y < y_max ; ++y) - { - // x0, y0, x1, y1 => projection-space image coordinates. - double x0 = lox + x*tile_size*pixel_x; - double y0 = loy + y*tile_size*pixel_y; - double x1 = x0 + tile_size*pixel_x; - double y1 = y0 + tile_size*pixel_y; - - // check if it intersects the query - if (e.intersects(box2d(x0,y0,x1,y1))) + for (int x = x_min; x < x_max; ++x) + { + for (int y = y_min; y < y_max; ++y) { - // tile_box => intersection of tile with query in projection-space. - box2d tile_box = e.intersect(box2d(x0,y0,x1,y1)); - std::string file = interpolate(file_pattern, x, y); - raster_info info(file,format,tile_box,tile_size,tile_size); - infos_.push_back(info); + // x0, y0, x1, y1 => projection-space image coordinates. + double x0 = lox + x*tile_size*pixel_x; + double y0 = loy + y*tile_size*pixel_y; + double x1 = x0 + tile_size*pixel_x; + double y1 = y0 + tile_size*pixel_y; + + // check if it intersects the query + if (e.intersects(box2d(x0,y0,x1,y1))) + { + // tile_box => intersection of tile with query in projection-space. + box2d tile_box = e.intersect(box2d(x0,y0,x1,y1)); + std::string file = interpolate(file_pattern, x, y); + raster_info info(file,format,tile_box,tile_size,tile_size); + infos_.push_back(info); + } } - } - } + } #ifdef MAPNIK_DEBUG - std::clog << "Raster Plugin: INFO SIZE=" << infos_.size() << " " << file_pattern << std::endl; + std::clog << "Raster Plugin: INFO SIZE=" << infos_.size() << " " << file_pattern << std::endl; #endif - } + } - const_iterator begin() - { - return infos_.begin(); - } - - const_iterator end() - { - return infos_.end(); - } + const_iterator begin() + { + return infos_.begin(); + } + + const_iterator end() + { + return infos_.end(); + } - inline int img_width(int) const - { - return image_width_; - } + inline int img_width(int) const + { + return image_width_; + } - inline int img_height(int) const - { - return image_height_; - } + inline int img_height(int) const + { + return image_height_; + } - inline box2d transform(box2d &box) const - { - int x_offset = int(std::floor(box.minx() / tile_size_)); - int y_offset = int(std::floor(box.miny() / tile_size_)); - box2d rem(x_offset * tile_size_, y_offset * tile_size_, - x_offset * tile_size_, y_offset * tile_size_); - box.init(box.minx() - rem.minx(), - box.miny() - rem.miny(), - box.maxx() - rem.maxx(), - box.maxy() - rem.maxy()); - return rem; - } + inline box2d transform(box2d& box) const + { + int x_offset = int(std::floor(box.minx() / tile_size_)); + int y_offset = int(std::floor(box.miny() / tile_size_)); + box2d rem(x_offset * tile_size_, + y_offset * tile_size_, + x_offset * tile_size_, + y_offset * tile_size_); + box.init(box.minx() - rem.minx(), + box.miny() - rem.miny(), + box.maxx() - rem.maxx(), + box.maxy() - rem.maxy()); + return rem; + } private: - std::string interpolate(std::string const &pattern, int x, int y) const; + std::string interpolate(std::string const& pattern, int x, int y) const; - unsigned int image_width_, image_height_, tile_size_, tile_stride_; - std::vector infos_; + unsigned int image_width_, image_height_, tile_size_, tile_stride_; + std::vector infos_; }; template class raster_featureset : public mapnik::Featureset { - typedef typename LookupPolicy::const_iterator iterator_type; - LookupPolicy policy_; - int feature_id_; - mapnik::box2d extent_; - mapnik::box2d bbox_; - iterator_type curIter_; - iterator_type endIter_; + typedef typename LookupPolicy::const_iterator iterator_type; + LookupPolicy policy_; + int feature_id_; + mapnik::box2d extent_; + mapnik::box2d bbox_; + iterator_type curIter_; + iterator_type endIter_; public: - raster_featureset(LookupPolicy const& policy,box2d const& exttent, mapnik::query const& q); - virtual ~raster_featureset(); - mapnik::feature_ptr next(); + raster_featureset(LookupPolicy const& policy,box2d const& exttent, mapnik::query const& q); + virtual ~raster_featureset(); + mapnik::feature_ptr next(); }; -#endif //RASTER_FEATURESET_HPP +#endif // RASTER_FEATURESET_HPP diff --git a/plugins/input/raster/raster_info.cpp b/plugins/input/raster/raster_info.cpp index 72ec49a59..ea3d219ab 100644 --- a/plugins/input/raster/raster_info.cpp +++ b/plugins/input/raster/raster_info.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,32 +19,38 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id: raster_info.cc 17 2005-03-08 23:58:43Z pavlenko $ #include "raster_info.hpp" -raster_info::raster_info(std::string const& file, std::string const& format, - mapnik::box2d const& extent, unsigned width, unsigned height) - :file_(file), - format_(format), - extent_(extent), - width_(width), - height_(height) {} +raster_info::raster_info(std::string const& file, + std::string const& format, + mapnik::box2d const& extent, + unsigned width, + unsigned height) + : file_(file), + format_(format), + extent_(extent), + width_(width), + height_(height) +{ +} raster_info::raster_info(const raster_info& rhs) - :file_(rhs.file_), - format_(rhs.format_), - extent_(rhs.extent_), - width_(rhs.width_), - height_(rhs.height_) {} + : file_(rhs.file_), + format_(rhs.format_), + extent_(rhs.extent_), + width_(rhs.width_), + height_(rhs.height_) +{ +} void raster_info::swap(raster_info& other) throw() { - file_=other.file_; - format_=other.format_; - extent_=other.extent_; - width_=other.width_; - height_=other.height_; + file_ = other.file_; + format_ = other.format_; + extent_ = other.extent_; + width_ = other.width_; + height_ = other.height_; } @@ -54,6 +60,3 @@ raster_info& raster_info::operator=(const raster_info& rhs) swap(tmp); return *this; } - - - diff --git a/plugins/input/raster/raster_info.hpp b/plugins/input/raster/raster_info.hpp index 63ff43e18..40a650e83 100644 --- a/plugins/input/raster/raster_info.hpp +++ b/plugins/input/raster/raster_info.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,25 +19,25 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//$Id: raster_info.hh 17 2005-03-08 23:58:43Z pavlenko $ #ifndef RASTER_INFO_HPP #define RASTER_INFO_HPP #include "raster_datasource.hpp" + +// stl #include using mapnik::box2d; class raster_info { - std::string file_; - std::string format_; - box2d extent_; - unsigned width_; - unsigned height_; public: - raster_info(const std::string& file,const std::string& format, const box2d& extent, unsigned width, unsigned height); + raster_info(const std::string& file, + const std::string& format, + const box2d& extent, + unsigned width, + unsigned height); raster_info(const raster_info& rhs); raster_info& operator=(const raster_info& rhs); inline box2d const& envelope() const {return extent_;} @@ -48,6 +48,12 @@ public: private: void swap(raster_info& other) throw(); + + std::string file_; + std::string format_; + box2d extent_; + unsigned width_; + unsigned height_; }; -#endif //RASTER_INFO_HPP +#endif // RASTER_INFO_HPP diff --git a/plugins/input/rasterlite/rasterlite_datasource.cpp b/plugins/input/rasterlite/rasterlite_datasource.cpp index 8fadb4e0b..eb68c2680 100644 --- a/plugins/input/rasterlite/rasterlite_datasource.cpp +++ b/plugins/input/rasterlite/rasterlite_datasource.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2007 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/plugins/input/rasterlite/rasterlite_include.hpp b/plugins/input/rasterlite/rasterlite_include.hpp index cf7995a86..843d01ca2 100644 --- a/plugins/input/rasterlite/rasterlite_include.hpp +++ b/plugins/input/rasterlite/rasterlite_include.hpp @@ -24,8 +24,8 @@ #define RASTERLITE_INCLUDE_HPP extern "C" { - #include - #include + #include + #include } #endif // RASTERLITE_INCLUDE_HPP diff --git a/plugins/input/shape/dbf_test.cpp b/plugins/input/shape/dbf_test.cpp index c59a4d064..5a5d48fbf 100644 --- a/plugins/input/shape/dbf_test.cpp +++ b/plugins/input/shape/dbf_test.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/plugins/input/shape/dbfile.cpp b/plugins/input/shape/dbfile.cpp index 63b390637..47a67d8e7 100644 --- a/plugins/input/shape/dbfile.cpp +++ b/plugins/input/shape/dbfile.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/plugins/input/shape/dbfile.hpp b/plugins/input/shape/dbfile.hpp index f2e4e3dab..f855c9a1e 100644 --- a/plugins/input/shape/dbfile.hpp +++ b/plugins/input/shape/dbfile.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/plugins/input/shape/shape_datasource.cpp b/plugins/input/shape/shape_datasource.cpp index f6ca9abfb..45f2b3158 100644 --- a/plugins/input/shape/shape_datasource.cpp +++ b/plugins/input/shape/shape_datasource.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/plugins/input/shape/shape_datasource.hpp b/plugins/input/shape/shape_datasource.hpp index 5fc85d0ed..477b8035b 100644 --- a/plugins/input/shape/shape_datasource.hpp +++ b/plugins/input/shape/shape_datasource.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/plugins/input/shape/shape_featureset.hpp b/plugins/input/shape/shape_featureset.hpp index 285e74fa7..ec8e6d0c5 100644 --- a/plugins/input/shape/shape_featureset.hpp +++ b/plugins/input/shape/shape_featureset.hpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/agg/agg_renderer.cpp b/src/agg/agg_renderer.cpp index ae482aa32..9275c0d76 100644 --- a/src/agg/agg_renderer.cpp +++ b/src/agg/agg_renderer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/agg/process_building_symbolizer.cpp b/src/agg/process_building_symbolizer.cpp index dda8090d8..a9b8b0dbd 100644 --- a/src/agg/process_building_symbolizer.cpp +++ b/src/agg/process_building_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/agg/process_glyph_symbolizer.cpp b/src/agg/process_glyph_symbolizer.cpp index 674c2eed7..276db2668 100644 --- a/src/agg/process_glyph_symbolizer.cpp +++ b/src/agg/process_glyph_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/agg/process_line_pattern_symbolizer.cpp b/src/agg/process_line_pattern_symbolizer.cpp index 99559f167..17f9cd191 100644 --- a/src/agg/process_line_pattern_symbolizer.cpp +++ b/src/agg/process_line_pattern_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/agg/process_line_symbolizer.cpp b/src/agg/process_line_symbolizer.cpp index a4de58dd8..c44cb273c 100644 --- a/src/agg/process_line_symbolizer.cpp +++ b/src/agg/process_line_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/agg/process_markers_symbolizer.cpp b/src/agg/process_markers_symbolizer.cpp index cd9757a01..0765bcf6f 100644 --- a/src/agg/process_markers_symbolizer.cpp +++ b/src/agg/process_markers_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/agg/process_point_symbolizer.cpp b/src/agg/process_point_symbolizer.cpp index d9974d82e..fb3035d8e 100644 --- a/src/agg/process_point_symbolizer.cpp +++ b/src/agg/process_point_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/agg/process_polygon_pattern_symbolizer.cpp b/src/agg/process_polygon_pattern_symbolizer.cpp index 23ea90043..a9a036ae5 100644 --- a/src/agg/process_polygon_pattern_symbolizer.cpp +++ b/src/agg/process_polygon_pattern_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/agg/process_polygon_symbolizer.cpp b/src/agg/process_polygon_symbolizer.cpp index e284a5c32..c376d9544 100644 --- a/src/agg/process_polygon_symbolizer.cpp +++ b/src/agg/process_polygon_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/agg/process_raster_symbolizer.cpp b/src/agg/process_raster_symbolizer.cpp index af1329b96..0f3e062f0 100644 --- a/src/agg/process_raster_symbolizer.cpp +++ b/src/agg/process_raster_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/agg/process_shield_symbolizer.cpp b/src/agg/process_shield_symbolizer.cpp index 4a104d69c..94a9caeec 100644 --- a/src/agg/process_shield_symbolizer.cpp +++ b/src/agg/process_shield_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/agg/process_text_symbolizer.cpp b/src/agg/process_text_symbolizer.cpp index 3d7440c19..c45e05c46 100644 --- a/src/agg/process_text_symbolizer.cpp +++ b/src/agg/process_text_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/arrow.cpp b/src/arrow.cpp index bf577da22..593452e4b 100644 --- a/src/arrow.cpp +++ b/src/arrow.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/box2d.cpp b/src/box2d.cpp index 4998994cc..16fe3148b 100644 --- a/src/box2d.cpp +++ b/src/box2d.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/cairo_renderer.cpp b/src/cairo_renderer.cpp index e1976f547..3939d49a6 100644 --- a/src/cairo_renderer.cpp +++ b/src/cairo_renderer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2008 Tom Hughes + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/color.cpp b/src/color.cpp index 368d50d14..dde0575c5 100644 --- a/src/color.cpp +++ b/src/color.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2009 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/datasource_cache.cpp b/src/datasource_cache.cpp index 5c0b8620b..a3847ee2f 100644 --- a/src/datasource_cache.cpp +++ b/src/datasource_cache.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/distance.cpp b/src/distance.cpp index 1fff44143..683c69230 100644 --- a/src/distance.cpp +++ b/src/distance.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/expression_string.cpp b/src/expression_string.cpp index b3d5dcc0b..78932bdf0 100644 --- a/src/expression_string.cpp +++ b/src/expression_string.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2009 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/feature_type_style.cpp b/src/feature_type_style.cpp index f9047f595..6350c4b39 100644 --- a/src/feature_type_style.cpp +++ b/src/feature_type_style.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/filter_factory.cpp b/src/filter_factory.cpp index 97e7e6129..f55cd096c 100644 --- a/src/filter_factory.cpp +++ b/src/filter_factory.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/font_engine_freetype.cpp b/src/font_engine_freetype.cpp index a1b586192..769abcbe7 100644 --- a/src/font_engine_freetype.cpp +++ b/src/font_engine_freetype.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/font_set.cpp b/src/font_set.cpp index f1a975ba4..df24f4c37 100644 --- a/src/font_set.cpp +++ b/src/font_set.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/gradient.cpp b/src/gradient.cpp index 35dc2ccc5..8e9c7278c 100644 --- a/src/gradient.cpp +++ b/src/gradient.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavelenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/graphics.cpp b/src/graphics.cpp index 46f30d3c7..90099da1b 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/grid/process_markers_symbolizer.cpp b/src/grid/process_markers_symbolizer.cpp index 84b2da613..347324326 100644 --- a/src/grid/process_markers_symbolizer.cpp +++ b/src/grid/process_markers_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/image_reader.cpp b/src/image_reader.cpp index 504538096..75f98d881 100644 --- a/src/image_reader.cpp +++ b/src/image_reader.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/image_util.cpp b/src/image_util.cpp index dc1fbbebe..39ffa9163 100644 --- a/src/image_util.cpp +++ b/src/image_util.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/jpeg_reader.cpp b/src/jpeg_reader.cpp index 6f665daa8..2828ca2d0 100644 --- a/src/jpeg_reader.cpp +++ b/src/jpeg_reader.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/layer.cpp b/src/layer.cpp index ba40a85f6..1700dec9f 100644 --- a/src/layer.cpp +++ b/src/layer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/libxml2_loader.cpp b/src/libxml2_loader.cpp index ec9392c33..f935243ce 100644 --- a/src/libxml2_loader.cpp +++ b/src/libxml2_loader.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2007 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/line_pattern_symbolizer.cpp b/src/line_pattern_symbolizer.cpp index 4703f98d5..f03cc90ae 100644 --- a/src/line_pattern_symbolizer.cpp +++ b/src/line_pattern_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/line_symbolizer.cpp b/src/line_symbolizer.cpp index d6ae7e08f..ccece0f8a 100644 --- a/src/line_symbolizer.cpp +++ b/src/line_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/load_map.cpp b/src/load_map.cpp index f31767583..381ac4bdb 100644 --- a/src/load_map.cpp +++ b/src/load_map.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/map.cpp b/src/map.cpp index 951b76a90..2f6e7af43 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/marker_cache.cpp b/src/marker_cache.cpp index 16a1d1e63..b93ce663c 100644 --- a/src/marker_cache.cpp +++ b/src/marker_cache.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/markers_symbolizer.cpp b/src/markers_symbolizer.cpp index 7588d66e9..bd30cf47e 100644 --- a/src/markers_symbolizer.cpp +++ b/src/markers_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/memory.cpp b/src/memory.cpp index 92a5c14ad..7869a0fe6 100644 --- a/src/memory.cpp +++ b/src/memory.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/memory_datasource.cpp b/src/memory_datasource.cpp index d22bcbd8a..bc60255cd 100644 --- a/src/memory_datasource.cpp +++ b/src/memory_datasource.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/metawriter.cpp b/src/metawriter.cpp index 25022b507..51a56b247 100644 --- a/src/metawriter.cpp +++ b/src/metawriter.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Hermann Kraus + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/metawriter_factory.cpp b/src/metawriter_factory.cpp index fc4ebbc26..fbb33afc3 100644 --- a/src/metawriter_factory.cpp +++ b/src/metawriter_factory.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2011 MapQuest + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/metawriter_inmem.cpp b/src/metawriter_inmem.cpp index b0ca16d1f..27025cde0 100644 --- a/src/metawriter_inmem.cpp +++ b/src/metawriter_inmem.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2011 MapQuest + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/palette.cpp b/src/palette.cpp index 8ef8018fc..0dccde3b7 100644 --- a/src/palette.cpp +++ b/src/palette.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -110,7 +110,9 @@ unsigned rgba_palette::quantize(rgba const& c) const da = sorted_pal_[i].a - c.a; // stop criteria based on properties of used sorting if ((dr+db+dg+da) * (dr+db+dg+da) / 4 > dist) + { break; + } newdist = dr*dr + dg*dg + db*db + da*da; if (newdist < dist) { @@ -118,6 +120,7 @@ unsigned rgba_palette::quantize(rgba const& c) const dist = newdist; } } + for (unsigned i = poz + 1; i < sorted_pal_.size(); i++) { dr = sorted_pal_[i].r - c.r; @@ -126,7 +129,9 @@ unsigned rgba_palette::quantize(rgba const& c) const da = sorted_pal_[i].a - c.a; // stop criteria based on properties of used sorting if ((dr+db+dg+da) * (dr+db+dg+da) / 4 > dist) + { break; + } newdist = dr*dr + dg*dg + db*db + da*da; if (newdist < dist) { @@ -144,7 +149,7 @@ unsigned rgba_palette::quantize(rgba const& c) const void rgba_palette::parse(std::string const& pal, palette_type type) { - int length = pal.length(); + unsigned length = pal.length(); if ((type == PALETTE_RGBA && length % 4 > 0) || (type == PALETTE_RGB && length % 3 > 0) || @@ -163,18 +168,26 @@ void rgba_palette::parse(std::string const& pal, palette_type type) rgb_pal_.clear(); alpha_pal_.clear(); - if (type == PALETTE_RGBA) for (unsigned i = 0; i < length; i += 4) + if (type == PALETTE_RGBA) { - sorted_pal_.push_back(rgba(pal[i], pal[i + 1], pal[i + 2], pal[i + 3])); + for (unsigned i = 0; i < length; i += 4) + { + sorted_pal_.push_back(rgba(pal[i], pal[i + 1], pal[i + 2], pal[i + 3])); + } } - else for (unsigned i = 0; i < length; i += 3) + else { - sorted_pal_.push_back(rgba(pal[i], pal[i + 1], pal[i + 2], 0xFF)); + for (unsigned i = 0; i < length; i += 3) + { + sorted_pal_.push_back(rgba(pal[i], pal[i + 1], pal[i + 2], 0xFF)); + } } // Make sure we have at least one entry in the palette. if (sorted_pal_.size() == 0) + { sorted_pal_.push_back(rgba(0, 0, 0, 0)); + } colors_ = sorted_pal_.size(); @@ -187,7 +200,10 @@ void rgba_palette::parse(std::string const& pal, palette_type type) rgba c = sorted_pal_[i]; color_hashmap_[c] = i; rgb_pal_.push_back(rgb(c)); - if (c.a < 0xFF) alpha_pal_.push_back(c.a); + if (c.a < 0xFF) + { + alpha_pal_.push_back(c.a); + } } } diff --git a/src/parse_path.cpp b/src/parse_path.cpp index d5ac0a9e4..aa7e1f9fe 100644 --- a/src/parse_path.cpp +++ b/src/parse_path.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/placement_finder.cpp b/src/placement_finder.cpp index 9813dab04..b0dafd56b 100644 --- a/src/placement_finder.cpp +++ b/src/placement_finder.cpp @@ -2,8 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko - * Copyright (C) 2006 10East Corp. + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/plugin.cpp b/src/plugin.cpp index 7e5aa9445..e96d71b52 100644 --- a/src/plugin.cpp +++ b/src/plugin.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/png_reader.cpp b/src/png_reader.cpp index 3dfaab3ea..9e642a91b 100644 --- a/src/png_reader.cpp +++ b/src/png_reader.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/point_symbolizer.cpp b/src/point_symbolizer.cpp index c7d62645d..221f922cd 100644 --- a/src/point_symbolizer.cpp +++ b/src/point_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/polygon_pattern_symbolizer.cpp b/src/polygon_pattern_symbolizer.cpp index 4519670b6..234fc000b 100644 --- a/src/polygon_pattern_symbolizer.cpp +++ b/src/polygon_pattern_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/proj_transform.cpp b/src/proj_transform.cpp index 462453deb..e835adf4c 100644 --- a/src/proj_transform.cpp +++ b/src/proj_transform.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/projection.cpp b/src/projection.cpp index c6a74f32a..ca0344cba 100644 --- a/src/projection.cpp +++ b/src/projection.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/raster_colorizer.cpp b/src/raster_colorizer.cpp index 603273b1f..03f2968f5 100644 --- a/src/raster_colorizer.cpp +++ b/src/raster_colorizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/save_map.cpp b/src/save_map.cpp index 0e885c9ce..2a9e8368e 100644 --- a/src/save_map.cpp +++ b/src/save_map.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/scale_denominator.cpp b/src/scale_denominator.cpp index e9cff6dc6..f79a964a8 100644 --- a/src/scale_denominator.cpp +++ b/src/scale_denominator.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/shield_symbolizer.cpp b/src/shield_symbolizer.cpp index c8102448c..6ef85788e 100644 --- a/src/shield_symbolizer.cpp +++ b/src/shield_symbolizer.cpp @@ -2,8 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko - * Copyright (C) 2006 10East Corp. + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/stroke.cpp b/src/stroke.cpp index 0a9ecb40f..fbce4542d 100644 --- a/src/stroke.cpp +++ b/src/stroke.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/svg/process_building_symbolizer.cpp b/src/svg/process_building_symbolizer.cpp index e35bd7384..da56146b6 100644 --- a/src/svg/process_building_symbolizer.cpp +++ b/src/svg/process_building_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/svg/process_glyph_symbolizer.cpp b/src/svg/process_glyph_symbolizer.cpp index cfcea7ed7..7ac35bb4d 100644 --- a/src/svg/process_glyph_symbolizer.cpp +++ b/src/svg/process_glyph_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/svg/process_line_pattern_symbolizer.cpp b/src/svg/process_line_pattern_symbolizer.cpp index a72bd59d9..8a2274284 100644 --- a/src/svg/process_line_pattern_symbolizer.cpp +++ b/src/svg/process_line_pattern_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/svg/process_line_symbolizer.cpp b/src/svg/process_line_symbolizer.cpp index 0e99eb681..825b08d0b 100644 --- a/src/svg/process_line_symbolizer.cpp +++ b/src/svg/process_line_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/svg/process_markers_symbolizer.cpp b/src/svg/process_markers_symbolizer.cpp index c6e88f091..a4bba39bd 100644 --- a/src/svg/process_markers_symbolizer.cpp +++ b/src/svg/process_markers_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/svg/process_point_symbolizer.cpp b/src/svg/process_point_symbolizer.cpp index 0d586e2ea..bc6ab1a9c 100644 --- a/src/svg/process_point_symbolizer.cpp +++ b/src/svg/process_point_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/svg/process_polygon_pattern_symbolizer.cpp b/src/svg/process_polygon_pattern_symbolizer.cpp index 8ff791a81..b3639b193 100644 --- a/src/svg/process_polygon_pattern_symbolizer.cpp +++ b/src/svg/process_polygon_pattern_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/svg/process_polygon_symbolizer.cpp b/src/svg/process_polygon_symbolizer.cpp index d6a65aef9..0c787d407 100644 --- a/src/svg/process_polygon_symbolizer.cpp +++ b/src/svg/process_polygon_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/svg/process_raster_symbolizer.cpp b/src/svg/process_raster_symbolizer.cpp index d68be6793..ee7e0ab27 100644 --- a/src/svg/process_raster_symbolizer.cpp +++ b/src/svg/process_raster_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/svg/process_shield_symbolizer.cpp b/src/svg/process_shield_symbolizer.cpp index b342b321e..7b9ae0311 100644 --- a/src/svg/process_shield_symbolizer.cpp +++ b/src/svg/process_shield_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/svg/process_symbolizers.cpp b/src/svg/process_symbolizers.cpp index 16adc8b28..afa582e52 100644 --- a/src/svg/process_symbolizers.cpp +++ b/src/svg/process_symbolizers.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/svg/process_text_symbolizer.cpp b/src/svg/process_text_symbolizer.cpp index 1b3549c34..5440b1b01 100644 --- a/src/svg/process_text_symbolizer.cpp +++ b/src/svg/process_text_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/svg/svg_generator.cpp b/src/svg/svg_generator.cpp index f2fe7fbfb..8e626eeea 100644 --- a/src/svg/svg_generator.cpp +++ b/src/svg/svg_generator.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/svg/svg_output_attributes.cpp b/src/svg/svg_output_attributes.cpp index a9b209dde..eac93a891 100644 --- a/src/svg/svg_output_attributes.cpp +++ b/src/svg/svg_output_attributes.cpp @@ -3,7 +3,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/svg/svg_renderer.cpp b/src/svg/svg_renderer.cpp index b38644e89..8834644c4 100644 --- a/src/svg/svg_renderer.cpp +++ b/src/svg/svg_renderer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/svg_parser.cpp b/src/svg_parser.cpp index 3bd614392..73c693eb1 100644 --- a/src/svg_parser.cpp +++ b/src/svg_parser.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/svg_path_parser.cpp b/src/svg_path_parser.cpp index 2949ff34b..18539f42f 100644 --- a/src/svg_path_parser.cpp +++ b/src/svg_path_parser.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/svg_points_parser.cpp b/src/svg_points_parser.cpp index c4d410d4b..d7c6fdbb8 100644 --- a/src/svg_points_parser.cpp +++ b/src/svg_points_parser.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/svg_transform_parser.cpp b/src/svg_transform_parser.cpp index ffe11f575..ea3b9bb4d 100644 --- a/src/svg_transform_parser.cpp +++ b/src/svg_transform_parser.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2010 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/symbolizer.cpp b/src/symbolizer.cpp index 240c1b5db..4eba20036 100644 --- a/src/symbolizer.cpp +++ b/src/symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/text_placements.cpp b/src/text_placements.cpp index a8eb3574e..e0c0bc80a 100644 --- a/src/text_placements.cpp +++ b/src/text_placements.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2011 Hermann Kraus + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/text_symbolizer.cpp b/src/text_symbolizer.cpp index dd55a8953..8b2fcf21c 100644 --- a/src/text_symbolizer.cpp +++ b/src/text_symbolizer.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/tiff_reader.cpp b/src/tiff_reader.cpp index 6c000a023..25a5d5724 100644 --- a/src/tiff_reader.cpp +++ b/src/tiff_reader.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/unicode.cpp b/src/unicode.cpp index a768705c3..5665ded5d 100644 --- a/src/unicode.cpp +++ b/src/unicode.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006,2009 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/wkb.cpp b/src/wkb.cpp index 365853571..f704971b7 100644 --- a/src/wkb.cpp +++ b/src/wkb.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2006 Artem Pavlenko + * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/tests/python_tests/datasource_test.py b/tests/python_tests/datasource_test.py index 4d84b3346..a1d4e089b 100644 --- a/tests/python_tests/datasource_test.py +++ b/tests/python_tests/datasource_test.py @@ -59,6 +59,13 @@ def test_feature_attributes(): eq_(lyr.datasource.fields(),['AREA', 'EAS_ID', 'PRFEDEA']) eq_(lyr.datasource.field_types(),['float','int','str']) +def test_ogr_layer_by_sql(): + lyr = mapnik2.Layer('test') + lyr.datasource = mapnik2.Ogr(file='../data/shp/poly.shp', layer_by_sql='SELECT * FROM poly WHERE EAS_ID = 168') + features = lyr.datasource.all_features() + num_feats = len(features) + eq_(num_feats, 1) + def test_hit_grid(): import os from itertools import groupby diff --git a/utils/src_utils/fix_copyright.sh b/utils/src_utils/fix_copyright.sh new file mode 100755 index 000000000..78c068c59 --- /dev/null +++ b/utils/src_utils/fix_copyright.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +if [ $# -ne 1 ] +then + echo "Usage: `basename $0` YEAR" + exit 1 +fi + +YEAR=$1 +DIRECTORIES=( "include/mapnik" "src" "plugins/input" "demo/c++" "demo/viewer" ) + +SED="sed -i -e" +COMMAND="s: \* Copyright (C) 20[0-9][0-9].*: \* Copyright (C) $YEAR Artem Pavlenko:g" + +for d in "${DIRECTORIES[@]}" +do + for f in $(find "../../$d" -type f \( -iname '*.hpp' -o -iname '*.cpp' -o -iname '*.h' -o -iname '*.c' \)); do + $SED "$COMMAND" $f + done +done diff --git a/workspace/mapnik.pro b/workspace/mapnik.pro index 60a86e6be..54805997a 100644 --- a/workspace/mapnik.pro +++ b/workspace/mapnik.pro @@ -1,11 +1,16 @@ # ------------------------------------------------- # QtCreator Project For Mapnik2 # ------------------------------------------------- -QT -= core gui +QT = TARGET = mapnik2 TEMPLATE = lib +INCLUDEPATH = \ + ../deps/agg/include \ + ../include/mapnik2 \ + /usr/include + HEADERS += \ ../include/mapnik/svg/marker_cache.hpp \ ../include/mapnik/svg/svg_converter.hpp \ @@ -212,4 +217,3 @@ include(bindings.pri) unix { DEFINES += LINUX=1 } - diff --git a/workspace/plugins.pri b/workspace/plugins.pri index 8d3cd3137..623ab4567 100644 --- a/workspace/plugins.pri +++ b/workspace/plugins.pri @@ -3,6 +3,8 @@ HEADERS += \ $$PWD/../plugins/input/csv/csv_datasource.hpp \ $$PWD/../plugins/input/gdal/gdal_featureset.hpp \ $$PWD/../plugins/input/gdal/gdal_datasource.hpp \ + $$PWD/../plugins/input/geos/geos_datasource.hpp \ + $$PWD/../plugins/input/geos/geos_featureset.hpp \ $$PWD/../plugins/input/kismet/kismet_featureset.hpp \ $$PWD/../plugins/input/kismet/kismet_datasource.hpp \ $$PWD/../plugins/input/kismet/kismet_types.hpp \ @@ -14,6 +16,7 @@ HEADERS += \ $$PWD/../plugins/input/ogr/ogr_converter.hpp \ $$PWD/../plugins/input/ogr/ogr_featureset.hpp \ $$PWD/../plugins/input/ogr/ogr_datasource.hpp \ + $$PWD/../plugins/input/ogr/ogr_layer_ptr.hpp \ $$PWD/../plugins/input/ogr/ogr_feature_ptr.hpp \ $$PWD/../plugins/input/ogr/ogr_index.hpp \ $$PWD/../plugins/input/ogr/ogr_index_featureset.hpp \ @@ -51,6 +54,8 @@ SOURCES += \ $$PWD/../plugins/input/csv/csv_datasource.cpp \ $$PWD/../plugins/input/gdal/gdal_featureset.cpp \ $$PWD/../plugins/input/gdal/gdal_datasource.cpp \ + $$PWD/../plugins/input/geos/geos_datasource.cpp \ + $$PWD/../plugins/input/geos/geos_featureset.cpp \ $$PWD/../plugins/input/kismet/kismet_featureset.cpp \ $$PWD/../plugins/input/kismet/kismet_datasource.cpp \ $$PWD/../plugins/input/occi/occi_featureset.cpp \