geojson parser : only close path if we have at least 3 vertices
This commit is contained in:
parent
a6a4448e3d
commit
5eb406c7df
1 changed files with 4 additions and 1 deletions
|
@ -58,7 +58,10 @@ struct close_path
|
|||
result_type operator() (T path) const
|
||||
{
|
||||
BOOST_ASSERT( path!=0 );
|
||||
path->close_path();
|
||||
if (path->size() > 2u) // to form a polygon ring we need at least 3 vertices
|
||||
{
|
||||
path->close_path();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue