mapnik-index: only dump output if actually processing csv or geojson
This commit is contained in:
parent
3bb0f1748f
commit
001520aa95
1 changed files with 3 additions and 2 deletions
|
@ -147,7 +147,6 @@ int main (int argc, char** argv)
|
||||||
|
|
||||||
for (auto const& filename : files)
|
for (auto const& filename : files)
|
||||||
{
|
{
|
||||||
std::clog << "processing " << filename << std::endl;
|
|
||||||
if (!mapnik::util::exists(filename))
|
if (!mapnik::util::exists(filename))
|
||||||
{
|
{
|
||||||
std::clog << "Error : file " << filename << " does not exist" << std::endl;
|
std::clog << "Error : file " << filename << " does not exist" << std::endl;
|
||||||
|
@ -158,12 +157,14 @@ int main (int argc, char** argv)
|
||||||
mapnik::box2d<double> extent;
|
mapnik::box2d<double> extent;
|
||||||
if (mapnik::detail::is_csv(filename))
|
if (mapnik::detail::is_csv(filename))
|
||||||
{
|
{
|
||||||
|
std::clog << "processing '" << filename << "' as CSV\n";
|
||||||
auto result = mapnik::detail::process_csv_file(boxes, filename, manual_headers, separator, quote);
|
auto result = mapnik::detail::process_csv_file(boxes, filename, manual_headers, separator, quote);
|
||||||
if (!result.first) continue;
|
if (!result.first) continue;
|
||||||
extent = result.second;
|
extent = result.second;
|
||||||
}
|
}
|
||||||
else if (mapnik::detail::is_geojson(filename))
|
else if (mapnik::detail::is_geojson(filename))
|
||||||
{
|
{
|
||||||
|
std::clog << "processing '" << filename << "' as GeoJSON\n";
|
||||||
auto result = mapnik::detail::process_geojson_file(boxes, filename);
|
auto result = mapnik::detail::process_geojson_file(boxes, filename);
|
||||||
if (!result.first) continue;
|
if (!result.first) continue;
|
||||||
extent = result.second;
|
extent = result.second;
|
||||||
|
|
Loading…
Reference in a new issue