Permalink
Browse files

+ close polygon

  • Loading branch information...
artemp committed Jul 26, 2012
1 parent 1844217 commit 618bc1ba0f93dd4df89b671cb966669eefa88a96
Showing with 5 additions and 1 deletion.
  1. +5 −1 plugins/input/shape/shape_io.cpp
@@ -206,12 +206,16 @@ void shape_io::read_polygon(mapnik::geometry_container & geom)
double y = record.read_double();
poly->move_to(x, y);
- for (int j=start+1;j<end;j++)
+ for (int j=start+1;j<end-1;j++)
{
x = record.read_double();
y = record.read_double();
poly->line_to(x, y);
}
+ x = record.read_double();
+ y = record.read_double();
+ poly->close(x, y);
+
geom.push_back(poly);
}
// z-range

0 comments on commit 618bc1b

Please sign in to comment.