mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
- replace all instances of std::cerr with MAPNIK_LOG_*
This commit is contained in:
parent
a0feb26d21
commit
fb94e4a2ec
@ -103,7 +103,7 @@ struct feature_collection_grammar :
|
||||
qi::on_error<qi::fail>
|
||||
(
|
||||
feature_collection
|
||||
, std::cerr
|
||||
, std::clog
|
||||
<< phoenix::val("Error parsing GeoJSON ")
|
||||
<< qi::_4
|
||||
<< phoenix::val(" here: \"")
|
||||
|
||||
@ -316,7 +316,7 @@ struct feature_grammar :
|
||||
on_error<fail>
|
||||
(
|
||||
feature
|
||||
, std::cerr
|
||||
, std::clog
|
||||
<< phoenix::val("Error! Expecting ")
|
||||
<< _4 // what failed?
|
||||
<< phoenix::val(" here: \"")
|
||||
|
||||
@ -171,7 +171,7 @@ namespace mapnik { namespace svg {
|
||||
template <typename T>
|
||||
void operator()(T const& c, qi::unused_type, qi::unused_type) const
|
||||
{
|
||||
std::cerr << typeid(c).name() << std::endl;
|
||||
MAPNIK_LOG_DEBUG(svg) << typeid(c).name();
|
||||
}
|
||||
};
|
||||
*/
|
||||
|
||||
@ -414,7 +414,9 @@ public:
|
||||
{
|
||||
double end_x=0;
|
||||
double end_y=0;
|
||||
std::cerr << "Curve 3 not implemented" << std::endl;
|
||||
|
||||
MAPNIK_LOG_WARN(cairo_renderer) << "Curve 3 not implemented";
|
||||
|
||||
path.vertex(&end_x, &end_y);
|
||||
|
||||
curve_to(x,y,x,y,end_x,end_y);
|
||||
@ -437,7 +439,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "Unimplemented drawing command: " << cm << std::endl;
|
||||
MAPNIK_LOG_WARN(cairo_renderer) << "Unimplemented drawing command: " << cm;
|
||||
move_to(x, y);
|
||||
}
|
||||
}
|
||||
@ -447,7 +449,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "Unimplemented path command: " << cm << std::endl;
|
||||
MAPNIK_LOG_WARN(cairo_renderer) << "Unimplemented path command: " << cm;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1330,7 +1332,7 @@ void cairo_renderer_base::start_map_processing(Map const& map)
|
||||
if (writer.first)
|
||||
{
|
||||
//writer.first->add_box(label_ext, feature, t_, writer.second);
|
||||
std::cerr << "### Warning metawriter not yet supported for LINE placement\n";
|
||||
MAPNIK_LOG_WARN(cairo_renderer) << "metawriter not yet supported for LINE placement";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1457,7 +1459,7 @@ void cairo_renderer_base::start_map_processing(Map const& map)
|
||||
if (writer.first)
|
||||
{
|
||||
//writer.first->add_box(label_ext, feature, t_, writer.second);
|
||||
std::cerr << "### Warning metawriter not yet supported for LINE placement\n";
|
||||
MAPNIK_LOG_WARN(cairo_renderer) << "metawriter not yet supported for LINE placement";
|
||||
}
|
||||
|
||||
agg::conv_transform<agg::path_storage, agg::trans_affine> trans(marker, matrix);
|
||||
|
||||
@ -19,7 +19,9 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
// mapnik
|
||||
#include <mapnik/debug.hpp>
|
||||
#include <mapnik/formatting/base.hpp>
|
||||
#include <mapnik/formatting/list.hpp>
|
||||
#include <mapnik/formatting/registry.hpp>
|
||||
@ -34,9 +36,7 @@ namespace formatting {
|
||||
void node::to_xml(boost::property_tree::ptree &xml) const
|
||||
{
|
||||
//TODO: Should this throw a config_error?
|
||||
#ifdef MAPNIK_DEBUG
|
||||
std::cerr << "Error: Trying to write unsupported node type to XML.\n";
|
||||
#endif
|
||||
MAPNIK_LOG_ERROR(base) << "Trying to write unsupported node type to XML.";
|
||||
}
|
||||
|
||||
node_ptr node::from_xml(xml_node const& xml)
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
// mapnik
|
||||
#include <mapnik/debug.hpp>
|
||||
#include <mapnik/formatting/expression.hpp>
|
||||
#include <mapnik/ptree_helpers.hpp>
|
||||
#include <mapnik/expression_string.hpp>
|
||||
@ -29,12 +30,10 @@
|
||||
#include <mapnik/feature.hpp>
|
||||
#include <mapnik/xml_node.hpp>
|
||||
|
||||
// boost
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
namespace formatting
|
||||
{
|
||||
namespace mapnik {
|
||||
namespace formatting {
|
||||
|
||||
using boost::property_tree::ptree;
|
||||
void expression_format::to_xml(boost::property_tree::ptree &xml) const
|
||||
{
|
||||
@ -108,9 +107,7 @@ void expression_format::apply(char_properties const& p, const Feature &feature,
|
||||
if (child_) {
|
||||
child_->apply(new_properties, feature, output);
|
||||
} else {
|
||||
#ifdef MAPNIK_DEBUG
|
||||
std::cerr << "Warning: Useless format: No text to format\n";
|
||||
#endif
|
||||
MAPNIK_LOG_WARN(expression) << "Useless format: No text to format";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -19,14 +19,18 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
// mapnik
|
||||
#include <mapnik/debug.hpp>
|
||||
#include <mapnik/formatting/format.hpp>
|
||||
#include <mapnik/ptree_helpers.hpp>
|
||||
#include <mapnik/xml_node.hpp>
|
||||
|
||||
namespace mapnik {
|
||||
namespace formatting {
|
||||
|
||||
using boost::property_tree::ptree;
|
||||
|
||||
namespace formatting {
|
||||
void format_node::to_xml(ptree &xml) const
|
||||
{
|
||||
ptree &new_node = xml.push_back(ptree::value_type("Format", ptree()))->second;
|
||||
@ -88,9 +92,7 @@ void format_node::apply(char_properties const& p, const Feature &feature, proces
|
||||
if (child_) {
|
||||
child_->apply(new_properties, feature, output);
|
||||
} else {
|
||||
#ifdef MAPNIK_DEBUG
|
||||
std::cerr << "Warning: Useless format: No text to format\n";
|
||||
#endif
|
||||
MAPNIK_LOG_WARN(format) << "Useless format: No text to format";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
// mapnik
|
||||
#include <mapnik/debug.hpp>
|
||||
#include <mapnik/graphics.hpp>
|
||||
#include <mapnik/image_util.hpp>
|
||||
#include <mapnik/global.hpp>
|
||||
@ -60,7 +61,7 @@ image_32::image_32(Cairo::RefPtr<Cairo::ImageSurface> rhs)
|
||||
painted_ = true;
|
||||
if (rhs->get_format() != Cairo::FORMAT_ARGB32)
|
||||
{
|
||||
std::cerr << "Unable to convert this Cairo format\n";
|
||||
MAPNIK_LOG_WARN(graphics) << "Unable to convert this Cairo format";
|
||||
return; // throw exception ??
|
||||
}
|
||||
|
||||
|
||||
@ -596,7 +596,7 @@ featureset_ptr Map::query_point(unsigned index, double x, double y) const
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
std::cerr << "Exception caught in \"query_point\"" << std::endl;
|
||||
MAPNIK_LOG_ERROR(map) << "Exception caught in \"query_point\"";
|
||||
}
|
||||
}
|
||||
return featureset_ptr();
|
||||
@ -639,7 +639,7 @@ featureset_ptr Map::query_map_point(unsigned index, double x, double y) const
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
std::cerr << "Exception caught in \"query_map_point\"" << std::endl;
|
||||
MAPNIK_LOG_ERROR(map) << "Exception caught in \"query_map_point\"";
|
||||
}
|
||||
}
|
||||
return featureset_ptr();
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
// mapnik
|
||||
#include <mapnik/debug.hpp>
|
||||
#include <mapnik/mapped_memory_cache.hpp>
|
||||
|
||||
// boost
|
||||
@ -82,13 +83,15 @@ boost::optional<mapped_region_ptr> mapped_memory_cache::find(std::string const&
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
std::cerr << "Exception caught while loading mapping memory file: " << uri << std::endl;
|
||||
MAPNIK_LOG_ERROR(mapped_memory_cache) << "Exception caught while loading mapping memory file: " << uri;
|
||||
}
|
||||
}
|
||||
/*else
|
||||
{
|
||||
std::cerr << "### WARNING Memory region does not exist file: " << uri << std::endl;
|
||||
}*/
|
||||
/*
|
||||
else
|
||||
{
|
||||
MAPNIK_LOG_WARN(mapped_memory_cache) << "Memory region does not exist file: " << uri;
|
||||
}
|
||||
*/
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
// mapnik
|
||||
#include <mapnik/debug.hpp>
|
||||
#include <mapnik/marker.hpp>
|
||||
#include <mapnik/marker_cache.hpp>
|
||||
#include <mapnik/svg/svg_parser.hpp>
|
||||
@ -103,7 +104,7 @@ boost::optional<marker_ptr> marker_cache::find(std::string const& uri, bool upda
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
std::cerr << "Exception caught while loading SVG: " << uri << std::endl;
|
||||
MAPNIK_LOG_ERROR(marker_cache) << "Exception caught while loading SVG: " << uri;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -129,13 +130,13 @@ boost::optional<marker_ptr> marker_cache::find(std::string const& uri, bool upda
|
||||
|
||||
catch (...)
|
||||
{
|
||||
std::cerr << "Exception caught while loading image: " << uri << std::endl;
|
||||
MAPNIK_LOG_ERROR(marker_cache) << "Exception caught while loading image: " << uri;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "### WARNING Marker does not exist: " << uri << std::endl;
|
||||
MAPNIK_LOG_WARN(marker_cache) << "Marker does not exist: " << uri;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -108,11 +108,11 @@ bool markers_placement<Locator, Detector>::get_point(
|
||||
//Error for this marker is too large. Skip to the next position.
|
||||
if (abs(error_) > max_error_ * spacing_)
|
||||
{
|
||||
if (error_ > spacing_) {
|
||||
if (error_ > spacing_)
|
||||
{
|
||||
error_ = 0; //Avoid moving backwards
|
||||
#ifdef MAPNIK_DEBUG
|
||||
std::cerr << "WARNING: Extremely large error in markers_placement. Please file a bug report.\n";
|
||||
#endif
|
||||
|
||||
MAPNIK_LOG_WARN(markers_placement) << "Extremely large error in markers_placement. Please file a bug report.";
|
||||
}
|
||||
spacing_left_ += spacing_ - error_;
|
||||
error_ = 0;
|
||||
@ -211,15 +211,14 @@ void markers_placement<Locator, Detector>::set_spacing_left(double sl, bool allo
|
||||
double delta_error = sl - spacing_left_;
|
||||
if (!allow_negative && delta_error < 0)
|
||||
{
|
||||
#ifdef MAPNIK_DEBUG
|
||||
std::cerr << "WARNING: Unexpected negative error in markers_placement. Please file a bug report.\n";
|
||||
#endif
|
||||
MAPNIK_LOG_WARN(markers_placement) << "Unexpected negative error in markers_placement. Please file a bug report.";
|
||||
|
||||
return;
|
||||
}
|
||||
#ifdef MAPNIK_DEBUG
|
||||
if (delta_error == 0.0)
|
||||
{
|
||||
std::cerr << "WARNING: Not moving at all in set_spacing_left()! Please file a bug report.\n";
|
||||
MAPNIK_LOG_WARN(markers_placement) << "Not moving at all in set_spacing_left()! Please file a bug report.";
|
||||
}
|
||||
#endif
|
||||
error_ += delta_error;
|
||||
|
||||
@ -20,6 +20,8 @@
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
// mapnik
|
||||
#include <mapnik/debug.hpp>
|
||||
#include <mapnik/memory.hpp>
|
||||
|
||||
namespace mapnik
|
||||
@ -46,7 +48,7 @@ void Object::operator delete(void* p)
|
||||
|
||||
void Object::operator delete(void* , MemoryManager* )
|
||||
{
|
||||
//std::cerr << "operator delete with Manager " << std::hex << p << " " << manager << std::endl;
|
||||
//MAPNIK_LOG_DEBUG(memory) << "operator delete with Manager " << std::hex << p << " " << manager;
|
||||
}
|
||||
|
||||
inline size_t MemoryUtils::alignPointerSize(size_t ptrSize)
|
||||
|
||||
@ -806,7 +806,7 @@ std::auto_ptr<text_path> placement_finder<DetectorT>::get_placement_offset(std::
|
||||
index++;
|
||||
if (index >= path_positions.size()) //Bail out if we run off the end of the shape
|
||||
{
|
||||
//std::cerr << "FAIL: Out of space" << std::endl;
|
||||
//MAPNIK_LOG_ERROR(placement_finder) << "FAIL: Out of space";
|
||||
return std::auto_ptr<text_path>(NULL);
|
||||
}
|
||||
new_x = path_positions[index].x;
|
||||
@ -843,7 +843,7 @@ std::auto_ptr<text_path> placement_finder<DetectorT>::get_placement_offset(std::
|
||||
if (p.max_char_angle_delta > 0 &&
|
||||
fabs(angle_delta) > p.max_char_angle_delta)
|
||||
{
|
||||
//std::cerr << "FAIL: Too Bendy!" << std::endl;
|
||||
//MAPNIK_LOG_ERROR(placement_finder) << "FAIL: Too Bendy!";
|
||||
return std::auto_ptr<text_path>(NULL);
|
||||
}
|
||||
|
||||
@ -897,7 +897,7 @@ std::auto_ptr<text_path> placement_finder<DetectorT>::get_placement_offset(std::
|
||||
else
|
||||
{
|
||||
//Otherwise we have failed to find a placement
|
||||
//std::cerr << "FAIL: Double upside-down!" << std::endl;
|
||||
//MAPNIK_LOG_ERROR(placement_finder) << "FAIL: Double upside-down!";
|
||||
return std::auto_ptr<text_path>(NULL);
|
||||
}
|
||||
}
|
||||
@ -949,15 +949,15 @@ bool placement_finder<DetectorT>::test_placement(std::auto_ptr<text_path> const&
|
||||
)
|
||||
)
|
||||
{
|
||||
//std::cerr << "No Intersects:" << !dimensions_.intersects(e) << ": " << e << " @ " << dimensions_ << std::endl;
|
||||
//std::cerr << "No Placements:" << !detector_.has_placement(e, info.get_string(), p.minimum_distance) << std::endl;
|
||||
//MAPNIK_LOG_ERROR(placement_finder) << "No Intersects:" << !dimensions_.intersects(e) << ": " << e << " @ " << dimensions_;
|
||||
//MAPNIK_LOG_ERROR(placement_finder) << "No Placements:" << !detector_.has_placement(e, info.get_string(), p.minimum_distance);
|
||||
status = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (p.avoid_edges && !dimensions_.contains(e))
|
||||
{
|
||||
//std::cerr << "Fail avoid edges" << std::endl;
|
||||
//MAPNIK_LOG_ERROR(placement_finder) << "Fail avoid edges";
|
||||
status = false;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ agg::rgba8 parse_color(const char* str)
|
||||
}
|
||||
catch (mapnik::config_error & ex)
|
||||
{
|
||||
std::cerr << ex.what() << std::endl;
|
||||
MAPNIK_LOG_ERROR(svg_parser) << ex.what();
|
||||
}
|
||||
return agg::rgba8(c.red(), c.green(), c.blue(), c.alpha());
|
||||
}
|
||||
@ -147,10 +147,10 @@ void svg_parser::parse(std::string const& filename)
|
||||
xmlFreeTextReader(reader);
|
||||
if (ret != 0)
|
||||
{
|
||||
std::cerr << "Failed to parse " << filename << std::endl;
|
||||
MAPNIK_LOG_ERROR(svg_parser) << "Failed to parse " << filename;
|
||||
}
|
||||
} else {
|
||||
std::cerr << "Unable to open " << filename << std::endl;
|
||||
MAPNIK_LOG_ERROR(svg_parser) << "Unable to open " << filename;
|
||||
}
|
||||
}
|
||||
|
||||
@ -279,7 +279,7 @@ void svg_parser::parse_attr(const xmlChar * name, const xmlChar * value )
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "Failed to find gradient fill: " << id << std::endl;
|
||||
MAPNIK_LOG_ERROR(svg_parser) << "Failed to find gradient fill: " << id;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -316,7 +316,7 @@ void svg_parser::parse_attr(const xmlChar * name, const xmlChar * value )
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "Failed to find gradient fill: " << id << std::endl;
|
||||
MAPNIK_LOG_ERROR(svg_parser) << "Failed to find gradient fill: " << id;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -650,7 +650,7 @@ void svg_parser::parse_gradient_stop(xmlTextReaderPtr reader)
|
||||
}
|
||||
catch (mapnik::config_error & ex)
|
||||
{
|
||||
std::cerr << ex.what() << std::endl;
|
||||
MAPNIK_LOG_ERROR(svg_parser) << ex.what();
|
||||
}
|
||||
}
|
||||
else if (kv.first == "stop-opacity")
|
||||
@ -669,7 +669,7 @@ void svg_parser::parse_gradient_stop(xmlTextReaderPtr reader)
|
||||
}
|
||||
catch (mapnik::config_error & ex)
|
||||
{
|
||||
std::cerr << ex.what() << std::endl;
|
||||
MAPNIK_LOG_ERROR(svg_parser) << ex.what();
|
||||
}
|
||||
}
|
||||
|
||||
@ -684,8 +684,13 @@ void svg_parser::parse_gradient_stop(xmlTextReaderPtr reader)
|
||||
|
||||
temporary_gradient_.second.add_stop(offset, stop_color);
|
||||
|
||||
//std::cerr << "\tFound Stop: " << offset << " " << (unsigned)stop_color.red() << " " << (unsigned)stop_color.green() << " " << (unsigned)stop_color.blue() << " " << (unsigned)stop_color.alpha() << std::endl;
|
||||
|
||||
/*
|
||||
MAPNIK_LOG_DEBUG(svg_parser) << "\tFound Stop: " << offset << " "
|
||||
<< (unsigned)stop_color.red() << " "
|
||||
<< (unsigned)stop_color.green() << " "
|
||||
<< (unsigned)stop_color.blue() << " "
|
||||
<< (unsigned)stop_color.alpha();
|
||||
*/
|
||||
}
|
||||
|
||||
bool svg_parser::parse_common_gradient(xmlTextReaderPtr reader)
|
||||
@ -714,12 +719,12 @@ bool svg_parser::parse_common_gradient(xmlTextReaderPtr reader)
|
||||
std::string linkid = (const char *) &value[1];
|
||||
if (gradient_map_.count(linkid))
|
||||
{
|
||||
//std::cerr << "\tLoading linked gradient properties from " << linkid << std::endl;
|
||||
//MAPNIK_LOG_DEBUG(svg_parser) << "\tLoading linked gradient properties from " << linkid;
|
||||
temporary_gradient_.second = gradient_map_[linkid];
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "Failed to find linked gradient " << linkid << std::endl;
|
||||
MAPNIK_LOG_ERROR(svg_parser) << "Failed to find linked gradient " << linkid;
|
||||
}
|
||||
}
|
||||
|
||||
@ -801,7 +806,7 @@ void svg_parser::parse_radial_gradient(xmlTextReaderPtr reader)
|
||||
// add this here in case we have no end tag, will be replaced if we do
|
||||
gradient_map_[temporary_gradient_.first] = temporary_gradient_.second;
|
||||
|
||||
//std::cerr << "Found Radial Gradient: " << " " << cx << " " << cy << " " << fx << " " << fy << " " << r << std::endl;
|
||||
//MAPNIK_LOG_DEBUG(svg_parser) << "Found Radial Gradient: " << " " << cx << " " << cy << " " << fx << " " << fy << " " << r;
|
||||
}
|
||||
|
||||
void svg_parser::parse_linear_gradient(xmlTextReaderPtr reader)
|
||||
@ -839,7 +844,7 @@ void svg_parser::parse_linear_gradient(xmlTextReaderPtr reader)
|
||||
// add this here in case we have no end tag, will be replaced if we do
|
||||
gradient_map_[temporary_gradient_.first] = temporary_gradient_.second;
|
||||
|
||||
//std::cerr << "Found Linear Gradient: " << "(" << x1 << " " << y1 << "),(" << x2 << " " << y2 << ")" << std::endl;
|
||||
//MAPNIK_LOG_DEBUG(svg_parser) << "Found Linear Gradient: " << "(" << x1 << " " << y1 << "),(" << x2 << " " << y2 << ")";
|
||||
}
|
||||
|
||||
void svg_parser::parse_pattern(xmlTextReaderPtr reader)
|
||||
|
||||
@ -60,7 +60,7 @@ void symbolizer_base::cache_metawriters(Map const &m)
|
||||
properties_complete_.insert(properties_.begin(), properties_.end());
|
||||
} else {
|
||||
properties_complete_.clear();
|
||||
std::cerr << "WARNING: Metawriter '" << writer_name_ << "' used but not defined.\n";
|
||||
MAPNIK_LOG_WARN(symbolizer) << "Metawriter '" << writer_name_ << "' used but not defined.";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -207,9 +207,7 @@ void text_symbolizer_helper<FaceManagerT, DetectorT>::initialize_points()
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_DEBUG
|
||||
std::cerr << "ERROR: Unknown placement type in initialize_points();\n";
|
||||
#endif
|
||||
MAPNIK_LOG_ERROR(symbolizer_helpers) << "ERROR: Unknown placement type in initialize_points()";
|
||||
}
|
||||
prj_trans_.backward(label_x, label_y, z);
|
||||
t_.forward(&label_x, &label_y);
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
// mapnik
|
||||
#include <mapnik/debug.hpp>
|
||||
#include <mapnik/text_placements/simple.hpp>
|
||||
#include <mapnik/ptree_helpers.hpp>
|
||||
#include <mapnik/xml_node.hpp>
|
||||
@ -94,7 +95,7 @@ bool text_placement_info_simple::next_position_only()
|
||||
displacement = std::make_pair(-abs(pdisp.first), abs(pdisp.second));
|
||||
break;
|
||||
default:
|
||||
std::cerr << "WARNING: Unknown placement\n";
|
||||
MAPNIK_LOG_WARN(text_placements) << "Unknown placement";
|
||||
}
|
||||
position_state++;
|
||||
return true;
|
||||
@ -146,11 +147,11 @@ void text_placements_simple::set_positions(std::string positions)
|
||||
);
|
||||
if (first != last)
|
||||
{
|
||||
std::cerr << "WARNING: Could not parse text_placement_simple placement string ('" << positions << "').\n";
|
||||
MAPNIK_LOG_WARN(text_placements) << "Could not parse text_placement_simple placement string ('" << positions << "')";
|
||||
}
|
||||
if (direction_.size() == 0)
|
||||
{
|
||||
std::cerr << "WARNING: text_placements_simple with no valid placements! ('"<< positions<<"')\n";
|
||||
MAPNIK_LOG_WARN(text_placements) << "text_placements_simple with no valid placements! ('"<< positions<<"')";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -65,9 +65,7 @@ void text_symbolizer_properties::process(processed_text &output, Feature const&
|
||||
if (tree_) {
|
||||
tree_->apply(format, feature, output);
|
||||
} else {
|
||||
#ifdef MAPNIK_DEBUG
|
||||
std::cerr << "Warning: text_symbolizer_properties can't produce text: No formatting tree!\n";
|
||||
#endif
|
||||
MAPNIK_LOG_WARN(text_properties) << "text_symbolizer_properties can't produce text: No formatting tree!";
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,7 +120,8 @@ void text_symbolizer_properties::from_xml(xml_node const &sym, fontset_map const
|
||||
optional<std::string> name_ = sym.get_opt_attr<std::string>("name");
|
||||
if (name_)
|
||||
{
|
||||
std::cerr << "### WARNING: Using 'name' in TextSymbolizer/ShieldSymbolizer is deprecated!\n";
|
||||
MAPNIK_LOG_WARN(text_placements) << "Using 'name' in TextSymbolizer/ShieldSymbolizer is deprecated!";
|
||||
|
||||
set_old_style_expression(parse_expression(*name_, "utf8"));
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user