[GRASS-SVN] r58245 - grass/trunk/display/d.vect
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Nov 17 09:58:15 PST 2013
Author: martinl
Date: 2013-11-17 09:58:14 -0800 (Sun, 17 Nov 2013)
New Revision: 58245
Modified:
grass/trunk/display/d.vect/label.c
Log:
d.vect: fix reading centroids from PostGIS Topology
Modified: grass/trunk/display/d.vect/label.c
===================================================================
--- grass/trunk/display/d.vect/label.c 2013-11-17 11:10:30 UTC (rev 58244)
+++ grass/trunk/display/d.vect/label.c 2013-11-17 17:58:14 UTC (rev 58245)
@@ -17,14 +17,18 @@
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"));
More information about the grass-commit
mailing list