[GRASS-SVN] r62360 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Oct 22 09:03:22 PDT 2014
Author: martinl
Date: 2014-10-22 09:03:22 -0700 (Wed, 22 Oct 2014)
New Revision: 62360
Modified:
grass/trunk/lib/vector/Vlib/write_pg.c
Log:
fix #2436 (v.out.postgis: Unsupported geometry type / Unable to write feature in vector map)
Modified: grass/trunk/lib/vector/Vlib/write_pg.c
===================================================================
--- grass/trunk/lib/vector/Vlib/write_pg.c 2014-10-22 14:25:51 UTC (rev 62359)
+++ grass/trunk/lib/vector/Vlib/write_pg.c 2014-10-22 16:03:22 UTC (rev 62360)
@@ -1081,6 +1081,7 @@
pg_info->feature_type = SF_LINESTRING;
break;
case GV_BOUNDARY:
+ case GV_AREA:
pg_info->feature_type = SF_POLYGON;
break;
case GV_FACE:
@@ -1215,8 +1216,13 @@
/* get category & check for attributes */
cat = -1;
if (cats->n_cats > 0) {
- int field = pg_info->fi->number;
+ int field;
+ if (pg_info->fi)
+ field = pg_info->fi->number;
+ else
+ field = 1;
+
if (!Vect_cat_get(cats, field, &cat))
G_warning(_("No category defined for layer %d"), field);
if (cats->n_cats > 1) {
More information about the grass-commit
mailing list