Commit staged changes

This commit is contained in:
Artem Pavlenko 2024-10-29 10:19:22 +00:00
parent cd082c5872
commit 92b1ea9ceb
11 changed files with 19 additions and 19 deletions

View file

@ -436,7 +436,7 @@ mapnik::featureset_ptr csv_datasource::features(mapnik::query const& q) const
ctx_);
}
}
return mapnik::make_invalid_featureset();
return mapnik::make_empty_featureset();
}
mapnik::featureset_ptr csv_datasource::features_at_point(mapnik::coord2d const& pt, double tol) const

View file

@ -595,7 +595,7 @@ mapnik::featureset_ptr geojson_datasource::features(mapnik::query const& q) cons
}
}
// otherwise return an empty featureset
return mapnik::make_invalid_featureset();
return mapnik::make_empty_featureset();
}
mapnik::featureset_ptr geojson_datasource::features_at_point(mapnik::coord2d const& pt, double tol) const

View file

@ -558,7 +558,7 @@ featureset_ptr ogr_datasource::features(query const& q) const
}
}
return mapnik::make_invalid_featureset();
return mapnik::make_empty_featureset();
}
featureset_ptr ogr_datasource::features_at_point(coord2d const& pt, double tol) const
@ -595,5 +595,5 @@ featureset_ptr ogr_datasource::features_at_point(coord2d const& pt, double tol)
}
}
return mapnik::make_invalid_featureset();
return mapnik::make_empty_featureset();
}

View file

@ -959,7 +959,7 @@ featureset_ptr pgraster_datasource::features_with_context(query const& q, proces
);
}
return mapnik::make_invalid_featureset();
return mapnik::make_empty_featureset();
}
featureset_ptr pgraster_datasource::features_at_point(coord2d const& pt, double tol) const
@ -972,7 +972,7 @@ featureset_ptr pgraster_datasource::features_at_point(coord2d const& pt, double
{
shared_ptr<Connection> conn = pool->borrowObject();
if (!conn)
return mapnik::make_invalid_featureset();
return mapnik::make_empty_featureset();
if (conn->isOK())
{
@ -1042,7 +1042,7 @@ featureset_ptr pgraster_datasource::features_at_point(coord2d const& pt, double
}
}
return mapnik::make_invalid_featureset();
return mapnik::make_empty_featureset();
}
box2d<double> pgraster_datasource::envelope() const

View file

@ -890,7 +890,7 @@ featureset_ptr postgis_datasource::features_with_context(query const& q, process
twkb_encoding_);
}
return mapnik::make_invalid_featureset();
return mapnik::make_empty_featureset();
}
featureset_ptr postgis_datasource::features_at_point(coord2d const& pt, double tol) const
@ -903,7 +903,7 @@ featureset_ptr postgis_datasource::features_at_point(coord2d const& pt, double t
{
shared_ptr<Connection> conn = pool->borrowObject();
if (!conn)
return mapnik::make_invalid_featureset();
return mapnik::make_empty_featureset();
if (conn->isOK())
{
@ -973,7 +973,7 @@ featureset_ptr postgis_datasource::features_at_point(coord2d const& pt, double t
}
}
return mapnik::make_invalid_featureset();
return mapnik::make_empty_featureset();
}
box2d<double> postgis_datasource::envelope() const

View file

@ -227,5 +227,5 @@ featureset_ptr raster_datasource::features_at_point(coord2d const&, double tol)
{
MAPNIK_LOG_WARN(raster) << "raster_datasource: feature_at_point not supported";
return mapnik::make_invalid_featureset();
return mapnik::make_empty_featureset();
}

View file

@ -561,7 +561,7 @@ featureset_ptr sqlite_datasource::features(query const& q) const
using_subquery_);
}
return mapnik::make_invalid_featureset();
return mapnik::make_empty_featureset();
}
featureset_ptr sqlite_datasource::features_at_point(coord2d const& pt, double tol) const
@ -640,5 +640,5 @@ featureset_ptr sqlite_datasource::features_at_point(coord2d const& pt, double to
using_subquery_);
}
return mapnik::make_invalid_featureset();
return mapnik::make_empty_featureset();
}

View file

@ -277,7 +277,7 @@ mapnik::featureset_ptr topojson_datasource::features(mapnik::query const& q) con
}
}
// otherwise return an empty featureset pointer
return mapnik::make_invalid_featureset();
return mapnik::make_empty_featureset();
}
mapnik::featureset_ptr topojson_datasource::features_at_point(mapnik::coord2d const& pt, double tol) const

View file

@ -738,7 +738,7 @@ featureset_ptr Map::query_point(unsigned index, double x, double y) const
s << " (map has no layers)";
throw std::out_of_range(s.str());
}
return mapnik::make_invalid_featureset();
return mapnik::make_empty_featureset();
}
featureset_ptr Map::query_map_point(unsigned index, double x, double y) const

View file

@ -125,7 +125,7 @@ featureset_ptr memory_datasource::features(const query& q) const
{
if (features_.empty())
{
return mapnik::make_invalid_featureset();
return mapnik::make_empty_featureset();
}
return std::make_shared<memory_featureset>(q.get_bbox(), *this, bbox_check_);
}
@ -134,7 +134,7 @@ featureset_ptr memory_datasource::features_at_point(coord2d const& pt, double to
{
if (features_.empty())
{
return mapnik::make_invalid_featureset();
return mapnik::make_empty_featureset();
}
box2d<double> box = box2d<double>(pt.x, pt.y, pt.x, pt.y);
box.pad(tol);

View file

@ -7,7 +7,7 @@
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
i * version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -36,7 +36,7 @@ TEST_CASE("memory datasource")
mapnik::datasource_ptr ds = std::make_shared<mapnik::memory_datasource>(params);
CHECK(ds != nullptr);
auto fs = all_features(ds);
REQUIRE(!mapnik::is_valid(fs));
REQUIRE(mapnik::is_empty(fs));
while (auto f = fs->next())
{
CHECK(false); // shouldn't get here