ソースを参照

v.in.ogr: prune input

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@55284 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 12 年 前
コミット
287689b6b6
1 ファイル変更3 行追加0 行削除
  1. 3 0
      vector/v.in.ogr/geom.c

+ 3 - 0
vector/v.in.ogr/geom.c

@@ -276,6 +276,7 @@ geom(OGRGeometryH hGeom, struct Map_info *Map, int field, int cat,
 	    Vect_append_point(Points, OGR_G_GetX(hGeom, i),
 	    Vect_append_point(Points, OGR_G_GetX(hGeom, i),
 			      OGR_G_GetY(hGeom, i), OGR_G_GetZ(hGeom, i));
 			      OGR_G_GetY(hGeom, i), OGR_G_GetZ(hGeom, i));
 	}
 	}
+	Vect_line_prune(Points);
 	if (type & GV_BOUNDARY)
 	if (type & GV_BOUNDARY)
 	    otype = GV_BOUNDARY;
 	    otype = GV_BOUNDARY;
 	else
 	else
@@ -308,6 +309,7 @@ geom(OGRGeometryH hGeom, struct Map_info *Map, int field, int cat,
 	    Vect_append_point(Points, OGR_G_GetX(hRing, j),
 	    Vect_append_point(Points, OGR_G_GetX(hRing, j),
 			      OGR_G_GetY(hRing, j), OGR_G_GetZ(hRing, j));
 			      OGR_G_GetY(hRing, j), OGR_G_GetZ(hRing, j));
 	}
 	}
+	Vect_line_prune(Points);
 
 
 	/* Degenerate is not ignored because it may be useful to see where it is,
 	/* Degenerate is not ignored because it may be useful to see where it is,
 	 * but may be eliminated by min_area option */
 	 * but may be eliminated by min_area option */
@@ -353,6 +355,7 @@ geom(OGRGeometryH hGeom, struct Map_info *Map, int field, int cat,
 				      OGR_G_GetY(hRing, j),
 				      OGR_G_GetY(hRing, j),
 				      OGR_G_GetZ(hRing, j));
 				      OGR_G_GetZ(hRing, j));
 		}
 		}
+		Vect_line_prune(IPoints[valid_isles]);
 
 
 		if (IPoints[valid_isles]->n_points < 4)
 		if (IPoints[valid_isles]->n_points < 4)
 		    G_warning(_("Degenerate island ([%d] vertices)"),
 		    G_warning(_("Degenerate island ([%d] vertices)"),