diff --git a/src/Lib/Polygon/polygon.cxx b/src/Lib/Polygon/polygon.cxx index 33488bda..95091a1b 100644 --- a/src/Lib/Polygon/polygon.cxx +++ b/src/Lib/Polygon/polygon.cxx @@ -273,8 +273,10 @@ void TGPolygon::shift( double lon, double lat ) { // output void TGPolygon::write( const string& file ) const { FILE *fp = fopen( file.c_str(), "w" ); - + + fprintf(fp, "%d\n", poly.size()); for ( int i = 0; i < (int)poly.size(); ++i ) { + fprintf(fp, "%d\n", poly[i].size()); for ( int j = 0; j < (int)poly[i].size(); ++j ) { fprintf(fp, "%.6f %.6f\n", poly[i][j].x(), poly[i][j].y()); }