[GRASS-SVN] r39531 - grass/trunk/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Oct 16 14:08:48 EDT 2009


Author: martinl
Date: 2009-10-16 14:08:47 -0400 (Fri, 16 Oct 2009)
New Revision: 39531

Modified:
   grass/trunk/lib/vector/Vlib/open.c
Log:
build pseudo-topology for vector map from virtual mapset 'OGR'
(direct OGR read access)


Modified: grass/trunk/lib/vector/Vlib/open.c
===================================================================
--- grass/trunk/lib/vector/Vlib/open.c	2009-10-16 16:31:39 UTC (rev 39530)
+++ grass/trunk/lib/vector/Vlib/open.c	2009-10-16 18:08:47 UTC (rev 39531)
@@ -368,6 +368,16 @@
 	    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 */



More information about the grass-commit mailing list