浏览代码

d.vect: fix reading centroids from PostGIS Topology

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@58245 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 11 年之前
父节点
当前提交
6e0ff15d4b
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      display/d.vect/label.c

+ 5 - 1
display/d.vect/label.c

@@ -17,14 +17,18 @@ int display_label(struct Map_info *Map, int type,
     struct line_cats *Cats;
     int ogr_centroids;
 
+    const struct Format_info *finfo;
+    
     Points = Vect_new_line_struct();
     Cats = Vect_new_cats_struct();
 
     Vect_rewind(Map);
 
     ogr_centroids = FALSE;
+    finfo = Vect_get_finfo(Map);
     if (Vect_maptype(Map) == GV_FORMAT_OGR ||
-	Vect_maptype(Map) == GV_FORMAT_POSTGIS) {
+	(Vect_maptype(Map) == GV_FORMAT_POSTGIS &&
+         finfo->pg.toposchema_name == NULL)) {
 	if (Vect_level(Map) < 2)
 	    G_warning(_("Topology level required for drawing centroids "
 			"for OGR layers"));