瀏覽代碼

build pseudo-topology for vector map from virtual mapset 'OGR'
(direct OGR read access)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@39531 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 15 年之前
父節點
當前提交
bb7317af85
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      lib/vector/Vlib/open.c

+ 10 - 0
lib/vector/Vlib/open.c

@@ -368,6 +368,16 @@ int Vect__open_old(struct Map_info *Map, const char *name, const char *mapset, c
 	    fatal_error(ferror, errmsg);
 	    return -1;
 	}
+	if (ogr_mapset && !head_only) {
+	    /* build pseudo-topology on the fly */
+	    int verbose;
+	    verbose = G_verbose();
+	    G_message(_("Building topology for OGR layer <%s> from datasource '%s'..."),
+		      Map->fInfo.ogr.layer_name, Map->fInfo.ogr.dsn);
+	    G_set_verbose(0);
+	    Vect_build(Map);
+	    G_set_verbose(verbose);
+	}
     }
     else {
 	Map->head.with_z = Map->plus.with_z;	/* take dimension from topo */