From e727fb38774ea57a9a33bdb56b8ff2ed12b4a30f Mon Sep 17 00:00:00 2001 From: artemp Date: Tue, 6 Oct 2015 16:37:54 +0100 Subject: [PATCH] =?UTF-8?q?csv.input=20-=20read=20first=20line=20of=20data?= =?UTF-8?q?=20to=20update=20descriptor=20(disk-index)=20+=20remove=20stder?= =?UTF-8?q?r=20=C2=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/input/csv/csv_datasource.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/input/csv/csv_datasource.cpp b/plugins/input/csv/csv_datasource.cpp index d90daabd1..8da469101 100644 --- a/plugins/input/csv/csv_datasource.cpp +++ b/plugins/input/csv/csv_datasource.cpp @@ -291,8 +291,6 @@ void csv_datasource::parse_csv(T & stream) } } - if (has_disk_index_) return; - std::vector boxes; while (is_first_row || csv_utils::getline_csv(stream, csv_line, newline, quote_)) { @@ -460,6 +458,8 @@ void csv_datasource::parse_csv(T & stream) MAPNIK_LOG_ERROR(csv) << s.str(); } } + // return early if *.index is present + if (has_disk_index_) return; } // bulk insert initialise r-tree tree_ = std::make_unique(boxes); @@ -542,7 +542,6 @@ boost::optional csv_datasource::get_geometry_type int multi_type = 0; for (auto const& val : positions) { - std::cerr << val.first << ":" << val.second << std::endl; stream.seekg(val.first); std::vector record; record.resize(val.second);