geobuf.input - fix reading MultiPolygon's
This commit is contained in:
parent
6793ae5b90
commit
e7e56c984e
1 changed files with 2 additions and 7 deletions
|
@ -486,21 +486,17 @@ private:
|
||||||
mapnik::geometry::multi_polygon<double> read_multi_polygon(T & pbf, boost::optional<std::vector<int>> const& lengths)
|
mapnik::geometry::multi_polygon<double> read_multi_polygon(T & pbf, boost::optional<std::vector<int>> const& lengths)
|
||||||
{
|
{
|
||||||
mapnik::geometry::multi_polygon<double> multi_poly;
|
mapnik::geometry::multi_polygon<double> multi_poly;
|
||||||
#if 0 // FIXME
|
|
||||||
auto size = pbf.varint();
|
auto size = pbf.varint();
|
||||||
if (!lengths)
|
if (!lengths)
|
||||||
{
|
{
|
||||||
//std::unique_ptr<geometry_type> poly(new geometry_type(mapnik::geometry_type::types::Polygon));
|
auto poly = read_polygon(pbf, lengths);
|
||||||
mapnik::geometry::polygon<double> poly;
|
multi_poly.push_back(std::move(poly));
|
||||||
read_linear_ring(pbf, 0, size, poly, true);
|
|
||||||
paths.push_back(poly.release());
|
|
||||||
}
|
}
|
||||||
else if ((*lengths).size() > 0)
|
else if ((*lengths).size() > 0)
|
||||||
{
|
{
|
||||||
int j = 1;
|
int j = 1;
|
||||||
for (int i = 0; i < (*lengths)[0]; ++i)
|
for (int i = 0; i < (*lengths)[0]; ++i)
|
||||||
{
|
{
|
||||||
//std::unique_ptr<geometry_type> poly(new geometry_type(mapnik::geometry_type::types::Polygon));
|
|
||||||
mapnik::geometry::polygon<double> poly;
|
mapnik::geometry::polygon<double> poly;
|
||||||
for (int k = 0; k < (*lengths)[j]; ++k)
|
for (int k = 0; k < (*lengths)[j]; ++k)
|
||||||
{
|
{
|
||||||
|
@ -512,7 +508,6 @@ private:
|
||||||
j += (*lengths)[j] + 1;
|
j += (*lengths)[j] + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return multi_poly;
|
return multi_poly;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue