Skip to content

Commit

Permalink
Add reverse option to constructor of Polygon class
Browse files Browse the repository at this point in the history
  • Loading branch information
joto committed Mar 7, 2012
1 parent d6ff7c2 commit 9ad2fca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/osmium/geometry/polygon.hpp
Expand Up @@ -22,6 +22,7 @@ You should have received a copy of the Licenses along with Osmium. If not, see
*/

#include <iomanip>
#include <algorithm>

#include <osmium/geometry/from_way.hpp>
Expand All @@ -42,8 +43,9 @@ namespace Osmium {
* Create Polygon geometry from a list of nodes.
*/
Polygon(const Osmium::OSM::WayNodeList& way_node_list,
bool reverse=false,
osm_object_id_t id=0)
: FromWay(way_node_list, false, id) {
: FromWay(way_node_list, reverse, id) {
if (!way_node_list.is_closed()) {
throw Osmium::Exception::IllegalGeometry();
}
Expand Down

0 comments on commit 9ad2fca

Please sign in to comment.