Sfoglia il codice sorgente

vlib(pg): enable attaching centroids for topo-geo-only mode

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@56454 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 12 anni fa
parent
commit
769ab40f2d
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4 4
      lib/vector/Vlib/open_pg.c

+ 4 - 4
lib/vector/Vlib/open_pg.c

@@ -1449,9 +1449,10 @@ int Vect__load_plus_pg(struct Map_info *Map, int head_only)
     }
     plus->built = GV_BUILD_ATTACH_ISLES;
     
-    /* attach centroids (disabled: centroids are already attached) */
-#if 0
-    if (plus->n_areas > 0) {
+    /* attach centroids */
+    if (pg_info->topo_geo_only && plus->n_areas > 0) {
+        int area;
+        struct P_area   *Area;
         struct P_topo_c *topo;
         
         for (line = 1; line <= plus->n_lines; line++) {
@@ -1467,7 +1468,6 @@ int Vect__load_plus_pg(struct Map_info *Map, int head_only)
             Area->centroid = Line->offset;
         }
     }
-#endif
     plus->built = GV_BUILD_CENTROIDS;
     
     /* done */