Merge branch 'master' of github.com:mapnik/mapnik
This commit is contained in:
commit
f9d215337e
68 changed files with 278 additions and 605 deletions
|
@ -103,9 +103,7 @@ struct parameters_pickle_suite : boost::python::pickle_suite
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "parameters_pickle_suite: Could not unpickle key=" << key;
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(bindings) << "parameters_pickle_suite: Could not unpickle key=" << key;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -272,9 +272,7 @@ static void write_features(T const& grid_type,
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "write_features: Should not get here: key " << key << " not found in grid feature properties";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(bindings) << "write_features: Should not get here: key " << key << " not found in grid feature properties";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -240,10 +240,10 @@ struct MAPNIK_DECL coord_transform_parallel
|
|||
angle_a = atan2((m_pre_y-m_cur_y),(m_pre_x-m_cur_x));
|
||||
dx_pre = cos(angle_a + pi_by_2);
|
||||
dy_pre = sin(angle_a + pi_by_2);
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "coord_transform_parallel: Offsetting line by=" << offset_;
|
||||
mapnik::log() << "coord_transform_parallel: Initial dx=" << (dx_pre * offset_) << ",dy=" << (dy_pre * offset_);
|
||||
#endif
|
||||
|
||||
MAPNIK_LOG_DEBUG(ctrans) << "coord_transform_parallel: Offsetting line by=" << offset_;
|
||||
MAPNIK_LOG_DEBUG(ctrans) << "coord_transform_parallel: Initial dx=" << (dx_pre * offset_) << ",dy=" << (dy_pre * offset_);
|
||||
|
||||
*x = m_pre_x + (dx_pre * offset_);
|
||||
*y = m_pre_y + (dy_pre * offset_);
|
||||
m_status = process;
|
||||
|
@ -290,15 +290,14 @@ struct MAPNIK_DECL coord_transform_parallel
|
|||
}
|
||||
else // skip sharp spikes
|
||||
{
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
dx_curr = cos(angle_a + pi_by_2);
|
||||
dy_curr = sin(angle_a + pi_by_2);
|
||||
sin_curve = dx_curr*dy_pre-dy_curr*dx_pre;
|
||||
mapnik::log() << "coord_transform_parallel: angle a=" << angle_a;
|
||||
mapnik::log() << "coord_transform_parallel: angle b=" << angle_b;
|
||||
mapnik::log() << "coord_transform_parallel: h=" << h;
|
||||
mapnik::log() << "coord_transform_parallel: sin_curve=" << sin_curve;
|
||||
MAPNIK_LOG_DEBUG(ctrans) << "coord_transform_parallel: angle a=" << angle_a;
|
||||
MAPNIK_LOG_DEBUG(ctrans) << "coord_transform_parallel: angle b=" << angle_b;
|
||||
MAPNIK_LOG_DEBUG(ctrans) << "coord_transform_parallel: h=" << h;
|
||||
MAPNIK_LOG_DEBUG(ctrans) << "coord_transform_parallel: sin_curve=" << sin_curve;
|
||||
#endif
|
||||
m_status = process;
|
||||
break;
|
||||
|
@ -310,9 +309,7 @@ struct MAPNIK_DECL coord_transform_parallel
|
|||
sin_curve = dx_curr*dy_pre-dy_curr*dx_pre;
|
||||
cos_curve = -dx_pre*dx_curr-dy_pre*dy_curr;
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "coord_transform_parallel: sin_curve value=" << sin_curve;
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(ctrans) << "coord_transform_parallel: sin_curve value=" << sin_curve;
|
||||
if(sin_curve > -0.3 && sin_curve < 0.3) {
|
||||
angle_b = atan2((m_cur_y-m_next_y),(m_cur_x-m_next_x));
|
||||
h = tan((angle_b - angle_a)/2.0);
|
||||
|
|
|
@ -23,16 +23,6 @@
|
|||
#ifndef MAPNIK_DEBUG_HPP
|
||||
#define MAPNIK_DEBUG_HPP
|
||||
|
||||
#ifdef MAPNIK_DEBUG
|
||||
#define MAPNIK_DEBUG_AS_BOOL true
|
||||
#else
|
||||
#define MAPNIK_DEBUG_AS_BOOL false
|
||||
#endif
|
||||
|
||||
#ifndef MAPNIK_LOG_FORMAT
|
||||
#define MAPNIK_LOG_FORMAT "Mapnik LOG> %Y-%m-%d %H:%M:%S:"
|
||||
#endif
|
||||
|
||||
// mapnik (should not depend on anything else)
|
||||
#include <mapnik/config.hpp>
|
||||
|
||||
|
@ -47,7 +37,6 @@
|
|||
#include <iostream>
|
||||
#include <cassert>
|
||||
#include <sstream>
|
||||
#include <ctime>
|
||||
#include <ostream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
@ -124,42 +113,32 @@ namespace mapnik {
|
|||
};
|
||||
|
||||
|
||||
#define __xstr__(s) __str__(s)
|
||||
#define __str__(s) #s
|
||||
|
||||
static inline std::string format_logger()
|
||||
class format
|
||||
{
|
||||
char buf[256];
|
||||
const time_t tm = time(0);
|
||||
strftime(buf, sizeof(buf), __xstr__(MAPNIK_LOG_FORMAT), localtime(&tm));
|
||||
return buf;
|
||||
}
|
||||
public:
|
||||
|
||||
#undef __xstr__
|
||||
#undef __str__
|
||||
|
||||
|
||||
#if 0
|
||||
template<class Ch, class Tr, class A>
|
||||
class no_output
|
||||
{
|
||||
private:
|
||||
struct null_buffer
|
||||
{
|
||||
template<class T>
|
||||
null_buffer &operator<<(const T &)
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
typedef null_buffer stream_buffer;
|
||||
|
||||
void operator()(const stream_buffer &)
|
||||
static std::string get()
|
||||
{
|
||||
return format_;
|
||||
}
|
||||
};
|
||||
|
||||
static void set(const std::string& format)
|
||||
{
|
||||
#ifdef MAPNIK_THREADSAFE
|
||||
boost::mutex::scoped_lock lock(mutex_);
|
||||
#endif
|
||||
format_ = format;
|
||||
}
|
||||
|
||||
static std::string str();
|
||||
|
||||
private:
|
||||
static std::string format_;
|
||||
|
||||
#ifdef MAPNIK_THREADSAFE
|
||||
static boost::mutex mutex_;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
template<class Ch, class Tr, class A>
|
||||
|
@ -174,7 +153,7 @@ namespace mapnik {
|
|||
static boost::mutex mutex;
|
||||
boost::mutex::scoped_lock lock(mutex);
|
||||
#endif
|
||||
std::clog << format_logger() << " " << s.str() << std::endl;
|
||||
std::clog << format::str() << " " << s.str() << std::endl;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -193,28 +172,35 @@ namespace mapnik {
|
|||
|
||||
base_log(const char* object_name)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
if (object_name != NULL)
|
||||
{
|
||||
object_name_ = object_name;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
~base_log()
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
if (check_severity())
|
||||
{
|
||||
output_policy()(streambuf_);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
template<class T>
|
||||
base_log &operator<<(const T &x)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
streambuf_ << x;
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
#ifdef MAPNIK_LOG
|
||||
inline bool check_severity()
|
||||
{
|
||||
return Severity >= severity::get_object(object_name_);
|
||||
|
@ -222,6 +208,7 @@ namespace mapnik {
|
|||
|
||||
typename output_policy::stream_buffer streambuf_;
|
||||
std::string object_name_;
|
||||
#endif
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -139,9 +139,8 @@ public:
|
|||
|
||||
~font_face()
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "font_face: Clean up face \"" << family_name() << " " << style_name() << "\"";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(font_engine_freetype) << "font_face: Clean up face \"" << family_name() << " " << style_name() << "\"";
|
||||
|
||||
FT_Done_Face(face_);
|
||||
}
|
||||
|
||||
|
@ -225,9 +224,7 @@ public:
|
|||
|
||||
~stroker()
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "stroker: Destroy stroker=" << s_;
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(font_engine_freetype) << "stroker: Destroy stroker=" << s_;
|
||||
|
||||
FT_Stroker_Done(s_);
|
||||
}
|
||||
|
|
|
@ -136,9 +136,7 @@ public:
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "hit_grid: Should not get here: key '" << key_ << "' not found in feature properties";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(grid) << "hit_grid: Should not get here: key '" << key_ << "' not found in feature properties";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -155,9 +153,7 @@ public:
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "hit_grid: Warning - key '" << key_ << "' was blank for " << *feature;
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(grid) << "hit_grid: Warning - key '" << key_ << "' was blank for " << *feature;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -56,9 +56,9 @@ public:
|
|||
for (unsigned i=0; i<(*pos_)->num_geometries();++i)
|
||||
{
|
||||
geometry_type & geom = (*pos_)->get_geometry(i);
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "memory_featureset: BBox=" << bbox_ << ",Envelope=" << geom.envelope();
|
||||
#endif
|
||||
|
||||
MAPNIK_LOG_DEBUG(memory_featureset) << "memory_featureset: BBox=" << bbox_ << ",Envelope=" << geom.envelope();
|
||||
|
||||
if (bbox_.intersects(geom.envelope()))
|
||||
{
|
||||
return *pos_++;
|
||||
|
|
|
@ -72,12 +72,14 @@ public:
|
|||
void set_pixel_coordinates(bool on) { pixel_coordinates_ = on; }
|
||||
bool get_pixel_coordinates() { return pixel_coordinates_; }
|
||||
virtual void set_map_srs(projection const& proj);
|
||||
|
||||
protected:
|
||||
enum {
|
||||
HEADER_NOT_WRITTEN = -1,
|
||||
STOPPED = -2,
|
||||
STARTED = 0
|
||||
};
|
||||
|
||||
/** Features written. */
|
||||
int count_;
|
||||
bool output_empty_;
|
||||
|
@ -85,20 +87,23 @@ protected:
|
|||
proj_transform *trans_;
|
||||
projection output_srs_;
|
||||
bool pixel_coordinates_;
|
||||
|
||||
virtual void write_header();
|
||||
|
||||
inline void write_feature_header(std::string type) {
|
||||
#ifdef MAPNIK_LOG
|
||||
if (count_ == STOPPED)
|
||||
{
|
||||
std::cerr << "WARNING: Metawriter not started before using it.\n";
|
||||
MAPNIK_LOG_WARN(metawrite_json) << "Metawriter: instance not started before using it.";
|
||||
}
|
||||
#endif
|
||||
|
||||
if (count_ == HEADER_NOT_WRITTEN) write_header();
|
||||
if (count_++) *f_ << ",\n";
|
||||
|
||||
*f_ << "{ \"type\": \"Feature\",\n \"geometry\": { \"type\": \"" << type << "\",\n \"coordinates\":";
|
||||
}
|
||||
|
||||
void write_properties(Feature const& feature, metawriter_properties const& properties);
|
||||
|
||||
inline void write_point(CoordTransform const& t, double x, double y, bool last = false)
|
||||
{
|
||||
double z = 0.0;
|
||||
|
@ -111,6 +116,7 @@ protected:
|
|||
*f_ << ",";
|
||||
}
|
||||
}
|
||||
|
||||
void write_line_polygon(path_type & path, CoordTransform const& t, bool polygon);
|
||||
|
||||
private:
|
||||
|
@ -136,10 +142,12 @@ public:
|
|||
void set_filename(path_expression_ptr fn);
|
||||
/** Get filename template. */
|
||||
path_expression_ptr get_filename() const;
|
||||
|
||||
private:
|
||||
path_expression_ptr fn_;
|
||||
std::fstream f_;
|
||||
std::string filename_;
|
||||
|
||||
protected:
|
||||
virtual void write_header();
|
||||
};
|
||||
|
|
|
@ -101,9 +101,8 @@ public:
|
|||
typename ContType::iterator itr=unusedPool_.begin();
|
||||
while ( itr!=unusedPool_.end())
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "pool: Borrow instance=" << (*itr).get();
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(pool) << "pool: Borrow instance=" << (*itr).get();
|
||||
|
||||
if ((*itr)->isOK())
|
||||
{
|
||||
usedPool_.push_back(*itr);
|
||||
|
@ -112,9 +111,8 @@ public:
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "pool: Bad connection (erase) instance=" << (*itr).get();
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(pool) << "pool: Bad connection (erase) instance=" << (*itr).get();
|
||||
|
||||
itr=unusedPool_.erase(itr);
|
||||
}
|
||||
}
|
||||
|
@ -124,9 +122,9 @@ public:
|
|||
if (conn->isOK())
|
||||
{
|
||||
usedPool_.push_back(conn);
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "pool: Create connection=" << conn.get();
|
||||
#endif
|
||||
|
||||
MAPNIK_LOG_DEBUG(pool) << "pool: Create connection=" << conn.get();
|
||||
|
||||
return conn;
|
||||
}
|
||||
}
|
||||
|
@ -143,9 +141,8 @@ public:
|
|||
{
|
||||
if (obj.get()==(*itr).get())
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "pool: Return instance=" << (*itr).get();
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(pool) << "pool: Return instance=" << (*itr).get();
|
||||
|
||||
unusedPool_.push_back(*itr);
|
||||
usedPool_.erase(itr);
|
||||
return;
|
||||
|
|
|
@ -203,9 +203,7 @@ private:
|
|||
template <class T>
|
||||
void copy_text_ptr(T & sym) const
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
std::cerr << "Warning: Deep copying TextSymbolizers is broken!\n";
|
||||
#endif
|
||||
MAPNIK_LOG_WARN(rule) << "rule: deep copying TextSymbolizers is broken!";
|
||||
}
|
||||
|
||||
template <class T>
|
||||
|
|
|
@ -146,9 +146,7 @@ public:
|
|||
unsigned g = stop_color.green();
|
||||
unsigned b = stop_color.blue();
|
||||
unsigned a = stop_color.alpha();
|
||||
#ifdef MAPNIK_LOG
|
||||
//mapnik::log() << "svg_renderer: r=" << r << ",g=" << g << ",b=" << b << ",a=" << a;
|
||||
#endif
|
||||
//MAPNIK_LOG_DEBUG(svg_renderer) << "svg_renderer: r=" << r << ",g=" << g << ",b=" << b << ",a=" << a;
|
||||
m_gradient_lut.add_color(st.first, agg::rgba8(r, g, b, int(a * opacity)));
|
||||
}
|
||||
m_gradient_lut.build_lut();
|
||||
|
|
|
@ -125,9 +125,7 @@ template <typename T,
|
|||
pInstance_ = 0;
|
||||
destroyed_=true;
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "singleton: Destroyed instance";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(utils) << "singleton: Destroyed instance";
|
||||
}
|
||||
|
||||
protected:
|
||||
|
@ -153,9 +151,7 @@ public:
|
|||
{
|
||||
pInstance_ = CreatePolicy<T>::create();
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "singleton: Created instance";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(utils) << "singleton: Created instance";
|
||||
|
||||
// register destruction
|
||||
std::atexit(&DestroySingleton);
|
||||
|
|
|
@ -221,9 +221,7 @@ void csv_datasource::parse_csv(T& stream,
|
|||
{
|
||||
sep = "\t";
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(csv) << "csv_datasource: auto detected tab separator";
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else // pipes
|
||||
|
@ -233,9 +231,7 @@ void csv_datasource::parse_csv(T& stream,
|
|||
{
|
||||
sep = "|";
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(csv) << "csv_datasource: auto detected '|' separator";
|
||||
#endif
|
||||
}
|
||||
else // semicolons
|
||||
{
|
||||
|
@ -244,9 +240,7 @@ void csv_datasource::parse_csv(T& stream,
|
|||
{
|
||||
sep = ";";
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(csv) << "csv_datasource: auto detected ';' separator";
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -263,9 +257,7 @@ void csv_datasource::parse_csv(T& stream,
|
|||
std::string quo = boost::trim_copy(quote);
|
||||
if (quo.empty()) quo = "\"";
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(csv) << "csv_datasource: csv grammer: sep: '" << sep << "' quo: '" << quo << "' esc: '" << esc;
|
||||
#endif
|
||||
|
||||
boost::escaped_list_separator<char> grammer;
|
||||
try
|
||||
|
@ -430,9 +422,8 @@ void csv_datasource::parse_csv(T& stream,
|
|||
{
|
||||
if ((row_limit_ > 0) && (line_number > row_limit_))
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(csv) << "csv_datasource: row limit hit, exiting at feature: " << feature_count;
|
||||
#endif
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -447,9 +438,7 @@ void csv_datasource::parse_csv(T& stream,
|
|||
{
|
||||
++line_number;
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(csv) << "csv_datasource: empty row encountered at line: " << line_number;
|
||||
#endif
|
||||
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -50,9 +50,7 @@ using mapnik::datasource_exception;
|
|||
*/
|
||||
inline GDALDataset* gdal_datasource::open_dataset() const
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_datasource: Opening " << dataset_name_;
|
||||
#endif
|
||||
|
||||
GDALDataset *dataset;
|
||||
#if GDAL_VERSION_NUM >= 1600
|
||||
|
@ -81,9 +79,7 @@ gdal_datasource::gdal_datasource(parameters const& params, bool bind)
|
|||
filter_factor_(*params_.get<double>("filter_factor", 0.0)),
|
||||
nodata_value_(params_.get<double>("nodata"))
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_datasource: Initializing...";
|
||||
#endif
|
||||
|
||||
GDALAllRegister();
|
||||
|
||||
|
@ -128,9 +124,7 @@ void gdal_datasource::bind() const
|
|||
boost::optional<std::string> bbox_s = params_.get<std::string>("bbox");
|
||||
if (bbox_s)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_datasource: BBox Parameter=" << *bbox_s;
|
||||
#endif
|
||||
|
||||
bbox_override = extent_.from_string(*bbox_s);
|
||||
if (! bbox_override)
|
||||
|
@ -153,12 +147,10 @@ void gdal_datasource::bind() const
|
|||
dataset->GetGeoTransform(tr);
|
||||
}
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_datasource Geotransform="
|
||||
<< tr[0] << "," << tr[1] << ","
|
||||
<< tr[2] << "," << tr[3] << ","
|
||||
<< tr[4] << "," << tr[5];
|
||||
#endif
|
||||
|
||||
// TODO - We should throw for true non-north up images, but the check
|
||||
// below is clearly too restrictive.
|
||||
|
@ -193,10 +185,8 @@ void gdal_datasource::bind() const
|
|||
|
||||
GDALClose(dataset);
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_datasource: Raster Size=" << width_ << "," << height_;
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_datasource: Raster Extent=" << extent_;
|
||||
#endif
|
||||
|
||||
is_bound_ = true;
|
||||
}
|
||||
|
|
|
@ -76,9 +76,7 @@ gdal_featureset::gdal_featureset(GDALDataset& dataset,
|
|||
|
||||
gdal_featureset::~gdal_featureset()
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Closing Dataset=" << &dataset_;
|
||||
#endif
|
||||
|
||||
GDALClose(&dataset_);
|
||||
}
|
||||
|
@ -89,9 +87,7 @@ feature_ptr gdal_featureset::next()
|
|||
{
|
||||
first_ = false;
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Next feature in Dataset=" << &dataset_;
|
||||
#endif
|
||||
|
||||
query *q = boost::get<query>(&gquery_);
|
||||
if (q)
|
||||
|
@ -122,7 +118,7 @@ feature_ptr gdal_featureset::get_feature(mapnik::query const& q)
|
|||
GDALRasterBand * grey = 0;
|
||||
|
||||
/*
|
||||
#ifdef MAPNIK_DEBUG
|
||||
#ifdef MAPNIK_LOG
|
||||
double tr[6];
|
||||
dataset_.GetGeoTransform(tr);
|
||||
|
||||
|
@ -188,12 +184,10 @@ feature_ptr gdal_featureset::get_feature(mapnik::query const& q)
|
|||
box2d<double> feature_raster_extent(x_off, y_off, x_off + width, y_off + height);
|
||||
intersect = t.backward(feature_raster_extent);
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Raster extent=" << raster_extent_;
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: View extent=" << intersect;
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Query resolution=" << boost::get<0>(q.resolution()) << "," << boost::get<1>(q.resolution());
|
||||
MAPNIK_LOG_DEBUG(gdal) << boost::format("gdal_featureset: StartX=%d StartY=%d Width=%d Height=%d") % x_off % y_off % width % height;
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: StartX=" << x_off << " StartY=" << y_off << " Width=" << width << " Height=" << height;
|
||||
|
||||
if (width > 0 && height > 0)
|
||||
{
|
||||
|
@ -208,9 +202,7 @@ feature_ptr gdal_featureset::get_feature(mapnik::query const& q)
|
|||
im_width *= filter_factor_;
|
||||
im_height *= filter_factor_;
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Applying layer filter_factor=" << filter_factor_;
|
||||
#endif
|
||||
}
|
||||
// otherwise respect symbolizer level factor applied to query, default of 1.0
|
||||
else
|
||||
|
@ -233,10 +225,9 @@ feature_ptr gdal_featureset::get_feature(mapnik::query const& q)
|
|||
mapnik::image_data_32 image(im_width, im_height);
|
||||
image.set(0xffffffff);
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Image Size=(" << im_width << "," << im_height << ")";
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Reading band=" << band_;
|
||||
#endif
|
||||
|
||||
typedef std::vector<int,int> pallete;
|
||||
|
||||
if (band_ > 0) // we are querying a single band
|
||||
|
@ -284,78 +275,74 @@ feature_ptr gdal_featureset::get_feature(mapnik::query const& q)
|
|||
{
|
||||
case GCI_RedBand:
|
||||
red = band;
|
||||
#ifdef MAPNIK_LOG
|
||||
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Found red band";
|
||||
#endif
|
||||
|
||||
break;
|
||||
case GCI_GreenBand:
|
||||
green = band;
|
||||
#ifdef MAPNIK_LOG
|
||||
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Found green band";
|
||||
#endif
|
||||
|
||||
break;
|
||||
case GCI_BlueBand:
|
||||
blue = band;
|
||||
#ifdef MAPNIK_LOG
|
||||
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Found blue band";
|
||||
#endif
|
||||
|
||||
break;
|
||||
case GCI_AlphaBand:
|
||||
alpha = band;
|
||||
#ifdef MAPNIK_LOG
|
||||
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Found alpha band";
|
||||
#endif
|
||||
|
||||
break;
|
||||
case GCI_GrayIndex:
|
||||
grey = band;
|
||||
#ifdef MAPNIK_LOG
|
||||
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Found gray band";
|
||||
#endif
|
||||
|
||||
break;
|
||||
case GCI_PaletteIndex:
|
||||
{
|
||||
grey = band;
|
||||
#ifdef MAPNIK_LOG
|
||||
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Found gray band, and colortable...";
|
||||
#endif
|
||||
|
||||
GDALColorTable *color_table = band->GetColorTable();
|
||||
|
||||
if (color_table)
|
||||
{
|
||||
int count = color_table->GetColorEntryCount();
|
||||
#ifdef MAPNIK_LOG
|
||||
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Color Table count=" << count;
|
||||
#endif
|
||||
|
||||
for (int j = 0; j < count; j++)
|
||||
{
|
||||
const GDALColorEntry *ce = color_table->GetColorEntry (j);
|
||||
if (! ce) continue;
|
||||
#ifdef MAPNIK_LOG
|
||||
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Color entry RGB=" << ce->c1 << "," <<ce->c2 << "," << ce->c3;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case GCI_Undefined:
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Found undefined band (assumming gray band)";
|
||||
#endif
|
||||
|
||||
grey = band;
|
||||
break;
|
||||
default:
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_WARN(gdal) << "gdal_featureset: Band type unknown!";
|
||||
#endif
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (red && green && blue)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Processing rgb bands...";
|
||||
#endif
|
||||
|
||||
int hasNoData(0);
|
||||
double nodata(0);
|
||||
if (nodata_value_)
|
||||
|
@ -406,9 +393,8 @@ feature_ptr gdal_featureset::get_feature(mapnik::query const& q)
|
|||
}
|
||||
else if (grey)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Processing gray band...";
|
||||
#endif
|
||||
|
||||
int hasNoData(0);
|
||||
double nodata(0);
|
||||
if (nodata_value_)
|
||||
|
@ -424,9 +410,8 @@ feature_ptr gdal_featureset::get_feature(mapnik::query const& q)
|
|||
|
||||
if (hasNoData && ! color_table)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: No data value for layer=" << nodata;
|
||||
#endif
|
||||
|
||||
feature->put("NODATA",nodata);
|
||||
// first read the data in and create an alpha channel from the nodata values
|
||||
float* imageData = (float*)image.getBytes();
|
||||
|
@ -458,9 +443,8 @@ feature_ptr gdal_featureset::get_feature(mapnik::query const& q)
|
|||
|
||||
if (color_table)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Loading colour table...";
|
||||
#endif
|
||||
|
||||
unsigned nodata_value = static_cast<unsigned>(nodata);
|
||||
if (hasNoData)
|
||||
{
|
||||
|
@ -498,9 +482,8 @@ feature_ptr gdal_featureset::get_feature(mapnik::query const& q)
|
|||
}
|
||||
if (alpha)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: processing alpha band...";
|
||||
#endif
|
||||
|
||||
alpha->RasterIO(GF_Read, x_off, y_off, width, height, image.getBytes() + 3,
|
||||
image.width(), image.height(), GDT_Byte, 4, 4 * image.width());
|
||||
}
|
||||
|
@ -535,10 +518,9 @@ feature_ptr gdal_featureset::get_feature_at_point(mapnik::coord2d const& pt)
|
|||
|
||||
if (x < raster_xsize && y < raster_ysize)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(gdal) << boost::format("gdal_featureset: pt.x=%f pt.y=%f") % pt.x % pt.y;
|
||||
MAPNIK_LOG_DEBUG(gdal) << boost::format("gdal_featureset: x=%f y=%f") % x % y;
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: pt.x=" << pt.x << " pt.y=" << pt.y;
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: x=" << x << " y=" << y;
|
||||
|
||||
GDALRasterBand* band = dataset_.GetRasterBand(band_);
|
||||
int hasNoData;
|
||||
double nodata = band->GetNoDataValue(&hasNoData);
|
||||
|
|
|
@ -159,9 +159,7 @@ void geos_datasource::bind() const
|
|||
mapnik::progress_timer __stats2__(std::clog, "geos_datasource::bind(initialize_extent)");
|
||||
#endif
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(geos) << "geos_datasource: Initializing extent from geometry";
|
||||
#endif
|
||||
|
||||
if (GEOSGeomTypeId(*geometry_) == GEOS_POINT)
|
||||
{
|
||||
|
@ -194,9 +192,7 @@ void geos_datasource::bind() const
|
|||
const GEOSCoordSequence* cs = GEOSGeom_getCoordSeq(exterior);
|
||||
if (cs != NULL)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(geos) << "geos_datasource: Iterating boundary points";
|
||||
#endif
|
||||
|
||||
double x, y;
|
||||
double minx = std::numeric_limits<float>::max(),
|
||||
|
@ -313,9 +309,7 @@ featureset_ptr geos_datasource::features(query const& q) const
|
|||
<< extent.minx() << " " << extent.miny()
|
||||
<< "))";
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(geos) << "geos_datasource: Using extent=" << s.str();
|
||||
#endif
|
||||
|
||||
return boost::make_shared<geos_featureset>(*geometry_,
|
||||
GEOSGeomFromWKT(s.str().c_str()),
|
||||
|
@ -336,9 +330,7 @@ featureset_ptr geos_datasource::features_at_point(coord2d const& pt) const
|
|||
std::ostringstream s;
|
||||
s << "POINT(" << pt.x << " " << pt.y << ")";
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(geos) << "geos_datasource: Using point=" << s.str();
|
||||
#endif
|
||||
|
||||
return boost::make_shared<geos_featureset>(*geometry_,
|
||||
GEOSGeomFromWKT(s.str().c_str()),
|
||||
|
|
|
@ -105,9 +105,7 @@ feature_ptr geos_featureset::next()
|
|||
break;
|
||||
|
||||
default:
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(geos) << "geos_featureset: Unknown extent geometry_type=" << type;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -156,9 +156,7 @@ featureset_ptr kismet_datasource::features(query const& q) const
|
|||
{
|
||||
if (! is_bound_) bind();
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
// MAPNIK_LOG_DEBUG(kismet) << "kismet_datasource::features()";
|
||||
#endif
|
||||
MAPNIK_LOG_INFO(kismet) << "kismet_datasource::features()";
|
||||
|
||||
// TODO: use box2d to filter bbox before adding to featureset_ptr
|
||||
// mapnik::box2d<double> const& e = q.get_bbox();
|
||||
|
@ -176,18 +174,14 @@ featureset_ptr kismet_datasource::features_at_point(coord2d const& pt) const
|
|||
{
|
||||
if (! is_bound_) bind();
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
// MAPNIK_LOG_DEBUG(kismet) << "kismet_datasource::features_at_point()";
|
||||
#endif
|
||||
MAPNIK_LOG_INFO(kismet) << "kismet_datasource::features_at_point()";
|
||||
|
||||
return featureset_ptr();
|
||||
}
|
||||
|
||||
void kismet_datasource::run(const std::string& ip_host, const unsigned int port)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(kismet) << "kismet_datasource: Enter run";
|
||||
#endif
|
||||
|
||||
int sockfd, n;
|
||||
struct sockaddr_in sock_addr;
|
||||
|
@ -252,9 +246,7 @@ void kismet_datasource::run(const std::string& ip_host, const unsigned int port)
|
|||
buffer[n] = '\0';
|
||||
std::string bufferObj(buffer); // TCP data send from kismet_server as STL string
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(kismet) << "kismet_datasource: buffer_obj=" << bufferObj;
|
||||
#endif
|
||||
|
||||
std::string::size_type found = 0;
|
||||
std::string::size_type search_start = 0;
|
||||
|
@ -266,9 +258,7 @@ void kismet_datasource::run(const std::string& ip_host, const unsigned int port)
|
|||
{
|
||||
kismet_line.assign(bufferObj, search_start, found - search_start);
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(kismet) << "kismet_datasource: line=" << kismet_line;
|
||||
#endif
|
||||
|
||||
int param_number = 5; // the number of parameters to parse
|
||||
|
||||
|
@ -281,13 +271,11 @@ void kismet_datasource::run(const std::string& ip_host, const unsigned int port)
|
|||
&bestlat,
|
||||
&bestlon) == param_number)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(kismet) << "kismet_datasource: ssid=" << ssid
|
||||
<< ", bssid=" << bssid
|
||||
<< ", crypt=" << crypt
|
||||
<< ", bestlat=" << bestlat
|
||||
<< ", bestlon=" << bestlon;
|
||||
#endif
|
||||
|
||||
kismet_network_data knd(ssid, bssid, bestlat, bestlon, crypt);
|
||||
|
||||
|
@ -319,8 +307,6 @@ void kismet_datasource::run(const std::string& ip_host, const unsigned int port)
|
|||
|
||||
close(sockfd);
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(kismet) << "kismet_datasource: Exit run";
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -203,9 +203,7 @@ void occi_datasource::bind() const
|
|||
s << " AND LOWER(column_name) = LOWER('" << geometry_field_ << "')";
|
||||
}
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(occi) << "occi_datasource: " << s.str();
|
||||
#endif
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -243,9 +241,7 @@ void occi_datasource::bind() const
|
|||
std::ostringstream s;
|
||||
s << "SELECT " << fields_ << " FROM (" << table_name_ << ") WHERE rownum < 1";
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(occi) << "occi_datasource: " << s.str();
|
||||
#endif
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -335,17 +331,13 @@ void occi_datasource::bind() const
|
|||
case oracle::occi::OCCI_SQLT_CLOB:
|
||||
case oracle::occi::OCCI_SQLT_BLOB:
|
||||
case oracle::occi::OCCI_SQLT_RSET:
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_WARN(occi) << "occi_datasource: Unsupported datatype "
|
||||
<< occi_enums::resolve_datatype(type_oid)
|
||||
<< " (type_oid=" << type_oid << ")";
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_WARN(occi) << "occi_datasource: Unknown datatype "
|
||||
<< "(type_oid=" << type_oid << ")";
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -391,9 +383,7 @@ box2d<double> occi_datasource::envelope() const
|
|||
s << " (SELECT SDO_AGGR_MBR(" << geometry_field_ << ") shape FROM " << table_ << ") a, ";
|
||||
s << " TABLE(SDO_UTIL.GETVERTICES(a.shape)) c";
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(occi) << "occi_datasource: " << s.str();
|
||||
#endif
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -439,9 +429,7 @@ box2d<double> occi_datasource::envelope() const
|
|||
s << METADATA_TABLE << " m, TABLE(m.diminfo) dim ";
|
||||
s << " WHERE LOWER(m.table_name) = LOWER('" << table_name_ << "') AND dim.sdo_dimname = 'Y'";
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(occi) << "occi_datasource: " << s.str();
|
||||
#endif
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -590,9 +578,7 @@ featureset_ptr occi_datasource::features(query const& q) const
|
|||
|
||||
s << query;
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(occi) << "occi_datasource: " << s.str();
|
||||
#endif
|
||||
|
||||
return boost::make_shared<occi_featureset>(pool_,
|
||||
conn_,
|
||||
|
@ -680,9 +666,7 @@ featureset_ptr occi_datasource::features_at_point(coord2d const& pt) const
|
|||
|
||||
s << query;
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(occi) << "occi_datasource: " << s.str();
|
||||
#endif
|
||||
|
||||
return boost::make_shared<occi_featureset>(pool_,
|
||||
conn_,
|
||||
|
|
|
@ -205,19 +205,15 @@ feature_ptr occi_featureset::next()
|
|||
case oracle::occi::OCCI_SQLT_BLOB:
|
||||
case oracle::occi::OCCI_SQLT_RSET:
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_WARN(occi) << "occi_featureset: Unsupported datatype "
|
||||
<< occi_enums::resolve_datatype(type_oid)
|
||||
<< " (type_oid=" << type_oid << ")";
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
default: // shouldn't get here
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_WARN(occi) << "occi_featureset: Unknown datatype "
|
||||
<< "(type_oid=" << type_oid << ")";
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -359,11 +355,9 @@ void occi_featureset::convert_geometry(SDOGeometry* geom, feature_ptr feature)
|
|||
case SDO_GTYPE_UNKNOWN:
|
||||
default:
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_WARN(occi) << "occi_featureset: Unknown oracle enum "
|
||||
<< occi_enums::resolve_gtype(geomtype)
|
||||
<< "(gtype=" << gtype << ")";
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -88,9 +88,7 @@ public:
|
|||
{
|
||||
if (env_ == 0)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(occi) << "occi_environment: constructor";
|
||||
#endif
|
||||
|
||||
const int mode = oracle::occi::Environment::OBJECT
|
||||
| oracle::occi::Environment::THREADED_MUTEXED;
|
||||
|
@ -112,9 +110,7 @@ private:
|
|||
{
|
||||
if (env_)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(occi) << "occi_environment: destructor";
|
||||
#endif
|
||||
|
||||
oracle::occi::Environment::terminateEnvironment(env_);
|
||||
env_ = 0;
|
||||
|
@ -164,9 +160,7 @@ public:
|
|||
{
|
||||
close_query(false);
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(occi) << "occi_connection_ptr: " << s;
|
||||
#endif
|
||||
|
||||
stmt_ = conn_->createStatement(s);
|
||||
|
||||
|
|
|
@ -70,10 +70,8 @@ void ogr_converter::convert_geometry(OGRGeometry* geom, feature_ptr feature)
|
|||
case wkbUnknown:
|
||||
default:
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_WARN(ogr) << "ogr_converter: unknown <ogr> geometry_type="
|
||||
<< wkbFlatten(geom->getGeometryType());
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -269,7 +269,6 @@ void ogr_datasource::bind() const
|
|||
indexed_ = true;
|
||||
index_file.close();
|
||||
}
|
||||
#ifdef MAPNIK_LOG
|
||||
#if 0
|
||||
// TODO - enable this warning once the ogrindex tool is a bit more stable/mature
|
||||
else
|
||||
|
@ -278,7 +277,6 @@ void ogr_datasource::bind() const
|
|||
<< ", use the 'ogrindex' program to build an index for faster rendering";
|
||||
}
|
||||
#endif
|
||||
#endif // MAPNIK_LOG
|
||||
|
||||
#ifdef MAPNIK_STATS
|
||||
mapnik::progress_timer __stats2__(std::clog, "ogr_datasource::bind(get_column_description)");
|
||||
|
@ -319,18 +317,14 @@ void ogr_datasource::bind() const
|
|||
case OFTRealList:
|
||||
case OFTStringList:
|
||||
case OFTWideStringList: // deprecated !
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_WARN(ogr) << "ogr_datasource: Unhandled type_oid=" << type_oid;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case OFTDate:
|
||||
case OFTTime:
|
||||
case OFTDateTime: // unhandled !
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_WARN(ogr) << "ogr_datasource: Unhandled type_oid=" << type_oid;
|
||||
#endif
|
||||
desc_.add_descriptor(attribute_descriptor(fld_name, mapnik::Object));
|
||||
MAPNIK_LOG_WARN(ogr) << "ogr_datasource: Unhandled type_oid=" << type_oid;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,12 +103,11 @@ feature_ptr ogr_featureset::next()
|
|||
{
|
||||
ogr_converter::convert_geometry(geom, feature);
|
||||
}
|
||||
#ifdef MAPNIK_LOG
|
||||
else
|
||||
{
|
||||
MAPNIK_LOG_DEBUG(ogr) << "ogr_featureset: Feature with null geometry=" << (*feat)->GetFID();
|
||||
}
|
||||
#endif
|
||||
|
||||
++count_;
|
||||
|
||||
int fld_count = layerdef_->GetFieldCount();
|
||||
|
@ -145,17 +144,13 @@ feature_ptr ogr_featureset::next()
|
|||
case OFTStringList:
|
||||
case OFTWideStringList: // deprecated !
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_WARN(ogr) << "ogr_featureset: Unhandled type_oid=" << type_oid;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
case OFTBinary:
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_WARN(ogr) << "ogr_featureset: Unhandled type_oid=" << type_oid;
|
||||
#endif
|
||||
//feature->put(name,feat->GetFieldAsBinary (i, size));
|
||||
break;
|
||||
}
|
||||
|
@ -164,17 +159,13 @@ feature_ptr ogr_featureset::next()
|
|||
case OFTTime:
|
||||
case OFTDateTime: // unhandled !
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_WARN(ogr) << "ogr_featureset: Unhandled type_oid=" << type_oid;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
default: // unknown
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_WARN(ogr) << "ogr_featureset: Unknown type_oid=" << type_oid;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -182,9 +173,7 @@ feature_ptr ogr_featureset::next()
|
|||
return feature;
|
||||
}
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(ogr) << "ogr_featureset: " << count_ << " features";
|
||||
#endif
|
||||
|
||||
return feature_ptr();
|
||||
}
|
||||
|
|
|
@ -76,9 +76,7 @@ ogr_index_featureset<filterT>::ogr_index_featureset(mapnik::context_ptr const &
|
|||
|
||||
std::sort(ids_.begin(),ids_.end());
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(ogr) << "ogr_index_featureset: Query size=" << ids_.size();
|
||||
#endif
|
||||
|
||||
itr_ = ids_.begin();
|
||||
|
||||
|
@ -110,12 +108,10 @@ feature_ptr ogr_index_featureset<filterT>::next()
|
|||
{
|
||||
ogr_converter::convert_geometry (geom, feature);
|
||||
}
|
||||
#ifdef MAPNIK_LOG
|
||||
else
|
||||
{
|
||||
MAPNIK_LOG_DEBUG(ogr) << "ogr_index_featureset: Feature with null geometry=" << (*feat)->GetFID();
|
||||
}
|
||||
#endif
|
||||
|
||||
int fld_count = layerdef_->GetFieldCount();
|
||||
for (int i = 0; i < fld_count; i++)
|
||||
|
@ -151,17 +147,13 @@ feature_ptr ogr_index_featureset<filterT>::next()
|
|||
case OFTStringList:
|
||||
case OFTWideStringList: // deprecated !
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_WARN(ogr) << "ogr_index_featureset: Unhandled type_oid=" << type_oid;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
case OFTBinary:
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_WARN(ogr) << "ogr_index_featureset: Unhandled type_oid=" << type_oid;
|
||||
#endif
|
||||
//feature->put(name,feat->GetFieldAsBinary (i, size));
|
||||
break;
|
||||
}
|
||||
|
@ -170,9 +162,7 @@ feature_ptr ogr_index_featureset<filterT>::next()
|
|||
case OFTTime:
|
||||
case OFTDateTime: // unhandled !
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_WARN(ogr) << "ogr_index_featureset: Unhandled type_oid=" << type_oid;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,9 +78,7 @@ public:
|
|||
layer_ = ogr_layer;
|
||||
is_valid_ = true;
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(ogr) << "ogr_layer_ptr: layer_from_name layer=" << layer_name_;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
|
@ -105,9 +103,7 @@ public:
|
|||
layer_name_ = def->GetName();
|
||||
is_valid_ = true;
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(ogr) << "ogr_layer_ptr: layer_from_index layer=" << layer_name_;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -141,9 +137,7 @@ public:
|
|||
layer_name_ = def->GetName();
|
||||
is_valid_ = true;
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(ogr) << "ogr_layer_ptr: layer_from_sql layer=" << layer_name_;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -83,9 +83,7 @@ osm_dataset* dataset_deliverer::load_from_url(const string& url, const string& b
|
|||
}
|
||||
else if (bbox != last_bbox)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_WARN(osm) << "osm_dataset_deliverer: BBoxes are different=" << last_bbox << "," << bbox;
|
||||
#endif
|
||||
|
||||
// Reload the dataset
|
||||
dataset->clear();
|
||||
|
|
|
@ -49,9 +49,7 @@ bool osm_dataset::load_from_url(const std::string& url,
|
|||
{
|
||||
if (parser == "libxml2")
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(osm) << "osm_dataset: load_from_url url=" << url << ",bbox=" << bbox;
|
||||
#endif
|
||||
|
||||
std::ostringstream str;
|
||||
// use curl to grab the data
|
||||
|
@ -59,9 +57,7 @@ bool osm_dataset::load_from_url(const std::string& url,
|
|||
|
||||
str << url << "?bbox=" << bbox;
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(osm) << "osm_dataset: Full url=" << str.str();
|
||||
#endif
|
||||
|
||||
CURL_LOAD_DATA* resp = grab_http_response(str.str().c_str());
|
||||
|
||||
|
@ -71,9 +67,7 @@ bool osm_dataset::load_from_url(const std::string& url,
|
|||
memcpy(blx, resp->data, resp->nbytes);
|
||||
blx[resp->nbytes] = '\0';
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(osm) << "osm_dataset: CURL Response=" << blx;
|
||||
#endif
|
||||
|
||||
delete[] blx;
|
||||
bool success = osmparser::parse(this, resp->data, resp->nbytes);
|
||||
|
@ -90,13 +84,9 @@ osm_dataset::~osm_dataset()
|
|||
|
||||
void osm_dataset::clear()
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(osm) << "osm_dataset: Clear";
|
||||
#endif
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(osm) << "osm_dataset: -- Deleting ways";
|
||||
#endif
|
||||
for (unsigned int count = 0; count < ways.size(); ++count)
|
||||
{
|
||||
delete ways[count];
|
||||
|
@ -104,9 +94,7 @@ void osm_dataset::clear()
|
|||
}
|
||||
ways.clear();
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(osm) << "osm_dataset: -- Deleting nodes";
|
||||
#endif
|
||||
for (unsigned int count = 0; count < nodes.size(); ++count)
|
||||
{
|
||||
delete nodes[count];
|
||||
|
@ -114,9 +102,7 @@ void osm_dataset::clear()
|
|||
}
|
||||
nodes.clear();
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(osm) << "osm_dataset: Clear done";
|
||||
#endif
|
||||
}
|
||||
|
||||
std::string osm_dataset::to_string()
|
||||
|
|
|
@ -79,9 +79,7 @@ void osm_datasource::bind() const
|
|||
if (url != "" && bbox != "")
|
||||
{
|
||||
// if we supplied a url and a bounding box, load from the url
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(osm) << "osm_datasource: loading_from_url url=" << url << ",bbox=" << bbox;
|
||||
#endif
|
||||
|
||||
if ((osm_data_ = dataset_deliverer::load_from_url(url, bbox, parser)) == NULL)
|
||||
{
|
||||
|
|
|
@ -81,9 +81,8 @@ public:
|
|||
{
|
||||
PQfinish(conn_);
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(postgis) << "postgis_connection: postgresql connection closed - " << conn_;
|
||||
#endif
|
||||
|
||||
closed_ = true;
|
||||
}
|
||||
}
|
||||
|
@ -162,9 +161,8 @@ public:
|
|||
{
|
||||
PQfinish(conn_);
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(postgis) << "postgis_connection: datasource closed, also closing connection - " << conn_;
|
||||
#endif
|
||||
|
||||
closed_ = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -88,9 +88,8 @@ public:
|
|||
std::ostringstream s;
|
||||
s << "CLOSE " << cursorName_;
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(postgis) << "postgis_cursor_resultset: " << s.str();
|
||||
#endif
|
||||
|
||||
conn_->execute(s.str());
|
||||
is_closed_ = true;
|
||||
}
|
||||
|
@ -159,15 +158,12 @@ private:
|
|||
std::ostringstream s;
|
||||
s << "FETCH FORWARD " << fetch_size_ << " FROM " << cursorName_;
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(postgis) << "postgis_cursor_resultset: " << s.str();
|
||||
#endif
|
||||
|
||||
rs_ = conn_->executeQuery(s.str());
|
||||
is_closed_ = false;
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(postgis) << "postgis_cursor_resultset: FETCH result (" << cursorName_ << "): " << rs_->size() << " rows";
|
||||
#endif
|
||||
}
|
||||
|
||||
boost::shared_ptr<Connection> conn_;
|
||||
|
|
|
@ -265,10 +265,9 @@ void postgis_datasource::bind() const
|
|||
if (key_field_string)
|
||||
{
|
||||
key_field_ = std::string(key_field_string);
|
||||
#ifdef MAPNIK_LOG
|
||||
|
||||
MAPNIK_LOG_DEBUG(postgis) << "postgis_datasource: auto-detected key field of '"
|
||||
<< key_field_ << "' on table '" << geometry_table_ << "'";
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -308,17 +307,13 @@ void postgis_datasource::bind() const
|
|||
{
|
||||
srid_ = -1;
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(postgis) << "postgis_datasource: Table " << table_ << " is using SRID=-1";
|
||||
#endif
|
||||
}
|
||||
|
||||
// At this point the geometry_field may still not be known
|
||||
// but we'll catch that where more useful...
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(postgis) << "postgis_datasource: Using SRID=" << srid_;
|
||||
MAPNIK_LOG_DEBUG(postgis) << "postgis_datasource: Using geometry_column=" << geometryColumn_;
|
||||
#endif
|
||||
|
||||
// collect attribute desc
|
||||
#ifdef MAPNIK_STATS
|
||||
|
@ -846,9 +841,7 @@ box2d<double> postgis_datasource::envelope() const
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(postgis) << boost::format("postgis_datasource: Could not determine extent from query: %s") % s.str();
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(postgis) << "postgis_datasource: Could not determine extent from query: " << s.str();
|
||||
}
|
||||
}
|
||||
rs->close();
|
||||
|
|
|
@ -198,9 +198,8 @@ feature_ptr postgis_featureset::next()
|
|||
|
||||
default:
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_WARN(postgis) << "postgis_featureset: Uknown type_oid=" << oid;
|
||||
#endif
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,9 +52,7 @@ raster_datasource::raster_datasource(const parameters& params, bool bind)
|
|||
desc_(*params.get<std::string>("type"), "utf-8"),
|
||||
extent_initialized_(false)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(raster) << "raster_datasource: Initializing...";
|
||||
#endif
|
||||
|
||||
boost::optional<std::string> file = params.get<std::string>("file");
|
||||
if (! file) throw datasource_exception("Raster Plugin: missing <file> parameter ");
|
||||
|
@ -150,9 +148,7 @@ void raster_datasource::bind() const
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(raster) << "raster_datasource: Raster size=" << width_ << "," << height_;
|
||||
#endif
|
||||
|
||||
is_bound_ = true;
|
||||
}
|
||||
|
@ -197,15 +193,11 @@ featureset_ptr raster_datasource::features(query const& q) const
|
|||
const int width = int(ext.maxx() + 0.5) - int(ext.minx() + 0.5);
|
||||
const int height = int(ext.maxy() + 0.5) - int(ext.miny() + 0.5);
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(raster) << "raster_datasource: Box size=" << width << "," << height;
|
||||
#endif
|
||||
|
||||
if (multi_tiles_)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(raster) << "raster_datasource: Multi-Tiled policy";
|
||||
#endif
|
||||
|
||||
tiled_multi_file_policy policy(filename_, format_, tile_size_, extent_, q.get_bbox(), width_, height_, tile_stride_);
|
||||
|
||||
|
@ -213,9 +205,7 @@ featureset_ptr raster_datasource::features(query const& q) const
|
|||
}
|
||||
else if (width * height > 512*512)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(raster) << "raster_datasource: Tiled policy";
|
||||
#endif
|
||||
|
||||
tiled_file_policy policy(filename_, format_, 256, extent_, q.get_bbox(), width_, height_);
|
||||
|
||||
|
@ -223,9 +213,7 @@ featureset_ptr raster_datasource::features(query const& q) const
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(raster) << "raster_datasource: Single file";
|
||||
#endif
|
||||
|
||||
raster_info info(filename_, format_, extent_, width_, height_);
|
||||
single_file_policy policy(info);
|
||||
|
@ -236,9 +224,7 @@ featureset_ptr raster_datasource::features(query const& q) const
|
|||
|
||||
featureset_ptr raster_datasource::features_at_point(coord2d const&) const
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_WARN(raster) << "raster_datasource: feature_at_point not supported";
|
||||
#endif
|
||||
|
||||
return featureset_ptr();
|
||||
}
|
||||
|
|
|
@ -70,10 +70,8 @@ feature_ptr raster_featureset<LookupPolicy>::next()
|
|||
{
|
||||
std::auto_ptr<image_reader> reader(mapnik::get_image_reader(curIter_->file(),curIter_->format()));
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(raster) << "raster_featureset: Reader=" << curIter_->format() << "," << curIter_->file()
|
||||
<< ",size(" << curIter_->width() << "," << curIter_->height() << ")";
|
||||
#endif
|
||||
|
||||
if (reader.get())
|
||||
{
|
||||
|
|
|
@ -140,9 +140,7 @@ public:
|
|||
double pixel_x = extent.width() / double(width);
|
||||
double pixel_y = extent.height() / double(height);
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(raster) << "tiled_file_policy: Raster Plugin PIXEL SIZE("<< pixel_x << "," << pixel_y << ")";
|
||||
#endif
|
||||
|
||||
box2d<double> e = bbox.intersect(extent);
|
||||
|
||||
|
@ -164,9 +162,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(raster) << "tiled_file_policy: Raster Plugin INFO SIZE=" << infos_.size() << " " << file;
|
||||
#endif
|
||||
}
|
||||
|
||||
const_iterator begin()
|
||||
|
@ -227,9 +223,7 @@ public:
|
|||
double pixel_x = extent.width() / double(width);
|
||||
double pixel_y = extent.height() / double(height);
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(raster) << "tiled_multi_file_policy: Raster Plugin PIXEL SIZE(" << pixel_x << "," << pixel_y << ")";
|
||||
#endif
|
||||
|
||||
// intersection of query with extent => new query
|
||||
box2d<double> e = bbox.intersect(extent);
|
||||
|
@ -261,9 +255,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(raster) << "tiled_multi_file_policy: Raster Plugin INFO SIZE=" << infos_.size() << " " << file_pattern;
|
||||
#endif
|
||||
}
|
||||
|
||||
const_iterator begin()
|
||||
|
|
|
@ -75,9 +75,7 @@ rasterlite_datasource::rasterlite_datasource(parameters const& params, bool bind
|
|||
: datasource(params),
|
||||
desc_(*params.get<std::string>("type"),"utf-8")
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(rasterlite) << "rasterlite_datasource: Initializing...";
|
||||
#endif
|
||||
|
||||
boost::optional<std::string> file = params.get<std::string>("file");
|
||||
if (!file) throw datasource_exception("missing <file> parameter");
|
||||
|
|
|
@ -55,9 +55,7 @@ rasterlite_featureset::rasterlite_featureset(void* dataset,
|
|||
|
||||
rasterlite_featureset::~rasterlite_featureset()
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(rasterlite) << "rasterlite_featureset: Closing";
|
||||
#endif
|
||||
|
||||
rasterliteClose(dataset_);
|
||||
}
|
||||
|
@ -88,9 +86,7 @@ feature_ptr rasterlite_featureset::next()
|
|||
|
||||
feature_ptr rasterlite_featureset::get_feature(mapnik::query const& q)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(rasterlite) << "rasterlite_featureset: Running get_feature";
|
||||
#endif
|
||||
|
||||
feature_ptr feature(feature_factory::create(ctx_,1));
|
||||
|
||||
|
@ -106,14 +102,12 @@ feature_ptr rasterlite_featureset::get_feature(mapnik::query const& q)
|
|||
const double pixel_size = (intersect.width() >= intersect.height()) ?
|
||||
(intersect.width() / (double) width) : (intersect.height() / (double) height);
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(rasterlite) << "rasterlite_featureset: Raster extent=" << raster_extent;
|
||||
MAPNIK_LOG_DEBUG(rasterlite) << "rasterlite_featureset: View extent=" << q.get_bbox();
|
||||
MAPNIK_LOG_DEBUG(rasterlite) << "rasterlite_featureset: Intersect extent=" << intersect;
|
||||
MAPNIK_LOG_DEBUG(rasterlite) << "rasterlite_featureset: Query resolution=" << boost::get<0>(q.resolution()) << "," << boost::get<1>(q.resolution());
|
||||
MAPNIK_LOG_DEBUG(rasterlite) << "rasterlite_featureset: Size=" << width << " " << height;
|
||||
MAPNIK_LOG_DEBUG(rasterlite) << "rasterlite_featureset: Pixel Size=" << pixel_size;
|
||||
#endif
|
||||
|
||||
if (width > 0 && height > 0)
|
||||
{
|
||||
|
@ -146,9 +140,7 @@ feature_ptr rasterlite_featureset::get_feature(mapnik::query const& q)
|
|||
|
||||
free (raster);
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(rasterlite) << "rasterlite_featureset: Done";
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -140,12 +140,10 @@ void shape_datasource::bind() const
|
|||
break;
|
||||
}
|
||||
default:
|
||||
#ifdef MAPNIK_LOG
|
||||
// I - long
|
||||
// G - ole
|
||||
// + - autoincrement
|
||||
MAPNIK_LOG_WARN(shape) << "shape_datasource: Unknown type=" << fd.type_;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -231,18 +229,13 @@ void shape_datasource::init(shape_io& shape) const
|
|||
//}
|
||||
//else
|
||||
//{
|
||||
// #ifdef MAPNIK_LOG
|
||||
// MAPNIK_LOG_DEBUG(shape) << "shape_datasource: No .index file found for "
|
||||
// << shape_name_ << ".shp, use the 'shapeindex' program to build an index for faster rendering";
|
||||
// #endif
|
||||
//}
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(shape) << "shape_datasource: Extent=" << extent_;
|
||||
MAPNIK_LOG_DEBUG(shape) << "shape_datasource: File length=" << file_length_;
|
||||
MAPNIK_LOG_DEBUG(shape) << "shape_datasource: Shape type=" << shape_type_;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
std::string shape_datasource::name()
|
||||
|
|
|
@ -147,9 +147,8 @@ feature_ptr shape_featureset<filterT>::next()
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(shape) << "shape_featureset: Total shapes read=" << count_;
|
||||
#endif
|
||||
|
||||
return feature_ptr();
|
||||
}
|
||||
}
|
||||
|
@ -257,9 +256,8 @@ feature_ptr shape_featureset<filterT>::next()
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(shape) << "shape_featureset: Total shapes read=" << count_;
|
||||
#endif
|
||||
|
||||
return feature_ptr();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,9 +67,7 @@ shape_index_featureset<filterT>::shape_index_featureset(filterT const& filter,
|
|||
|
||||
std::sort(ids_.begin(), ids_.end());
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(shape) << "shape_index_featureset: Query size=" << ids_.size();
|
||||
#endif
|
||||
|
||||
itr_ = ids_.begin();
|
||||
}
|
||||
|
@ -202,10 +200,8 @@ feature_ptr shape_index_featureset<filterT>::next()
|
|||
}
|
||||
else
|
||||
{
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(shape) << "shape_index_featureset: " << count_ << " features";
|
||||
#endif
|
||||
|
||||
return feature_ptr();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,9 +58,7 @@ shape_io::shape_io(const std::string& shape_name, bool open_index)
|
|||
}
|
||||
catch (...)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_WARN(shape) << "shape_io: Could not open index=" << shape_name << INDEX;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -215,9 +215,8 @@ void sqlite_datasource::bind() const
|
|||
for (std::vector<std::string>::const_iterator iter = init_statements_.begin();
|
||||
iter != init_statements_.end(); ++iter)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(sqlite) << "sqlite_datasource: Execute init sql=" << *iter;
|
||||
#endif
|
||||
|
||||
dataset_->execute(*iter);
|
||||
}
|
||||
|
||||
|
@ -613,9 +612,7 @@ featureset_ptr sqlite_datasource::features(query const& q) const
|
|||
s << " OFFSET " << row_offset_;
|
||||
}
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(sqlite) << "sqlite_datasource: " << s.str();
|
||||
#endif
|
||||
|
||||
boost::shared_ptr<sqlite_resultset> rs(dataset_->execute_query(s.str()));
|
||||
|
||||
|
@ -697,9 +694,7 @@ featureset_ptr sqlite_datasource::features_at_point(coord2d const& pt) const
|
|||
s << " OFFSET " << row_offset_;
|
||||
}
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_DEBUG(sqlite) << "sqlite_datasource: " << s.str();
|
||||
#endif
|
||||
|
||||
boost::shared_ptr<sqlite_resultset> rs(dataset_->execute_query(s.str()));
|
||||
|
||||
|
|
|
@ -125,9 +125,7 @@ feature_ptr sqlite_featureset::next()
|
|||
break;
|
||||
|
||||
default:
|
||||
#ifdef MAPNIK_LOG
|
||||
MAPNIK_LOG_WARN(sqlite) << "sqlite_featureset: Field=" << fld_name_str << " unhandled type_oid=" << type_oid;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,10 +73,6 @@
|
|||
#include <boost/math/special_functions/round.hpp>
|
||||
|
||||
// stl
|
||||
#ifdef MAPNIK_LOG
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
#include <cmath>
|
||||
|
||||
namespace mapnik
|
||||
|
@ -172,9 +168,7 @@ void agg_renderer<T>::setup(Map const &m)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "agg_renderer: Scale=" << m.scale();
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(agg_renderer) << "agg_renderer: Scale=" << m.scale();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
@ -183,28 +177,24 @@ agg_renderer<T>::~agg_renderer() {}
|
|||
template <typename T>
|
||||
void agg_renderer<T>::start_map_processing(Map const& map)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "agg_renderer: Start map processing bbox=" << map.get_current_extent();
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(agg_renderer) << "agg_renderer: Start map processing bbox=" << map.get_current_extent();
|
||||
|
||||
ras_ptr->clip_box(0,0,width_,height_);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void agg_renderer<T>::end_map_processing(Map const& )
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "agg_renderer: End map processing";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(agg_renderer) << "agg_renderer: End map processing";
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void agg_renderer<T>::start_layer_processing(layer const& lay, box2d<double> const& query_extent)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "agg_renderer: Start processing layer=" << lay.name();
|
||||
mapnik::log() << "agg_renderer: -- datasource=" << lay.datasource().get();
|
||||
mapnik::log() << "agg_renderer: -- query_extent=" << query_extent;
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(agg_renderer) << "agg_renderer: Start processing layer=" << lay.name();
|
||||
MAPNIK_LOG_DEBUG(agg_renderer) << "agg_renderer: -- datasource=" << lay.datasource().get();
|
||||
MAPNIK_LOG_DEBUG(agg_renderer) << "agg_renderer: -- query_extent=" << query_extent;
|
||||
|
||||
if (lay.clear_label_cache())
|
||||
{
|
||||
detector_->clear();
|
||||
|
@ -215,9 +205,7 @@ void agg_renderer<T>::start_layer_processing(layer const& lay, box2d<double> con
|
|||
template <typename T>
|
||||
void agg_renderer<T>::end_layer_processing(layer const&)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "agg_renderer: End layer processing";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(agg_renderer) << "agg_renderer: End layer processing";
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
|
|
@ -68,9 +68,8 @@ void agg_renderer<T>::process(line_pattern_symbolizer const& sym,
|
|||
|
||||
if (!(*mark)->is_bitmap())
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "agg_renderer: Only images (not '" << filename << "') are supported in the line_pattern_symbolizer";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(agg_renderer) << "agg_renderer: Only images (not '" << filename << "') are supported in the line_pattern_symbolizer";
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -83,9 +83,8 @@ void agg_renderer<T>::process(markers_symbolizer const& sym,
|
|||
{
|
||||
if (!(*mark)->is_vector())
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "agg_renderer: markers_symbolizer do not yet support SVG markers";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(agg_renderer) << "agg_renderer: markers_symbolizer do not yet support SVG markers";
|
||||
|
||||
return;
|
||||
}
|
||||
boost::optional<path_ptr> marker = (*mark)->get_vector_data();
|
||||
|
@ -154,9 +153,8 @@ void agg_renderer<T>::process(markers_symbolizer const& sym,
|
|||
if (writer.first)
|
||||
{
|
||||
//writer.first->add_box(label_ext, feature, t_, writer.second);
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "agg_renderer: metawriter do not yet supported for line placement";
|
||||
#endif
|
||||
|
||||
MAPNIK_LOG_DEBUG(agg_renderer) << "agg_renderer: metawriter do not yet supported for line placement";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -300,9 +298,8 @@ void agg_renderer<T>::process(markers_symbolizer const& sym,
|
|||
if (writer.first)
|
||||
{
|
||||
//writer.first->add_box(label_ext, feature, t_, writer.second);
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "agg_renderer: metawriter do not yet supported for line placement";
|
||||
#endif
|
||||
|
||||
MAPNIK_LOG_DEBUG(agg_renderer) << "agg_renderer: metawriter do not yet supported for line placement";
|
||||
}
|
||||
|
||||
agg::conv_transform<agg::path_storage, agg::trans_affine> trans(marker, matrix);
|
||||
|
|
|
@ -83,18 +83,15 @@ void agg_renderer<T>::process(polygon_pattern_symbolizer const& sym,
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "agg_renderer: File not found=" << filename;
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(agg_renderer) << "agg_renderer: File not found=" << filename;
|
||||
}
|
||||
|
||||
if (!marker) return;
|
||||
|
||||
if (!(*marker)->is_bitmap())
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "agg_renderer: Only images (not '" << filename << "') are supported in the polygon_pattern_symbolizer";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(agg_renderer) << "agg_renderer: Only images (not '" << filename << "') are supported in the polygon_pattern_symbolizer";
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -639,9 +639,7 @@ cairo_renderer_base::cairo_renderer_base(Map const& m, Cairo::RefPtr<Cairo::Cont
|
|||
face_manager_(font_engine_,font_manager_),
|
||||
detector_(box2d<double>(-m.buffer_size() ,-m.buffer_size() , m.width() + m.buffer_size() ,m.height() + m.buffer_size()))
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "cairo_renderer_base: Scale=" << m.scale();
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(cairo_renderer) << "cairo_renderer_base: Scale=" << m.scale();
|
||||
}
|
||||
|
||||
template <>
|
||||
|
@ -662,9 +660,7 @@ cairo_renderer_base::~cairo_renderer_base() {}
|
|||
|
||||
void cairo_renderer_base::start_map_processing(Map const& map)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "cairo_renderer_base: Start map processing bbox=" << map.get_current_extent();
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(cairo_renderer) << "cairo_renderer_base: Start map processing bbox=" << map.get_current_extent();
|
||||
|
||||
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 6, 0)
|
||||
box2d<double> bounds = t_.forward(t_.extent());
|
||||
|
@ -684,27 +680,23 @@ void cairo_renderer_base::start_map_processing(Map const& map)
|
|||
template <>
|
||||
void cairo_renderer<Cairo::Context>::end_map_processing(Map const& )
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "cairo_renderer_base: End map processing";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(cairo_renderer) << "cairo_renderer_base: End map processing";
|
||||
}
|
||||
|
||||
template <>
|
||||
void cairo_renderer<Cairo::Surface>::end_map_processing(Map const& )
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "cairo_renderer_base: End map processing";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(cairo_renderer) << "cairo_renderer_base: End map processing";
|
||||
|
||||
context_->show_page();
|
||||
}
|
||||
|
||||
void cairo_renderer_base::start_layer_processing(layer const& lay, box2d<double> const& query_extent)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "cairo_renderer_base: Start processing layer=" << lay.name() ;
|
||||
mapnik::log() << "cairo_renderer_base: -- datasource=" << lay.datasource().get();
|
||||
mapnik::log() << "cairo_renderer_base: -- query_extent=" << query_extent;
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(cairo_renderer) << "cairo_renderer_base: Start processing layer=" << lay.name() ;
|
||||
MAPNIK_LOG_DEBUG(cairo_renderer) << "cairo_renderer_base: -- datasource=" << lay.datasource().get();
|
||||
MAPNIK_LOG_DEBUG(cairo_renderer) << "cairo_renderer_base: -- query_extent=" << query_extent;
|
||||
|
||||
if (lay.clear_label_cache())
|
||||
{
|
||||
detector_.clear();
|
||||
|
@ -714,9 +706,7 @@ void cairo_renderer_base::start_map_processing(Map const& map)
|
|||
|
||||
void cairo_renderer_base::end_layer_processing(layer const&)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "cairo_renderer_base: End layer processing";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(cairo_renderer) << "cairo_renderer_base: End layer processing";
|
||||
}
|
||||
|
||||
void cairo_renderer_base::process(polygon_symbolizer const& sym,
|
||||
|
@ -1276,9 +1266,8 @@ void cairo_renderer_base::start_map_processing(Map const& map)
|
|||
{
|
||||
if (!(*mark)->is_vector())
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "cairo_renderer_base: markers_symbolizer does not yet support SVG markers";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(cairo_renderer) << "cairo_renderer_base: markers_symbolizer does not yet support SVG markers";
|
||||
|
||||
return;
|
||||
}
|
||||
boost::optional<path_ptr> marker = (*mark)->get_vector_data();
|
||||
|
|
|
@ -102,20 +102,19 @@ datasource_ptr datasource_cache::create(const parameters& params, bool bind)
|
|||
}
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "datasource_cache: Size=" << params.size();
|
||||
MAPNIK_LOG_DEBUG(datasource_cache) << "datasource_cache: Size=" << params.size();
|
||||
|
||||
parameters::const_iterator i = params.begin();
|
||||
for (; i != params.end(); ++i)
|
||||
{
|
||||
mapnik::log() << "datasource_cache: -- " << i->first << "=" << i->second;
|
||||
MAPNIK_LOG_DEBUG(datasource_cache) << "datasource_cache: -- " << i->first << "=" << i->second;
|
||||
}
|
||||
#endif
|
||||
|
||||
ds = datasource_ptr(create_datasource(params, bind), datasource_deleter());
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "datasource_cache: Datasource=" << ds << " type=" << type;
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(datasource_cache) << "datasource_cache: Datasource=" << ds << " type=" << type;
|
||||
|
||||
return ds;
|
||||
}
|
||||
|
||||
|
@ -180,24 +179,27 @@ void datasource_cache::register_datasources(const std::string& str)
|
|||
reinterpret_cast<datasource_name*>(lt_dlsym(module, "datasource_name"));
|
||||
if (ds_name && insert(ds_name(),module))
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "datasource_cache: Registered=" << ds_name();
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(datasource_cache) << "datasource_cache: Registered=" << ds_name();
|
||||
|
||||
registered_=true;
|
||||
}
|
||||
else if (!ds_name)
|
||||
{
|
||||
std::cerr << "Problem loading plugin library '" << itr->path().string() << "' (plugin is lacking compatible interface)" << std::endl;
|
||||
MAPNIK_LOG_ERROR(datasource_cache)
|
||||
<< "Problem loading plugin library '"
|
||||
<< itr->path().string() << "' (plugin is lacking compatible interface)";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#if (BOOST_FILESYSTEM_VERSION == 3)
|
||||
std::cerr << "Problem loading plugin library: " << itr->path().string()
|
||||
<< " (dlopen failed - plugin likely has an unsatisfied dependency or incompatible ABI)" << std::endl;
|
||||
MAPNIK_LOG_ERROR(datasource_cache)
|
||||
<< "Problem loading plugin library: " << itr->path().string()
|
||||
<< " (dlopen failed - plugin likely has an unsatisfied dependency or incompatible ABI)";
|
||||
#else // v2
|
||||
std::cerr << "Problem loading plugin library: " << itr->string()
|
||||
<< " (dlopen failed - plugin likely has an unsatisfied dependency or incompatible ABI)" << std::endl;
|
||||
MAPNIK_LOG_ERROR(datasource_cache)
|
||||
<< "Problem loading plugin library: " << itr->string()
|
||||
<< " (dlopen failed - plugin likely has an unsatisfied dependency or incompatible ABI)";
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,14 +23,46 @@
|
|||
// mapnik
|
||||
#include <mapnik/debug.hpp>
|
||||
|
||||
// stl
|
||||
#include <ctime>
|
||||
|
||||
#ifndef MAPNIK_LOG_FORMAT
|
||||
#define MAPNIK_LOG_FORMAT "Mapnik LOG> %Y-%m-%d %H:%M:%S:"
|
||||
#endif
|
||||
|
||||
namespace mapnik { namespace logger {
|
||||
|
||||
// severity
|
||||
|
||||
severity::type severity::severity_level_ =
|
||||
MAPNIK_DEBUG_AS_BOOL ? severity::debug : severity::error;
|
||||
#ifdef MAPNIK_DEBUG
|
||||
severity::debug
|
||||
#else
|
||||
severity::error
|
||||
#endif
|
||||
;
|
||||
|
||||
severity::severity_map severity::object_severity_level_ = severity::severity_map();
|
||||
|
||||
|
||||
// format
|
||||
|
||||
#define __xstr__(s) __str__(s)
|
||||
#define __str__(s) #s
|
||||
|
||||
std::string format::format_ = __xstr__(MAPNIK_LOG_FORMAT);
|
||||
|
||||
#undef __xstr__
|
||||
#undef __str__
|
||||
|
||||
std::string format::str()
|
||||
{
|
||||
char buf[256];
|
||||
const time_t tm = time(0);
|
||||
strftime(buf, sizeof(buf), format::format_.c_str(), localtime(&tm));
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -122,9 +122,7 @@ void feature_style_processor<Processor>::apply()
|
|||
}
|
||||
catch (proj_init_error& ex)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "feature_style_processor: proj_init_error=" << ex.what();
|
||||
#endif
|
||||
MAPNIK_LOG_ERROR(feature_style_processor) << "feature_style_processor: proj_init_error=" << ex.what();
|
||||
}
|
||||
|
||||
p.end_map_processing(m_);
|
||||
|
@ -154,9 +152,7 @@ void feature_style_processor<Processor>::apply(mapnik::layer const& lyr, std::se
|
|||
}
|
||||
catch (proj_init_error& ex)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "feature_style_processor: proj_init_error=" << ex.what();
|
||||
#endif
|
||||
MAPNIK_LOG_ERROR(feature_style_processor) << "feature_style_processor: proj_init_error=" << ex.what();
|
||||
}
|
||||
p.end_map_processing(m_);
|
||||
}
|
||||
|
@ -196,18 +192,16 @@ void feature_style_processor<Processor>::apply_to_layer(layer const& lay, Proces
|
|||
unsigned int num_styles = style_names.size();
|
||||
if (! num_styles)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "feature_style_processor: No style for layer=" << lay.name();
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(feature_style_processor) << "feature_style_processor: No style for layer=" << lay.name();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
mapnik::datasource_ptr ds = lay.datasource();
|
||||
if (! ds)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "feature_style_processor: No datasource for layer=" << lay.name();
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(feature_style_processor) << "feature_style_processor: No datasource for layer=" << lay.name();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -219,10 +213,12 @@ void feature_style_processor<Processor>::apply_to_layer(layer const& lay, Proces
|
|||
proj_transform prj_trans(proj0,proj1);
|
||||
|
||||
#if defined(RENDERING_STATS)
|
||||
if (!prj_trans.equal())
|
||||
if (! prj_trans.equal())
|
||||
{
|
||||
std::clog << "notice: reprojecting layer: '" << lay.name() << "' from/to:\n\t'"
|
||||
<< lay.srs() << "'\n\t'"
|
||||
<< m_.srs() << "'\n";
|
||||
}
|
||||
#endif
|
||||
|
||||
box2d<double> buffered_query_ext = m_.get_buffered_extent(); // buffered
|
||||
|
@ -255,13 +251,12 @@ void feature_style_processor<Processor>::apply_to_layer(layer const& lay, Proces
|
|||
{
|
||||
layer_ext.clip(buffered_query_ext);
|
||||
// forward project layer extent back into native projection
|
||||
if (!prj_trans.forward(layer_ext, PROJ_ENVELOPE_POINTS))
|
||||
if (! prj_trans.forward(layer_ext, PROJ_ENVELOPE_POINTS))
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "feature_style_processor: Layer=" << lay.name()
|
||||
<< " extent=" << layer_ext << " in map projection "
|
||||
<< " did not reproject properly back to layer projection";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(feature_style_processor)
|
||||
<< "feature_style_processor: Layer=" << lay.name()
|
||||
<< " extent=" << layer_ext << " in map projection "
|
||||
<< " did not reproject properly back to layer projection";
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -315,10 +310,10 @@ void feature_style_processor<Processor>::apply_to_layer(layer const& lay, Proces
|
|||
boost::optional<feature_type_style const&> style=m_.find_style(style_name);
|
||||
if (!style)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "feature_style_processor: Style=" << style_name << " required for layer="
|
||||
<< lay.name() << " does not exist.";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(feature_style_processor)
|
||||
<< "feature_style_processor: Style=" << style_name
|
||||
<< " required for layer=" << lay.name() << " does not exist.";
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -117,9 +117,7 @@ bool freetype_engine::register_font(std::string const& file_name)
|
|||
else if (face->style_name)
|
||||
s << "which reports a style name of '" << std::string(face->style_name) << "' and lacks a family name";
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "grid_renderer: " << s.str();
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(font_engine_freetype) << "freetype_engine: " << s.str();
|
||||
}
|
||||
}
|
||||
if (face)
|
||||
|
@ -332,11 +330,9 @@ box2d<double> text_renderer<T>::prepare_glyphs(text_path *path)
|
|||
|
||||
path->vertex(&c, &x, &y, &angle);
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
// TODO Enable when we have support for setting verbosity
|
||||
//mapnik::log() << "text_renderer: prepare_glyphs="
|
||||
// << c << "," << x << "," << y << "," << angle;
|
||||
#endif
|
||||
// MAPNIK_LOG_DEBUG(font_engine_freetype) << "text_renderer: prepare_glyphs="
|
||||
// << c << "," << x << "," << y << "," << angle;
|
||||
|
||||
FT_BBox glyph_bbox;
|
||||
FT_Glyph image;
|
||||
|
|
|
@ -44,13 +44,6 @@
|
|||
// agg
|
||||
#include "agg_trans_affine.h"
|
||||
|
||||
// stl
|
||||
#ifdef MAPNIK_LOG
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
//#include <cmath>
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
||||
|
@ -67,9 +60,7 @@ grid_renderer<T>::grid_renderer(Map const& m, T & pixmap, double scale_factor, u
|
|||
detector_(box2d<double>(-m.buffer_size(), -m.buffer_size(), pixmap_.width() + m.buffer_size(), pixmap_.height() + m.buffer_size())),
|
||||
ras_ptr(new grid_rasterizer)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "grid_renderer: Scale=" << m.scale();
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(grid_renderer) << "grid_renderer: Scale=" << m.scale();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
@ -78,9 +69,7 @@ grid_renderer<T>::~grid_renderer() {}
|
|||
template <typename T>
|
||||
void grid_renderer<T>::start_map_processing(Map const& m)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "grid_renderer: Start map processing bbox=" << m.get_current_extent();
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(grid_renderer) << "grid_renderer: Start map processing bbox=" << m.get_current_extent();
|
||||
|
||||
ras_ptr->clip_box(0,0,width_,height_);
|
||||
}
|
||||
|
@ -88,19 +77,15 @@ void grid_renderer<T>::start_map_processing(Map const& m)
|
|||
template <typename T>
|
||||
void grid_renderer<T>::end_map_processing(Map const& m)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "grid_renderer: End map processing";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(grid_renderer) << "grid_renderer: End map processing";
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void grid_renderer<T>::start_layer_processing(layer const& lay, box2d<double> const& query_extent)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "grid_renderer: Start processing layer=" << lay.name();
|
||||
mapnik::log() << "grid_renderer: datasource=" << lay.datasource().get();
|
||||
mapnik::log() << "grid_renderer: query_extent = " << query_extent;
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(grid_renderer) << "grid_renderer: Start processing layer=" << lay.name();
|
||||
MAPNIK_LOG_DEBUG(grid_renderer) << "grid_renderer: datasource=" << lay.datasource().get();
|
||||
MAPNIK_LOG_DEBUG(grid_renderer) << "grid_renderer: query_extent = " << query_extent;
|
||||
|
||||
if (lay.clear_label_cache())
|
||||
{
|
||||
|
@ -111,9 +96,7 @@ void grid_renderer<T>::start_layer_processing(layer const& lay, box2d<double> co
|
|||
template <typename T>
|
||||
void grid_renderer<T>::end_layer_processing(layer const&)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "grid_renderer: End layer processing";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(grid_renderer) << "grid_renderer: End layer processing";
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
|
|
@ -106,9 +106,8 @@ void grid_renderer<T>::process(markers_symbolizer const& sym,
|
|||
geometry_type & geom = feature->get_geometry(i);
|
||||
if (geom.num_points() <= 1)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "grid_renderer: markers_symbolizer points do not yet support SVG markers";
|
||||
#endif
|
||||
MAPNIK_LOG_WARN(grid_renderer) << "grid_renderer: markers_symbolizer points do not yet support SVG markers";
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,9 +32,7 @@ void grid_renderer<T>::process(raster_symbolizer const& sym,
|
|||
mapnik::feature_ptr const& feature,
|
||||
proj_transform const& prj_trans)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "grid_renderer: raster_symbolizer is not yet supported";
|
||||
#endif
|
||||
MAPNIK_LOG_WARN(grid_renderer) << "grid_renderer: raster_symbolizer is not yet supported";
|
||||
}
|
||||
|
||||
template void grid_renderer<grid>::process(raster_symbolizer const&,
|
||||
|
|
|
@ -234,9 +234,7 @@ void map_parser::parse_map(Map & map, xml_node const& pt, std::string const& bas
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "map_parser: Warning - " << s_err.str();
|
||||
#endif
|
||||
MAPNIK_LOG_WARN(load_map) << "map_parser: " << s_err.str();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -574,9 +572,7 @@ void map_parser::parse_layer(Map & map, xml_node const& lay)
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "map_parser: Warning - " << ss.str();
|
||||
#endif
|
||||
MAPNIK_LOG_WARN(load_map) << "map_parser: " << ss.str();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -818,9 +814,7 @@ void map_parser::parse_point_symbolizer(rule & rule, xml_node const & sym)
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "map_parser: Warning - " << ss;
|
||||
#endif
|
||||
MAPNIK_LOG_WARN(load_map) << "map_parser: " << ss;
|
||||
}
|
||||
}
|
||||
boost::array<double,6> matrix;
|
||||
|
@ -838,9 +832,7 @@ void map_parser::parse_point_symbolizer(rule & rule, xml_node const & sym)
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "map_parser: Warning - " << msg;
|
||||
#endif
|
||||
MAPNIK_LOG_WARN(load_map) << "map_parser: " << msg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -888,9 +880,7 @@ void map_parser::parse_markers_symbolizer(rule & rule, xml_node const& sym)
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "map_parser: Warning - " << msg;
|
||||
#endif
|
||||
MAPNIK_LOG_WARN(load_map) << "map_parser: " << msg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -919,9 +909,7 @@ void map_parser::parse_markers_symbolizer(rule & rule, xml_node const& sym)
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "map_parser: Warning - " << ss;
|
||||
#endif
|
||||
MAPNIK_LOG_WARN(load_map) << "map_parser: " << ss;
|
||||
}
|
||||
}
|
||||
boost::array<double,6> matrix;
|
||||
|
@ -1023,9 +1011,7 @@ void map_parser::parse_line_pattern_symbolizer(rule & rule, xml_node const & sym
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "map_parser: Warning - " << msg;
|
||||
#endif
|
||||
MAPNIK_LOG_WARN(load_map) << "map_parser: " << msg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1089,9 +1075,7 @@ void map_parser::parse_polygon_pattern_symbolizer(rule & rule,
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "map_parser: Warning - " << msg;
|
||||
#endif
|
||||
MAPNIK_LOG_WARN(load_map) << "map_parser: " << msg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1165,9 +1149,7 @@ void map_parser::parse_shield_symbolizer(rule & rule, xml_node const& sym)
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "map_parser: Warning - " << ss;
|
||||
#endif
|
||||
MAPNIK_LOG_WARN(load_map) << "map_parser: " << ss;
|
||||
}
|
||||
}
|
||||
boost::array<double,6> matrix;
|
||||
|
@ -1237,9 +1219,7 @@ void map_parser::parse_shield_symbolizer(rule & rule, xml_node const& sym)
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "map_parser: Warning - " << msg;
|
||||
#endif
|
||||
MAPNIK_LOG_WARN(load_map) << "map_parser: " << msg;
|
||||
}
|
||||
}
|
||||
rule.append(shield_symbol);
|
||||
|
@ -1560,11 +1540,10 @@ std::string map_parser::ensure_relative_to_xml(boost::optional<std::string> opt_
|
|||
boost::filesystem::path full = boost::filesystem::complete(xml_path.branch_path()/rel_path).normalize();
|
||||
#endif
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "map_parser: Modifying relative paths to be relative to xml...";
|
||||
mapnik::log() << "map_parser: -- Original base path=" << *opt_path;
|
||||
mapnik::log() << "map_parser: -- Relative base path=" << full.string();
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(load_map) << "map_parser: Modifying relative paths to be relative to xml...";
|
||||
MAPNIK_LOG_DEBUG(load_map) << "map_parser: -- Original base path=" << *opt_path;
|
||||
MAPNIK_LOG_DEBUG(load_map) << "map_parser: -- Relative base path=" << full.string();
|
||||
|
||||
return full.string();
|
||||
}
|
||||
}
|
||||
|
|
18
src/map.cpp
18
src/map.cpp
|
@ -415,10 +415,10 @@ void Map::zoom_all()
|
|||
if (prj_trans.backward(layer_ext, PROJ_ENVELOPE_POINTS))
|
||||
{
|
||||
success = true;
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "map: Layer " << itr->name() << " original ext=" << itr->envelope();
|
||||
mapnik::log() << "map: Layer " << itr->name() << " transformed to map srs=" << layer_ext;
|
||||
#endif
|
||||
|
||||
MAPNIK_LOG_DEBUG(map) << "map: Layer " << itr->name() << " original ext=" << itr->envelope();
|
||||
MAPNIK_LOG_DEBUG(map) << "map: Layer " << itr->name() << " transformed to map srs=" << layer_ext;
|
||||
|
||||
if (first)
|
||||
{
|
||||
ext = layer_ext;
|
||||
|
@ -586,9 +586,8 @@ featureset_ptr Map::query_point(unsigned index, double x, double y) const
|
|||
mapnik::datasource_ptr ds = layer.datasource();
|
||||
if (ds)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "map: Query at point tol=" << tol << "(" << x << "," << y << ")";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(map) << "map: Query at point tol=" << tol << "(" << x << "," << y << ")";
|
||||
|
||||
featureset_ptr fs = ds->features_at_point(mapnik::coord2d(x,y));
|
||||
if (fs)
|
||||
return boost::make_shared<filter_featureset<hit_test_filter> >(fs,
|
||||
|
@ -630,9 +629,8 @@ featureset_ptr Map::query_map_point(unsigned index, double x, double y) const
|
|||
mapnik::datasource_ptr ds = layer.datasource();
|
||||
if (ds)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "map: Query at point tol=" << tol << "(" << x << "," << y << ")";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(map) << "map: Query at point tol=" << tol << "(" << x << "," << y << ")";
|
||||
|
||||
featureset_ptr fs = ds->features_at_point(mapnik::coord2d(x,y));
|
||||
if (fs)
|
||||
return boost::make_shared<filter_featureset<hit_test_filter> >(fs,
|
||||
|
|
|
@ -88,9 +88,7 @@ featureset_ptr memory_datasource::features_at_point(coord2d const& pt) const
|
|||
{
|
||||
box2d<double> box = box2d<double>(pt.x, pt.y, pt.x, pt.y);
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "memory_datasource: Box=" << box << ", Point x=" << pt.x << ",y=" << pt.y;
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(memory_datasource) << "memory_datasource: Box=" << box << ", Point x=" << pt.x << ",y=" << pt.y;
|
||||
|
||||
return boost::make_shared<memory_featureset>(box,*this);
|
||||
}
|
||||
|
|
|
@ -89,9 +89,8 @@ metawriter_json_stream::~metawriter_json_stream()
|
|||
{
|
||||
if (count_ >= STARTED)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
std::cerr << "WARNING: GeoJSON metawriter not stopped before destroying it.";
|
||||
#endif
|
||||
MAPNIK_LOG_WARN(metawriter) << "WARNING: GeoJSON metawriter not stopped before destroying it.";
|
||||
|
||||
stop();
|
||||
}
|
||||
if (trans_) delete trans_;
|
||||
|
@ -327,9 +326,7 @@ void metawriter_json::start(metawriter_property_map const& properties)
|
|||
{
|
||||
filename_ = path_processor<metawriter_property_map>::evaluate(*fn_, properties);
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "metawriter_json: Filename=" << filename_;
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(metawriter) << "metawriter_json: Filename=" << filename_;
|
||||
|
||||
metawriter_json_stream::start(properties);
|
||||
}
|
||||
|
@ -346,14 +343,14 @@ void metawriter_json::write_header()
|
|||
void metawriter_json::stop()
|
||||
{
|
||||
metawriter_json_stream::stop();
|
||||
if (f_.is_open()) {
|
||||
if (f_.is_open())
|
||||
{
|
||||
f_.close();
|
||||
}
|
||||
#ifdef MAPNIK_LOG
|
||||
else if (count_ >= STARTED){
|
||||
mapnik::log() << "metawriter_json: File not open when stopping";
|
||||
else if (count_ >= STARTED)
|
||||
{
|
||||
MAPNIK_LOG_DEBUG(metawriter) << "metawriter_json: File not open when stopping";
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void metawriter_json::set_filename(path_expression_ptr fn)
|
||||
|
|
|
@ -534,7 +534,7 @@ void placement_finder<DetectorT>::find_line_placements(PathT & shape_path)
|
|||
#ifdef MAPNIK_LOG
|
||||
if (! line_sizes_.empty())
|
||||
{
|
||||
std::cerr << "WARNING: Internal error. Text contains line breaks, but line placement is used. Please file a bug report!\n";
|
||||
MAPNIK_LOG_WARN(placement_finder) << "Internal error. Text contains line breaks, but line placement is used. Please file a bug report!";
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -31,10 +31,6 @@ extern "C"
|
|||
#include <boost/scoped_array.hpp>
|
||||
#include <boost/utility.hpp>
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
class png_reader : public image_reader, boost::noncopyable
|
||||
|
@ -134,9 +130,7 @@ void png_reader::init()
|
|||
width_=width;
|
||||
height_=height;
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "png_reader: bit_depth=" << bit_depth_ << ",color_type=" << color_type_;
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(png_reader) << "png_reader: bit_depth=" << bit_depth_ << ",color_type=" << color_type_;
|
||||
|
||||
png_destroy_read_struct(&png_ptr,&info_ptr,0);
|
||||
fclose(fp);
|
||||
|
|
|
@ -266,19 +266,17 @@ color raster_colorizer::get_color(float value) const
|
|||
}
|
||||
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
/*
|
||||
mapnik::log() << "raster_colorizer: get_color " << value;
|
||||
mapnik::log() << "\tstopIdx: " << stopIdx;
|
||||
mapnik::log() << "\tnextStopIdx: " << nextStopIdx;
|
||||
mapnik::log() << "\tstopValue: " << stopValue;
|
||||
mapnik::log() << "\tnextStopValue: " << nextStopValue;
|
||||
mapnik::log() << "\tstopColor: " << stopColor.to_string();
|
||||
mapnik::log() << "\tnextStopColor: " << nextStopColor.to_string();
|
||||
mapnik::log() << "\tstopMode: " << stopMode.as_string();
|
||||
mapnik::log() << "\toutputColor: " << outputColor.to_string();
|
||||
MAPNIK_LOG_DEBUG(raster_colorizer) << "raster_colorizer: get_color " << value;
|
||||
MAPNIK_LOG_DEBUG(raster_colorizer) << "\tstopIdx: " << stopIdx;
|
||||
MAPNIK_LOG_DEBUG(raster_colorizer) << "\tnextStopIdx: " << nextStopIdx;
|
||||
MAPNIK_LOG_DEBUG(raster_colorizer) << "\tstopValue: " << stopValue;
|
||||
MAPNIK_LOG_DEBUG(raster_colorizer) << "\tnextStopValue: " << nextStopValue;
|
||||
MAPNIK_LOG_DEBUG(raster_colorizer) << "\tstopColor: " << stopColor.to_string();
|
||||
MAPNIK_LOG_DEBUG(raster_colorizer) << "\tnextStopColor: " << nextStopColor.to_string();
|
||||
MAPNIK_LOG_DEBUG(raster_colorizer) << "\tstopMode: " << stopMode.as_string();
|
||||
MAPNIK_LOG_DEBUG(raster_colorizer) << "\toutputColor: " << outputColor.to_string();
|
||||
*/
|
||||
#endif
|
||||
|
||||
return outputColor;
|
||||
}
|
||||
|
|
|
@ -26,9 +26,6 @@
|
|||
#include <mapnik/map.hpp>
|
||||
|
||||
// stl
|
||||
#ifdef MAPNIK_LOG
|
||||
#include <iostream>
|
||||
#endif
|
||||
#include <ostream>
|
||||
|
||||
namespace mapnik
|
||||
|
@ -49,9 +46,7 @@ svg_renderer<T>::~svg_renderer() {}
|
|||
template <typename T>
|
||||
void svg_renderer<T>::start_map_processing(Map const& map)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "svg_renderer: Start map processing";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(svg_renderer) << "svg_renderer: Start map processing";
|
||||
|
||||
// generate XML header.
|
||||
generator_.generate_header();
|
||||
|
@ -77,25 +72,19 @@ void svg_renderer<T>::end_map_processing(Map const& map)
|
|||
// generate SVG root element closing tag.
|
||||
generator_.generate_closing_root();
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "svg_renderer: End map processing";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(svg_renderer) << "svg_renderer: End map processing";
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void svg_renderer<T>::start_layer_processing(layer const& lay)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "svg_renderer: Start layer processing=" << lay.name();
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(svg_renderer) << "svg_renderer: Start layer processing=" << lay.name();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void svg_renderer<T>::end_layer_processing(layer const& lay)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "svg_renderer: End layer processing=" << lay.name();
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(svg_renderer) << "svg_renderer: End layer processing=" << lay.name();
|
||||
}
|
||||
|
||||
template class svg_renderer<std::ostream_iterator<char> >;
|
||||
|
|
|
@ -230,7 +230,7 @@ void svg_parser::start_element(xmlTextReaderPtr reader)
|
|||
#ifdef MAPNIK_LOG
|
||||
else if (!xmlStrEqual(name, BAD_CAST "svg"))
|
||||
{
|
||||
mapnik::log() << "svg_parser: Unhandled svg element=" << name;
|
||||
MAPNIK_LOG_WARN(svg_parser) << "svg_parser: Unhandled svg element=" << name;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -130,9 +130,7 @@ text_symbolizer& text_symbolizer::operator=(text_symbolizer const& other)
|
|||
return *this;
|
||||
placement_options_ = other.placement_options_; /*TODO: Copy options? */
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "text_symbolizer: TODO - Metawriter (text_symbolizer::operator=)";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(text_symbolizer) << "text_symbolizer: TODO - Metawriter (text_symbolizer::operator=)";
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
|
|
@ -166,9 +166,7 @@ void tiff_reader::read_generic(unsigned /*x*/,unsigned /*y*/,image_data_32& /*im
|
|||
TIFF* tif = load_if_exists(file_name_);
|
||||
if (tif)
|
||||
{
|
||||
#ifdef MAPNIK_LOG
|
||||
mapnik::log() << "tiff_reader: TODO - tiff is not stripped or tiled";
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(tiff_reader) << "tiff_reader: TODO - tiff is not stripped or tiled";
|
||||
|
||||
TIFFClose(tif);
|
||||
}
|
||||
|
|
|
@ -31,8 +31,6 @@
|
|||
#include <boost/utility.hpp>
|
||||
#include <boost/format.hpp>
|
||||
|
||||
// #define MAPNIK_DEBUG_WKB
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
struct wkb_reader : boost::noncopyable
|
||||
|
@ -115,9 +113,7 @@ public:
|
|||
{
|
||||
int type = read_integer();
|
||||
|
||||
#if defined(MAPNIK_LOG) && defined(MAPNIK_DEBUG_WKB)
|
||||
mapnik::log() << "wkb_reader: Read=" << wkb_geometry_type_string(type) << "," << type;
|
||||
#endif
|
||||
MAPNIK_LOG_DEBUG(wkb_reader) << "wkb_reader: Read=" << wkb_geometry_type_string(type) << "," << type;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
|
@ -405,7 +401,6 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(MAPNIK_LOG) && defined(MAPNIK_DEBUG_WKB)
|
||||
std::string wkb_geometry_type_string(int type)
|
||||
{
|
||||
std::stringstream s;
|
||||
|
@ -431,8 +426,6 @@ private:
|
|||
|
||||
return s.str();
|
||||
}
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
void geometry_utils::from_wkb (boost::ptr_vector<geometry_type>& paths,
|
||||
|
|
Loading…
Add table
Reference in a new issue