pre-scons update

This commit is contained in:
Artem Pavlenko 2005-05-03 18:28:16 +00:00
parent ed620ce6b2
commit fcc9638f46
30 changed files with 1808 additions and 463 deletions

View file

@ -1 +1 @@
nobase_include_HEADERS = attribute.hh color.hh config.hh coord.hh coord_array.hh vertex_vector.hh ctrans.hh datasource.hh datasource_cache.hh factory.hh feature.hh query.hh filter.hh filter_visitor.hh envelope.hh gamma.hh geometry.hh geom_util.hh graphics.hh image_data.hh image_reader.hh image_util.hh layer.hh line_aa.hh map.hh mapnik.hh memory.hh params.hh plugin.hh line_symbolizer.hh polygon_symbolizer.hh image_symbolizer.hh pool.hh ptr.hh raster.hh render.hh scanline_aa.hh scanline.hh style.hh style_cache.hh style_factory.hh symbolizer.hh text.hh utils.hh vertex.hh vertex_transform.hh wkb.hh logical.hh rule.hh comparison.hh fill.hh spatial.hh expression.hh stroke.hh attribute_collector.hh colorcube.hh feature_type_style.hh
nobase_include_HEADERS = attribute.hh color.hh config.hh coord.hh coord_array.hh vertex_vector.hh ctrans.hh datasource.hh datasource_cache.hh factory.hh feature.hh query.hh filter.hh filter_visitor.hh envelope.hh gamma.hh geometry.hh geom_util.hh graphics.hh image_data.hh image_reader.hh image_util.hh layer.hh line_aa.hh map.hh mapnik.hh math_expr.hh memory.hh params.hh plugin.hh line_symbolizer.hh polygon_symbolizer.hh image_symbolizer.hh pool.hh ptr.hh raster.hh render.hh scanline_aa.hh scanline.hh style.hh style_cache.hh style_factory.hh symbolizer.hh text.hh utils.hh vertex.hh vertex_transform.hh wkb.hh logical.hh rule.hh comparison.hh fill.hh spatial.hh expression.hh stroke.hh attribute_collector.hh colorcube.hh feature_type_style.hh value.hh filter_parser.hh filter_factory.hh

View file

@ -121,6 +121,7 @@ namespace mapnik
{
return ATraits::to_string(value_);
}
attribute_base* clone() const
{
return new attribute_impl(value_);
@ -136,7 +137,8 @@ namespace mapnik
public:
attribute_base* base_;
};
template<typename T>
struct bad_attribute_cast : public std::bad_cast
{

View file

@ -21,36 +21,40 @@
#ifndef ATTRIBUTE_COLLECTOR
#define ATTROBUTE_COLLECTOR
#include "filter_visitor.hh"
#include "filter.hh"
#include "expression.hh"
#include <set>
#include "comparison.hh"
namespace mapnik
{
template <typename Feature>
class attribute_collector : public filter_visitor<Feature>
template <typename FeatureT>
class attribute_collector : public filter_visitor<FeatureT>
{
private:
std::set<std::string> names_;
public:
attribute_collector() {}
void visit(filter<Feature>& filter)
{
property_filter<Feature>* pf_;
if((pf_=dynamic_cast<property_filter<Feature>*>(&filter)))
void visit(filter<FeatureT>& /*filter*/)
{
//not interested
}
void visit(expression<FeatureT>& exp)
{
property<FeatureT>* pf;
if ((pf = dynamic_cast<property<FeatureT>*>(&exp)))
{
names_.insert(pf_->name_);
names_.insert(pf->name());
}
}
const std::set<std::string>& property_names() const
std::set<std::string> const& property_names() const
{
return names_;
}
virtual ~attribute_collector() {}
private:
attribute_collector(const attribute_collector&);
attribute_collector& operator=(const attribute_collector&);
attribute_collector(attribute_collector const&);
attribute_collector& operator=(attribute_collector const&);
};
}

View file

@ -24,186 +24,96 @@
#include "filter.hh"
#include "expression.hh"
#include "feature.hh"
#include "attribute.hh"
namespace mapnik
{
template<typename Feature>
struct property_filter : public filter<Feature> {
const std::string name_;
explicit property_filter(const std::string& name)
: name_(name) {}
virtual ~property_filter() {}
{
template <typename T>
struct greater_than
{
bool operator() (T const& left, T const& right) const
{
return left > right;
}
};
template <typename Feature,typename T>
struct property_is_equal_to : public property_filter<Feature>
template <typename T>
struct greater_than_or_equal
{
using property_filter<Feature>::name_;
T value_;
property_is_equal_to(const std::string& name,const T& value)
: property_filter<Feature>(name), value_(value) {}
int type() const
bool operator() (T const& left, T const& right) const
{
return filter<Feature>::COMPARISON_OPS;
return left >= right;
}
bool pass(const Feature& feature) const
};
template <typename T>
struct less_than
{
bool operator() (T const& left, T const& right) const
{
const attribute& attr=feature.attribute_by_name(name_);
bool result=false;
try
{
result=(value_ == attribute_cast<T>(attr)) ? true:false;
}
catch (bad_attribute_cast<T>& ex)
{
std::cerr<<ex.what()<<std::endl;
}
return result;
return left < right;
}
filter<Feature>* clone() const
};
template <typename T>
struct less_than_or_equal
{
bool operator() (T const& left, T const& right) const
{
return new property_is_equal_to(name_,value_);
return left <= right;
}
void accept(filter_visitor<Feature>& v)
};
template <typename T>
struct equals
{
bool operator() (T const& left, T const& right) const
{
v.visit(*this);
return left == right;
}
virtual ~property_is_equal_to() {}
};
template <typename Feature,typename T>
struct property_is_greater_then : public property_filter<Feature>
{
using property_filter<Feature>::name_;
T value_;
property_is_greater_then(const std::string& name,const T& value)
: property_filter<Feature>(name), value_(value) {}
int type() const
template <typename T>
struct not_equals
{
bool operator() (T const& left, T const& right) const
{
return filter<Feature>::COMPARISON_OPS;
return left != right;
}
bool pass(const Feature& feature) const
{
const attribute& attr=feature.attribute_by_name(name_);
bool result=false;
try
{
result = (value_ < attribute_cast<T>(attr))?true:false;
}
catch (bad_attribute_cast<T>& ex)
{
std::cerr<<ex.what()<<std::endl;
}
return result;
}
filter<Feature>* clone() const
{
return new property_is_greater_then(name_,value_);
}
void accept(filter_visitor<Feature>& v)
{
v.visit(*this);
}
virtual ~property_is_greater_then() {}
};
template <typename Feature,typename T>
struct property_is_less_then : public property_filter<Feature>
template <typename FeatureT,typename Op>
struct compare_filter : public filter<FeatureT>
{
using property_filter<Feature>::name_;
T value_;
property_is_less_then(const std::string& name,const T& value)
: property_filter<Feature>(name), value_(value) {}
compare_filter(expression<FeatureT> const& left,
expression<FeatureT> const& right)
: filter<FeatureT>(),
left_(left.clone()), right_(right.clone()) {}
int type() const
{
return filter<Feature>::COMPARISON_OPS;
}
compare_filter(compare_filter const& other)
: filter<FeatureT>(),
left_(other.left_->clone()),right_(other.right_->clone()) {}
bool pass(const Feature& feature) const
bool pass(const FeatureT& feature) const
{
const attribute& attr=feature.attribute_by_name(name_);
bool result=false;
try
{
result=(value_ > attribute_cast<T>(attr))?true:false;
}
catch (bad_attribute_cast<T>& ex)
{
std::cerr<<ex.what()<<std::endl;
}
return result;
return Op()(left_->get_value(feature),right_->get_value(feature));
}
filter<Feature>* clone() const
{
return new property_is_less_then(name_,value_);
}
void accept(filter_visitor<Feature>& v)
void accept(filter_visitor<FeatureT>& v)
{
left_->accept(v);
right_->accept(v);
v.visit(*this);
}
virtual ~property_is_less_then() {}
filter<FeatureT>* clone() const
{
return new compare_filter<FeatureT,Op>(*this);
}
virtual ~compare_filter()
{
delete left_;
delete right_;
}
private:
expression<FeatureT>* left_;
expression<FeatureT>* right_;
};
template <typename Feature,typename T>
struct property_is_between : public property_filter<Feature>
{
using property_filter<Feature>::name_;
T lo_value_;
T hi_value_;
property_is_between(const std::string& name,const T& lo_value,const T& hi_value)
: property_filter<Feature>(name),
lo_value_(lo_value),
hi_value_(hi_value) {}
int type() const
{
return filter<Feature>::COMPARISON_OPS;
}
bool pass(const Feature& feature) const
{
const attribute& attr=feature.attribute_by_name(name_);
bool result=false;
try
{
T const& a=attribute_cast<T>(attr);
result=(lo_value_ < a && a < hi_value_) ? true : false;
}
catch (bad_attribute_cast<T>& ex)
{
std::cerr<<ex.what()<<std::endl;
}
return result;
}
filter<Feature>* clone() const
{
return new property_is_between(name_,lo_value_,hi_value_);
}
void accept(filter_visitor<Feature>& v)
{
v.visit(*this);
}
virtual ~property_is_between() {}
};
}
#endif //COMPARISON_HH

View file

@ -16,48 +16,97 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//$Id$
#ifndef EXPRESSION_HH
#define EXPRESSION_HH
#include "value.hh"
#include "filter_visitor.hh"
namespace mapnik
{
//arithmetic expressions
template <typename T>
struct add
template <typename FeatureT> class filter_visitor;
template <typename FeatureT>
struct expression
{
T operator()(T operand1,T operand2) const
{
return operand1 + operand2;
}
virtual value get_value(FeatureT const& feature) const=0;
virtual void accept(filter_visitor<FeatureT>& v)=0;
virtual expression<FeatureT>* clone() const=0;
virtual ~expression() {}
};
template <typename T>
struct divide
template <typename FeatureT>
class literal : public expression<FeatureT>
{
T operator()(T operand1,T operand2) const
public:
literal(int val)
: expression<FeatureT>(),
value_(val) {}
literal(double val)
: expression<FeatureT>(),
value_(val) {}
literal(std::string const& val)
: expression<FeatureT>(),
value_(val) {}
literal(literal const& other)
: expression<FeatureT>(),
value_(other.value_) {}
value get_value(FeatureT const& /*feature*/) const
{
assert(operand2);
return operand1 / operand2;
return value_;
}
void accept(filter_visitor<FeatureT>& v)
{
v.visit(*this);
}
expression<FeatureT>* clone() const
{
return new literal(*this);
}
~literal() {}
private:
value value_;
};
template <typename T>
struct mult
template <typename FeatureT>
class property : public expression<FeatureT>
{
T operator() (T operand1,T operand2) const
public:
property(std::string const& name)
: expression<FeatureT>(),
name_(name) {}
property(property const& other)
: expression<FeatureT>(),
name_(other.name_) {}
value get_value(FeatureT const& feature) const
{
return operand1 * operand2;
const attribute& attr=feature.attribute_by_name(name_);
return value(attr);
}
void accept(filter_visitor<FeatureT>& v)
{
v.visit(*this);
}
expression<FeatureT>* clone() const
{
return new property(*this);
}
std::string const& name() const
{
return name_;
}
~property() {}
private:
std::string name_;
};
template <typename T>
struct sub
{
T operator() (T operand1,T operand2) const
{
return operand1 - operand2;
}
};
}
#endif //EXPRESSION_HH

View file

@ -97,7 +97,7 @@ namespace mapnik
typename attributes::const_iterator pos=attr_.find(name);
if (pos!=attr_.end())
return pos->second;
static attribute empty;
static attribute empty(0);
return empty;
}

View file

@ -16,63 +16,47 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// $Id$
//$Id$
#ifndef FILTER_HH
#define FILTER_HH
#include "envelope.hh"
#include "feature.hh"
#include "filter_visitor.hh"
#include "feature.hh"
namespace mapnik
{
typedef ref_ptr<filter<Feature> > filter_ptr;
template <typename Feature>
template <typename FeatureT> class filter_visitor;
template <typename FeatureT>
struct filter
{
enum {
NULL_OPS,
SPATIAL_OPS,
COMPARISON_OPS,
LOGICAL_OPS,
FEATUREID_OPS
};
virtual int type() const=0;
virtual bool pass (const Feature& feature) const = 0;
virtual filter<Feature>* clone() const = 0;
virtual void accept(filter_visitor<Feature>& v) = 0;
virtual bool pass(const FeatureT& feature) const=0;
virtual filter<FeatureT>* clone() const=0;
virtual void accept(filter_visitor<FeatureT>& v) = 0;
virtual ~filter() {}
};
template <typename Feature>
struct null_filter : public filter<Feature>
{
typedef filter<Feature> _Base_;
int type() const
{
return _Base_::NULL_OPS;
}
bool pass (const Feature&) const
template <typename FeatureT>
struct null_filter : public filter<FeatureT>
{
bool pass (const FeatureT&) const
{
return true;
}
_Base_* clone() const
{
return new null_filter<Feature>;
}
void accept(filter_visitor<Feature>& v)
filter<FeatureT>* clone() const
{
v.visit(*this);
return new null_filter<FeatureT>;
}
void accept(filter_visitor<FeatureT>&)
{}
virtual ~null_filter() {}
~null_filter() {}
};
}
#endif //FILTER_HH

52
include/filter_factory.hh Normal file
View file

@ -0,0 +1,52 @@
/* This file is part of Mapnik (c++ mapping toolkit)
* Copyright (C) 2005 Artem Pavlenko
*
* Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//$Id$
#include "filter_parser.hh"
using std::string;
namespace mapnik
{
template<typename FeatureT>
class filter_factory
{
public:
filter_factory() {}
filter_ptr compile(string const& str) const
{
stack<ref_ptr<filter<FeatureT> > > filters;
stack<ref_ptr<expression<FeatureT> > > exps;
filter_grammar<FeatureT> grammar(filters,exps);
char const *text = str.c_str();
parse_info<> info = parse(text,text+strlen(text),grammar,space_p);
if (info.full && !filters.empty())
{
cout<<"success parsing filter expression\n";
return filters.top();
}
else
{
cout << "failed at: \": " << info.stop << "\n";
return filter_ptr(new null_filter<FeatureT>());
}
}
};
}

306
include/filter_parser.hh Normal file
View file

@ -0,0 +1,306 @@
/* This file is part of Mapnik (c++ mapping toolkit)
* Copyright (C) 2005 Artem Pavlenko
*
* Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//$Id$
#ifndef FILTER_PARSER_HH
#define FILTER_PARSER_HH
#include <boost/spirit/core.hpp>
#include <boost/spirit/symbols.hpp>
#include "value.hh"
#include "expression.hh"
#include "filter.hh"
#include <stack>
#include <iostream>
using namespace boost::spirit;
using std::string;
using std::cout;
using std::stack;
namespace mapnik
{
template <typename FeatureT>
struct push_integer
{
push_integer(stack<ref_ptr<expression<FeatureT> > >& exprs)
: exprs_(exprs) {}
void operator() (int val) const
{
cout << "push int("<<val<<")\n";
exprs_.push(ref_ptr<expression<FeatureT> >(new literal<FeatureT>(val)));
}
stack<ref_ptr<expression<FeatureT> > >& exprs_;
};
template <typename FeatureT>
struct push_real
{
push_real(stack<ref_ptr<expression<FeatureT> > >& exprs)
: exprs_(exprs) {}
void operator() (double val) const
{
cout << "push real("<<val<<")\n";
exprs_.push(ref_ptr<expression<FeatureT> >(new literal<FeatureT>(val)));
}
stack<ref_ptr<expression<FeatureT> > >& exprs_;
};
template <typename FeatureT>
struct push_string
{
push_string(stack<ref_ptr<expression<FeatureT> > >& exprs)
: exprs_(exprs) {}
template <typename Iter>
void operator() (Iter start,Iter end) const
{
string str(start,end);
cout << "push string("<<str<<")\n";
exprs_.push(ref_ptr<expression<FeatureT> >(new literal<FeatureT>(str)));
}
stack<ref_ptr<expression<FeatureT> > >& exprs_;
};
template <typename FeatureT>
struct push_property
{
push_property(stack<ref_ptr<expression<FeatureT> > >& exprs)
: exprs_(exprs) {}
template <typename Iter>
void operator() (Iter start,Iter end) const
{
string str(start,end);
cout << "property name ["<<str<<"]\n";
exprs_.push(ref_ptr<expression<FeatureT> >(new property<FeatureT>(str)));
}
stack<ref_ptr<expression<FeatureT> > >& exprs_;
};
template <typename FeatureT,typename Op>
struct compose_expression
{
compose_expression(stack<ref_ptr<expression<FeatureT> > >& exprs)
: exprs_(exprs) {}
template <typename Iter>
void operator() (Iter,Iter) const
{
if (exprs_.size()>=2)
{
ref_ptr<expression<FeatureT> > right = exprs_.top();
exprs_.pop();
ref_ptr<expression<FeatureT> > left = exprs_.top();
exprs_.pop();
if (left && right)
{
exprs_.push(ref_ptr<expression<FeatureT> >(new math_expr_b<FeatureT,Op>(*left,*right)));
}
}
}
stack<ref_ptr<expression<FeatureT> > >& exprs_;
};
template <typename FeatureT,typename Op>
struct compose_filter
{
compose_filter(stack<ref_ptr<filter<FeatureT> > >& filters,
stack<ref_ptr<expression<FeatureT> > >& exprs)
: filters_(filters),exprs_(exprs) {}
template <typename Iter>
void operator() (Iter,Iter) const
{
if (exprs_.size()>=2)
{
ref_ptr<expression<FeatureT> > right = exprs_.top();
exprs_.pop();
ref_ptr<expression<FeatureT> > left = exprs_.top();
exprs_.pop();
if (left && right)
{
filters_.push(ref_ptr<filter<FeatureT> >(new compare_filter<FeatureT,Op>(*left,*right)));
}
}
}
stack<ref_ptr<filter<FeatureT> > >& filters_;
stack<ref_ptr<expression<FeatureT> > >& exprs_;
};
template <typename FeatureT>
struct compose_and_filter
{
compose_and_filter(stack<ref_ptr<filter<FeatureT> > >& filters)
: filters_(filters) {}
template <typename Iter>
void operator() (Iter,Iter) const
{
if (filters_.size()>=2)
{
ref_ptr<filter<FeatureT> > right = filters_.top();
filters_.pop();
ref_ptr<filter<FeatureT> > left = filters_.top();
filters_.pop();
if (left && right)
{
filters_.push(ref_ptr<filter<FeatureT> >(new logical_and<FeatureT>(*left,*right)));
}
}
}
stack<ref_ptr<filter<FeatureT> > >& filters_;
};
template <typename FeatureT>
struct compose_or_filter
{
compose_or_filter(stack<ref_ptr<filter<FeatureT> > >& filters)
: filters_(filters) {}
template <typename Iter>
void operator() (Iter,Iter) const
{
if (filters_.size()>=2)
{
ref_ptr<filter<FeatureT> > right = filters_.top();
filters_.pop();
ref_ptr<filter<FeatureT> > left = filters_.top();
filters_.pop();
if (left && right)
{
filters_.push(ref_ptr<filter<FeatureT> >(new logical_or<FeatureT>(*left,*right)));
}
}
}
stack<ref_ptr<filter<FeatureT> > >& filters_;
};
template <typename FeatureT>
struct compose_not_filter
{
compose_not_filter(stack<ref_ptr<filter<FeatureT> > >& filters)
: filters_(filters) {}
template <typename Iter>
void operator() (Iter,Iter) const
{
if (filters_.size()>=1)
{
ref_ptr<filter<FeatureT> > filter_ = filters_.top();
filters_.pop();
if (filter_)
{
filters_.push(ref_ptr<filter<FeatureT> >(new logical_not<FeatureT>(*filter_)));
}
}
}
stack<ref_ptr<filter<FeatureT> > >& filters_;
};
template <typename FeatureT>
struct filter_grammar : public grammar<filter_grammar<FeatureT> >
{
filter_grammar(stack<ref_ptr<filter<FeatureT> > >& filters_,
stack<ref_ptr<expression<FeatureT> > >& exprs_)
: filters(filters_),exprs(exprs_) {}
template <typename ScannerT>
struct definition
{
definition(filter_grammar const& self)
{
func1_op = "sqrt","sin","cos";
func2_op = "min","max";
spatial_op = "Equals","Disjoint","Touches","Within","Overlaps",
"Crosses","Intersects","Contains","DWithin","Beyond","BBOX";
number = strict_real_p [push_real<FeatureT>(self.exprs)]
| int_p [push_integer<FeatureT>(self.exprs)];
string_ ='\''>> ( (alpha_p | '_') >>
* (alnum_p | '_' )) [push_string<FeatureT>(self.exprs)] >> '\'';
property = '[' >> ( (alpha_p | '_')
>> * (alnum_p | '_' ))[push_property<FeatureT>(self.exprs)]>>']';
literal = number | string_ | property;
function = literal | ( func1_op >> '('>> literal >> ')') |
(func2_op >> '(' >> literal >>','>> literal >> ')');
factor = function
| '(' >> or_expr >> ')'
| ( '-' >> factor)
;
term = factor
>> *(('*' >> factor) [compose_expression<FeatureT,mult<value> >(self.exprs)]
| ('/' >> factor) [compose_expression<FeatureT,div<value> >(self.exprs)]);
expression = term >> *(('+' >> term) [compose_expression<FeatureT,add<value> >(self.exprs)]
| ('-' >> term) [compose_expression<FeatureT,sub<value> >(self.exprs)]);
relation = expression
>> *((">=" >> expression)
[compose_filter<FeatureT,greater_than_or_equal<value> >(self.filters,self.exprs)]
| ('>' >> expression)
[compose_filter<FeatureT,greater_than<value> >(self.filters,self.exprs)]
| ('<' >> expression)
[compose_filter<FeatureT,less_than<value> >(self.filters,self.exprs)]
| ("<=" >> expression)
[compose_filter<FeatureT,less_than_or_equal<value> >(self.filters,self.exprs)]);
equation = relation >> *( ( '=' >> relation)
[compose_filter<FeatureT,equals<value> >(self.filters,self.exprs)]
| ( "<>" >> relation)
[compose_filter<FeatureT,not_equals<value> >(self.filters,self.exprs)]);
not_expr = equation | *(str_p("not") >> equation)[compose_not_filter<FeatureT>(self.filters)];
and_expr = not_expr >> *("and" >> not_expr)[compose_and_filter<FeatureT>(self.filters)];
or_expr = and_expr >> *("or" >> and_expr)[compose_or_filter<FeatureT>(self.filters)];
filter_statement = or_expr;
}
boost::spirit::rule<ScannerT> const& start() const
{
return filter_statement;
}
boost::spirit::rule<ScannerT> factor;
boost::spirit::rule<ScannerT> term;
boost::spirit::rule<ScannerT> expression;
boost::spirit::rule<ScannerT> relation;
boost::spirit::rule<ScannerT> equation;
boost::spirit::rule<ScannerT> not_expr;
boost::spirit::rule<ScannerT> and_expr;
boost::spirit::rule<ScannerT> or_expr;
boost::spirit::rule<ScannerT> filter_statement;
boost::spirit::rule<ScannerT> literal,number,string_,property,function;
symbols<string> func1_op;
symbols<string> func2_op;
symbols<string> spatial_op;
};
stack<ref_ptr<filter<FeatureT> > >& filters;
stack<ref_ptr<expression<FeatureT> > >& exprs;
};
}
#endif //FILTER_PARSER_HH

View file

@ -0,0 +1,261 @@
/* This file is part of Mapnik (c++ mapping toolkit)
* Copyright (C) 2005 Artem Pavlenko
*
* Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//$Id$
#ifndef FILTER_PARSER_AST_HH
#define FILTER_PARSER_AST_HH
#include <boost/spirit/core.hpp>
#include <boost/spirit/tree/ast.hpp>
#include <iostream>
using namespace std;
using namespace boost::spirit;
namespace mapnik
{
struct filter_grammar_ast : public grammar<filter_grammar_ast>
{
static const int integerID = 1;
static const int realID = 2;
static const int stringID = 3;
static const int propertyID = 4;
static const int factorID = 5;
static const int termID = 6;
static const int expressionID = 7;
static const int relationID = 8;
static const int equationID = 9;
static const int and_exprID = 10;
static const int or_exprID = 11;
template <typename ScannerT>
struct definition
{
definition(filter_grammar_ast const& /*self*/)
{
real = leaf_node_d[strict_real_p];
integer = leaf_node_d[int_p];
number = real | integer;
string_ = inner_node_d['\''>> leaf_node_d[( (alpha_p | '_') >>
* (alnum_p | '_' ))] >> '\''];
property = inner_node_d['[' >> leaf_node_d[ ( (alpha_p | '_') >> * (alnum_p | '_' )) ] >> ']'];
literal = number | string_ | property;
factor = literal
| (root_node_d[str_p("not")] >> literal)
| inner_node_d[ch_p('(') >> or_expr >> ch_p(')') ]
| (root_node_d[ch_p('-')] >> factor)
;
term = factor
>> *((root_node_d[ch_p('*')] >> factor) | (root_node_d[ch_p('/')] >> factor));
expression = term >> *((root_node_d[ch_p('+')] >> term) | (root_node_d[ch_p('-')] >> term));
relation = expression >> *((root_node_d[str_p(">=")] >> expression)
| (root_node_d[ch_p('>')] >> expression)
| (root_node_d[ch_p('<')] >> expression)
| (root_node_d[str_p("<=")] >> expression));
equation = relation >> *( (root_node_d[ch_p('=')] >> relation)
| (root_node_d[str_p("<>")] >> relation));
and_expr = equation >> *(root_node_d[str_p("and")] >> equation);
or_expr = and_expr >> *(root_node_d[str_p("or")] >> and_expr);
//spatial_op = str_p("Equals") | "Disjoint" | "Touches" | "Within"
// | "Overlaps" | "Crosses" | "Intersects" | "Contains" | "DWithin" | "Beyond" | "BBOX";
filter_statement = or_expr;
}
rule<ScannerT> const& start() const
{
return filter_statement;
}
rule<ScannerT,parser_context<>, parser_tag<factorID> > factor;
rule<ScannerT,parser_context<>, parser_tag<termID> > term;
rule<ScannerT,parser_context<>, parser_tag<expressionID> > expression;
rule<ScannerT,parser_context<>, parser_tag<relationID> > relation;
rule<ScannerT,parser_context<>, parser_tag<equationID> > equation;
rule<ScannerT,parser_context<>, parser_tag<and_exprID> > and_expr;
rule<ScannerT,parser_context<>, parser_tag<or_exprID> > or_expr;
rule<ScannerT> filter_statement;
rule<ScannerT> literal,number;
rule<ScannerT,parser_context<>, parser_tag<integerID> > integer;
rule<ScannerT,parser_context<>, parser_tag<realID> > real;
rule<ScannerT,parser_context<>, parser_tag<stringID> > string_;
rule<ScannerT,parser_context<>, parser_tag<propertyID> > property;
//rule<ScannerT> spatial_op;
};
};
class node_data
{
public:
enum {
Unknown=0,
Integer=1,
Real =2,
String =3,
Property=4
};
node_data()
: type_(Unknown) {}
node_data(int type)
: type_(type) {}
node_data(node_data const& other)
: type_(other.type_) {}
node_data& operator=(node_data const& other)
{
if (this==&other)
return *this;
type_=other.type_;
return *this;
}
~node_data() {}
private:
int type_;
};
typedef char const* iterator_t;
typedef node_val_data_factory<node_data> factory_t;
typedef tree_match<iterator_t,factory_t>::tree_iterator iter_t;
void process_node(iter_t const&,string&);
void walk_ast_tree(tree_parse_info<iterator_t,factory_t> info,string& text)
{
process_node(info.trees.begin(),text);
}
void process_node(iter_t const& i,string& text)
{
//cout << "In eval_expression. i->value = " <<
// string(i->value.begin(), i->value.end()) <<
// " i->children.size() = " << i->children.size() << endl;
//std::cout<<typeid(*i).name()<<"\n";
if (i->value.id() == filter_grammar_ast::integerID)
{
assert(i->children.size()==0);
string integer(i->value.begin(), i->value.end());
text+= integer;
}
else if (i->value.id() == filter_grammar_ast::realID)
{
assert(i->children.size()==0);
string real(i->value.begin(), i->value.end());
text += real;
}
else if (i->value.id() == filter_grammar_ast::stringID)
{
assert(i->children.size()==0);
string str(i->value.begin(), i->value.end());
text += str;
}
else if (i->value.id() == filter_grammar_ast::propertyID)
{
assert(i->children.size()==0);
string property_name(i->value.begin(), i->value.end());
text += property_name;
}
else if (i->value.id() == filter_grammar_ast::expressionID)
{
assert(i->children.size() == 2);
assert(!i->children.begin()->value.is_root());
process_node(i->children.begin(),text);
text += string(i->value.begin(), i->value.end());
process_node(i->children.begin()+1,text);
text +="\n";
}
else if (i->value.id() == filter_grammar_ast::termID)
{
assert(i->children.size() == 2);
assert(!i->children.begin()->value.is_root());
process_node(i->children.begin(),text);
text += string(i->value.begin(), i->value.end());
process_node(i->children.begin()+1,text);
text +="\n";
}
else if (i->value.id() == filter_grammar_ast::relationID)
{
assert(i->children.size() == 2);
assert(!i->children.begin()->value.is_root());
process_node(i->children.begin(),text);
text += string(i->value.begin(), i->value.end());
process_node(i->children.begin()+1,text);
text +="\n";
}
else if (i->value.id() == filter_grammar_ast::equationID)
{
assert(i->children.size() == 2);
assert(!i->children.begin()->value.is_root());
process_node(i->children.begin(),text);
text += string(i->value.begin(), i->value.end());
process_node(i->children.begin()+1,text);
text +="\n";
}
else if (i->value.id() == filter_grammar_ast::and_exprID)
{
assert(i->children.size() == 2);
assert(!i->children.begin()->value.is_root());
process_node(i->children.begin(),text);
text += string(i->value.begin(), i->value.end());
process_node(i->children.begin()+1,text);
text +="\n";
}
else if (i->value.id() == filter_grammar_ast::or_exprID)
{
assert(i->children.size() == 2);
assert(!i->children.begin()->value.is_root());
process_node(i->children.begin(),text);
text += string(i->value.begin(), i->value.end());
process_node(i->children.begin()+1,text);
text +="\n";
}
}
}
#endif //FILTER_PARSER_AST_HH

View file

@ -20,15 +20,17 @@
#define FILTER_VISITOR_HH
#include "filter.hh"
#include "feature.hh"
#include "expression.hh"
namespace mapnik
{
template <typename Feature> class filter;
template <typename Feature>
template <typename FeatureT> class filter;
template <typename FeatureT> class expression;
template <typename FeatureT>
struct filter_visitor
{
virtual void visit(filter<Feature>& filter)=0;
virtual void visit(filter<FeatureT>& filter)=0;
virtual void visit(expression<FeatureT>&)=0;
virtual ~filter_visitor() {}
};
}

View file

@ -70,16 +70,7 @@ namespace mapnik
{
cont_.push_back(x,y,SEG_LINETO);
}
//unsigned vertex(double* x, double* y)
// {
// return cont_.get_vertex(itr_++,x,y);
// }
//void rewind(unsigned )
// {
// itr_=0;
// }
template <typename Transform>
class path_iterator
{
@ -173,6 +164,16 @@ namespace mapnik
return cont_.size();
}
unsigned vertex(double* x, double* y)
{
return cont_.get_vertex(itr_++,x,y);
}
void rewind(unsigned )
{
itr_=0;
}
virtual ~geometry() {}
private:
geometry(const geometry&);

View file

@ -24,10 +24,10 @@
#include <vector>
#include "feature.hh"
#include "ptr.hh"
#include "datasource.hh"
namespace mapnik
{
class Layer
{
private:

View file

@ -21,28 +21,29 @@
#ifndef LINE_SYMBOLIZER_HH
#define LINE_SYMBOLIZER_HH
//#include "agg_basics.h"
//#include "agg_rendering_buffer.h"
//#include "agg_rasterizer_scanline_aa.h"
//#include "agg_conv_stroke.h"
//#include "agg_conv_dash.h"
//#include "agg_conv_curve.h"
//#include "agg_conv_contour.h"
//#include "agg_conv_stroke.h"
//#include "agg_vcgen_stroke.h"
//#include "agg_conv_adaptor_vcgen.h"
//#include "agg_conv_smooth_poly1.h"
//#include "agg_conv_marker.h"
//#include "agg_arrowhead.h"
//#include "agg_vcgen_markers_term.h"
//#include "agg_scanline_p.h"
//#include "agg_renderer_scanline.h"
//#include "agg_pixfmt_rgba32.h"
//#include "agg_path_storage.h"
//#include "agg_renderer_outline_aa.h"
//#include "agg_rasterizer_outline_aa.h"
//#include "agg_rasterizer_outline.h"
//#include "agg_renderer_outline_image.h"
#include "agg_basics.h"
#include "agg_rendering_buffer.h"
#include "agg_rasterizer_scanline_aa.h"
#include "agg_conv_stroke.h"
#include "agg_conv_curve.h"
#include "agg_conv_dash.h"
#include "agg_conv_contour.h"
#include "agg_conv_stroke.h"
#include "agg_vcgen_stroke.h"
#include "agg_conv_adaptor_vcgen.h"
#include "agg_conv_smooth_poly1.h"
#include "agg_conv_marker.h"
#include "agg_arrowhead.h"
#include "agg_vcgen_markers_term.h"
#include "agg_scanline_p.h"
#include "agg_scanline_u.h"
#include "agg_renderer_scanline.h"
#include "agg_pixfmt_rgba32.h"
#include "agg_path_storage.h"
#include "agg_renderer_outline_aa.h"
#include "agg_rasterizer_outline_aa.h"
#include "agg_rasterizer_outline.h"
#include "agg_renderer_outline_image.h"
#include "symbolizer.hh"
#include "line_aa.hh"
@ -50,6 +51,7 @@
namespace mapnik
{
struct LineSymbolizer : public SymbolizerImpl
{
private:
@ -68,14 +70,15 @@ namespace mapnik
void render(geometry_type& geom, Image32& image) const
{
typedef agg::renderer_base<agg::pixfmt_rgba32> ren_base;
if (1) //width_ == 1.0)
{
if (width_ == 1.0)
{
//typedef agg::renderer_outline_aa<ren_base> renderer_oaa;
//typedef agg::rasterizer_outline_aa<renderer_oaa> rasterizer_outline_aa;
//agg::line_profile_aa prof;
//prof.width(1.0);
//renderer_oaa ren_oaa(renb, prof);
//renderer_oaa ren_oaa(ren_base, prof);
//rasterizer_outline_aa ras_oaa(ren_oaa);
//ren_oaa.color(agg::rgba(r, g, b));
@ -86,32 +89,37 @@ namespace mapnik
else
{
//typedef agg::renderer_base<agg::pixfmt_rgba32> ren_base;
//agg::row_ptr_cache<agg::int8u> buf(image.raw_data(),image.width(),image.height(),image.width()*4);
//agg::pixfmt_rgba32 pixf(buf);
//ren_base renb(pixf);
typedef agg::renderer_base<agg::pixfmt_rgba32> ren_base;
agg::row_ptr_cache<agg::int8u> buf(image.raw_data(),image.width(),image.height(),image.width()*4);
agg::pixfmt_rgba32 pixf(buf);
ren_base renb(pixf);
//double r=pen_.red()/255.0;
//double g=pen_.green()/255.0;
//double b=pen_.blue()/255.0;
double r=pen_.red()/255.0;
double g=pen_.green()/255.0;
double b=pen_.blue()/255.0;
//typedef agg::renderer_scanline_aa_solid<ren_base> renderer;
//renderer ren(renb);
//ren.color(agg::rgba(r, g, b));
typedef agg::renderer_scanline_aa_solid<ren_base> renderer;
renderer ren(renb);
//agg::rasterizer_scanline_aa<> ras;
//agg::scanline_p8 sl;
//agg::conv_adaptor_vcgen<geometry<vertex2d,vertex_vector>,
// agg::vcgen_stroke,agg::null_markers> stroke(geom);
//stroke.generator().line_join(agg::round_join);
//stroke.generator().line_cap(agg::round_cap);
//stroke.generator().miter_limit(2.0);
//stroke.generator().width(width_);
agg::rasterizer_scanline_aa<> ras;
agg::scanline_p8 sl;
agg::conv_adaptor_vcgen<geometry<vertex2d,vertex_vector>,
agg::vcgen_stroke,agg::null_markers> stroke(geom);
stroke.generator().line_join(agg::round_join);
stroke.generator().line_cap(agg::round_cap);
stroke.generator().miter_limit(2.0);
stroke.generator().width(width_);
//ScanlineRasterizerAA<Image32> rasterizer(image);
ras.add_path(stroke);
//rasterizer.render<agg::conv_adaptor_vcgen<geometry<vertex2d,vertex_vector>,
// agg::vcgen_stroke,agg::null_markers> >(stroke,pen_);
//ras.add_path(stroke);
//agg::render_scanlines(ras, sl, ren);
// agg::vcgen_stroke,agg::null_markers> >(stroke,pen_);
ras.add_path(stroke);
ren.color(agg::rgba(r, g, b));
agg::render_scanlines(ras, sl, ren);
}
}

View file

@ -0,0 +1,47 @@
/* This file is part of Mapnik (c++ mapping toolkit)
* Copyright (C) 2005 Artem Pavlenko
*
* Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//$Id$
#ifndef LOCAL_DATASOURCE_HH
#define LOCAL_DATASOURCE_HH
#include "mapnik.hh"
#include <vector>
namespace mapnik
{
/*
class local_datasource : public datasource
{
public:
local_datasource(Parameters const& params);
int type() const;
static std::string name();
featureset_ptr features(query const& q) const;
const Envelope<double>& envelope() const;
virtual ~local_datasource();
private:
static std::string name_;
Envelope<double> extent_;
std::vector<Feature*>
};
*/
}
#endif //LOCAL_DATASOURCE_HH

View file

@ -16,40 +16,41 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//$Id: logical.hh 11 2005-03-16 19:46:18Z artem $
//$Id$
#ifndef LOGICAL_HH
#define LOGICAL_HH
#include "filter.hh"
#include "feature.hh"
namespace mapnik
{
template <typename Feature>
struct logical_and : public filter<Feature>
template <typename FeatureT>
struct logical_and : public filter<FeatureT>
{
logical_and(const filter<Feature>& filter1,const filter<Feature>& filter2)
: filter1_(filter1.clone()),
logical_and(filter<FeatureT> const& filter1,
filter<FeatureT> const& filter2)
: filter<FeatureT>(),
filter1_(filter1.clone()),
filter2_(filter2.clone()) {}
logical_and(logical_and const& other)
: filter<FeatureT>(),
filter1_(other.filter1_->clone()),
filter2_(other.filter2_->clone()) {}
int type() const
{
return filter<Feature>::LOGICAL_OPS;
}
bool pass(const Feature& feature) const
bool pass(const FeatureT& feature) const
{
return (filter1_->pass(feature) &&
filter2_->pass(feature));
}
filter<Feature>* clone() const
filter<FeatureT>* clone() const
{
return new logical_and(*filter1_,*filter2_);
return new logical_and(*this);
}
void accept(filter_visitor<Feature>& v)
void accept(filter_visitor<FeatureT>& v)
{
filter1_->accept(v);
filter2_->accept(v);
@ -63,34 +64,41 @@ namespace mapnik
}
private:
filter<Feature>* filter1_;
filter<Feature>* filter2_;
filter<FeatureT>* filter1_;
filter<FeatureT>* filter2_;
};
template <typename Feature>
struct logical_or : public filter<Feature>
template <typename FeatureT>
struct logical_or : public filter<FeatureT>
{
logical_or(const filter<Feature>& filter1,const filter<Feature>& filter2)
: filter1_(filter1.clone()),
logical_or(const filter<FeatureT>& filter1,const filter<FeatureT>& filter2)
: filter<FeatureT>(),
filter1_(filter1.clone()),
filter2_(filter2.clone()) {}
logical_or(logical_or const& other)
: filter<FeatureT>(),
filter1_(other.filter1_->clone()),
filter2_(other.filter2_->clone()) {}
int type() const
bool pass(const FeatureT& feature) const
{
return filter<Feature>::LOGICAL_OPS;
if (filter1_->pass(feature))
{
return true;
}
else
{
return filter2_->pass(feature);
}
}
filter<FeatureT>* clone() const
{
return new logical_or(*this);
}
bool pass(const Feature& feature) const
{
return (filter1_->pass(feature) ||
filter2_->pass(feature));
}
filter<Feature>* clone() const
{
return new logical_or(*filter1_,*filter2_);
}
void accept(filter_visitor<Feature>& v)
void accept(filter_visitor<FeatureT>& v)
{
filter1_->accept(v);
filter2_->accept(v);
@ -103,31 +111,36 @@ namespace mapnik
delete filter2_;
}
private:
filter<Feature>* filter1_;
filter<Feature>* filter2_;
filter<FeatureT>* filter1_;
filter<FeatureT>* filter2_;
};
template <typename Feature>
struct logical_not : public filter<Feature>
template <typename FeatureT>
struct logical_not : public filter<FeatureT>
{
logical_not(const filter<Feature>& filter)
: filter_(filter.clone()) {}
logical_not(filter<FeatureT> const& _filter)
: filter<FeatureT>(),
filter_(_filter.clone()) {}
logical_not(logical_not const& other)
: filter<FeatureT>(),
filter_(other.filter_->clone()) {}
int type() const
{
return filter<Feature>::LOGICAL_OPS;
return filter<FeatureT>::LOGICAL_OPS;
}
bool pass(const Feature& feature) const
bool pass(const FeatureT& feature) const
{
return !(filter_->pass(feature));
}
filter<Feature>* clone() const
filter<FeatureT>* clone() const
{
return new logical_not(*filter_);
return new logical_not(*this);
}
void accept(filter_visitor<Feature>& v)
void accept(filter_visitor<FeatureT>& v)
{
filter_->accept(v);
v.visit(*this);
@ -138,8 +151,8 @@ namespace mapnik
delete filter_;
}
private:
filter<Feature>* filter_;
filter<FeatureT>* filter_;
};
}
#endif //LOGICAL_HH

View file

@ -55,7 +55,12 @@
#include "map.hh"
#include "colorcube.hh"
#include "feature_type_style.hh"
#include "filter_visitor.hh"
#include "math_expr.hh"
#include "value.hh"
#include "expression.hh"
#include "filter_parser.hh"
#include "filter_factory.hh"
namespace mapnik
{

106
include/math_expr.hh Normal file
View file

@ -0,0 +1,106 @@
/* This file is part of Mapnik (c++ mapping toolkit)
* Copyright (C) 2005 Artem Pavlenko
*
* Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//$Id$
#ifndef MATH_EXPR_HH
#define MATH_EXPR_HH
#include "expression.hh"
namespace mapnik
{
template <typename T>
struct add
{
T operator () (T const& left, T const& right)
{
return left + right;
}
};
template <typename T>
struct sub
{
T operator () (T const& left, T const& right)
{
return left - right;
}
};
template <typename T>
struct mult
{
T operator () (T const& left, T const& right)
{
return left * right;
}
};
template <typename T>
struct div
{
T operator () (T const& left, T const& right)
{
return left / right;
}
};
template <typename FeatureT,typename Op>
struct math_expr_b : public expression<FeatureT>
{
math_expr_b(expression<FeatureT> const& left,
expression<FeatureT> const& right)
: expression<FeatureT>(),
left_(left.clone()),
right_(right.clone()) {}
math_expr_b(math_expr_b const& other)
: expression<FeatureT>(),
left_(other.left_->clone()),
right_(other.right_->clone()) {}
value get_value(FeatureT const& feature) const
{
return Op ()(left_->get_value(feature),right_->get_value(feature));
}
void accept(filter_visitor<FeatureT>& v)
{
left_->accept(v);
right_->accept(v);
v.visit(*this);
}
expression<FeatureT>* clone() const
{
return new math_expr_b<FeatureT,Op>(*this);
}
~math_expr_b()
{
delete left_;
delete right_;
}
private:
expression<FeatureT>* left_;
expression<FeatureT>* right_;
};
};
#endif //

View file

@ -20,151 +20,125 @@
#define SPATIAL_HH
#include "filter.hh"
#include "filter_visitor.hh"
namespace mapnik
{
template <typename Feature>
struct equals : public filter<Feature>
template <typename FeatureT>
struct equals_ : public filter<FeatureT>
{
int type() const
{
return filter<Feature>::SPATIAL_OPS;
}
bool pass(const Feature& feature) const
bool pass(const FeatureT& feature) const
{
return false;
}
void accept(const filter_visitor<Feature>& v)
void accept(const filter_visitor<FeatureT>& v)
{
v.visit(*this);
}
};
template <typename Feature>
struct disjoint : public filter<Feature>
template <typename FeatureT>
struct disjoint : public filter<FeatureT>
{
int type() const
{
return filter<Feature>::SPATIAL_OPS;
}
bool pass(const Feature& feature) const
bool pass(const FeatureT& feature) const
{
return false;
}
void accept(const filter_visitor<Feature>& v)
void accept(const filter_visitor<FeatureT>& v)
{
v.visit(*this);
}
};
template <typename Feature>
struct touches : public filter<Feature>
template <typename FeatureT>
struct touches : public filter<FeatureT>
{
int type() const
{
return filter<Feature>::SPATIAL_OPS;
}
bool pass(const Feature& feature) const
bool pass(const FeatureT& feature) const
{
return false;
}
void accept(const filter_visitor<Feature>& v)
void accept(const filter_visitor<FeatureT>& v)
{
v.visit(*this);
}
};
template <typename Feature>
struct within : public filter<Feature>
template <typename FeatureT>
struct within : public filter<FeatureT>
{
int type() const
{
return filter<Feature>::SPATIAL_OPS;
}
bool pass(const Feature& feature) const
bool pass(const FeatureT& feature) const
{
return false;
}
void accept(const filter_visitor<Feature>& v)
void accept(const filter_visitor<FeatureT>& v)
{
v.visit(*this);
}
};
template <typename Feature>
struct overlaps : public filter<Feature>
template <typename FeatureT>
struct overlaps : public filter<FeatureT>
{
int type() const
{
return filter<Feature>::SPATIAL_OPS;
}
bool pass(const Feature& feature) const
bool pass(const FeatureT& feature) const
{
return false;
}
void accept(const filter_visitor<Feature>& v)
void accept(const filter_visitor<FeatureT>& v)
{
v.visit(*this);
}
};
template <typename Feature>
struct crosses : public filter<Feature>
template <typename FeatureT>
struct crosses : public filter<FeatureT>
{
int type() const
{
return filter<Feature>::SPATIAL_OPS;
}
bool pass(const Feature& feature) const
bool pass(const FeatureT& feature) const
{
return false;
}
void accept(const filter_visitor<Feature>& v)
void accept(const filter_visitor<FeatureT>& v)
{
v.visit(*this);
}
};
template <typename Feature>
struct bbox : public filter<Feature>
template <typename FeatureT>
struct bbox : public filter<FeatureT>
{
private:
Envelope<double> box_;
public:
bbox(const Envelope<double>& box)
: box_(box) {}
int type() const
{
return filter<Feature>::SPATIAL_OPS;
}
bool pass(const Feature& feature) const
bool pass(const FeatureT& feature) const
{
return box_.contains(feature.get_geometry()->bbox());
}
std::string to_string()
filter<FeatureT>* clone() const
{
return "BBOX filter";
return new bbox<FeatureT>(box_);
}
filter<Feature>* clone() const
{
return new bbox<Feature>(box_);
}
void accept(const filter_visitor<Feature>& v)
void accept(const filter_visitor<FeatureT>& v)
{
v.visit(*this);
}

View file

@ -56,7 +56,7 @@ namespace mapnik {
public:
static bool insert(const std::string& name,const feature_type_style& style);
static void remove(const std::string& name);
static const feature_type_style& find(const std::string& name);
static feature_type_style find(const std::string& name);
};
}

565
include/value.hh Normal file
View file

@ -0,0 +1,565 @@
/* This file is part of Mapnik (c++ mapping toolkit)
* Copyright (C) 2005 Artem Pavlenko
*
* Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//$Id$
#ifndef VALUE_HH
#define VALUE_HH
#include <string>
#include <sstream>
#include "attribute.hh"
#include "expression.hh"
using std::string;
namespace mapnik
{
class value
{
attribute data;
public:
value()
: data(0) {}
value(int value)
: data(value) {}
value(double value)
: data(value) {}
value(string const& value)
: data(value) {}
value(attribute const& attr)
: data(attr) {}
value(value const& other)
: data(other.data) {}
~value() {}
bool is_int() const
{
return data.type() == typeid(int);
}
bool is_real() const
{
return data.type() == typeid(double);
}
bool is_string() const
{
return data.type() == typeid(std::string);
}
int as_int() const
{
return attribute_cast<int>(data);
}
double as_real() const
{
return attribute_cast<double>(data);
}
string as_string() const
{
return attribute_cast<string>(data);
}
string to_string() const
{
return data.to_string();
}
bool operator<=(value const& other) const
{
if (is_int())
{
if (other.is_int())
{
return as_int() <= other.as_int();
}
else if (other.is_real())
{
return as_int() <= other.as_real();
}
else
{
return to_string() <= other.as_string();
}
}
else if (is_real())
{
if (other.is_int())
{
return as_real() <= other.as_int();
}
else if (other.is_real())
{
return as_real() <= other.as_real();
}
else
{
return to_string() <= other.as_string();
}
}
else
{
if (other.is_int())
{
return as_string() <= other.to_string();
}
else if (other.is_real())
{
return as_string() <= other.to_string();
}
else
{
return as_string() <= other.as_string();
}
}
}
bool operator<(value const& other) const
{
if (is_int())
{
if (other.is_int())
{
return as_int() < other.as_int();
}
else if (other.is_real())
{
return as_int() < other.as_real();
}
else
{
return to_string() < other.as_string();
}
}
else if (is_real())
{
if (other.is_int())
{
return as_real() < other.as_int();
}
else if (other.is_real())
{
return as_real() < other.as_real();
}
else
{
return to_string() < other.as_string();
}
}
else
{
if (other.is_int())
{
return as_string() < other.to_string();
}
else if (other.is_real())
{
return as_string() < other.to_string();
}
else
{
return as_string() < other.as_string();
}
}
}
bool operator>=(value const& other) const
{
if (is_int())
{
if (other.is_int())
{
return as_int() >= other.as_int();
}
else if (other.is_real())
{
return as_int() >= other.as_real();
}
else
{
return to_string() >= other.as_string();
}
}
else if (is_real())
{
if (other.is_int())
{
return as_real() >= other.as_int();
}
else if (other.is_real())
{
return as_real() >= other.as_real();
}
else
{
return to_string() >= other.as_string();
}
}
else
{
if (other.is_int())
{
return as_string() >= other.to_string();
}
else if (other.is_real())
{
return as_string() >= other.to_string();
}
else
{
return as_string() >= other.as_string();
}
}
}
bool operator>(value const& other) const
{
if (is_int())
{
if (other.is_int())
{
return as_int() > other.as_int();
}
else if (other.is_real())
{
return as_int() > other.as_real();
}
else
{
return to_string() > other.as_string();
}
}
else if (is_real())
{
if (other.is_int())
{
return as_real() > other.as_int();
}
else if (other.is_real())
{
return as_real() > other.as_real();
}
else
{
return to_string() > other.as_string();
}
}
else
{
if (other.is_int())
{
return as_string() > other.to_string();
}
else if (other.is_real())
{
return as_string() > other.to_string();
}
else
{
return as_string() > other.as_string();
}
}
}
bool operator!=(value const& other) const
{
if (is_int())
{
if (other.is_int())
{
return as_int() != other.as_int();
}
else if (other.is_real())
{
return as_int() != other.as_real();
}
else
{
return to_string() != other.as_string();
}
}
else if (is_real())
{
if (other.is_int())
{
return as_real() != other.as_int();
}
else if (other.is_real())
{
return as_real() != other.as_real();
}
else
{
return to_string() != other.as_string();
}
}
else
{
if (other.is_int())
{
return as_string() != other.to_string();
}
else if (other.is_real())
{
return as_string() != other.to_string();
}
else
{
return as_string() != other.as_string();
}
}
}
bool operator==(value const& other) const
{
if (is_int())
{
if (other.is_int())
{
return as_int() == other.as_int();
}
else if (other.is_real())
{
return as_int() == other.as_real();
}
else
{
return to_string() == other.as_string();
}
}
else if (is_real())
{
if (other.is_int())
{
return as_real() == other.as_int();
}
else if (other.is_real())
{
return as_real() == other.as_real();
}
else
{
return to_string() == other.as_string();
}
}
else
{
if (other.is_int())
{
return as_string() == other.to_string();
}
else if (other.is_real())
{
return as_string() == other.to_string();
}
else
{
return as_string() == other.as_string();
}
}
}
value operator-() const
{
if (is_int())
{
return -(as_int());
}
else if (is_real())
{
return -(as_real());
}
return value();
}
value& operator+=(value const& other)
{
if (is_int())
{
if (other.is_int())
{
data = as_int() + other.as_int();
}
else if (other.is_real())
{
data = as_int() + other.as_real();
}
else
{
data = to_string() + other.as_string();
}
}
else if (is_real())
{
if (other.is_int())
{
data = as_real() + other.as_int();
}
else if (other.is_real())
{
data = as_real() + other.as_real();
}
else
{
data = to_string() + other.as_string();
}
}
else
{
if (other.is_int())
{
data = as_string() + other.to_string();
}
else if (other.is_real())
{
data = as_string() + other.to_string();
}
else
{
data = as_string() + other.as_string();
}
}
return *this;
}
value& operator-=(value const& other)
{
if (is_int())
{
if (other.is_int())
{
data = as_int() - other.as_int();
}
else if (other.is_real())
{
data = as_int() - other.as_real();
}
}
else if (is_real())
{
if (other.is_int())
{
data = as_real() - other.as_int();
}
else if (other.is_real())
{
data = as_real() - other.as_real();
}
}
return *this;
}
value& operator*=(value const& other)
{
if (is_int())
{
if (other.is_int())
{
data = as_int() * other.as_int();
}
else if (other.is_real())
{
data = as_int() * other.as_real();
}
}
else if (is_real())
{
if (other.is_int())
{
data = as_real() * other.as_int();
}
else if (other.is_real())
{
data = as_real() * other.as_real();
}
}
return *this;
}
value& operator/=(value const& other)
{
if (is_int())
{
if (other.is_int())
{
data = as_int() / other.as_int();
}
else if (other.is_real())
{
data = as_int() / other.as_real();
}
}
else if (is_real())
{
if (other.is_int())
{
data = as_real() / other.as_int();
}
else if (other.is_real())
{
data = as_real() / other.as_real();
}
}
return *this;
}
};
inline const value operator+(value const& p1,value const& p2)
{
value tmp(p1);
tmp+=p2;
return tmp;
}
inline const value operator-(value const& p1,value const& p2)
{
value tmp(p1);
tmp-=p2;
return tmp;
}
inline const value operator*(value const& p1,value const& p2)
{
value tmp(p1);
tmp*=p2;
return tmp;
}
inline const value operator/(value const& p1,value const& p2)
{
value tmp(p1);
tmp/=p2;
return tmp;
}
template <typename charT, typename traits>
inline std::basic_ostream<charT,traits>&
operator << (std::basic_ostream<charT,traits>& out,
const value& p)
{
out << p.to_string();
return out;
}
}
#endif //VALUE_HH

View file

@ -8,9 +8,13 @@ if BUILD_TIFF_READER
libmapnik_la_SOURCES += tiff_reader.cc
endif
libmapnik_la_CPPFLAGS = -I$(top_srcdir)/include $(FREETYPE2_CFLAGS)
libmapnik_la_CPPFLAGS += @INCLTDL@
libmapnik_la_LIBADD = @LIBLTDL@ -lpthread -lpng -ljpeg $(FREETYPE2_LIBS) -lz -lm
SPIRIT_ROOT = "/home/artem/projects/spirit_1_8_2"
libmapnik_la_CXXFLAGS = -I$(top_srcdir)/include $(FREETYPE2_CFLAGS)
libmapnik_la_CXXFLAGS += -I$//home/artem/projects/spirit_1_8_2 -I$//home/artem/projects/spirit_1_8_2/miniboost
libmapnik_la_CXXFLAGS += -I$//home/artem/projects/agg2/include
libmapnik_la_CXXFLAGS += @INCLTDL@
libmapnik_la_LIBADD = @LIBLTDL@ -lpthread -lpng -ljpeg $(FREETYPE2_LIBS) -lz -lm -L$//home/artem/projects/agg2/src -lagg
libmapnik_la_LDFLAGS= -version-info 0:0:0 $(TIFF_LDFLAGS)
if SHAPE_DATASOURCE

View file

@ -220,9 +220,12 @@ libmapnik_la_SOURCES = color.cc datasource_cache.cc envelope.cc \
map.cc memory.cc params.cc plugin.cc png_reader.cc render.cc \
scanline_aa.cc scanline.cc style.cc style_cache.cc text.cc \
wkb.cc $(am__append_1)
libmapnik_la_CPPFLAGS = -I$(top_srcdir)/include $(FREETYPE2_CFLAGS) \
@INCLTDL@ $(am__empty)
libmapnik_la_LIBADD = @LIBLTDL@ -lpthread -lpng -ljpeg $(FREETYPE2_LIBS) -lz -lm
SPIRIT_ROOT = "/home/artem/projects/spirit_1_8_2"
libmapnik_la_CXXFLAGS = -I$(top_srcdir)/include $(FREETYPE2_CFLAGS) \
-I$//home/artem/projects/spirit_1_8_2 \
-I$//home/artem/projects/spirit_1_8_2/miniboost \
-I$//home/artem/projects/agg2/include @INCLTDL@
libmapnik_la_LIBADD = @LIBLTDL@ -lpthread -lpng -ljpeg $(FREETYPE2_LIBS) -lz -lm -L$//home/artem/projects/agg2/src -lagg
libmapnik_la_LDFLAGS = -version-info 0:0:0 $(TIFF_LDFLAGS)
@SHAPE_DATASOURCE_TRUE@SHAPE_DATASOURCE_DIR = shape
@RASTER_DATASOURCE_TRUE@RASTER_DATASOURCE_DIR = raster
@ -341,151 +344,151 @@ distclean-compile:
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
libmapnik_la-color.lo: color.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-color.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-color.Tpo" -c -o libmapnik_la-color.lo `test -f 'color.cc' || echo '$(srcdir)/'`color.cc; \
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-color.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-color.Tpo" -c -o libmapnik_la-color.lo `test -f 'color.cc' || echo '$(srcdir)/'`color.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmapnik_la-color.Tpo" "$(DEPDIR)/libmapnik_la-color.Plo"; else rm -f "$(DEPDIR)/libmapnik_la-color.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='color.cc' object='libmapnik_la-color.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-color.lo `test -f 'color.cc' || echo '$(srcdir)/'`color.cc
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-color.lo `test -f 'color.cc' || echo '$(srcdir)/'`color.cc
libmapnik_la-datasource_cache.lo: datasource_cache.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-datasource_cache.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-datasource_cache.Tpo" -c -o libmapnik_la-datasource_cache.lo `test -f 'datasource_cache.cc' || echo '$(srcdir)/'`datasource_cache.cc; \
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-datasource_cache.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-datasource_cache.Tpo" -c -o libmapnik_la-datasource_cache.lo `test -f 'datasource_cache.cc' || echo '$(srcdir)/'`datasource_cache.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmapnik_la-datasource_cache.Tpo" "$(DEPDIR)/libmapnik_la-datasource_cache.Plo"; else rm -f "$(DEPDIR)/libmapnik_la-datasource_cache.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='datasource_cache.cc' object='libmapnik_la-datasource_cache.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-datasource_cache.lo `test -f 'datasource_cache.cc' || echo '$(srcdir)/'`datasource_cache.cc
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-datasource_cache.lo `test -f 'datasource_cache.cc' || echo '$(srcdir)/'`datasource_cache.cc
libmapnik_la-envelope.lo: envelope.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-envelope.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-envelope.Tpo" -c -o libmapnik_la-envelope.lo `test -f 'envelope.cc' || echo '$(srcdir)/'`envelope.cc; \
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-envelope.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-envelope.Tpo" -c -o libmapnik_la-envelope.lo `test -f 'envelope.cc' || echo '$(srcdir)/'`envelope.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmapnik_la-envelope.Tpo" "$(DEPDIR)/libmapnik_la-envelope.Plo"; else rm -f "$(DEPDIR)/libmapnik_la-envelope.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='envelope.cc' object='libmapnik_la-envelope.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-envelope.lo `test -f 'envelope.cc' || echo '$(srcdir)/'`envelope.cc
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-envelope.lo `test -f 'envelope.cc' || echo '$(srcdir)/'`envelope.cc
libmapnik_la-graphics.lo: graphics.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-graphics.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-graphics.Tpo" -c -o libmapnik_la-graphics.lo `test -f 'graphics.cc' || echo '$(srcdir)/'`graphics.cc; \
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-graphics.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-graphics.Tpo" -c -o libmapnik_la-graphics.lo `test -f 'graphics.cc' || echo '$(srcdir)/'`graphics.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmapnik_la-graphics.Tpo" "$(DEPDIR)/libmapnik_la-graphics.Plo"; else rm -f "$(DEPDIR)/libmapnik_la-graphics.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='graphics.cc' object='libmapnik_la-graphics.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-graphics.lo `test -f 'graphics.cc' || echo '$(srcdir)/'`graphics.cc
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-graphics.lo `test -f 'graphics.cc' || echo '$(srcdir)/'`graphics.cc
libmapnik_la-image_reader.lo: image_reader.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-image_reader.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-image_reader.Tpo" -c -o libmapnik_la-image_reader.lo `test -f 'image_reader.cc' || echo '$(srcdir)/'`image_reader.cc; \
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-image_reader.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-image_reader.Tpo" -c -o libmapnik_la-image_reader.lo `test -f 'image_reader.cc' || echo '$(srcdir)/'`image_reader.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmapnik_la-image_reader.Tpo" "$(DEPDIR)/libmapnik_la-image_reader.Plo"; else rm -f "$(DEPDIR)/libmapnik_la-image_reader.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='image_reader.cc' object='libmapnik_la-image_reader.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-image_reader.lo `test -f 'image_reader.cc' || echo '$(srcdir)/'`image_reader.cc
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-image_reader.lo `test -f 'image_reader.cc' || echo '$(srcdir)/'`image_reader.cc
libmapnik_la-image_util.lo: image_util.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-image_util.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-image_util.Tpo" -c -o libmapnik_la-image_util.lo `test -f 'image_util.cc' || echo '$(srcdir)/'`image_util.cc; \
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-image_util.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-image_util.Tpo" -c -o libmapnik_la-image_util.lo `test -f 'image_util.cc' || echo '$(srcdir)/'`image_util.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmapnik_la-image_util.Tpo" "$(DEPDIR)/libmapnik_la-image_util.Plo"; else rm -f "$(DEPDIR)/libmapnik_la-image_util.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='image_util.cc' object='libmapnik_la-image_util.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-image_util.lo `test -f 'image_util.cc' || echo '$(srcdir)/'`image_util.cc
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-image_util.lo `test -f 'image_util.cc' || echo '$(srcdir)/'`image_util.cc
libmapnik_la-layer.lo: layer.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-layer.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-layer.Tpo" -c -o libmapnik_la-layer.lo `test -f 'layer.cc' || echo '$(srcdir)/'`layer.cc; \
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-layer.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-layer.Tpo" -c -o libmapnik_la-layer.lo `test -f 'layer.cc' || echo '$(srcdir)/'`layer.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmapnik_la-layer.Tpo" "$(DEPDIR)/libmapnik_la-layer.Plo"; else rm -f "$(DEPDIR)/libmapnik_la-layer.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='layer.cc' object='libmapnik_la-layer.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-layer.lo `test -f 'layer.cc' || echo '$(srcdir)/'`layer.cc
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-layer.lo `test -f 'layer.cc' || echo '$(srcdir)/'`layer.cc
libmapnik_la-line_aa.lo: line_aa.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-line_aa.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-line_aa.Tpo" -c -o libmapnik_la-line_aa.lo `test -f 'line_aa.cc' || echo '$(srcdir)/'`line_aa.cc; \
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-line_aa.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-line_aa.Tpo" -c -o libmapnik_la-line_aa.lo `test -f 'line_aa.cc' || echo '$(srcdir)/'`line_aa.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmapnik_la-line_aa.Tpo" "$(DEPDIR)/libmapnik_la-line_aa.Plo"; else rm -f "$(DEPDIR)/libmapnik_la-line_aa.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='line_aa.cc' object='libmapnik_la-line_aa.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-line_aa.lo `test -f 'line_aa.cc' || echo '$(srcdir)/'`line_aa.cc
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-line_aa.lo `test -f 'line_aa.cc' || echo '$(srcdir)/'`line_aa.cc
libmapnik_la-map.lo: map.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-map.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-map.Tpo" -c -o libmapnik_la-map.lo `test -f 'map.cc' || echo '$(srcdir)/'`map.cc; \
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-map.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-map.Tpo" -c -o libmapnik_la-map.lo `test -f 'map.cc' || echo '$(srcdir)/'`map.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmapnik_la-map.Tpo" "$(DEPDIR)/libmapnik_la-map.Plo"; else rm -f "$(DEPDIR)/libmapnik_la-map.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='map.cc' object='libmapnik_la-map.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-map.lo `test -f 'map.cc' || echo '$(srcdir)/'`map.cc
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-map.lo `test -f 'map.cc' || echo '$(srcdir)/'`map.cc
libmapnik_la-memory.lo: memory.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-memory.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-memory.Tpo" -c -o libmapnik_la-memory.lo `test -f 'memory.cc' || echo '$(srcdir)/'`memory.cc; \
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-memory.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-memory.Tpo" -c -o libmapnik_la-memory.lo `test -f 'memory.cc' || echo '$(srcdir)/'`memory.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmapnik_la-memory.Tpo" "$(DEPDIR)/libmapnik_la-memory.Plo"; else rm -f "$(DEPDIR)/libmapnik_la-memory.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='memory.cc' object='libmapnik_la-memory.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-memory.lo `test -f 'memory.cc' || echo '$(srcdir)/'`memory.cc
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-memory.lo `test -f 'memory.cc' || echo '$(srcdir)/'`memory.cc
libmapnik_la-params.lo: params.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-params.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-params.Tpo" -c -o libmapnik_la-params.lo `test -f 'params.cc' || echo '$(srcdir)/'`params.cc; \
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-params.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-params.Tpo" -c -o libmapnik_la-params.lo `test -f 'params.cc' || echo '$(srcdir)/'`params.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmapnik_la-params.Tpo" "$(DEPDIR)/libmapnik_la-params.Plo"; else rm -f "$(DEPDIR)/libmapnik_la-params.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='params.cc' object='libmapnik_la-params.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-params.lo `test -f 'params.cc' || echo '$(srcdir)/'`params.cc
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-params.lo `test -f 'params.cc' || echo '$(srcdir)/'`params.cc
libmapnik_la-plugin.lo: plugin.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-plugin.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-plugin.Tpo" -c -o libmapnik_la-plugin.lo `test -f 'plugin.cc' || echo '$(srcdir)/'`plugin.cc; \
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-plugin.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-plugin.Tpo" -c -o libmapnik_la-plugin.lo `test -f 'plugin.cc' || echo '$(srcdir)/'`plugin.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmapnik_la-plugin.Tpo" "$(DEPDIR)/libmapnik_la-plugin.Plo"; else rm -f "$(DEPDIR)/libmapnik_la-plugin.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='plugin.cc' object='libmapnik_la-plugin.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-plugin.lo `test -f 'plugin.cc' || echo '$(srcdir)/'`plugin.cc
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-plugin.lo `test -f 'plugin.cc' || echo '$(srcdir)/'`plugin.cc
libmapnik_la-png_reader.lo: png_reader.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-png_reader.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-png_reader.Tpo" -c -o libmapnik_la-png_reader.lo `test -f 'png_reader.cc' || echo '$(srcdir)/'`png_reader.cc; \
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-png_reader.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-png_reader.Tpo" -c -o libmapnik_la-png_reader.lo `test -f 'png_reader.cc' || echo '$(srcdir)/'`png_reader.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmapnik_la-png_reader.Tpo" "$(DEPDIR)/libmapnik_la-png_reader.Plo"; else rm -f "$(DEPDIR)/libmapnik_la-png_reader.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='png_reader.cc' object='libmapnik_la-png_reader.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-png_reader.lo `test -f 'png_reader.cc' || echo '$(srcdir)/'`png_reader.cc
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-png_reader.lo `test -f 'png_reader.cc' || echo '$(srcdir)/'`png_reader.cc
libmapnik_la-render.lo: render.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-render.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-render.Tpo" -c -o libmapnik_la-render.lo `test -f 'render.cc' || echo '$(srcdir)/'`render.cc; \
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-render.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-render.Tpo" -c -o libmapnik_la-render.lo `test -f 'render.cc' || echo '$(srcdir)/'`render.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmapnik_la-render.Tpo" "$(DEPDIR)/libmapnik_la-render.Plo"; else rm -f "$(DEPDIR)/libmapnik_la-render.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='render.cc' object='libmapnik_la-render.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-render.lo `test -f 'render.cc' || echo '$(srcdir)/'`render.cc
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-render.lo `test -f 'render.cc' || echo '$(srcdir)/'`render.cc
libmapnik_la-scanline_aa.lo: scanline_aa.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-scanline_aa.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-scanline_aa.Tpo" -c -o libmapnik_la-scanline_aa.lo `test -f 'scanline_aa.cc' || echo '$(srcdir)/'`scanline_aa.cc; \
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-scanline_aa.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-scanline_aa.Tpo" -c -o libmapnik_la-scanline_aa.lo `test -f 'scanline_aa.cc' || echo '$(srcdir)/'`scanline_aa.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmapnik_la-scanline_aa.Tpo" "$(DEPDIR)/libmapnik_la-scanline_aa.Plo"; else rm -f "$(DEPDIR)/libmapnik_la-scanline_aa.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scanline_aa.cc' object='libmapnik_la-scanline_aa.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-scanline_aa.lo `test -f 'scanline_aa.cc' || echo '$(srcdir)/'`scanline_aa.cc
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-scanline_aa.lo `test -f 'scanline_aa.cc' || echo '$(srcdir)/'`scanline_aa.cc
libmapnik_la-scanline.lo: scanline.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-scanline.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-scanline.Tpo" -c -o libmapnik_la-scanline.lo `test -f 'scanline.cc' || echo '$(srcdir)/'`scanline.cc; \
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-scanline.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-scanline.Tpo" -c -o libmapnik_la-scanline.lo `test -f 'scanline.cc' || echo '$(srcdir)/'`scanline.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmapnik_la-scanline.Tpo" "$(DEPDIR)/libmapnik_la-scanline.Plo"; else rm -f "$(DEPDIR)/libmapnik_la-scanline.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scanline.cc' object='libmapnik_la-scanline.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-scanline.lo `test -f 'scanline.cc' || echo '$(srcdir)/'`scanline.cc
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-scanline.lo `test -f 'scanline.cc' || echo '$(srcdir)/'`scanline.cc
libmapnik_la-style.lo: style.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-style.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-style.Tpo" -c -o libmapnik_la-style.lo `test -f 'style.cc' || echo '$(srcdir)/'`style.cc; \
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-style.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-style.Tpo" -c -o libmapnik_la-style.lo `test -f 'style.cc' || echo '$(srcdir)/'`style.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmapnik_la-style.Tpo" "$(DEPDIR)/libmapnik_la-style.Plo"; else rm -f "$(DEPDIR)/libmapnik_la-style.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='style.cc' object='libmapnik_la-style.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-style.lo `test -f 'style.cc' || echo '$(srcdir)/'`style.cc
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-style.lo `test -f 'style.cc' || echo '$(srcdir)/'`style.cc
libmapnik_la-style_cache.lo: style_cache.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-style_cache.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-style_cache.Tpo" -c -o libmapnik_la-style_cache.lo `test -f 'style_cache.cc' || echo '$(srcdir)/'`style_cache.cc; \
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-style_cache.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-style_cache.Tpo" -c -o libmapnik_la-style_cache.lo `test -f 'style_cache.cc' || echo '$(srcdir)/'`style_cache.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmapnik_la-style_cache.Tpo" "$(DEPDIR)/libmapnik_la-style_cache.Plo"; else rm -f "$(DEPDIR)/libmapnik_la-style_cache.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='style_cache.cc' object='libmapnik_la-style_cache.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-style_cache.lo `test -f 'style_cache.cc' || echo '$(srcdir)/'`style_cache.cc
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-style_cache.lo `test -f 'style_cache.cc' || echo '$(srcdir)/'`style_cache.cc
libmapnik_la-text.lo: text.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-text.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-text.Tpo" -c -o libmapnik_la-text.lo `test -f 'text.cc' || echo '$(srcdir)/'`text.cc; \
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-text.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-text.Tpo" -c -o libmapnik_la-text.lo `test -f 'text.cc' || echo '$(srcdir)/'`text.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmapnik_la-text.Tpo" "$(DEPDIR)/libmapnik_la-text.Plo"; else rm -f "$(DEPDIR)/libmapnik_la-text.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='text.cc' object='libmapnik_la-text.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-text.lo `test -f 'text.cc' || echo '$(srcdir)/'`text.cc
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-text.lo `test -f 'text.cc' || echo '$(srcdir)/'`text.cc
libmapnik_la-wkb.lo: wkb.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-wkb.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-wkb.Tpo" -c -o libmapnik_la-wkb.lo `test -f 'wkb.cc' || echo '$(srcdir)/'`wkb.cc; \
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-wkb.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-wkb.Tpo" -c -o libmapnik_la-wkb.lo `test -f 'wkb.cc' || echo '$(srcdir)/'`wkb.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmapnik_la-wkb.Tpo" "$(DEPDIR)/libmapnik_la-wkb.Plo"; else rm -f "$(DEPDIR)/libmapnik_la-wkb.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='wkb.cc' object='libmapnik_la-wkb.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-wkb.lo `test -f 'wkb.cc' || echo '$(srcdir)/'`wkb.cc
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-wkb.lo `test -f 'wkb.cc' || echo '$(srcdir)/'`wkb.cc
libmapnik_la-tiff_reader.lo: tiff_reader.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-tiff_reader.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-tiff_reader.Tpo" -c -o libmapnik_la-tiff_reader.lo `test -f 'tiff_reader.cc' || echo '$(srcdir)/'`tiff_reader.cc; \
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -MT libmapnik_la-tiff_reader.lo -MD -MP -MF "$(DEPDIR)/libmapnik_la-tiff_reader.Tpo" -c -o libmapnik_la-tiff_reader.lo `test -f 'tiff_reader.cc' || echo '$(srcdir)/'`tiff_reader.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmapnik_la-tiff_reader.Tpo" "$(DEPDIR)/libmapnik_la-tiff_reader.Plo"; else rm -f "$(DEPDIR)/libmapnik_la-tiff_reader.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='tiff_reader.cc' object='libmapnik_la-tiff_reader.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmapnik_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-tiff_reader.lo `test -f 'tiff_reader.cc' || echo '$(srcdir)/'`tiff_reader.cc
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmapnik_la_CXXFLAGS) $(CXXFLAGS) -c -o libmapnik_la-tiff_reader.lo `test -f 'tiff_reader.cc' || echo '$(srcdir)/'`tiff_reader.cc
mostlyclean-libtool:
-rm -f *.lo

42
src/local_datasource.cc Normal file
View file

@ -0,0 +1,42 @@
/* This file is part of Mapnik (c++ mapping toolkit)
* Copyright (C) 2005 Artem Pavlenko
*
* Mapnik is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//$Id$
#include "local_datasource.hh"
namespace mapnik
{
local_datasource::local_datasource(Parameters const& params) {}
local_datasource::~local_datasource() {}
std::string local_datasource::name_="local";
std::string local_datasource::name()
{
return name_;
}
const Envelope<double>& local_datasource::envelope() const
{
return extent_;
}
featureset_ptr features(query const& q) const
{
}
}

View file

@ -44,7 +44,9 @@ namespace mapnik
if (!ds) return;
volatile named_style_cache* styles=named_style_cache::instance();
const feature_type_style& style=styles->find(l.getStyle());
//get copy
feature_type_style style=styles->find(l.getStyle());
const std::vector<rule_type>& rules=style.rules();

View file

@ -5,4 +5,4 @@ shape_la_SOURCES = dbffile.cc shape.cc shape_io.cc shape_featureset.cc shape_ind
shape_la_LIBDADD =
shape_la_LDFLAGS = -module -version-info 0:0:0 -lpthread
shape_la_CXXFLAGS = -I$(top_srcdir)/include
shape_la_CXXFLAGS += -I$//home/artem/projects/spirit_1_8_2 -I$//home/artem/projects/spirit_1_8_2/miniboost

View file

@ -203,7 +203,9 @@ plugins_LTLIBRARIES = shape.la
shape_la_SOURCES = dbffile.cc shape.cc shape_io.cc shape_featureset.cc shape_index_featureset.hh dbffile.hh shapefile.cc shape_featureset.hh shape_io.hh shp_index.cc dbf_test.cc shapefile.hh shape.hh shape_index_featureset.cc shp_index.hh
shape_la_LIBDADD =
shape_la_LDFLAGS = -module -version-info 0:0:0 -lpthread
shape_la_CXXFLAGS = -I$(top_srcdir)/include
shape_la_CXXFLAGS = -I$(top_srcdir)/include \
-I$//home/artem/projects/spirit_1_8_2 \
-I$//home/artem/projects/spirit_1_8_2/miniboost
all: all-am
.SUFFIXES:

View file

@ -70,15 +70,14 @@ namespace mapnik
styles_.erase(name);
}
const feature_type_style& named_style_cache::find(const std::string& name)
feature_type_style named_style_cache::find(const std::string& name)
{
Lock lock(&mutex_);
std::map<std::string,feature_type_style>::iterator itr=styles_.find(name);
//if (itr!=styles_.end())
// {
return itr->second;
//}
//static const Style default_style(ref_ptr<Symbolizer>(new LineSymbolizer(Color(255,0,0))));
//return default_style;
if (itr!=styles_.end())
{
return itr->second;
}
return feature_type_style();
}
}

View file

@ -1,6 +1,7 @@
bin_PROGRAMS = shapeindex
shapeindex_SOURCES = quadtree.cc quadtree.hh shapeindex.cc
shapeindex_CXXFLAGS = -I$(srcdir)/../../include -I$(srcdir)/../../src/shape
shapeindex_CXXFLAGS += -I$//home/artem/projects/spirit_1_8_2 -I$//home/artem/projects/spirit_1_8_2/miniboost
SHAPELIB = ../../src/shape/.libs/shape.a
MAPNIKLIB = ../../src/.libs/libmapnik.a
shapeindex_LDADD = $(SHAPELIB) $(MAPNIKLIB)

View file

@ -158,7 +158,10 @@ sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
shapeindex_SOURCES = quadtree.cc quadtree.hh shapeindex.cc
shapeindex_CXXFLAGS = -I$(srcdir)/../../include -I$(srcdir)/../../src/shape
shapeindex_CXXFLAGS = -I$(srcdir)/../../include \
-I$(srcdir)/../../src/shape \
-I$//home/artem/projects/spirit_1_8_2 \
-I$//home/artem/projects/spirit_1_8_2/miniboost
SHAPELIB = ../../src/shape/.libs/shape.a
MAPNIKLIB = ../../src/.libs/libmapnik.a
shapeindex_LDADD = $(SHAPELIB) $(MAPNIKLIB)