+ rasterlite logging cosmetics
This commit is contained in:
parent
cda9089ddf
commit
79d039721a
2 changed files with 22 additions and 22 deletions
|
@ -74,7 +74,7 @@ rasterlite_datasource::rasterlite_datasource(parameters const& params, bool bind
|
|||
desc_(*params.get<std::string>("type"),"utf-8")
|
||||
{
|
||||
#ifdef MAPNIK_DEBUG
|
||||
std::clog << "\nRasterlite Plugin: Initializing...\n";
|
||||
std::clog << "Rasterlite Plugin: Initializing..." << std::endl;
|
||||
#endif
|
||||
|
||||
boost::optional<std::string> file = params.get<std::string>("file");
|
||||
|
@ -136,21 +136,21 @@ void rasterlite_datasource::bind() const
|
|||
throw datasource_exception(error);
|
||||
}
|
||||
|
||||
std::clog << "Rasterlite Plugin: Data Source=" << rasterliteGetTablePrefix(dataset) << "\n";
|
||||
std::clog << "Rasterlite Plugin: SRID=" << srid << "\n";
|
||||
std::clog << "Rasterlite Plugin: Authority=" << auth_name << "\n";
|
||||
std::clog << "Rasterlite Plugin: AuthSRID=" << auth_srid << "\n";
|
||||
std::clog << "Rasterlite Plugin: RefSys Name=" << ref_sys_name << "\n";
|
||||
std::clog << "Rasterlite Plugin: Proj4Text=" << proj4text << "\n";
|
||||
std::clog << "Rasterlite Plugin: Extent(" << x0 << "," << y0 << " " << x1 << "," << y1 << ")\n";
|
||||
std::clog << "Rasterlite Plugin: Levels=" << levels << "\n";
|
||||
std::clog << "Rasterlite Plugin: Data Source=" << rasterliteGetTablePrefix(dataset) << std::endl;
|
||||
std::clog << "Rasterlite Plugin: SRID=" << srid << std::endl;
|
||||
std::clog << "Rasterlite Plugin: Authority=" << auth_name << std::endl;
|
||||
std::clog << "Rasterlite Plugin: AuthSRID=" << auth_srid << std::endl;
|
||||
std::clog << "Rasterlite Plugin: RefSys Name=" << ref_sys_name << std::endl;
|
||||
std::clog << "Rasterlite Plugin: Proj4Text=" << proj4text << std::endl;
|
||||
std::clog << "Rasterlite Plugin: Extent(" << x0 << "," << y0 << " " << x1 << "," << y1 << ")" << std::endl;
|
||||
std::clog << "Rasterlite Plugin: Levels=" << levels << std::endl;
|
||||
|
||||
for (int i = 0; i < levels; i++)
|
||||
{
|
||||
if (rasterliteGetResolution(dataset, i, &pixel_x_size, &pixel_y_size, &tile_count) == RASTERLITE_OK)
|
||||
{
|
||||
std::clog << "Rasterlite Plugin: Level=" << i
|
||||
<< " x=" << pixel_x_size << " y=" << pixel_y_size << " tiles=" << tile_count << "\n";
|
||||
<< " x=" << pixel_x_size << " y=" << pixel_y_size << " tiles=" << tile_count << std::endl;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -48,7 +48,7 @@ rasterlite_featureset::rasterlite_featureset(void* dataset, rasterlite_query q)
|
|||
rasterlite_featureset::~rasterlite_featureset()
|
||||
{
|
||||
#ifdef MAPNIK_DEBUG
|
||||
std::clog << "Rasterlite Plugin: closing dataset" << "\n";
|
||||
std::clog << "Rasterlite Plugin: closing dataset" << std::endl;
|
||||
#endif
|
||||
|
||||
rasterliteClose(dataset_);
|
||||
|
@ -77,7 +77,7 @@ feature_ptr rasterlite_featureset::next()
|
|||
feature_ptr rasterlite_featureset::get_feature(mapnik::query const& q)
|
||||
{
|
||||
#ifdef MAPNIK_DEBUG
|
||||
std::clog << "Rasterlite Plugin: get_feature" << "\n";
|
||||
std::clog << "Rasterlite Plugin: get_feature" << std::endl;
|
||||
#endif
|
||||
|
||||
feature_ptr feature(new Feature(1));
|
||||
|
@ -95,19 +95,19 @@ feature_ptr rasterlite_featureset::get_feature(mapnik::query const& q)
|
|||
(intersect.width() / (double) width) : (intersect.height() / (double) height);
|
||||
|
||||
#ifdef MAPNIK_DEBUG
|
||||
std::clog << "Rasterlite Plugin: Raster extent=" << raster_extent << "\n";
|
||||
std::clog << "Rasterlite Plugin: View extent=" << q.get_bbox() << "\n";
|
||||
std::clog << "Rasterlite Plugin: Intersect extent=" << intersect << "\n";
|
||||
std::clog << "Rasterlite Plugin: Raster extent=" << raster_extent << std::endl;
|
||||
std::clog << "Rasterlite Plugin: View extent=" << q.get_bbox() << std::endl;
|
||||
std::clog << "Rasterlite Plugin: Intersect extent=" << intersect << std::endl;
|
||||
std::clog << "Rasterlite Plugin: Query resolution=" << boost::get<0>(q.resolution())
|
||||
<< "," << boost::get<1>(q.resolution()) << "\n";
|
||||
std::clog << "Rasterlite Plugin: Size=" << width << " " << height << "\n";
|
||||
std::clog << "Rasterlite Plugin: Pixel Size=" << pixel_size << "\n";
|
||||
<< "," << boost::get<1>(q.resolution()) << std::endl;
|
||||
std::clog << "Rasterlite Plugin: Size=" << width << " " << height << std::endl;
|
||||
std::clog << "Rasterlite Plugin: Pixel Size=" << pixel_size << std::endl;
|
||||
#endif
|
||||
|
||||
if (width > 0 && height > 0)
|
||||
{
|
||||
int size;
|
||||
void *raster;
|
||||
int size = 0;
|
||||
void *raster = 0;
|
||||
|
||||
if (rasterliteGetRawImageByRect(dataset_,
|
||||
intersect.minx(), intersect.miny(), intersect.maxx(), intersect.maxy(),
|
||||
|
@ -128,13 +128,13 @@ feature_ptr rasterlite_featureset::get_feature(mapnik::query const& q)
|
|||
free (raster);
|
||||
|
||||
#ifdef MAPNIK_DEBUG
|
||||
std::clog << "Rasterlite Plugin: Done" << "\n";
|
||||
std::clog << "Rasterlite Plugin: done" << std::endl;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_DEBUG
|
||||
std::clog << "Rasterlite Plugin: Error=" << rasterliteGetLastError (dataset_) << "\n";
|
||||
std::clog << "Rasterlite Plugin: error=" << rasterliteGetLastError (dataset_) << std::endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue