[GRASS-SVN] r56399 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri May 24 05:56:51 PDT 2013
Author: martinl
Date: 2013-05-24 05:56:51 -0700 (Fri, 24 May 2013)
New Revision: 56399
Modified:
grass/trunk/lib/vector/Vlib/write_pg.c
Log:
vlib/pg: faces are exported as 3D polygons (simple features)
Modified: grass/trunk/lib/vector/Vlib/write_pg.c
===================================================================
--- grass/trunk/lib/vector/Vlib/write_pg.c 2013-05-24 12:05:12 UTC (rev 56398)
+++ grass/trunk/lib/vector/Vlib/write_pg.c 2013-05-24 12:56:51 UTC (rev 56399)
@@ -648,6 +648,9 @@
case (SF_POLYGON):
geom_type = "POLYGON";
break;
+ case (SF_POLYGON25D):
+ geom_type = "POLYGONZ";
+ break;
default:
G_warning(_("Unsupported feature type %d"), pg_info->feature_type);
Vect__execute_pg(pg_info->conn, "ROLLBACK");
@@ -906,6 +909,9 @@
case GV_BOUNDARY:
pg_info->feature_type = SF_POLYGON;
break;
+ case GV_FACE:
+ pg_info->feature_type = SF_POLYGON25D;
+ break;
default:
G_warning(_("Unsupported geometry type (%d)"), type);
return -1;
@@ -1552,7 +1558,7 @@
wkb_data = point_to_wkb(byte_order, points[0], with_z, &nbytes);
else if (type == GV_LINE)
wkb_data = linestring_to_wkb(byte_order, points[0], with_z, &nbytes);
- else if (type == GV_BOUNDARY) {
+ else if (type & (GV_BOUNDARY | GV_FACE)) {
if (!pg_info->toposchema_name) {
/* PostGIS simple feature access */
wkb_data = polygon_to_wkb(byte_order, points, nparts,
More information about the grass-commit
mailing list