Merge branch 'master' of github.com:mapnik/mapnik

This commit is contained in:
Dane Springmeyer 2011-10-25 15:08:19 -07:00
commit 06040d5847
270 changed files with 1751 additions and 1503 deletions

View file

@ -485,10 +485,11 @@ def Ogr(**keywords):
Required keyword arguments: Required keyword arguments:
file -- path to OGR supported dataset 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: 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) base -- path prefix (default None)
encoding -- file encoding (default 'utf-8') encoding -- file encoding (default 'utf-8')
multiple_geometries -- boolean, direct the Mapnik wkb reader to interpret as multigeometries (default False) multiple_geometries -- boolean, direct the Mapnik wkb reader to interpret as multigeometries (default False)

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public

View file

@ -1,5 +1,6 @@
/* This file is part of Mapnik (c++ mapping toolkit) /* 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 * Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License

View file

@ -1,5 +1,6 @@
/* This file is part of Mapnik (c++ mapping toolkit) /* 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 * Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License

View file

@ -1,5 +1,6 @@
/* This file is part of Mapnik (c++ mapping toolkit) /* 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 * Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -35,6 +36,6 @@ info_dialog::info_dialog(QVector<QPair<QString,QString> > const& info, QWidget *
QTableWidgetItem *keyItem = new QTableWidgetItem(info[i].first); QTableWidgetItem *keyItem = new QTableWidgetItem(info[i].first);
QTableWidgetItem *valueItem = new QTableWidgetItem(info[i].second); QTableWidgetItem *valueItem = new QTableWidgetItem(info[i].second);
ui.tableWidget->setItem(i,0,keyItem); ui.tableWidget->setItem(i,0,keyItem);
ui.tableWidget->setItem(i,1,valueItem); ui.tableWidget->setItem(i,1,valueItem);
} }
} }

View file

@ -1,5 +1,6 @@
/* This file is part of Mapnik (c++ mapping toolkit) /* 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 * Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License

View file

@ -1,5 +1,6 @@
/* This file is part of Mapnik (c++ mapping toolkit) /* 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 * Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * 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) : QDialog(parent)
{ {
ui.setupUi(this); ui.setupUi(this);
ui.tableWidget->setHorizontalHeaderItem(0,new QTableWidgetItem("Name")); ui.tableWidget->setHorizontalHeaderItem(0,new QTableWidgetItem("Name"));
ui.tableWidget->setHorizontalHeaderItem(1,new QTableWidgetItem("Value")); ui.tableWidget->setHorizontalHeaderItem(1,new QTableWidgetItem("Value"));
// Layer name // Layer name
ui.layerNameEdit->setText(QString(lay.name().c_str())); ui.layerNameEdit->setText(QString(lay.name().c_str()));
// Named Styles : TODO!!! // Named Styles : TODO!!!
// Datasource // Datasource
mapnik::datasource_ptr ds = lay.datasource(); mapnik::datasource_ptr ds = lay.datasource();
if (ds) 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 *keyItem = new QTableWidgetItem(QString(pos->first.c_str()));
QTableWidgetItem *valueItem = new QTableWidgetItem(QString((*result).c_str())); QTableWidgetItem *valueItem = new QTableWidgetItem(QString((*result).c_str()));
ui.tableWidget->setItem(index,0,keyItem); ui.tableWidget->setItem(index,0,keyItem);
ui.tableWidget->setItem(index,1,valueItem); ui.tableWidget->setItem(index,1,valueItem);
++index; ++index;
} }
} }
} }
} }

View file

@ -1,5 +1,6 @@
/* This file is part of Mapnik (c++ mapping toolkit) /* 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 * Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License

View file

@ -1,5 +1,6 @@
/* This file is part of Mapnik (c++ mapping toolkit) /* 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 * Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -37,7 +38,7 @@ void LayerDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
else else
painter->setBrush(QBrush(QColor(255, 0, 0, 64))); painter->setBrush(QBrush(QColor(255, 0, 0, 64)));
painter->drawRoundRect(option.rect,4,4); painter->drawRoundRect(option.rect,4,4);
if (option.state & QStyle::State_Selected) if (option.state & QStyle::State_Selected)

View file

@ -1,5 +1,6 @@
/* This file is part of Mapnik (c++ mapping toolkit) /* 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 * Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -32,11 +33,11 @@ class QPainter;
class LayerDelegate : public QAbstractItemDelegate class LayerDelegate : public QAbstractItemDelegate
{ {
Q_OBJECT Q_OBJECT
public: public:
LayerDelegate(QObject *parent = 0); LayerDelegate(QObject *parent = 0);
void paint(QPainter *painter, const QStyleOptionViewItem &option, void paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index) const; const QModelIndex &index) const;
QSize sizeHint(const QStyleOptionViewItem &option, QSize sizeHint(const QStyleOptionViewItem &option,
const QModelIndex &index ) const; const QModelIndex &index ) const;
}; };

View file

@ -1,5 +1,6 @@
/* This file is part of Mapnik (c++ mapping toolkit) /* 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 * Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * 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()) if (map_->layers().at(index.row()).isActive())
return QVariant(Qt::Checked); return QVariant(Qt::Checked);
else else
return QVariant(Qt::Unchecked); return QVariant(Qt::Unchecked);
} }
else else
@ -75,7 +76,7 @@ QVariant LayerListModel::headerData(int section, Qt::Orientation orientation,
{ {
if (role != Qt::DisplayRole) if (role != Qt::DisplayRole)
return QVariant(); return QVariant();
if (orientation == Qt::Horizontal) if (orientation == Qt::Horizontal)
return QString("TODO Column %1").arg(section); return QString("TODO Column %1").arg(section);
else else
@ -86,22 +87,22 @@ bool LayerListModel::setData(const QModelIndex &index,
const QVariant &value, int role) const QVariant &value, int role)
{ {
if (!map_) return false; if (!map_) return false;
if (index.isValid() && role == Qt::CheckStateRole) if (index.isValid() && role == Qt::CheckStateRole)
{ {
int status = value.toInt(); int status = value.toInt();
std::vector<mapnik::layer> & layers = const_cast<std::vector<mapnik::layer>& >(map_->layers()); std::vector<mapnik::layer> & layers = const_cast<std::vector<mapnik::layer>& >(map_->layers());
layers.at(index.row()).setActive(status); layers.at(index.row()).setActive(status);
emit dataChanged(index, index); emit dataChanged(index, index);
return true; return true;
} }
return false; return false;
} }
Qt::ItemFlags LayerListModel::flags(QModelIndex const& index) const Qt::ItemFlags LayerListModel::flags(QModelIndex const& index) const
{ {
Qt::ItemFlags flags = QAbstractItemModel::flags(index); Qt::ItemFlags flags = QAbstractItemModel::flags(index);
if (index.isValid()) if (index.isValid())
flags |= Qt::ItemIsUserCheckable; flags |= Qt::ItemIsUserCheckable;
return flags; return flags;
@ -121,4 +122,4 @@ boost::optional<mapnik::layer&> LayerListModel::map_layer(int i)

View file

@ -1,5 +1,6 @@
/* This file is part of Mapnik (c++ mapping toolkit) /* 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 * Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * 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; int rowCount(const QModelIndex &parent = QModelIndex()) const;
QVariant data(const QModelIndex &index, int role) const; QVariant data(const QModelIndex &index, int role) const;
QVariant headerData(int section, Qt::Orientation orientation, 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, bool setData(const QModelIndex &index, const QVariant &value,
int role = Qt::EditRole); int role = Qt::EditRole);
Qt::ItemFlags flags(QModelIndex const& index) const; Qt::ItemFlags flags(QModelIndex const& index) const;
boost::optional<mapnik::layer&> map_layer(int i); boost::optional<mapnik::layer&> map_layer(int i);
private: private:

View file

@ -1,5 +1,6 @@
/* This file is part of Mapnik (c++ mapping toolkit) /* 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 * Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -41,7 +42,7 @@ LayerTab::LayerTab(QWidget* parent)
void LayerTab::paintEvent(QPaintEvent *e) void LayerTab::paintEvent(QPaintEvent *e)
{ {
QListView::paintEvent(e); QListView::paintEvent(e);
} }
void LayerTab::dataChanged(const QModelIndex &topLeft, void LayerTab::dataChanged(const QModelIndex &topLeft,
@ -55,7 +56,7 @@ void LayerTab::dataChanged(const QModelIndex &topLeft,
void LayerTab::selectionChanged(const QItemSelection & selected, const QItemSelection &) void LayerTab::selectionChanged(const QItemSelection & selected, const QItemSelection &)
{ {
QModelIndexList list = selected.indexes(); QModelIndexList list = selected.indexes();
if (list.size() != 0) if (list.size() != 0)
{ {
std::cout << "SELECTED LAYER ->" << list[0].row() << "\n"; std::cout << "SELECTED LAYER ->" << list[0].row() << "\n";
emit layerSelected(list[0].row()); emit layerSelected(list[0].row());
@ -69,7 +70,7 @@ void LayerTab::layerInfo()
if (indexes.size() > 0) if (indexes.size() > 0)
{ {
qDebug("id = %d",indexes[0].row()); qDebug("id = %d",indexes[0].row());
} }
} }
@ -81,7 +82,7 @@ void LayerTab::layerInfo2(QModelIndex const& index)
unsigned i = index.row(); unsigned i = index.row();
LayerListModel * model = static_cast<LayerListModel*>(this->model()); LayerListModel * model = static_cast<LayerListModel*>(this->model());
boost::optional<mapnik::layer&> layer = model->map_layer(i); boost::optional<mapnik::layer&> layer = model->map_layer(i);
if (layer) if (layer)
{ {
layer_info_dialog dlg(*layer,this); layer_info_dialog dlg(*layer,this);
@ -91,7 +92,7 @@ void LayerTab::layerInfo2(QModelIndex const& index)
StyleTab::StyleTab(QWidget*) StyleTab::StyleTab(QWidget*)
{ {
} }
void StyleTab::contextMenuEvent(QContextMenuEvent * event ) void StyleTab::contextMenuEvent(QContextMenuEvent * event )

View file

@ -1,5 +1,6 @@
/* This file is part of Mapnik (c++ mapping toolkit) /* 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 * Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -33,10 +34,10 @@ class LayerTab : public QListView
void paintEvent(QPaintEvent *e); void paintEvent(QPaintEvent *e);
signals: signals:
void update_mapwidget(); void update_mapwidget();
void layerSelected(int) const; void layerSelected(int) const;
public slots: public slots:
void layerInfo(); void layerInfo();
void layerInfo2(QModelIndex const&); void layerInfo2(QModelIndex const&);
protected slots: protected slots:
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight); void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
void selectionChanged(const QItemSelection & selected, const QItemSelection &); void selectionChanged(const QItemSelection & selected, const QItemSelection &);
@ -51,4 +52,4 @@ protected:
void contextMenuEvent(QContextMenuEvent * event ); void contextMenuEvent(QContextMenuEvent * event );
}; };
#endif #endif

View file

@ -1,5 +1,6 @@
/* This file is part of Mapnik (c++ mapping toolkit) /* 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 * Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * 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::datasource_cache;
using mapnik::freetype_engine; using mapnik::freetype_engine;
QCoreApplication::setOrganizationName("Mapnik"); QCoreApplication::setOrganizationName("Mapnik");
QCoreApplication::setOrganizationDomain("mapnik.org"); QCoreApplication::setOrganizationDomain("mapnik.org");
QCoreApplication::setApplicationName("Viewer"); QCoreApplication::setApplicationName("Viewer");
QSettings settings("viewer.ini",QSettings::IniFormat); QSettings settings("viewer.ini",QSettings::IniFormat);
// register input plug-ins // register input plug-ins
QString plugins_dir = settings.value("mapnik/plugins_dir", QString plugins_dir = settings.value("mapnik/plugins_dir",
QVariant("/usr/local/lib/mapnik2/input/")).toString(); QVariant("/usr/local/lib/mapnik2/input/")).toString();
@ -54,8 +55,8 @@ int main( int argc, char **argv )
freetype_engine::register_fonts(font_dir.toStdString()); freetype_engine::register_fonts(font_dir.toStdString());
} }
settings.endArray(); settings.endArray();
QApplication app( argc, argv ); QApplication app( argc, argv );
MainWindow window; MainWindow window;
window.show(); window.show();
if (argc > 1) window.open(argv[1]); 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); double scaling_factor = QString(argv[3]).toDouble(&ok);
if (ok) window.set_scaling_factor(scaling_factor); if (ok) window.set_scaling_factor(scaling_factor);
} }
return app.exec(); return app.exec();
} }

View file

@ -1,5 +1,6 @@
/* This file is part of Mapnik (c++ mapping toolkit) /* 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 * Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -47,42 +48,42 @@
MainWindow::MainWindow() MainWindow::MainWindow()
: filename_(), : filename_(),
default_extent_(-20037508.3428,-20037508.3428,20037508.3428,20037508.3428) default_extent_(-20037508.3428,-20037508.3428,20037508.3428,20037508.3428)
{ {
mapWidget_ = new MapWidget(this); mapWidget_ = new MapWidget(this);
QSplitter *splitter = new QSplitter(this); QSplitter *splitter = new QSplitter(this);
QTabWidget *tabWidget=new QTabWidget; QTabWidget *tabWidget=new QTabWidget;
layerTab_ = new LayerTab; layerTab_ = new LayerTab;
layerTab_->setFocusPolicy(Qt::NoFocus); layerTab_->setFocusPolicy(Qt::NoFocus);
layerTab_->setIconSize(QSize(16,16)); layerTab_->setIconSize(QSize(16,16));
//LayerDelegate *delegate = new LayerDelegate(this); //LayerDelegate *delegate = new LayerDelegate(this);
//layerTab_->setItemDelegate(delegate); //layerTab_->setItemDelegate(delegate);
//layerTab_->setItemDelegate(new QItemDelegate(this)); //layerTab_->setItemDelegate(new QItemDelegate(this));
//layerTab_->setViewMode(QListView::IconMode); //layerTab_->setViewMode(QListView::IconMode);
layerTab_->setFlow(QListView::TopToBottom); layerTab_->setFlow(QListView::TopToBottom);
tabWidget->addTab(layerTab_,tr("Layers")); tabWidget->addTab(layerTab_,tr("Layers"));
// Styles tab // Styles tab
styleTab_ = new StyleTab; styleTab_ = new StyleTab;
tabWidget->addTab(styleTab_,tr("Styles")); tabWidget->addTab(styleTab_,tr("Styles"));
splitter->addWidget(tabWidget); splitter->addWidget(tabWidget);
splitter->addWidget(mapWidget_); splitter->addWidget(mapWidget_);
QList<int> list; QList<int> list;
list.push_back(200); list.push_back(200);
list.push_back(600); list.push_back(600);
splitter->setSizes(list); splitter->setSizes(list);
mapWidget_->setFocusPolicy(Qt::StrongFocus); mapWidget_->setFocusPolicy(Qt::StrongFocus);
mapWidget_->setFocus(); mapWidget_->setFocus();
//setCentralWidget(mapWidget_); //setCentralWidget(mapWidget_);
setCentralWidget(splitter); setCentralWidget(splitter);
createActions(); createActions();
createMenus(); createMenus();
createToolBars(); createToolBars();
createContextMenu(); createContextMenu();
setWindowTitle(tr("Mapnik Viewer")); setWindowTitle(tr("Mapnik Viewer"));
status=new QStatusBar(this); status=new QStatusBar(this);
status->showMessage(tr("")); status->showMessage(tr(""));
@ -91,11 +92,11 @@ MainWindow::MainWindow()
//connect mapview to layerlist //connect mapview to layerlist
connect(mapWidget_, SIGNAL(mapViewChanged()),layerTab_, SLOT(update())); connect(mapWidget_, SIGNAL(mapViewChanged()),layerTab_, SLOT(update()));
// slider // slider
connect(slider_,SIGNAL(valueChanged(int)),mapWidget_,SLOT(zoomToLevel(int))); connect(slider_,SIGNAL(valueChanged(int)),mapWidget_,SLOT(zoomToLevel(int)));
// //
connect(layerTab_,SIGNAL(update_mapwidget()),mapWidget_,SLOT(updateMap())); connect(layerTab_,SIGNAL(update_mapwidget()),mapWidget_,SLOT(updateMap()));
connect(layerTab_,SIGNAL(layerSelected(int)), connect(layerTab_,SIGNAL(layerSelected(int)),
mapWidget_,SLOT(layerSelected(int))); mapWidget_,SLOT(layerSelected(int)));
} }
@ -128,21 +129,21 @@ void MainWindow::open(QString const& path)
{ {
filename_ = path; filename_ = path;
} }
if (!filename_.isEmpty()) if (!filename_.isEmpty())
{ {
load_map_file(filename_); load_map_file(filename_);
setWindowTitle(tr("%1 - Mapnik Viewer").arg(filename_)); setWindowTitle(tr("%1 - Mapnik Viewer").arg(filename_));
} }
} }
void MainWindow::reload() void MainWindow::reload()
{ {
if (!filename_.isEmpty()) if (!filename_.isEmpty())
{ {
mapnik::box2d<double> bbox = mapWidget_->getMap()->get_current_extent(); mapnik::box2d<double> bbox = mapWidget_->getMap()->get_current_extent();
load_map_file(filename_); load_map_file(filename_);
mapWidget_->zoomToBox(bbox); mapWidget_->zoomToBox(bbox);
@ -157,7 +158,7 @@ void MainWindow::save()
initialPath, initialPath,
tr("%1 Files (*.xml)") tr("%1 Files (*.xml)")
.arg(QString("Mapnik definition"))); .arg(QString("Mapnik definition")));
if (!filename.isEmpty()) if (!filename.isEmpty())
{ {
std::cout<<"saving "<< filename.toStdString() << std::endl; std::cout<<"saving "<< filename.toStdString() << std::endl;
mapnik::save_map(*mapWidget_->getMap(),filename.toStdString()); mapnik::save_map(*mapWidget_->getMap(),filename.toStdString());
@ -166,16 +167,16 @@ void MainWindow::save()
void MainWindow::load_map_file(QString const& filename) 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 width = mapWidget_->width();
unsigned height = mapWidget_->height(); unsigned height = mapWidget_->height();
boost::shared_ptr<mapnik::Map> map(new mapnik::Map(width,height)); boost::shared_ptr<mapnik::Map> map(new mapnik::Map(width,height));
mapWidget_->setMap(map); mapWidget_->setMap(map);
try try
{ {
mapnik::load_map(*map,filename.toStdString()); mapnik::load_map(*map,filename.toStdString());
} }
catch (mapnik::config_error & ex) catch (mapnik::config_error & ex)
{ {
std::cout << ex.what() << "\n"; std::cout << ex.what() << "\n";
} }
@ -195,7 +196,7 @@ void MainWindow::zoom_to_box()
void MainWindow::pan() void MainWindow::pan()
{ {
mapWidget_->setTool(MapWidget::Pan); mapWidget_->setTool(MapWidget::Pan);
} }
void MainWindow::info() void MainWindow::info()
@ -240,7 +241,7 @@ void MainWindow::export_as()
tr("%1 Files (*.%2);;All Files (*)") tr("%1 Files (*.%2);;All Files (*)")
.arg(QString(fileFormat.toUpper())) .arg(QString(fileFormat.toUpper()))
.arg(QString(fileFormat))); .arg(QString(fileFormat)));
if (!fileName.isEmpty()) if (!fileName.isEmpty())
{ {
QPixmap const& pix = mapWidget_->pixmap(); QPixmap const& pix = mapWidget_->pixmap();
pix.save(fileName); pix.save(fileName);
@ -248,8 +249,8 @@ void MainWindow::export_as()
} }
void MainWindow::print() void MainWindow::print()
{ {
//Q_ASSERT(mapWidget_->pixmap()); //Q_ASSERT(mapWidget_->pixmap());
//QPrintDialog dialog(&printer, this); //QPrintDialog dialog(&printer, this);
//if (dialog.exec()) { //if (dialog.exec()) {
@ -264,31 +265,31 @@ void MainWindow::print()
} }
void MainWindow::createActions() void MainWindow::createActions()
{ {
//exportAct = new QAction(tr("&Export as ..."),this); //exportAct = new QAction(tr("&Export as ..."),this);
//exportAct->setShortcut(tr("Ctrl+E")); //exportAct->setShortcut(tr("Ctrl+E"));
//connect(exportAct, SIGNAL(triggered()), this, SLOT(export_as())); //connect(exportAct, SIGNAL(triggered()), this, SLOT(export_as()));
zoomAllAct = new QAction(QIcon(":/images/home.png"),tr("Zoom All"),this); zoomAllAct = new QAction(QIcon(":/images/home.png"),tr("Zoom All"),this);
connect(zoomAllAct, SIGNAL(triggered()), this, SLOT(zoom_all())); connect(zoomAllAct, SIGNAL(triggered()), this, SLOT(zoom_all()));
zoomBoxAct = new QAction(QIcon(":/images/zoombox.png"),tr("Zoom To Box"),this); zoomBoxAct = new QAction(QIcon(":/images/zoombox.png"),tr("Zoom To Box"),this);
zoomBoxAct->setCheckable(true); zoomBoxAct->setCheckable(true);
connect(zoomBoxAct, SIGNAL(triggered()), this, SLOT(zoom_to_box())); connect(zoomBoxAct, SIGNAL(triggered()), this, SLOT(zoom_to_box()));
panAct = new QAction(QIcon(":/images/pan.png"),tr("Pan"),this); panAct = new QAction(QIcon(":/images/pan.png"),tr("Pan"),this);
panAct->setCheckable(true); panAct->setCheckable(true);
connect(panAct, SIGNAL(triggered()), this, SLOT(pan())); connect(panAct, SIGNAL(triggered()), this, SLOT(pan()));
infoAct = new QAction(QIcon(":/images/info.png"),tr("Info"),this); infoAct = new QAction(QIcon(":/images/info.png"),tr("Info"),this);
infoAct->setCheckable(true); infoAct->setCheckable(true);
connect(infoAct, SIGNAL(triggered()), this, SLOT(info())); connect(infoAct, SIGNAL(triggered()), this, SLOT(info()));
toolsGroup=new QActionGroup(this); toolsGroup=new QActionGroup(this);
toolsGroup->addAction(zoomBoxAct); toolsGroup->addAction(zoomBoxAct);
toolsGroup->addAction(panAct); toolsGroup->addAction(panAct);
toolsGroup->addAction(infoAct); toolsGroup->addAction(infoAct);
zoomBoxAct->setChecked(true); zoomBoxAct->setChecked(true);
openAct=new QAction(tr("Open Map definition"),this); openAct=new QAction(tr("Open Map definition"),this);
connect(openAct,SIGNAL(triggered()),this,SLOT(open())); connect(openAct,SIGNAL(triggered()),this,SLOT(open()));
saveAct=new QAction(tr("Save Map definition"),this); saveAct=new QAction(tr("Save Map definition"),this);
@ -302,27 +303,27 @@ void MainWindow::createActions()
connect(panUpAct, SIGNAL(triggered()), this, SLOT(pan_up())); connect(panUpAct, SIGNAL(triggered()), this, SLOT(pan_up()));
panDownAct = new QAction(QIcon(":/images/down.png"),tr("&Pan Down"),this); panDownAct = new QAction(QIcon(":/images/down.png"),tr("&Pan Down"),this);
connect(panDownAct, SIGNAL(triggered()), this, SLOT(pan_down())); connect(panDownAct, SIGNAL(triggered()), this, SLOT(pan_down()));
reloadAct = new QAction(QIcon(":/images/reload.png"),tr("Reload"),this); reloadAct = new QAction(QIcon(":/images/reload.png"),tr("Reload"),this);
connect(reloadAct, SIGNAL(triggered()), this, SLOT(reload())); connect(reloadAct, SIGNAL(triggered()), this, SLOT(reload()));
layerInfo = new QAction(QIcon(":/images/info.png"),tr("&Layer info"),layerTab_); layerInfo = new QAction(QIcon(":/images/info.png"),tr("&Layer info"),layerTab_);
connect(layerInfo, SIGNAL(triggered()), layerTab_,SLOT(layerInfo())); connect(layerInfo, SIGNAL(triggered()), layerTab_,SLOT(layerInfo()));
connect(layerTab_, SIGNAL(doubleClicked(QModelIndex const&)), layerTab_,SLOT(layerInfo2(QModelIndex const&))); 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()); QString text = tr("%1...").arg(QString(format).toUpper());
QAction *action = new QAction(text, this); QAction *action = new QAction(text, this);
action->setData(format); action->setData(format);
connect(action, SIGNAL(triggered()), this, SLOT(export_as())); connect(action, SIGNAL(triggered()), this, SLOT(export_as()));
exportAsActs.append(action); exportAsActs.append(action);
} }
printAct = new QAction(QIcon(":/images/print.png"),tr("&Print ..."),this); printAct = new QAction(QIcon(":/images/print.png"),tr("&Print ..."),this);
printAct->setShortcut(tr("Ctrl+E")); printAct->setShortcut(tr("Ctrl+E"));
connect(printAct, SIGNAL(triggered()), this, SLOT(print())); connect(printAct, SIGNAL(triggered()), this, SLOT(print()));
exitAct = new QAction(tr("E&xit"), this); exitAct = new QAction(tr("E&xit"), this);
exitAct->setShortcut(tr("Ctrl+Q")); exitAct->setShortcut(tr("Ctrl+Q"));
connect(exitAct, SIGNAL(triggered()), this, SLOT(close())); connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
@ -335,8 +336,8 @@ void MainWindow::createMenus()
{ {
exportMenu = new QMenu(tr("&Export As"), this); exportMenu = new QMenu(tr("&Export As"), this);
foreach (QAction *action, exportAsActs) foreach (QAction *action, exportAsActs)
exportMenu->addAction(action); exportMenu->addAction(action);
fileMenu = new QMenu(tr("&File"),this); fileMenu = new QMenu(tr("&File"),this);
fileMenu->addAction(openAct); fileMenu->addAction(openAct);
fileMenu->addAction(saveAct); fileMenu->addAction(saveAct);
@ -345,7 +346,7 @@ void MainWindow::createMenus()
fileMenu->addSeparator(); fileMenu->addSeparator();
fileMenu->addAction(exitAct); fileMenu->addAction(exitAct);
menuBar()->addMenu(fileMenu); menuBar()->addMenu(fileMenu);
helpMenu = new QMenu(tr("&Help"), this); helpMenu = new QMenu(tr("&Help"), this);
helpMenu->addAction(aboutAct); helpMenu->addAction(aboutAct);
menuBar()->addMenu(helpMenu); menuBar()->addMenu(helpMenu);
@ -377,10 +378,10 @@ void MainWindow::createToolBars()
void MainWindow::set_default_extent(double x0,double y0, double x1, double y1) void MainWindow::set_default_extent(double x0,double y0, double x1, double y1)
{ {
try try
{ {
boost::shared_ptr<mapnik::Map> map_ptr = mapWidget_->getMap(); boost::shared_ptr<mapnik::Map> map_ptr = mapWidget_->getMap();
if (map_ptr) if (map_ptr)
{ {
mapnik::projection prj(map_ptr->srs()); mapnik::projection prj(map_ptr->srs());
prj.forward(x0,y0); prj.forward(x0,y0);
@ -401,7 +402,7 @@ void MainWindow::set_scaling_factor(double scaling_factor)
void MainWindow::zoom_all() void MainWindow::zoom_all()
{ {
boost::shared_ptr<mapnik::Map> map_ptr = mapWidget_->getMap(); boost::shared_ptr<mapnik::Map> map_ptr = mapWidget_->getMap();
if (map_ptr) if (map_ptr)
{ {
map_ptr->zoom_all(); map_ptr->zoom_all();
mapnik::box2d<double> const& ext = map_ptr->get_current_extent(); mapnik::box2d<double> const& ext = map_ptr->get_current_extent();

View file

@ -1,5 +1,6 @@
/* This file is part of Mapnik (c++ mapping toolkit) /* 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 * Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -67,7 +68,7 @@ private:
void createToolBars(); void createToolBars();
void createContextMenu(); void createContextMenu();
void load_map_file(QString const& filename); void load_map_file(QString const& filename);
QString currentPath; QString currentPath;
QString filename_; QString filename_;

View file

@ -1,5 +1,6 @@
/* This file is part of Mapnik (c++ mapping toolkit) /* 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 * Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -63,7 +64,7 @@ double scales [] = {279541132.014,
1066.36479192, 1066.36479192,
533.182395962}; 533.182395962};
MapWidget::MapWidget(QWidget *parent) MapWidget::MapWidget(QWidget *parent)
: QWidget(parent), : QWidget(parent),
map_(), map_(),
selected_(1), selected_(1),
@ -90,9 +91,9 @@ void MapWidget::setTool(eTool tool)
} }
void MapWidget::paintEvent(QPaintEvent*) void MapWidget::paintEvent(QPaintEvent*)
{ {
QPainter painter(this); QPainter painter(this);
if (drag_) if (drag_)
{ {
if (cur_tool_ == ZoomToBox) if (cur_tool_ == ZoomToBox)
@ -119,7 +120,7 @@ void MapWidget::paintEvent(QPaintEvent*)
} }
painter.end(); painter.end();
} }
void MapWidget::resizeEvent(QResizeEvent * ev) void MapWidget::resizeEvent(QResizeEvent * ev)
{ {
if (map_) if (map_)
@ -128,10 +129,10 @@ void MapWidget::resizeEvent(QResizeEvent * ev)
updateMap(); updateMap();
} }
} }
void MapWidget::mousePressEvent(QMouseEvent* e) void MapWidget::mousePressEvent(QMouseEvent* e)
{ {
if (e->button()==Qt::LeftButton) if (e->button()==Qt::LeftButton)
{ {
if (cur_tool_ == ZoomToBox || cur_tool_==Pan) if (cur_tool_ == ZoomToBox || cur_tool_==Pan)
{ {
@ -142,17 +143,17 @@ void MapWidget::mousePressEvent(QMouseEvent* e)
else if (cur_tool_==Info) else if (cur_tool_==Info)
{ {
if (map_) if (map_)
{ {
QVector<QPair<QString,QString> > info; QVector<QPair<QString,QString> > info;
projection map_proj(map_->srs()); // map projection projection map_proj(map_->srs()); // map projection
double scale_denom = scale_denominator(*map_,map_proj.is_geographic()); double scale_denom = scale_denominator(*map_,map_proj.is_geographic());
CoordTransform t(map_->width(),map_->height(),map_->get_current_extent()); CoordTransform t(map_->width(),map_->height(),map_->get_current_extent());
for (unsigned index = 0; index < map_->layer_count();++index) for (unsigned index = 0; index < map_->layer_count();++index)
{ {
if (int(index) != selectedLayer_) continue; if (int(index) != selectedLayer_) continue;
layer & layer = map_->layers()[index]; layer & layer = map_->layers()[index];
if (!layer.isVisible(scale_denom)) continue; if (!layer.isVisible(scale_denom)) continue;
std::string name = layer.name(); std::string name = layer.name();
@ -163,11 +164,11 @@ void MapWidget::mousePressEvent(QMouseEvent* e)
mapnik::proj_transform prj_trans(map_proj,layer_proj); mapnik::proj_transform prj_trans(map_proj,layer_proj);
//std::auto_ptr<mapnik::memory_datasource> data(new mapnik::memory_datasource); //std::auto_ptr<mapnik::memory_datasource> data(new mapnik::memory_datasource);
mapnik::featureset_ptr fs = map_->query_map_point(index,x,y); mapnik::featureset_ptr fs = map_->query_map_point(index,x,y);
if (fs) if (fs)
{ {
feature_ptr feat = fs->next(); feature_ptr feat = fs->next();
if (feat) if (feat)
{ {
std::map<std::string,mapnik::value> const& props = feat->props(); std::map<std::string,mapnik::value> const& props = feat->props();
std::map<std::string,mapnik::value>::const_iterator itr=props.begin(); std::map<std::string,mapnik::value>::const_iterator itr=props.begin();
@ -180,10 +181,10 @@ void MapWidget::mousePressEvent(QMouseEvent* e)
} }
} }
typedef mapnik::coord_transform2<mapnik::CoordTransform,mapnik::geometry_type> path_type; typedef mapnik::coord_transform2<mapnik::CoordTransform,mapnik::geometry_type> path_type;
for (unsigned i=0; i<feat->num_geometries();++i) for (unsigned i=0; i<feat->num_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); path_type path(t,geom,prj_trans);
if (geom.num_points() > 0) if (geom.num_points() > 0)
{ {
@ -208,7 +209,7 @@ void MapWidget::mousePressEvent(QMouseEvent* e)
} }
} }
} }
if (info.size() > 0) if (info.size() > 0)
{ {
info_dialog info_dlg(info,this); info_dialog info_dlg(info,this);
@ -216,34 +217,34 @@ void MapWidget::mousePressEvent(QMouseEvent* e)
break; break;
} }
} }
// remove annotation layer // remove annotation layer
map_->layers().erase(remove_if(map_->layers().begin(), map_->layers().erase(remove_if(map_->layers().begin(),
map_->layers().end(), map_->layers().end(),
bind(&layer::name,_1) == "*annotations*") bind(&layer::name,_1) == "*annotations*")
, map_->layers().end()); , map_->layers().end());
} }
} }
} }
else if (e->button()==Qt::RightButton) else if (e->button()==Qt::RightButton)
{ {
//updateMap(); //updateMap();
} }
} }
void MapWidget::mouseMoveEvent(QMouseEvent* e) void MapWidget::mouseMoveEvent(QMouseEvent* e)
{ {
if (cur_tool_ == ZoomToBox || cur_tool_==Pan) if (cur_tool_ == ZoomToBox || cur_tool_==Pan)
{ {
end_x_ = e->x(); end_x_ = e->x();
end_y_ = e->y(); end_y_ = e->y();
update(); update();
} }
} }
void MapWidget::mouseReleaseEvent(QMouseEvent* e) void MapWidget::mouseReleaseEvent(QMouseEvent* e)
{ {
if (e->button()==Qt::LeftButton) if (e->button()==Qt::LeftButton)
{ {
end_x_ = e->x(); end_x_ = e->x();
end_y_ = e->y(); end_y_ = e->y();
@ -252,7 +253,7 @@ void MapWidget::mouseReleaseEvent(QMouseEvent* e)
drag_=false; drag_=false;
if (map_) if (map_)
{ {
CoordTransform t(map_->width(),map_->height(),map_->get_current_extent()); CoordTransform t(map_->width(),map_->height(),map_->get_current_extent());
box2d<double> box = t.backward(box2d<double>(start_x_,start_y_,end_x_,end_y_)); box2d<double> box = t.backward(box2d<double>(start_x_,start_y_,end_x_,end_y_));
map_->zoom_to_box(box); map_->zoom_to_box(box);
updateMap(); updateMap();
@ -267,7 +268,7 @@ void MapWidget::mouseReleaseEvent(QMouseEvent* e)
int cy = int(0.5 * map_->height()); int cy = int(0.5 * map_->height());
int dx = end_x_ - start_x_; int dx = end_x_ - start_x_;
int dy = end_y_ - start_y_; int dy = end_y_ - start_y_;
map_->pan(cx - dx ,cy - dy); map_->pan(cx - dx ,cy - dy);
updateMap(); 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"; std::cout << "key pressed:"<< e->key()<<"\n";
switch (e->key()) { switch (e->key()) {
case Qt::Key_Minus: case Qt::Key_Minus:
zoomOut(); zoomOut();
break; break;
@ -294,10 +295,10 @@ void MapWidget::keyPressEvent(QKeyEvent *e)
break; break;
case Qt::Key_Down: case Qt::Key_Down:
panDown(); panDown();
break; break;
case Qt::Key_Left: case Qt::Key_Left:
panLeft(); panLeft();
break; break;
case Qt::Key_Right: case Qt::Key_Right:
panRight(); panRight();
break; break;
@ -309,7 +310,7 @@ void MapWidget::keyPressEvent(QKeyEvent *e)
break; break;
case 51: case 51:
zoomToLevel(12); zoomToLevel(12);
break; break;
case 52: case 52:
zoomToLevel(13); zoomToLevel(13);
break; break;
@ -318,7 +319,7 @@ void MapWidget::keyPressEvent(QKeyEvent *e)
break; break;
case 54: case 54:
zoomToLevel(15); zoomToLevel(15);
break; break;
case 55: case 55:
zoomToLevel(16); zoomToLevel(16);
break; break;
@ -327,12 +328,12 @@ void MapWidget::keyPressEvent(QKeyEvent *e)
break; break;
case 57: case 57:
zoomToLevel(18); zoomToLevel(18);
break; break;
default: default:
QWidget::keyPressEvent(e); QWidget::keyPressEvent(e);
} }
} }
void MapWidget::zoomToBox(mapnik::box2d<double> const& bbox) void MapWidget::zoomToBox(mapnik::box2d<double> const& bbox)
@ -344,7 +345,7 @@ void MapWidget::zoomToBox(mapnik::box2d<double> const& bbox)
} }
} }
void MapWidget::defaultView() void MapWidget::defaultView()
{ {
if (map_) if (map_)
{ {
@ -354,7 +355,7 @@ void MapWidget::defaultView()
} }
} }
void MapWidget::zoomIn() void MapWidget::zoomIn()
{ {
if (map_) if (map_)
{ {
@ -363,7 +364,7 @@ void MapWidget::zoomIn()
} }
} }
void MapWidget::zoomOut() void MapWidget::zoomOut()
{ {
if (map_) if (map_)
{ {
@ -406,12 +407,12 @@ void MapWidget::panLeft()
} }
void MapWidget::panRight() void MapWidget::panRight()
{ {
if (map_) if (map_)
{ {
double cx = 0.5*map_->width(); double cx = 0.5*map_->width();
double cy = 0.5*map_->height(); 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(); updateMap();
} }
} }
@ -425,11 +426,11 @@ void MapWidget::zoomToLevel(int level)
std::cerr << "scale denominator = " << scale_denom << "\n"; std::cerr << "scale denominator = " << scale_denom << "\n";
mapnik::box2d<double> ext = map_->get_current_extent(); mapnik::box2d<double> ext = map_->get_current_extent();
double width = static_cast<double>(map_->width()); double width = static_cast<double>(map_->width());
double height= static_cast<double>(map_->height()); double height= static_cast<double>(map_->height());
mapnik::coord2d pt = ext.center(); mapnik::coord2d pt = ext.center();
double res = scale_denom * 0.00028; double res = scale_denom * 0.00028;
mapnik::box2d<double> box(pt.x - 0.5 * width * res, mapnik::box2d<double> box(pt.x - 0.5 * width * res,
pt.y - 0.5 * height*res, pt.y - 0.5 * height*res,
pt.x + 0.5 * width * 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); //image_32 image(width,height);
//agg_renderer renderer(map,image); //agg_renderer renderer(map,image);
//renderer.apply(); //renderer.apply();
//image.saveToFile(filename,type); //image.saveToFile(filename,type);
} }
void MapWidget::set_scaling_factor(double scaling_factor) void MapWidget::set_scaling_factor(double scaling_factor)
{ {
scaling_factor_ = scaling_factor; scaling_factor_ = scaling_factor;
} }
void MapWidget::updateMap() void MapWidget::updateMap()
{ {
if (map_) if (map_)
{ {
unsigned width=map_->width(); unsigned width=map_->width();
unsigned height=map_->height(); unsigned height=map_->height();
image_32 buf(width,height); image_32 buf(width,height);
try try
{ {
mapnik::agg_renderer<image_32> ren(*map_,buf,scaling_factor_); mapnik::agg_renderer<image_32> ren(*map_,buf,scaling_factor_);
ren.apply(); ren.apply();
QImage image((uchar*)buf.raw_data(),width,height,QImage::Format_ARGB32); QImage image((uchar*)buf.raw_data(),width,height,QImage::Format_ARGB32);
pix_=QPixmap::fromImage(image.rgbSwapped()); pix_=QPixmap::fromImage(image.rgbSwapped());
projection prj(map_->srs()); // map projection projection prj(map_->srs()); // map projection
box2d<double> ext = map_->get_current_extent(); box2d<double> ext = map_->get_current_extent();
double x0 = ext.minx(); double x0 = ext.minx();
double y0 = ext.miny(); double y0 = ext.miny();

View file

@ -1,5 +1,6 @@
/* This file is part of Mapnik (c++ mapping toolkit) /* 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 * Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -32,19 +33,19 @@
#include <boost/scoped_ptr.hpp> #include <boost/scoped_ptr.hpp>
#include <mapnik/map.hpp> #include <mapnik/map.hpp>
class MapWidget : public QWidget class MapWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
enum eTool enum eTool
{ {
ZoomToBox = 1, ZoomToBox = 1,
Pan, Pan,
Info, Info,
}; };
private: private:
boost::shared_ptr<mapnik::Map> map_; boost::shared_ptr<mapnik::Map> map_;
int selected_; int selected_;
QPixmap pix_; QPixmap pix_;
@ -64,7 +65,7 @@ public:
void setTool(eTool tool); void setTool(eTool tool);
boost::shared_ptr<mapnik::Map> getMap(); boost::shared_ptr<mapnik::Map> getMap();
inline QPixmap const& pixmap() const { return pix_;} inline QPixmap const& pixmap() const { return pix_;}
void setMap(boost::shared_ptr<mapnik::Map> map); void setMap(boost::shared_ptr<mapnik::Map> map);
void defaultView(); void defaultView();
void zoomToBox(mapnik::box2d<double> const& box); void zoomToBox(mapnik::box2d<double> const& box);
void zoomIn(); void zoomIn();
@ -80,7 +81,7 @@ public slots:
void layerSelected(int); void layerSelected(int);
signals: signals:
void mapViewChanged(); void mapViewChanged();
protected: protected:
void paintEvent(QPaintEvent* ev); void paintEvent(QPaintEvent* ev);
void resizeEvent(QResizeEvent* ev); void resizeEvent(QResizeEvent* ev);
void mousePressEvent(QMouseEvent* e); void mousePressEvent(QMouseEvent* e);
@ -89,8 +90,8 @@ protected:
void keyPressEvent(QKeyEvent *e); void keyPressEvent(QKeyEvent *e);
void export_to_file(unsigned width, void export_to_file(unsigned width,
unsigned height, unsigned height,
std::string const& filename, std::string const& filename,
std::string const& type); std::string const& type);
}; };
#endif // MAP_WIDGET_HPP #endif // MAP_WIDGET_HPP

View file

@ -1,5 +1,6 @@
/* This file is part of Mapnik (c++ mapping toolkit) /* 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 * Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * 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 QIcon icon() const=0;
virtual ~node_base() {} virtual ~node_base() {}
}; };
template <typename T> template <typename T>
struct wrap : public node_base struct wrap : public node_base
{ {
wrap(T const& obj) wrap(T const& obj)
: obj_(obj) {} : obj_(obj) {}
~wrap() {} ~wrap() {}
QString name () const QString name () const
{ {
return obj_.name(); return obj_.name();
} }
QIcon icon() const QIcon icon() const
{ {
return obj_.icon(); return obj_.icon();
} }
T obj_; T obj_;
}; };
public: public:
template <typename T> template <typename T>
node ( T const& obj, node * parent=0) node ( T const& obj, node * parent=0)
: impl_(new wrap<T>(obj)), : impl_(new wrap<T>(obj)),
parent_(parent) parent_(parent)
{} {}
QString name() const QString name() const
{ {
return impl_->name(); return impl_->name();
} }
QIcon icon() const QIcon icon() const
{ {
return impl_->icon(); return impl_->icon();
} }
unsigned num_children() const unsigned num_children() const
{ {
return children_.count(); return children_.count();
} }
node * child(unsigned row) const node * child(unsigned row) const
{ {
return children_.value(row); return children_.value(row);
} }
node * parent() const node * parent() const
{ {
return parent_; return parent_;
} }
node * add_child(node * child) node * add_child(node * child)
{ {
children_.push_back(child); children_.push_back(child);
@ -104,12 +105,12 @@ public:
else else
return 0; return 0;
} }
~node() ~node()
{ {
qDeleteAll(children_); qDeleteAll(children_);
} }
private: private:
boost::scoped_ptr<node_base> impl_; boost::scoped_ptr<node_base> impl_;
QList<node*> children_; QList<node*> children_;
@ -124,7 +125,7 @@ struct symbolizer_info : public boost::static_visitor<QString>
boost::ignore_unused_variable_warning(sym); boost::ignore_unused_variable_warning(sym);
return QString("PointSymbolizer"); return QString("PointSymbolizer");
} }
QString operator() (mapnik::line_symbolizer const& sym) const QString operator() (mapnik::line_symbolizer const& sym) const
{ {
boost::ignore_unused_variable_warning(sym); boost::ignore_unused_variable_warning(sym);
@ -148,19 +149,19 @@ struct symbolizer_info : public boost::static_visitor<QString>
boost::ignore_unused_variable_warning(sym); boost::ignore_unused_variable_warning(sym);
return QString("PolygonSymbolizer"); return QString("PolygonSymbolizer");
} }
QString operator() (mapnik::text_symbolizer const& sym) const QString operator() (mapnik::text_symbolizer const& sym) const
{ {
boost::ignore_unused_variable_warning(sym); boost::ignore_unused_variable_warning(sym);
return QString("TextSymbolizer"); return QString("TextSymbolizer");
} }
QString operator() (mapnik::shield_symbolizer const& sym) const QString operator() (mapnik::shield_symbolizer const& sym) const
{ {
boost::ignore_unused_variable_warning(sym); boost::ignore_unused_variable_warning(sym);
return QString("ShieldSymbolizer"); return QString("ShieldSymbolizer");
} }
template <typename T> template <typename T>
QString operator() (T const& ) const QString operator() (T const& ) const
{ {
@ -200,14 +201,14 @@ struct symbolizer_icon : public boost::static_visitor<QIcon>
QPixmap pix(48,16); QPixmap pix(48,16);
pix.fill(); pix.fill();
QPainter painter(&pix); QPainter painter(&pix);
mapnik::stroke const& strk = sym.get_stroke(); mapnik::stroke const& strk = sym.get_stroke();
mapnik::color const& col = strk.get_color(); mapnik::color const& col = strk.get_color();
QPen pen(QColor(col.red(),col.green(),col.blue(),col.alpha())); QPen pen(QColor(col.red(),col.green(),col.blue(),col.alpha()));
pen.setWidth(strk.get_width()); pen.setWidth(strk.get_width());
painter.setPen(pen); painter.setPen(pen);
painter.drawLine(0,7,47,7); painter.drawLine(0,7,47,7);
//painter.drawLine(7,15,12,0); //painter.drawLine(7,15,12,0);
//painter.drawLine(12,0,8,15); //painter.drawLine(12,0,8,15);
return QIcon(pix); return QIcon(pix);
} }
@ -224,13 +225,13 @@ public:
symbolizer_node(mapnik::symbolizer const & sym) symbolizer_node(mapnik::symbolizer const & sym)
: sym_(sym) {} : sym_(sym) {}
~symbolizer_node(){} ~symbolizer_node(){}
QString name() const QString name() const
{ {
//return QString("Symbolizer:fixme"); //return QString("Symbolizer:fixme");
return boost::apply_visitor(symbolizer_info(),sym_); return boost::apply_visitor(symbolizer_info(),sym_);
} }
QIcon icon() const QIcon icon() const
{ {
return boost::apply_visitor(symbolizer_icon(),sym_);//QIcon(":/images/filter.png"); return boost::apply_visitor(symbolizer_icon(),sym_);//QIcon(":/images/filter.png");
@ -248,15 +249,15 @@ public:
QString name() const QString name() const
{ {
mapnik::expression_ptr filter = rule_.get_filter(); mapnik::expression_ptr filter = rule_.get_filter();
return QString(mapnik::to_expression_string(*filter).c_str()); return QString(mapnik::to_expression_string(*filter).c_str());
} }
QIcon icon() const QIcon icon() const
{ {
return QIcon(":/images/filter.png"); return QIcon(":/images/filter.png");
} }
private: private:
QString name_; QString name_;
mapnik::rule const& rule_; mapnik::rule const& rule_;
@ -268,19 +269,19 @@ public:
style_node(QString name, mapnik::feature_type_style const& style) style_node(QString name, mapnik::feature_type_style const& style)
: name_(name), : name_(name),
style_(style) {} style_(style) {}
~style_node() {} ~style_node() {}
QString name() const QString name() const
{ {
return name_; return name_;
} }
QIcon icon() const QIcon icon() const
{ {
return QIcon(":/images/style.png"); return QIcon(":/images/style.png");
} }
private: private:
QString name_; QString name_;
mapnik::feature_type_style const& style_; mapnik::feature_type_style const& style_;
@ -292,26 +293,26 @@ public:
explicit map_node(boost::shared_ptr<mapnik::Map> map) explicit map_node(boost::shared_ptr<mapnik::Map> map)
: map_(map) {} : map_(map) {}
~map_node() {} ~map_node() {}
QString name() const QString name() const
{ {
return QString("Map"); return QString("Map");
} }
QIcon icon() const QIcon icon() const
{ {
return QIcon(":/images/map.png"); return QIcon(":/images/map.png");
} }
private: private:
boost::shared_ptr<mapnik::Map> map_; boost::shared_ptr<mapnik::Map> map_;
}; };
StyleModel::StyleModel(boost::shared_ptr<mapnik::Map> map, QObject * parent) StyleModel::StyleModel(boost::shared_ptr<mapnik::Map> map, QObject * parent)
: QAbstractItemModel(parent), : QAbstractItemModel(parent),
root_(new node(map_node(map))) root_(new node(map_node(map)))
{ {
typedef std::map<std::string,mapnik::feature_type_style> style_type; typedef std::map<std::string,mapnik::feature_type_style> style_type;
style_type const & styles = map->styles(); style_type const & styles = map->styles();
style_type::const_iterator itr = styles.begin(); style_type::const_iterator itr = styles.begin();
style_type::const_iterator end = styles.end(); style_type::const_iterator end = styles.end();
@ -329,22 +330,22 @@ StyleModel::StyleModel(boost::shared_ptr<mapnik::Map> map, QObject * parent)
rule_n->add_child(new node(symbolizer_node(*itr3),rule_n)); rule_n->add_child(new node(symbolizer_node(*itr3),rule_n));
} }
} }
} }
} }
StyleModel::~StyleModel() {} StyleModel::~StyleModel() {}
// interface // interface
QModelIndex StyleModel::index (int row, int col, QModelIndex const& parent) const QModelIndex StyleModel::index (int row, int col, QModelIndex const& parent) const
{ {
// qDebug("index() row=%d col=%d parent::internalId() = %lld", row,col,parent.internalId()); // qDebug("index() row=%d col=%d parent::internalId() = %lld", row,col,parent.internalId());
node * parent_node; node * parent_node;
if (!parent.isValid()) if (!parent.isValid())
parent_node = root_.get(); parent_node = root_.get();
else else
parent_node = static_cast<node*>(parent.internalPointer()); parent_node = static_cast<node*>(parent.internalPointer());
node * child_node = parent_node->child(row); node * child_node = parent_node->child(row);
if (child_node) if (child_node)
return createIndex(row,col,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(); node * parent_node = child_node->parent();
if (parent_node == root_.get()) if (parent_node == root_.get())
return QModelIndex(); return QModelIndex();
return createIndex(parent_node->row(),0,parent_node); 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) if (role == Qt::DisplayRole)
{ {
return QVariant(cur_node->name()); return QVariant(cur_node->name());
} }
else if ( role == Qt::DecorationRole) else if ( role == Qt::DecorationRole)

View file

@ -1,5 +1,6 @@
/* This file is part of Mapnik (c++ mapping toolkit) /* 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 * Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -32,11 +33,11 @@ class StyleModel : public QAbstractItemModel
public: public:
StyleModel(boost::shared_ptr<mapnik::Map> map, QObject * parent=0); StyleModel(boost::shared_ptr<mapnik::Map> map, QObject * parent=0);
~StyleModel(); ~StyleModel();
// interface // interface
QModelIndex index (int row, int col, QModelIndex const& parent = QModelIndex()) const; QModelIndex index (int row, int col, QModelIndex const& parent = QModelIndex()) const;
QModelIndex parent (QModelIndex const& child) const; QModelIndex parent (QModelIndex const& child) const;
int rowCount( QModelIndex const& parent = QModelIndex()) 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; QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
private: private:
//boost::shared_ptr<mapnik::Map> map_; //boost::shared_ptr<mapnik::Map> map_;

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* *
*****************************************************************************/ *****************************************************************************/
//$Id$
#ifndef MAPNIK_AGG_PATTERN_SOURCE_HPP #ifndef MAPNIK_AGG_PATTERN_SOURCE_HPP
#define MAPNIK_AGG_PATTERN_SOURCE_HPP #define MAPNIK_AGG_PATTERN_SOURCE_HPP
// mapnik // mapnik
#include <mapnik/image_data.hpp> #include <mapnik/image_data.hpp>
// boost // boost
#include <boost/utility.hpp> #include <boost/utility.hpp>
// agg // agg
#include "agg_color_rgba.h" #include "agg_color_rgba.h"
@ -61,4 +62,4 @@ private:
}; };
} }
#endif //MAPNIK_AGG_PATTERN_SOURCE_HPP #endif // MAPNIK_AGG_PATTERN_SOURCE_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* *
*****************************************************************************/ *****************************************************************************/
//$Id$
#ifndef MAPNIK_AGG_RASTERIZER_HPP #ifndef MAPNIK_AGG_RASTERIZER_HPP
#define MAPNIK_AGG_RASTERIZER_HPP #define MAPNIK_AGG_RASTERIZER_HPP
// boost
#include <boost/utility.hpp> #include <boost/utility.hpp>
// agg
#include "agg_rasterizer_scanline_aa.h" #include "agg_rasterizer_scanline_aa.h"
namespace mapnik { namespace mapnik {
@ -33,4 +35,4 @@ struct rasterizer : agg::rasterizer_scanline_aa<>, boost::noncopyable {};
} }
#endif //MAPNIK_AGG_RASTERIZER_HPP #endif // MAPNIK_AGG_RASTERIZER_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,10 +20,8 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$ #ifndef MAPNIK_AGG_RENDERER_HPP
#define MAPNIK_AGG_RENDERER_HPP
#ifndef AGG_RENDERER_HPP
#define AGG_RENDERER_HPP
// mapnik // mapnik
#include <mapnik/config.hpp> #include <mapnik/config.hpp>
@ -134,4 +132,4 @@ private:
}; };
} }
#endif //AGG_RENDERER_HPP #endif // MAPNIK_AGG_RENDERER_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,10 +20,8 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$ #ifndef MAPNIK_ARROW_HPP
#define MAPNIK_ARROW_HPP
#ifndef ARROW_HPP
#define ARROW_HPP
#include <mapnik/box2d.hpp> #include <mapnik/box2d.hpp>
@ -44,4 +42,4 @@ private:
}; };
} }
#endif // ARROW_HPP #endif // MAPNIK_ARROW_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,8 +20,6 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$
#ifndef MAPNIK_ATTRIBUTE_HPP #ifndef MAPNIK_ATTRIBUTE_HPP
#define MAPNIK_ATTRIBUTE_HPP #define MAPNIK_ATTRIBUTE_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,20 +20,20 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$ #ifndef MAPNIK_ATTRIBUTE_COLLECTOR_HPP
#define MAPNIK_ATTRIBUTE_COLLECTOR_HPP
#ifndef ATTRIBUTE_COLLECTOR_HPP
#define ATTRIBUTE_COLLECTOR_HPP
// mapnik // mapnik
#include <mapnik/feature_layer_desc.hpp> #include <mapnik/feature_layer_desc.hpp>
#include <mapnik/rule.hpp> #include <mapnik/rule.hpp>
#include <mapnik/path_expression_grammar.hpp> #include <mapnik/path_expression_grammar.hpp>
#include <mapnik/parse_path.hpp> #include <mapnik/parse_path.hpp>
// boost // boost
#include <boost/utility.hpp> #include <boost/utility.hpp>
#include <boost/variant.hpp> #include <boost/variant.hpp>
#include <boost/concept_check.hpp> #include <boost/concept_check.hpp>
// stl // stl
#include <set> #include <set>
#include <iostream> #include <iostream>
@ -271,4 +271,4 @@ private:
} // namespace mapnik } // namespace mapnik
#endif //ATTRIBUTE_COLLECTOR_HPP #endif // MAPNIK_ATTRIBUTE_COLLECTOR_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,10 +20,8 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$ #ifndef MAPNIK_ATTRIBUTE_DESCRIPTOR_HPP
#define MAPNIK_ATTRIBUTE_DESCRIPTOR_HPP
#ifndef ATTRIBUTE_DESCRIPTOR
#define ATTRIBUTE_DESCRIPTOR
#include <string> #include <string>
@ -118,4 +116,4 @@ operator << (std::basic_ostream<charT,traits>& out,
} }
#endif // ATTRIBUTE_DESCRIPTOR_HPP #endif // MAPNIK_ATTRIBUTE_DESCRIPTOR_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 #ifndef MAPNIK_BOX2D_HPP
#define MAPNIK_BOX2D_HPP #define MAPNIK_BOX2D_HPP
// mapnik // mapnik
#include <mapnik/config.hpp> #include <mapnik/config.hpp>
#include <mapnik/coord.hpp> #include <mapnik/coord.hpp>
// boost // boost
#include <boost/operators.hpp> #include <boost/operators.hpp>
// stl // stl
#include <iomanip> #include <iomanip>

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,14 +20,10 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$
#if defined(HAVE_CAIRO) #if defined(HAVE_CAIRO)
#ifndef CAIRO_RENDERER_HPP #ifndef MAPNIK_CAIRO_RENDERER_HPP
#define CAIRO_RENDERER_HPP #define MAPNIK_CAIRO_RENDERER_HPP
// mapnik // mapnik
#include <mapnik/config.hpp> #include <mapnik/config.hpp>
@ -152,6 +148,6 @@ public:
}; };
} }
#endif #endif // MAPNIK_CAIRO_RENDERER_HPP
#endif //CAIRO_RENDERER_HPP #endif

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 MAPNIK_COLOR_HPP
#define MAPNIK_COLOR_HPP
#ifndef COLOR_HPP
#define COLOR_HPP
// mapnik // mapnik
#include <mapnik/config.hpp> #include <mapnik/config.hpp>
@ -32,6 +30,7 @@
//boost //boost
#include <boost/cstdint.hpp> #include <boost/cstdint.hpp>
#include <boost/operators.hpp> #include <boost/operators.hpp>
// stl // stl
#include <sstream> #include <sstream>
@ -141,4 +140,4 @@ public:
} }
#endif //COLOR_HPP #endif // MAPNIK_COLOR_HPP

View file

@ -20,8 +20,6 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$
#ifndef MAPNIK_COLOR_FACTORY_HPP #ifndef MAPNIK_COLOR_FACTORY_HPP
#define MAPNIK_COLOR_FACTORY_HPP #define MAPNIK_COLOR_FACTORY_HPP
@ -120,4 +118,4 @@ public:
#endif #endif
#endif //MAPNIK_COLOR_FACTORY_HPP #endif // MAPNIK_COLOR_FACTORY_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,8 +20,8 @@
* *
*****************************************************************************/ *****************************************************************************/
#ifndef CONFIG_HPP #ifndef MAPNIK_CONFIG_HPP
#define CONFIG_HPP #define MAPNIK_CONFIG_HPP
// Windows DLL support // Windows DLL support
@ -47,4 +47,5 @@
#endif #endif
#define PROJ_ENVELOPE_POINTS 20 #define PROJ_ENVELOPE_POINTS 20
#endif // CONFIG_HPP
#endif // MAPNIK_CONFIG_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,8 +20,8 @@
* *
*****************************************************************************/ *****************************************************************************/
#ifndef MAPNIK_CONFIG_ERROR_INCLUDED #ifndef MAPNIK_CONFIG_ERROR_HPP
#define MAPNIK_CONFIG_ERROR_INCLUDED #define MAPNIK_CONFIG_ERROR_HPP
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>
@ -54,4 +54,4 @@ protected:
}; };
} }
#endif // MAPNIK_CONFIG_ERROR_INCLUDED #endif // MAPNIK_CONFIG_ERROR_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 MAPNIK_COORD_HPP
#define MAPNIK_COORD_HPP
#ifndef COORD_HPP
#define COORD_HPP
// boost
#include <boost/operators.hpp> #include <boost/operators.hpp>
// stl
#include <iomanip> #include <iomanip>
#include <sstream> #include <sstream>
@ -187,4 +188,4 @@ operator << (std::basic_ostream<charT,traits>& out,
} }
} }
#endif // COORD_HPP #endif // MAPNIK_COORD_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 MAPNIK_COORD_ARRAY_HPP
#define MAPNIK_COORD_ARRAY_HPP
#ifndef COORD_ARRAY_HPP
#define COORD_ARRAY_HPP
//mapnik //mapnik
#include <mapnik/coord.hpp> #include <mapnik/coord.hpp>
// stl // stl
#include <cassert> #include <cassert>
@ -89,4 +88,4 @@ private:
} }
#endif //COORD_ARRAY_HPP #endif // MAPNIK_COORD_ARRAY_HPP

View file

@ -20,22 +20,23 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$
#ifndef MAPNIK_CSS_COLOR_GRAMMAR_HPP #ifndef MAPNIK_CSS_COLOR_GRAMMAR_HPP
#define MAPNIK_CSS_COLOR_GRAMMAR_HPP #define MAPNIK_CSS_COLOR_GRAMMAR_HPP
// mapnik // mapnik
#include <mapnik/color.hpp> #include <mapnik/color.hpp>
// spirit2 // spirit2
#include <boost/config/warning_disable.hpp> #include <boost/config/warning_disable.hpp>
#include <boost/spirit/include/qi.hpp> #include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/qi_action.hpp> #include <boost/spirit/include/qi_action.hpp>
// phoenix // phoenix
#include <boost/spirit/include/phoenix_core.hpp> #include <boost/spirit/include/phoenix_core.hpp>
#include <boost/spirit/include/phoenix_operator.hpp> #include <boost/spirit/include/phoenix_operator.hpp>
#include <boost/spirit/include/phoenix_fusion.hpp> #include <boost/spirit/include/phoenix_fusion.hpp>
#include <boost/spirit/include/phoenix_function.hpp> #include <boost/spirit/include/phoenix_function.hpp>
// fusion // fusion
#include <boost/fusion/include/adapt_struct.hpp> #include <boost/fusion/include/adapt_struct.hpp>
#include <boost/fusion/include/adapt_adt.hpp> #include <boost/fusion/include/adapt_adt.hpp>
@ -387,4 +388,4 @@ struct css_color_grammar : qi::grammar<Iterator, color(), ascii_space_type>
} }
#endif //MAPNIK_CSS_COLOR_GRAMMAR_HPP #endif // MAPNIK_CSS_COLOR_GRAMMAR_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,22 +20,23 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$ #ifndef MAPNIK_CSS_COLOR_GRAMMAR_DEPRECATED_HPP
#define MAPNIK_CSS_COLOR_GRAMMAR_DEPRECATED_HPP
#ifndef MAPNIK_CSS_COLOR_GRAMMAR_HPP
#define MAPNIK_CSS_COLOR_GRAMMAR_HPP
// mapnik // mapnik
#include <mapnik/color.hpp> #include <mapnik/color.hpp>
// spirit2 // spirit2
#include <boost/config/warning_disable.hpp> #include <boost/config/warning_disable.hpp>
#include <boost/spirit/include/qi.hpp> #include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/qi_action.hpp> #include <boost/spirit/include/qi_action.hpp>
// phoenix // phoenix
#include <boost/spirit/include/phoenix_core.hpp> #include <boost/spirit/include/phoenix_core.hpp>
#include <boost/spirit/include/phoenix_operator.hpp> #include <boost/spirit/include/phoenix_operator.hpp>
#include <boost/spirit/include/phoenix_fusion.hpp> #include <boost/spirit/include/phoenix_fusion.hpp>
#include <boost/spirit/include/phoenix_function.hpp> #include <boost/spirit/include/phoenix_function.hpp>
// fusion // fusion
#include <boost/fusion/include/adapt_struct.hpp> #include <boost/fusion/include/adapt_struct.hpp>
@ -45,7 +46,6 @@
// stl // stl
#include <string> #include <string>
//BOOST_FUSION_ADAPT_CLASS( //BOOST_FUSION_ADAPT_CLASS(
// mapnik::color, // mapnik::color,
// (unsigned, unsigned, obj.red(), obj.set_red(val)) // (unsigned, unsigned, obj.red(), obj.set_red(val))
@ -417,4 +417,4 @@ struct css_color_grammar : qi::grammar<Iterator, css(), ascii_space_type>
} }
#endif //MAPNIK_CSS_COLOR_GRAMMAR_HPP #endif // MAPNIK_CSS_COLOR_GRAMMAR_DEPRECATED_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* *
*****************************************************************************/ *****************************************************************************/
//$Id$
#ifndef CTRANS_HPP #ifndef MAPNIK_CTRANS_HPP
#define CTRANS_HPP #define MAPNIK_CTRANS_HPP
// mapnik // mapnik
#include <mapnik/box2d.hpp> #include <mapnik/box2d.hpp>
@ -518,4 +517,4 @@ public:
}; };
} }
#endif //CTRANS_HPP #endif // MAPNIK_CTRANS_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 // mapnik
#include <mapnik/config.hpp> #include <mapnik/config.hpp>
#include <mapnik/ctrans.hpp> #include <mapnik/ctrans.hpp>
@ -31,9 +30,11 @@
#include <mapnik/feature.hpp> #include <mapnik/feature.hpp>
#include <mapnik/query.hpp> #include <mapnik/query.hpp>
#include <mapnik/feature_layer_desc.hpp> #include <mapnik/feature_layer_desc.hpp>
// boost // boost
#include <boost/utility.hpp> #include <boost/utility.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
// stl // stl
#include <map> #include <map>
#include <string> #include <string>
@ -142,6 +143,7 @@ typedef boost::shared_ptr<datasource> datasource_ptr;
delete ds; \ delete ds; \
} \ } \
// //
} }
#endif //DATASOURCE_HPP #endif // MAPNIK_DATASOURCE_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 MAPNIK_DATASOURCE_CACHE_HPP
#define MAPNIK_DATASOURCE_CACHE_HPP
#ifndef DATASOURCE_CACHE_HPP
#define DATASOURCE_CACHE_HPP
// mapnik // mapnik
#include <mapnik/utils.hpp> #include <mapnik/utils.hpp>
#include <mapnik/params.hpp> #include <mapnik/params.hpp>
#include <mapnik/plugin.hpp> #include <mapnik/plugin.hpp>
#include <mapnik/datasource.hpp> #include <mapnik/datasource.hpp>
// boost // boost
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
// stl // stl
#include <map> #include <map>
@ -57,4 +57,4 @@ public:
}; };
} }
#endif //DATASOURCE_CACHE_HPP #endif // MAPNIK_DATASOURCE_CACHE_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,10 +20,8 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$ #ifndef MAPNIK_DISTANCE_HPP
#define MAPNIK_DISTANCE_HPP
#ifndef DISTANCE_HPP
#define DISTANCE_HPP
#include <mapnik/coord.hpp> #include <mapnik/coord.hpp>
@ -52,4 +50,4 @@ public:
*/ */
} }
#endif // GEO_UTILS_HPP #endif // MAPNIK_DISTANCE_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,8 +20,6 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$
#ifndef MAPNIK_ELLIPSOID_HPP #ifndef MAPNIK_ELLIPSOID_HPP
#define MAPNIK_ELLIPSOID_HPP #define MAPNIK_ELLIPSOID_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,11 +20,13 @@
* *
*****************************************************************************/ *****************************************************************************/
#ifndef MAPNIK_ENUMERATION_INCLUDED #ifndef MAPNIK_ENUMERATION_HPP
#define MAPNIK_ENUMERATION_INCLUDED #define MAPNIK_ENUMERATION_HPP
// mapnik
#include <mapnik/config.hpp> #include <mapnik/config.hpp>
// stl
#include <vector> #include <vector>
#include <bitset> #include <bitset>
#include <iostream> #include <iostream>
@ -325,4 +327,4 @@ operator>>(std::istream & is, mapnik::enumeration<ENUM, THE_MAX> & e)
template <> std::string name ::our_name_ = #name; \ template <> std::string name ::our_name_ = #name; \
template <> bool name ::our_verified_flag_( name ::verify(__FILE__, __LINE__)); template <> bool name ::our_verified_flag_( name ::verify(__FILE__, __LINE__));
#endif // MAPNIK_ENUMERATION_INCLUDED #endif // MAPNIK_ENUMERATION_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,8 +20,6 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$
#ifndef MAPNIK_EXPRESSION_EVALUATOR_HPP #ifndef MAPNIK_EXPRESSION_EVALUATOR_HPP
#define MAPNIK_EXPRESSION_EVALUATOR_HPP #define MAPNIK_EXPRESSION_EVALUATOR_HPP
@ -104,4 +102,4 @@ struct evaluate : boost::static_visitor<T1>
} }
#endif //MAPNIK_EXPRESSION_EVALUATOR_HPP #endif // MAPNIK_EXPRESSION_EVALUATOR_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,8 +20,6 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$
#ifndef MAPNIK_EXPRESSIONS_GRAMMAR_HPP #ifndef MAPNIK_EXPRESSIONS_GRAMMAR_HPP
#define MAPNIK_EXPRESSIONS_GRAMMAR_HPP #define MAPNIK_EXPRESSIONS_GRAMMAR_HPP
@ -34,12 +32,15 @@
#include <boost/variant.hpp> #include <boost/variant.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/concept_check.hpp> #include <boost/concept_check.hpp>
//spirit2
// spirit2
#include <boost/spirit/include/qi.hpp> #include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/qi_action.hpp> #include <boost/spirit/include/qi_action.hpp>
//fusion
// fusion
#include <boost/fusion/include/adapt_struct.hpp> #include <boost/fusion/include/adapt_struct.hpp>
//phoenix
// phoenix
#include <boost/spirit/include/phoenix_core.hpp> #include <boost/spirit/include/phoenix_core.hpp>
#include <boost/spirit/include/phoenix_object.hpp> #include <boost/spirit/include/phoenix_object.hpp>
#include <boost/spirit/include/phoenix_operator.hpp> #include <boost/spirit/include/phoenix_operator.hpp>

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,12 +20,13 @@
* *
*****************************************************************************/ *****************************************************************************/
#ifndef MAPNIK_EXPRESSION_NODE_HPP #ifndef MAPNIK_EXPRESSION_NODE_HPP
#define MAPNIK_EXPRESSION_NODE_HPP #define MAPNIK_EXPRESSION_NODE_HPP
// mapnik // mapnik
#include <mapnik/value.hpp> #include <mapnik/value.hpp>
#include <mapnik/attribute.hpp> #include <mapnik/attribute.hpp>
// boost // boost
#include <boost/variant.hpp> #include <boost/variant.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,14 +20,13 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$
#ifndef MAPNIK_EXPRESSION_STRING_HPP #ifndef MAPNIK_EXPRESSION_STRING_HPP
#define MAPNIK_EXPRESSION_STRING_HPP #define MAPNIK_EXPRESSION_STRING_HPP
// mapnik // mapnik
#include <mapnik/config.hpp> #include <mapnik/config.hpp>
#include <mapnik/expression_node.hpp> #include <mapnik/expression_node.hpp>
// stl // stl
#include <string> #include <string>

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 MAPNIK_FACTORY_HPP
#define MAPNIK_FACTORY_HPP
#ifndef FACTORY_HPP
#define FACTORY_HPP
// mapnik // mapnik
#include <mapnik/utils.hpp> #include <mapnik/utils.hpp>
// stl // stl
#include <stdexcept> #include <stdexcept>
#include <map> #include <map>
@ -89,4 +88,4 @@ public:
}; };
} }
#endif //FACTORY_HPP #endif // MAPNIK_FACTORY_HPP

View file

@ -20,8 +20,8 @@
* *
*****************************************************************************/ *****************************************************************************/
#ifndef FASTMATH_HPP #ifndef MAPNIK_FASTMATH_HPP
#define FASTMATH_HPP #define MAPNIK_FASTMATH_HPP
/* Timings: /* Timings:
* fast_sin(not inlined) 8.95s * fast_sin(not inlined) 8.95s
@ -109,4 +109,4 @@ static inline double fast_atan2(double y, double x)
return result; return result;
} }
#endif // FASTMATH_HPP #endif // MAPNIK_FASTMATH_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 // mapnik
#include <mapnik/value.hpp> #include <mapnik/value.hpp>
#include <mapnik/geometry.hpp> #include <mapnik/geometry.hpp>
@ -36,9 +35,9 @@
#else #else
#include <boost/property_map.hpp> #include <boost/property_map.hpp>
#endif #endif
#include <boost/utility.hpp> #include <boost/utility.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
// stl // stl
#include <map> #include <map>
@ -181,4 +180,4 @@ inline std::ostream& operator<< (std::ostream & out,Feature const& f)
} }
} }
#endif //FEATURE_HPP #endif // MAPNIK_FEATURE_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,12 +20,13 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$ #ifndef MAPNIK_FEATURE_FACTORY_HPP
#define MAPNIK_FEATURE_FACTORY_HPP
#ifndef FEATURE_FACTORY_HPP
#define FEATURE_FACTORY_HPP
// mapnik
#include <mapnik/feature.hpp> #include <mapnik/feature.hpp>
// boost
#include <boost/make_shared.hpp> #include <boost/make_shared.hpp>
//#include <boost/pool/pool_alloc.hpp> //#include <boost/pool/pool_alloc.hpp>
@ -39,8 +40,7 @@ struct feature_factory
//return boost::allocate_shared<Feature>(boost::fast_pool_allocator<Feature>(),fid); //return boost::allocate_shared<Feature>(boost::fast_pool_allocator<Feature>(),fid);
return boost::make_shared<Feature>(fid); return boost::make_shared<Feature>(fid);
} }
}; };
} }
#endif //FEATURE_FACTORY_HPP #endif // MAPNIK_FEATURE_FACTORY_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,14 +20,13 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$ #ifndef MAPNIK_FEATURE_LAYER_DESC_HPP
#define MAPNIK_FEATURE_LAYER_DESC_HPP
#ifndef FEATURE_LAYER_DESC_HPP
#define FEATURE_LAYER_DESC_HPP
// mapnik // mapnik
#include <mapnik/attribute_descriptor.hpp> #include <mapnik/attribute_descriptor.hpp>
// stl
#include <string> #include <string>
#include <vector> #include <vector>
#include <iostream> #include <iostream>
@ -106,4 +105,4 @@ operator << (std::basic_ostream<charT,traits>& out,
} }
} }
#endif //FEATURE_LAYER_DESC_HPP #endif // MAPNIK_FEATURE_LAYER_DESC_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,10 +20,8 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$ #ifndef MAPNIK_FEATURE_STYLE_PROCESSOR_HPP
#define MAPNIK_FEATURE_STYLE_PROCESSOR_HPP
#ifndef FEATURE_STYLE_PROCESSOR_HPP
#define FEATURE_STYLE_PROCESSOR_HPP
#include <set> #include <set>
#include <string> #include <string>
@ -74,4 +72,4 @@ private:
}; };
} }
#endif //FEATURE_STYLE_PROCESSOR_HPP #endif // MAPNIK_FEATURE_STYLE_PROCESSOR_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 // mapnik
#include <mapnik/rule.hpp> #include <mapnik/rule.hpp>
#include <mapnik/feature.hpp> #include <mapnik/feature.hpp>
#include <mapnik/enumeration.hpp> #include <mapnik/enumeration.hpp>
// stl // stl
#include <vector> #include <vector>
@ -69,4 +69,4 @@ public:
}; };
} }
#endif //FEATURE_TYPE_STYLE_HPP #endif // MAPNIK_FEATURE_TYPE_STYLE_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,17 +20,16 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$ #ifndef MAPNIK_FILL_HPP
#define MAPNIK_FILL_HPP
#ifndef FILL_HPP
#define FILL_HPP
namespace mapnik namespace mapnik
{ {
class fill class fill
{ {
}; };
} }
#endif //FILL_HPP #endif // MAPNIK_FILL_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,14 +20,13 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$
#ifndef MAPNIK_FILTER_FACTORY_HPP #ifndef MAPNIK_FILTER_FACTORY_HPP
#define MAPNIK_FILTER_FACTORY_HPP #define MAPNIK_FILTER_FACTORY_HPP
// mapnik // mapnik
#include <mapnik/config.hpp> #include <mapnik/config.hpp>
#include <mapnik/expression_node.hpp> #include <mapnik/expression_node.hpp>
// stl // stl
#include <string> #include <string>
@ -41,4 +40,4 @@ MAPNIK_DECL expression_ptr parse_expression (std::string const& wkt);
} }
#endif //MAPNIK_FILTER_FACTORY_HPP #endif // MAPNIK_FILTER_FACTORY_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,11 +20,10 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$
#ifndef MAPNIK_FILTER_FEATURESET_HPP #ifndef MAPNIK_FILTER_FEATURESET_HPP
#define MAPNIK_FILTER_FEATURESET_HPP #define MAPNIK_FILTER_FEATURESET_HPP
// mapnik
#include <mapnik/datasource.hpp> #include <mapnik/datasource.hpp>
namespace mapnik { namespace mapnik {
@ -54,4 +53,4 @@ private:
}; };
} }
#endif //MAPNIK_FILTER_FEATURESET_HPP #endif // MAPNIK_FILTER_FEATURESET_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 // mapnik
#include <mapnik/color.hpp> #include <mapnik/color.hpp>
#include <mapnik/utils.hpp> #include <mapnik/utils.hpp>
@ -50,7 +49,6 @@ extern "C"
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
#endif #endif
// stl // stl
#include <string> #include <string>
#include <vector> #include <vector>
@ -602,4 +600,4 @@ private:
}; };
} }
#endif // FONT_ENGINE_FREETYPE_HPP #endif // MAPNIK_FONT_ENGINE_FREETYPE_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,10 +20,8 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$ #ifndef MAPNIK_FONT_SET_HPP
#define MAPNIK_FONT_SET_HPP
#ifndef FONT_SET_HPP
#define FONT_SET_HPP
// mapnik // mapnik
#include <mapnik/config.hpp> #include <mapnik/config.hpp>
@ -52,4 +50,4 @@ private:
}; };
} }
#endif //FONT_SET_HPP #endif // MAPNIK_FONT_SET_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 MAPNIK_GAMMA_HPP
#define MAPNIK_GAMMA_HPP
#ifndef GAMMA_HPP
#define GAMMA_HPP
#include <cmath> #include <cmath>
@ -50,4 +48,4 @@ struct MAPNIK_DECL gamma
}; };
} }
#endif //GAMMA_HPP #endif // MAPNIK_GAMMA_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 // mapnik
#include <mapnik/box2d.hpp> #include <mapnik/box2d.hpp>
#include <mapnik/vertex.hpp> #include <mapnik/vertex.hpp>
// boost // boost
#include <boost/tuple/tuple.hpp> #include <boost/tuple/tuple.hpp>
// stl // stl
#include <cmath> #include <cmath>
@ -217,4 +218,4 @@ struct filter_at_point
}; };
} }
#endif //GEOM_UTIL_HPP #endif // MAPNIK_GEOM_UTIL_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 MAPNIK_GEOMETRY_HPP
#define MAPNIK_GEOMETRY_HPP
#ifndef GEOMETRY_HPP
#define GEOMETRY_HPP
// mapnik // mapnik
#include <mapnik/vertex_vector.hpp> #include <mapnik/vertex_vector.hpp>
#include <mapnik/ctrans.hpp> #include <mapnik/ctrans.hpp>
#include <mapnik/geom_util.hpp> #include <mapnik/geom_util.hpp>
// boost // boost
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/utility.hpp> #include <boost/utility.hpp>
@ -392,4 +391,4 @@ typedef boost::ptr_vector<geometry_type> geometry_containter;
} }
#endif //GEOMETRY_HPP #endif // MAPNIK_GEOMETRY_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,14 +20,13 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$ #ifndef MAPNIK_GLOBAL_HPP
#define MAPNIK_GLOBAL_HPP
#ifndef GLOBAL_HPP
#define GLOBAL_HPP
// boost // boost
#include <boost/cstdint.hpp> #include <boost/cstdint.hpp>
#include <boost/detail/endian.hpp> #include <boost/detail/endian.hpp>
// stl // stl
#include <cstring> #include <cstring>
@ -183,4 +182,4 @@ inline double round (double val)
#endif //GLOBAL_HPP #endif // MAPNIK_GLOBAL_HPP

View file

@ -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 // mapnik
#include <mapnik/enumeration.hpp> #include <mapnik/enumeration.hpp>
@ -190,4 +212,4 @@ private:
} // end mapnik namespace } // end mapnik namespace
#endif #endif // MAPNIK_GLYPH_SYMBOLIZER_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* *
*****************************************************************************/ *****************************************************************************/
//$Id$
#ifndef GRADIENT_HPP #ifndef MAPNIK_GRADIENT_HPP
#define GRADIENT_HPP #define MAPNIK_GRADIENT_HPP
// agg
#include <agg_trans_affine.h> #include <agg_trans_affine.h>
// mapnik // mapnik
@ -104,4 +104,4 @@ private:
}; };
} }
#endif //GRADIENT_HPP #endif // MAPNIK_GRADIENT_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 MAPNIK_GRAPHICS_HPP
#define MAPNIK_GRAPHICS_HPP
#ifndef GRAPHICS_HPP
#define GRAPHICS_HPP
// mapnik // mapnik
#include <mapnik/color.hpp> #include <mapnik/color.hpp>
@ -520,4 +518,5 @@ public:
} }
}; };
} }
#endif //GRAPHICS_HPP
#endif // MAPNIK_GRAPHICS_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* *
*****************************************************************************/ *****************************************************************************/
//$Id$
#ifndef _HEXTREE_HPP_ #ifndef MAPNIK_HEXTREE_HPP
#define _HEXTREE_HPP_ #define MAPNIK_HEXTREE_HPP
// mapnik // mapnik
#include <mapnik/global.hpp> #include <mapnik/global.hpp>
@ -455,4 +454,4 @@ private:
}; };
} // namespace mapnik } // namespace mapnik
#endif // _HEXTREE_HPP_ #endif // MAPNIK_HEXTREE_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,11 +20,10 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$ #ifndef MAPNIK_HIT_TEST_FILTER_HPP
#define MAPNIK_HIT_TEST_FILTER_HPP
#ifndef HIT_TEST_FILTER_HPP
#define HIT_TEST_FILTER_HPP
// mapnik
#include <mapnik/feature.hpp> #include <mapnik/feature.hpp>
namespace mapnik { namespace mapnik {
@ -54,4 +53,4 @@ private:
}; };
} }
#endif // HIT_TEST_FILTER_HPP #endif // MAPNIK_HIT_TEST_FILTER_HPP

View file

@ -20,10 +20,8 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$ #ifndef MAPNIK_IMAGE_COMPOSITING_HPP
#define MAPNIK_IMAGE_COMPOSITING_HPP
#ifndef IMAGE_COMPOSITING_HPP
#define IMAGE_COMPOSITING_HPP
// agg // agg
#include "agg_rendering_buffer.h" #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

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 MAPNIK_IMAGE_DATA_HPP
#define MAPNIK_IMAGE_DATA_HPP
#ifndef IMAGE_DATA_HPP
#define IMAGE_DATA_HPP
// mapnik
#include <mapnik/global.hpp> #include <mapnik/global.hpp>
// stl
#include <cassert> #include <cassert>
#include <cstring> #include <cstring>
@ -139,4 +140,4 @@ typedef ImageData<unsigned> image_data_32;
typedef ImageData<byte> image_data_8; typedef ImageData<byte> image_data_8;
} }
#endif //IMAGE_DATA_HPP #endif // MAPNIK_IMAGE_DATA_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 // mapnik
#include <mapnik/image_data.hpp> #include <mapnik/image_data.hpp>
#include <mapnik/config.hpp> #include <mapnik/config.hpp>
// stl // stl
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
@ -63,4 +63,4 @@ MAPNIK_DECL image_reader* get_image_reader(const std::string& file);
} }
#endif //IMAGE_READER_HPP #endif // MAPNIK_IMAGE_READER_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 MAPNIK_IMAGE_UTIL_HPP
#define MAPNIK_IMAGE_UTIL_HPP
#ifndef IMAGE_UTIL_HPP
#define IMAGE_UTIL_HPP
// mapnik // mapnik
#include <mapnik/config.hpp> #include <mapnik/config.hpp>
@ -298,4 +296,4 @@ template MAPNIK_DECL std::string save_to_string<image_view<image_data_32> > (ima
} }
#endif //IMAGE_UTIL_HPP #endif // MAPNIK_IMAGE_UTIL_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,11 +20,8 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$ #ifndef MAPNIK_IMAGE_VIEW_HPP
#define MAPNIK_IMAGE_VIEW_HPP
#ifndef IMAGE_VIEW_HPP
#define IMAGE_VIEW_HPP
namespace mapnik { namespace mapnik {
@ -107,5 +104,5 @@ private:
}; };
} }
#endif // IMAGE_VIEW_HPP #endif // MAPNIK_IMAGE_VIEW_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,8 +20,6 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$
#ifndef MAPNIK_JPEG_IO_HPP #ifndef MAPNIK_JPEG_IO_HPP
#define MAPNIK_JPEG_IO_HPP #define MAPNIK_JPEG_IO_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,13 +20,12 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$ #ifndef MAPNIK_LABEL_COLLISION_DETECTOR_HPP
#define MAPNIK_LABEL_COLLISION_DETECTOR_HPP
#ifndef LABEL_COLLISION_DETECTOR_HPP
#define LABEL_COLLISION_DETECTOR_HPP
// mapnik // mapnik
#include <mapnik/quad_tree.hpp> #include <mapnik/quad_tree.hpp>
// stl // stl
#include <vector> #include <vector>
#include <unicode/unistr.h> #include <unicode/unistr.h>
@ -233,4 +232,4 @@ public:
}; };
} }
#endif // LABEL_COLLISION_DETECTOR_HPP #endif // MAPNIK_LABEL_COLLISION_DETECTOR_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* *
*****************************************************************************/ *****************************************************************************/
//$Id$
#ifndef LABEL_PLACEMENT_HPP #ifndef MAPNIK_LABEL_PLACEMENT_HPP
#define LABEL_PLACEMENT_HPP #define MAPNIK_LABEL_PLACEMENT_HPP
namespace mapnik namespace mapnik
{ {
@ -51,4 +50,4 @@ public:
}; };
} }
#endif //LABEL_PLACEMENT_HPP #endif // MAPNIK_LABEL_PLACEMENT_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 * 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 #ifndef MAPNIK_LAYER_HPP
#define LAYER_HPP #define MAPNIK_LAYER_HPP
// mapnik // mapnik
#include <mapnik/feature.hpp> #include <mapnik/feature.hpp>
#include <mapnik/datasource.hpp> #include <mapnik/datasource.hpp>
@ -217,4 +217,4 @@ private:
}; };
} }
#endif //LAYER_HPP #endif // MAPNIK_LAYER_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,11 +20,13 @@
* *
*****************************************************************************/ *****************************************************************************/
#ifndef LIBXML2_LOADER_INCLUDED #ifndef MAPNIK_LIBXML2_LOADER_HPP
#define LIBXML2_LOADER_INCLUDED #define MAPNIK_LIBXML2_LOADER_HPP
// boost
#include <boost/property_tree/ptree.hpp> #include <boost/property_tree/ptree.hpp>
// stl
#include <string> #include <string>
namespace mapnik 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=""); 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

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 * 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 #ifndef MAPNIK_LINE_PATTERN_SYMBOLIZER_HPP
#define LINE_PATTERN_SYMBOLIZER_HPP #define MAPNIK_LINE_PATTERN_SYMBOLIZER_HPP
// mapnik // mapnik
#include <mapnik/symbolizer.hpp> #include <mapnik/symbolizer.hpp>
@ -38,4 +37,4 @@ struct MAPNIK_DECL line_pattern_symbolizer :
}; };
} }
#endif // LINE_PATTERN_SYMBOLIZER_HPP #endif // MAPNIK_LINE_PATTERN_SYMBOLIZER_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 * 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 #ifndef MAPNIK_LINE_SYMBOLIZER_HPP
#define LINE_SYMBOLIZER_HPP #define MAPNIK_LINE_SYMBOLIZER_HPP
// mapnik
#include <mapnik/stroke.hpp> #include <mapnik/stroke.hpp>
#include <mapnik/symbolizer.hpp> #include <mapnik/symbolizer.hpp>
#include <mapnik/enumeration.hpp> #include <mapnik/enumeration.hpp>
@ -82,4 +82,4 @@ private:
}; };
} }
#endif //LINE_SYMBOLIZER_HPP #endif // MAPNIK_LINE_SYMBOLIZER_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* *
*****************************************************************************/ *****************************************************************************/
// $Id$
#ifndef MAP_LOADER_HPP #ifndef MAPNIK_LOAD_MAP_HPP
#define MAP_LOADER_HPP #define MAPNIK_LOAD_MAP_HPP
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
#endif #endif
// mapnik
#include <mapnik/map.hpp> #include <mapnik/map.hpp>
// stl
#include <string> #include <string>
namespace mapnik 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=""); 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

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 * 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 #ifndef MAPNIK_MAP_HPP
#define MAP_HPP #define MAPNIK_MAP_HPP
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
@ -461,4 +460,4 @@ private:
DEFINE_ENUM(aspect_fix_mode_e,Map::aspect_fix_mode); DEFINE_ENUM(aspect_fix_mode_e,Map::aspect_fix_mode);
} }
#endif //MAP_HPP #endif // MAPNIK_MAP_HPP

View file

@ -20,21 +20,19 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$ #ifndef MAPNIK_MAPPED_MEMORY_CACHE_HPP
#define MAPNIK_MAPPED_MEMORY_CACHE_HPP
#ifndef MEMORY_REGION_CACHE_HPP
#define MEMORY_REGION_CACHE_HPP
// mapnik // mapnik
#include <mapnik/config.hpp> #include <mapnik/config.hpp>
#include <mapnik/utils.hpp> #include <mapnik/utils.hpp>
// boost // boost
#include <boost/utility.hpp> #include <boost/utility.hpp>
#include <boost/unordered_map.hpp> #include <boost/unordered_map.hpp>
#include <boost/interprocess/mapped_region.hpp> #include <boost/interprocess/mapped_region.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/optional.hpp> #include <boost/optional.hpp>
#ifdef MAPNIK_THREADSAFE #ifdef MAPNIK_THREADSAFE
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
#endif #endif
@ -61,5 +59,5 @@ struct MAPNIK_DECL mapped_memory_cache :
} }
#endif // MAPNIK_MARKER_CACHE_HPP #endif // MAPNIK_MAPPED_MEMORY_CACHE_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 MAPNIK_MARKER_HPP
#define MAPNIK_MARKER_HPP
#ifndef MARKER_HPP
#define MARKER_HPP
// mapnik
#include <mapnik/global.hpp> #include <mapnik/global.hpp>
#include <mapnik/image_data.hpp> #include <mapnik/image_data.hpp>
#include <mapnik/svg/svg_path_attributes.hpp> #include <mapnik/svg/svg_path_attributes.hpp>
#include <mapnik/svg/svg_storage.hpp> #include <mapnik/svg/svg_storage.hpp>
#include <mapnik/svg/svg_path_adapter.hpp> #include <mapnik/svg/svg_path_adapter.hpp>
// agg
#include "agg_path_storage.h" #include "agg_path_storage.h"
// boost // boost
#include <boost/utility.hpp> #include <boost/utility.hpp>
#include <boost/unordered_map.hpp> #include <boost/unordered_map.hpp>
@ -39,6 +40,7 @@
#include <boost/optional.hpp> #include <boost/optional.hpp>
#include <boost/make_shared.hpp> #include <boost/make_shared.hpp>
// stl
#include <cassert> #include <cassert>
#include <cstring> #include <cstring>
@ -125,4 +127,4 @@ private:
} }
#endif //MARKER_HPP #endif // MAPNIK_MARKER_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,8 +20,6 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$
#ifndef MAPNIK_MARKER_CACHE_HPP #ifndef MAPNIK_MARKER_CACHE_HPP
#define MAPNIK_MARKER_CACHE_HPP #define MAPNIK_MARKER_CACHE_HPP
@ -32,8 +30,10 @@
#include <mapnik/svg/svg_path_attributes.hpp> #include <mapnik/svg/svg_path_attributes.hpp>
#include <mapnik/svg/svg_storage.hpp> #include <mapnik/svg/svg_storage.hpp>
#include <mapnik/svg/svg_path_adapter.hpp> #include <mapnik/svg/svg_path_adapter.hpp>
// agg // agg
#include "agg_path_storage.h" #include "agg_path_storage.h"
// boost // boost
#include <boost/utility.hpp> #include <boost/utility.hpp>
#include <boost/unordered_map.hpp> #include <boost/unordered_map.hpp>

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,13 +20,19 @@
* *
*****************************************************************************/ *****************************************************************************/
#ifndef MARKERS_PLACEMENT_HPP #ifndef MAPNIK_MARKERS_PLACEMENT_HPP
#define MARKERS_PLACEMENT_HPP #define MAPNIK_MARKERS_PLACEMENT_HPP
// agg
#include "agg_basics.h" #include "agg_basics.h"
// mapnik
#include <mapnik/box2d.hpp> #include <mapnik/box2d.hpp>
// boost
#include <boost/utility.hpp> #include <boost/utility.hpp>
// stl
#include <cmath> #include <cmath>
namespace mapnik { namespace mapnik {
@ -242,5 +248,7 @@ template <typename Locator, typename Detector> box2d<double> markers_placement<L
return box2d<double>(x1_, y1_, x2_, y2_); return box2d<double>(x1_, y1_, x2_, y2_);
} }
} /* end namespace */
#endif // MARKERS_PLACEMENT_HPP }
#endif // MAPNIK_MARKERS_PLACEMENT_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,10 +20,8 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$ #ifndef MAPNIK_MARKERS_SYMBOLIZER_HPP
#define MAPNIK_MARKERS_SYMBOLIZER_HPP
#ifndef MARKERS_SYMBOLIZER_HPP
#define MARKERS_SYMBOLIZER_HPP
//mapnik //mapnik
#include <mapnik/symbolizer.hpp> #include <mapnik/symbolizer.hpp>
@ -92,4 +90,4 @@ private:
} }
#endif // MARKERS_SYMBOLIZER_HPP #endif // MAPNIK_MARKERS_SYMBOLIZER_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 * 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 #ifndef MAPNIK_MEMORY_HPP
#define MEMORY_HPP #define MAPNIK_MEMORY_HPP
// stl
#include <iostream> #include <iostream>
#include <cassert> #include <cassert>
@ -85,4 +85,4 @@ public:
}; };
} }
#endif //MEMORY_HPP #endif // MAPNIK_MEMORY_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,13 +20,14 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$ #ifndef MAPNIK_MEMORY_DATASOURCE_HPP
#define MAPNIK_MEMORY_DATASOURCE_HPP
#ifndef MEMORY_DATASOURCE_HPP
#define MEMORY_DATASOURCE_HPP
// mapnik
#include <mapnik/datasource.hpp> #include <mapnik/datasource.hpp>
#include <mapnik/feature_layer_desc.hpp> #include <mapnik/feature_layer_desc.hpp>
// stl
#include <vector> #include <vector>
namespace mapnik { namespace mapnik {
@ -65,4 +66,4 @@ private:
}; };
} }
#endif // MEMORY_DATASOURCE_HPP #endif // MAPNIK_MEMORY_DATASOURCE_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,11 +20,13 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$ #ifndef MAPNIK_MEMORY_FEATURESET_HPP
#ifndef MEMORY_FEATURESET_HPP #define MAPNIK_MEMORY_FEATURESET_HPP
#define MEMORY_FEATURESET_HPP
// mapnik
#include <mapnik/memory_datasource.hpp> #include <mapnik/memory_datasource.hpp>
// boost
#include <boost/utility.hpp> #include <boost/utility.hpp>
namespace mapnik { namespace mapnik {
@ -73,4 +75,4 @@ private:
}; };
} }
#endif // MEMORY_FEATURESET_HPP #endif // MAPNIK_MEMORY_FEATURESET_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 // mapnik
#define METAWRITER_HPP
// Mapnik
#include <mapnik/box2d.hpp> #include <mapnik/box2d.hpp>
#include <mapnik/feature.hpp> #include <mapnik/feature.hpp>
#include <mapnik/font_engine_freetype.hpp> #include <mapnik/font_engine_freetype.hpp>
// Boost // boost
#include <boost/utility.hpp> #include <boost/utility.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/optional.hpp> #include <boost/optional.hpp>
#include <boost/concept_check.hpp> #include <boost/concept_check.hpp>
// STL
// stl
#include <set> #include <set>
#include <string> #include <string>
@ -139,4 +139,4 @@ typedef std::pair<metawriter_ptr, metawriter_properties> metawriter_with_propert
} }
#endif #endif // MAPNIK_METAWRITER_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,9 +20,8 @@
* *
*****************************************************************************/ *****************************************************************************/
#ifndef MAPNIK_METAWRITER_FACTORY_HPP
#ifndef METAWRITER_FACTORY_HPP #define MAPNIK_METAWRITER_FACTORY_HPP
#define METAWRITER_FACTORY_HPP
// mapnik // mapnik
#include <mapnik/metawriter.hpp> #include <mapnik/metawriter.hpp>
@ -51,5 +50,5 @@ void metawriter_save(
} }
#endif /* METAWRITER_FACTORY_HPP */ #endif // MAPNIK_METAWRITER_FACTORY_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,9 +20,8 @@
* *
*****************************************************************************/ *****************************************************************************/
#ifndef MAPNIK_METAWRITER_INMEM_HPP
#ifndef METAWRITER_INMEM_HPP #define MAPNIK_METAWRITER_INMEM_HPP
#define METAWRITER_INMEM_HPP
// mapnik // mapnik
#include <mapnik/config.hpp> #include <mapnik/config.hpp>
@ -117,4 +116,4 @@ typedef boost::shared_ptr<metawriter_inmem> metawriter_inmem_ptr;
} }
#endif /* METAWRITER_INMEM_HPP */ #endif // MAPNIK_METAWRITER_INMEM_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,9 +20,8 @@
* *
*****************************************************************************/ *****************************************************************************/
#ifndef MAPNIK_METAWRITER_JSON_HPP
#ifndef METAWRITER_JSON_HPP #define MAPNIK_METAWRITER_JSON_HPP
#define METAWRITER_JSON_HPP
// mapnik // mapnik
#include <mapnik/metawriter.hpp> #include <mapnik/metawriter.hpp>
@ -150,4 +149,4 @@ typedef boost::shared_ptr<metawriter_json> metawriter_json_ptr;
} }
#endif #endif // MAPNIK_METAWRITER_JSON_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* *
*****************************************************************************/ *****************************************************************************/
//$Id$
#ifndef _OCTREE_HPP_ #ifndef MAPNIK_OCTREE_HPP
#define _OCTREE_HPP_ #define MAPNIK_OCTREE_HPP
// mapnik // mapnik
#include <mapnik/global.hpp> #include <mapnik/global.hpp>
@ -303,6 +302,7 @@ public:
private: private:
node * root_; node * root_;
}; };
} // namespace mapnik } // namespace mapnik
#endif /* _OCTREE_HPP_ */ #endif // MAPNIK_OCTREE_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 * 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 // mapnik
#include <mapnik/config.hpp> #include <mapnik/config.hpp>
@ -164,5 +162,5 @@ private:
} // namespace mapnik } // namespace mapnik
#endif // _PALETTE_HPP_ #endif // MAPNIK_PALETTE_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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 * 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 #ifndef MAPNIK_PARAMS_HPP
#define PARAMS_HPP #define MAPNIK_PARAMS_HPP
// mapnik
#include <boost/variant.hpp> #include <boost/variant.hpp>
#include <boost/optional.hpp> #include <boost/optional.hpp>
#include <boost/none.hpp> #include <boost/none.hpp>
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
// stl
#include <string> #include <string>
#include <map> #include <map>
@ -100,4 +102,4 @@ public:
}; };
} }
#endif //PARAMS_HPP #endif // MAPNIK_PARAMS_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -28,10 +28,12 @@
#include <mapnik/attribute.hpp> #include <mapnik/attribute.hpp>
#include <mapnik/feature.hpp> #include <mapnik/feature.hpp>
#include <mapnik/value.hpp> #include <mapnik/value.hpp>
// boost // boost
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/variant.hpp> #include <boost/variant.hpp>
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
// stl // stl
#include <string> #include <string>
#include <vector> #include <vector>
@ -140,4 +142,4 @@ typedef mapnik::path_processor<Feature> path_processor_type;
} }
#endif //MAPNIK_PARSE_PATH_HPP #endif // MAPNIK_PARSE_PATH_HPP

View file

@ -2,7 +2,7 @@
* *
* This file is part of Mapnik (c++ mapping toolkit) * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,8 +20,6 @@
* *
*****************************************************************************/ *****************************************************************************/
//$Id$
#ifndef MAPNIK_PATH_EXPRESSIONS_GRAMMAR_HPP #ifndef MAPNIK_PATH_EXPRESSIONS_GRAMMAR_HPP
#define MAPNIK_PATH_EXPRESSIONS_GRAMMAR_HPP #define MAPNIK_PATH_EXPRESSIONS_GRAMMAR_HPP
@ -29,22 +27,26 @@
#include <mapnik/unicode.hpp> #include <mapnik/unicode.hpp>
#include <mapnik/expression_node.hpp> #include <mapnik/expression_node.hpp>
#include <mapnik/feature.hpp> #include <mapnik/feature.hpp>
// boost // boost
#include <boost/variant.hpp> #include <boost/variant.hpp>
#include <boost/concept_check.hpp> #include <boost/concept_check.hpp>
//spirit2 // spirit2
#include <boost/spirit/include/qi.hpp> #include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/qi_action.hpp> #include <boost/spirit/include/qi_action.hpp>
//fusion
// fusion
#include <boost/fusion/include/adapt_struct.hpp> #include <boost/fusion/include/adapt_struct.hpp>
//phoenix
// phoenix
#include <boost/spirit/include/phoenix_core.hpp> #include <boost/spirit/include/phoenix_core.hpp>
#include <boost/spirit/include/phoenix_object.hpp> #include <boost/spirit/include/phoenix_object.hpp>
#include <boost/spirit/include/phoenix_operator.hpp> #include <boost/spirit/include/phoenix_operator.hpp>
#include <boost/spirit/include/phoenix_function.hpp> #include <boost/spirit/include/phoenix_function.hpp>
#include <boost/spirit/include/phoenix_stl.hpp> #include <boost/spirit/include/phoenix_stl.hpp>
#include <boost/spirit/home/phoenix/object/construct.hpp> #include <boost/spirit/home/phoenix/object/construct.hpp>
// stl // stl
#include <string> #include <string>
#include <vector> #include <vector>
@ -56,11 +58,9 @@ namespace qi = boost::spirit::qi;
namespace phoenix = boost::phoenix; namespace phoenix = boost::phoenix;
namespace standard_wide = boost::spirit::standard_wide; namespace standard_wide = boost::spirit::standard_wide;
//
using standard_wide::space_type; using standard_wide::space_type;
using standard_wide::space; using standard_wide::space;
template <typename Iterator> template <typename Iterator>
struct path_expression_grammar : qi::grammar<Iterator, std::vector<path_component>(), space_type> struct path_expression_grammar : qi::grammar<Iterator, std::vector<path_component>(), space_type>
{ {
@ -92,8 +92,6 @@ struct path_expression_grammar : qi::grammar<Iterator, std::vector<path_componen
qi::rule<Iterator, std::string() > str; qi::rule<Iterator, std::string() > str;
}; };
} }
#endif // MAPNIK_PATH_EXPRESSIONS_GRAMMAR_HPP #endif // MAPNIK_PATH_EXPRESSIONS_GRAMMAR_HPP

Some files were not shown because too many files have changed in this diff Show more