From 79d039721afe5ea9e2c766d79554e40257e52902 Mon Sep 17 00:00:00 2001 From: Lucio Asnaghi Date: Thu, 18 Nov 2010 23:03:00 +0000 Subject: [PATCH] + rasterlite logging cosmetics --- .../rasterlite/rasterlite_datasource.cpp | 20 ++++++++-------- .../rasterlite/rasterlite_featureset.cpp | 24 +++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/plugins/input/rasterlite/rasterlite_datasource.cpp b/plugins/input/rasterlite/rasterlite_datasource.cpp index 304d79f06..dfdfcd384 100644 --- a/plugins/input/rasterlite/rasterlite_datasource.cpp +++ b/plugins/input/rasterlite/rasterlite_datasource.cpp @@ -74,7 +74,7 @@ rasterlite_datasource::rasterlite_datasource(parameters const& params, bool bind desc_(*params.get("type"),"utf-8") { #ifdef MAPNIK_DEBUG - std::clog << "\nRasterlite Plugin: Initializing...\n"; + std::clog << "Rasterlite Plugin: Initializing..." << std::endl; #endif boost::optional file = params.get("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 diff --git a/plugins/input/rasterlite/rasterlite_featureset.cpp b/plugins/input/rasterlite/rasterlite_featureset.cpp index a84e6d924..ad32b1586 100644 --- a/plugins/input/rasterlite/rasterlite_featureset.cpp +++ b/plugins/input/rasterlite/rasterlite_featureset.cpp @@ -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 } }