whitespace fixes (using format_source_files.sh)
This commit is contained in:
parent
b3819633bd
commit
f310148337
12 changed files with 66 additions and 66 deletions
|
@ -280,5 +280,5 @@ void export_envelope()
|
|||
.def_pickle(envelope_pickle_suite())
|
||||
.def("__deepcopy__", &box2d_deepcopy)
|
||||
;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -83,12 +83,12 @@ boost::python::dict attributes(Feature const& f)
|
|||
boost::python::dict attributes;
|
||||
feature_kv_iterator itr = f.begin();
|
||||
feature_kv_iterator end = f.end();
|
||||
|
||||
|
||||
for ( ;itr!=end; ++itr)
|
||||
{
|
||||
attributes[boost::get<0>(*itr)] = boost::get<1>(*itr);
|
||||
}
|
||||
|
||||
|
||||
return attributes;
|
||||
}
|
||||
|
||||
|
@ -158,16 +158,16 @@ void export_feature()
|
|||
implicitly_convertible<double,mapnik::value>();
|
||||
implicitly_convertible<UnicodeString,mapnik::value>();
|
||||
implicitly_convertible<bool,mapnik::value>();
|
||||
|
||||
|
||||
UnicodeString_from_python_str();
|
||||
|
||||
|
||||
class_<context_type,context_ptr,boost::noncopyable>
|
||||
("Context",init<>("Default ctor."))
|
||||
.def("push", &context_type::push)
|
||||
;
|
||||
|
||||
|
||||
class_<Feature,boost::shared_ptr<Feature>,
|
||||
boost::noncopyable>("Feature",init<context_ptr,int>("Default ctor."))
|
||||
boost::noncopyable>("Feature",init<context_ptr,int>("Default ctor."))
|
||||
.def("id",&Feature::id)
|
||||
.def("__str__",&Feature::to_string)
|
||||
.def("add_geometries_from_wkb", &feature_add_geometries_from_wkb)
|
||||
|
|
|
@ -39,7 +39,7 @@ struct fontset_pickle_suite : boost::python::pickle_suite
|
|||
}
|
||||
};
|
||||
|
||||
void export_fontset ()
|
||||
void export_fontset ()
|
||||
{
|
||||
using namespace boost::python;
|
||||
class_<font_set>("FontSet", init<>("default fontset constructor")
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
void export_gamma_method()
|
||||
{
|
||||
using namespace boost::python;
|
||||
|
||||
|
||||
mapnik::enumeration_<mapnik::gamma_method_e>("gamma_method")
|
||||
.value("POWER", mapnik::GAMMA_POWER)
|
||||
.value("LINEAR",mapnik::GAMMA_LINEAR)
|
||||
|
@ -37,5 +37,5 @@ void export_gamma_method()
|
|||
.value("THRESHOLD", mapnik::GAMMA_THRESHOLD)
|
||||
.value("MULTIPLY", mapnik::GAMMA_MULTIPLY)
|
||||
;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ PyObject* to_wkb( geometry_type const& geom, mapnik::util::wkbByteOrder byte_ord
|
|||
#else
|
||||
PyObject* to_wkb( geometry_type const& geom)
|
||||
{
|
||||
throw std::runtime_error("mapnik::to_wkb() requires at least boost 1.47 while your build was compiled against boost "
|
||||
throw std::runtime_error("mapnik::to_wkb() requires at least boost 1.47 while your build was compiled against boost "
|
||||
+ boost_version());
|
||||
}
|
||||
#endif
|
||||
|
@ -125,7 +125,7 @@ PyObject* to_wkb2( path_type const& p, mapnik::util::wkbByteOrder byte_order)
|
|||
#else
|
||||
PyObject* to_wkb2( path_type const& p)
|
||||
{
|
||||
throw std::runtime_error("mapnik::to_wkb() requires at least boost 1.47 while your build was compiled against boost "
|
||||
throw std::runtime_error("mapnik::to_wkb() requires at least boost 1.47 while your build was compiled against boost "
|
||||
+ boost_version());
|
||||
}
|
||||
#endif
|
||||
|
@ -136,13 +136,13 @@ std::string to_wkt( geometry_type const& geom)
|
|||
#if BOOST_VERSION >= 104700
|
||||
std::string wkt; // Use Python String directly ?
|
||||
bool result = mapnik::util::to_wkt(wkt,geom);
|
||||
if (!result)
|
||||
if (!result)
|
||||
{
|
||||
throw std::runtime_error("Generate WKT failed");
|
||||
}
|
||||
return wkt;
|
||||
#else
|
||||
throw std::runtime_error("mapnik::to_wkt() requires at least boost 1.47 while your build was compiled against boost "
|
||||
throw std::runtime_error("mapnik::to_wkt() requires at least boost 1.47 while your build was compiled against boost "
|
||||
+ boost_version());
|
||||
#endif
|
||||
}
|
||||
|
@ -152,13 +152,13 @@ std::string to_wkt2( path_type const& geom)
|
|||
#if BOOST_VERSION >= 104700
|
||||
std::string wkt; // Use Python String directly ?
|
||||
bool result = mapnik::util::to_wkt(wkt,geom);
|
||||
if (!result)
|
||||
if (!result)
|
||||
{
|
||||
throw std::runtime_error("Generate WKT failed");
|
||||
}
|
||||
return wkt;
|
||||
#else
|
||||
throw std::runtime_error("mapnik::to_wkt() requires at least boost 1.47 while your build was compiled against boost "
|
||||
throw std::runtime_error("mapnik::to_wkt() requires at least boost 1.47 while your build was compiled against boost "
|
||||
+ boost_version());
|
||||
#endif
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ void export_geometry()
|
|||
.value("NDR",mapnik::util::wkbNDR)
|
||||
;
|
||||
#endif
|
||||
|
||||
|
||||
using mapnik::geometry_type;
|
||||
class_<geometry_type, std::auto_ptr<geometry_type>, boost::noncopyable>("Geometry2d",no_init)
|
||||
.def("envelope",&geometry_type::envelope)
|
||||
|
|
|
@ -43,14 +43,14 @@ static boost::shared_ptr<mapnik::rgba_palette> make_palette( const std::string&
|
|||
void export_palette ()
|
||||
{
|
||||
using namespace boost::python;
|
||||
|
||||
class_<mapnik::rgba_palette,
|
||||
boost::shared_ptr<mapnik::rgba_palette>,
|
||||
boost::noncopyable >("Palette",no_init)
|
||||
|
||||
class_<mapnik::rgba_palette,
|
||||
boost::shared_ptr<mapnik::rgba_palette>,
|
||||
boost::noncopyable >("Palette",no_init)
|
||||
//, init<std::string,std::string>(
|
||||
// ( arg("palette"), arg("type")),
|
||||
// "Creates a new color palette from a file\n"
|
||||
// )
|
||||
.def( "__init__", boost::python::make_constructor(make_palette))
|
||||
.def( "__init__", boost::python::make_constructor(make_palette))
|
||||
;
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ mapnik::parameter get_params_by_index(mapnik::parameters const& p, int index)
|
|||
|
||||
void add_parameter(mapnik::parameters & p, mapnik::parameter const& param)
|
||||
{
|
||||
p[param.first] = param.second;
|
||||
p[param.first] = param.second;
|
||||
}
|
||||
|
||||
mapnik::value_holder get_param(mapnik::parameter const& p, int index)
|
||||
|
|
|
@ -93,7 +93,7 @@ void export_polygon_pattern_symbolizer()
|
|||
.value("LOCAL",LOCAL_ALIGNMENT)
|
||||
.value("GLOBAL",GLOBAL_ALIGNMENT)
|
||||
;
|
||||
|
||||
|
||||
class_<polygon_pattern_symbolizer>("PolygonPatternSymbolizer",
|
||||
init<path_expression_ptr>("<path_expression_ptr>"))
|
||||
.def_pickle(polygon_pattern_symbolizer_pickle_suite())
|
||||
|
|
|
@ -66,7 +66,7 @@ struct polygon_symbolizer_pickle_suite : boost::python::pickle_suite
|
|||
void export_polygon_symbolizer()
|
||||
{
|
||||
using namespace boost::python;
|
||||
|
||||
|
||||
class_<polygon_symbolizer>("PolygonSymbolizer",
|
||||
init<>("Default PolygonSymbolizer - solid fill grey"))
|
||||
.def(init<color const&>("TODO"))
|
||||
|
@ -82,9 +82,9 @@ void export_polygon_symbolizer()
|
|||
&polygon_symbolizer::get_gamma,
|
||||
&polygon_symbolizer::set_gamma)
|
||||
.add_property("gamma_method",
|
||||
&polygon_symbolizer::get_gamma_method,
|
||||
&polygon_symbolizer::set_gamma_method,
|
||||
"Set/get the gamma correction method of the polygon")
|
||||
&polygon_symbolizer::get_gamma_method,
|
||||
&polygon_symbolizer::set_gamma_method,
|
||||
"Set/get the gamma correction method of the polygon")
|
||||
;
|
||||
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ void export_stroke ()
|
|||
.value("ROUND_JOIN",ROUND_JOIN)
|
||||
.value("BEVEL_JOIN",BEVEL_JOIN)
|
||||
;
|
||||
|
||||
|
||||
class_<stroke>("Stroke",init<>(
|
||||
"Creates a new default black stroke with the width of 1.\n"))
|
||||
.def(init<color,float>(
|
||||
|
|
|
@ -52,7 +52,7 @@ void set_displacement(text_symbolizer_properties &t, boost::python::tuple arg)
|
|||
);
|
||||
throw_error_already_set();
|
||||
}
|
||||
|
||||
|
||||
double x = extract<double>(arg[0]);
|
||||
double y = extract<double>(arg[1]);
|
||||
t.displacement = std::make_pair(x, y);
|
||||
|
@ -99,40 +99,40 @@ void export_text_placement()
|
|||
|
||||
|
||||
class_<text_symbolizer_properties>("TextSymbolizerProperties")
|
||||
.def_readwrite("orientation", &text_symbolizer_properties::orientation)
|
||||
.add_property("displacement",
|
||||
&get_displacement,
|
||||
&set_displacement)
|
||||
.def_readwrite("label_placement", &text_symbolizer_properties::label_placement)
|
||||
.def_readwrite("horizontal_alignment", &text_symbolizer_properties::halign)
|
||||
.def_readwrite("justify_alignment", &text_symbolizer_properties::jalign)
|
||||
.def_readwrite("vertical_alignment", &text_symbolizer_properties::valign)
|
||||
.def_readwrite("label_spacing", &text_symbolizer_properties::label_spacing)
|
||||
.def_readwrite("label_position_tolerance", &text_symbolizer_properties::label_position_tolerance)
|
||||
.def_readwrite("avoid_edges", &text_symbolizer_properties::avoid_edges)
|
||||
.def_readwrite("minimum_distance", &text_symbolizer_properties::minimum_distance)
|
||||
.def_readwrite("minimum_padding", &text_symbolizer_properties::minimum_padding)
|
||||
.def_readwrite("minimum_path_length", &text_symbolizer_properties::minimum_path_length)
|
||||
.def_readwrite("maximum_angle_char_delta", &text_symbolizer_properties::max_char_angle_delta)
|
||||
.def_readwrite("force_odd_labels", &text_symbolizer_properties::force_odd_labels)
|
||||
.def_readwrite("allow_overlap", &text_symbolizer_properties::allow_overlap)
|
||||
.def_readwrite("text_ratio", &text_symbolizer_properties::text_ratio)
|
||||
.def_readwrite("wrap_width", &text_symbolizer_properties::wrap_width)
|
||||
/* TODO: text_processor */
|
||||
/* from_xml, to_xml operate on mapnik's internal XML tree and don't make sense in python.*/
|
||||
;
|
||||
.def_readwrite("orientation", &text_symbolizer_properties::orientation)
|
||||
.add_property("displacement",
|
||||
&get_displacement,
|
||||
&set_displacement)
|
||||
.def_readwrite("label_placement", &text_symbolizer_properties::label_placement)
|
||||
.def_readwrite("horizontal_alignment", &text_symbolizer_properties::halign)
|
||||
.def_readwrite("justify_alignment", &text_symbolizer_properties::jalign)
|
||||
.def_readwrite("vertical_alignment", &text_symbolizer_properties::valign)
|
||||
.def_readwrite("label_spacing", &text_symbolizer_properties::label_spacing)
|
||||
.def_readwrite("label_position_tolerance", &text_symbolizer_properties::label_position_tolerance)
|
||||
.def_readwrite("avoid_edges", &text_symbolizer_properties::avoid_edges)
|
||||
.def_readwrite("minimum_distance", &text_symbolizer_properties::minimum_distance)
|
||||
.def_readwrite("minimum_padding", &text_symbolizer_properties::minimum_padding)
|
||||
.def_readwrite("minimum_path_length", &text_symbolizer_properties::minimum_path_length)
|
||||
.def_readwrite("maximum_angle_char_delta", &text_symbolizer_properties::max_char_angle_delta)
|
||||
.def_readwrite("force_odd_labels", &text_symbolizer_properties::force_odd_labels)
|
||||
.def_readwrite("allow_overlap", &text_symbolizer_properties::allow_overlap)
|
||||
.def_readwrite("text_ratio", &text_symbolizer_properties::text_ratio)
|
||||
.def_readwrite("wrap_width", &text_symbolizer_properties::wrap_width)
|
||||
/* TODO: text_processor */
|
||||
/* from_xml, to_xml operate on mapnik's internal XML tree and don't make sense in python.*/
|
||||
;
|
||||
class_<char_properties>("CharProperties")
|
||||
.def_readwrite("face_name", &char_properties::face_name)
|
||||
.def_readwrite("fontset", &char_properties::fontset)
|
||||
.def_readwrite("text_size", &char_properties::text_size)
|
||||
.def_readwrite("character_spacing", &char_properties::character_spacing)
|
||||
.def_readwrite("line_spacing", &char_properties::line_spacing)
|
||||
.def_readwrite("text_opacity", &char_properties::text_opacity)
|
||||
.def_readwrite("wrap_char", &char_properties::wrap_char)
|
||||
.def_readwrite("wrap_before", &char_properties::wrap_before)
|
||||
.def_readwrite("text_transform", &char_properties::text_transform)
|
||||
.def_readwrite("fill", &char_properties::fill)
|
||||
.def_readwrite("halo_fill", &char_properties::halo_fill)
|
||||
.def_readwrite("halo_radius", &char_properties::halo_radius)
|
||||
;
|
||||
.def_readwrite("face_name", &char_properties::face_name)
|
||||
.def_readwrite("fontset", &char_properties::fontset)
|
||||
.def_readwrite("text_size", &char_properties::text_size)
|
||||
.def_readwrite("character_spacing", &char_properties::character_spacing)
|
||||
.def_readwrite("line_spacing", &char_properties::line_spacing)
|
||||
.def_readwrite("text_opacity", &char_properties::text_opacity)
|
||||
.def_readwrite("wrap_char", &char_properties::wrap_char)
|
||||
.def_readwrite("wrap_before", &char_properties::wrap_before)
|
||||
.def_readwrite("text_transform", &char_properties::text_transform)
|
||||
.def_readwrite("fill", &char_properties::fill)
|
||||
.def_readwrite("halo_fill", &char_properties::halo_fill)
|
||||
.def_readwrite("halo_radius", &char_properties::halo_radius)
|
||||
;
|
||||
}
|
||||
|
|
|
@ -145,7 +145,7 @@ struct text_symbolizer_pickle_suite : boost::python::pickle_suite
|
|||
void export_text_symbolizer()
|
||||
{
|
||||
using namespace boost::python;
|
||||
|
||||
|
||||
class_<text_symbolizer>("TextSymbolizer",init<expression_ptr,std::string const&, unsigned,color const&>())
|
||||
/*
|
||||
// todo - all python classes can have kwargs and default constructors
|
||||
|
|
Loading…
Add table
Reference in a new issue