@@ -18,6 +18,7 @@ email : morb at ozemail dot com dot au
18
18
19
19
#include " qgis.h"
20
20
#include " qgsgeometry.h"
21
+ #include " qgslogger.h"
21
22
22
23
23
24
// Set up static GEOS geometry factory
@@ -2106,9 +2107,7 @@ bool QgsGeometry::contains(QgsPoint* p) const
2106
2107
2107
2108
bool QgsGeometry::exportToWkt (unsigned char * geom) const
2108
2109
{
2109
- #ifdef QGISDEBUG
2110
- std::cout << " QgsGeometry::exportToWkt: entered." << std::endl;
2111
- #endif
2110
+ QgsDebugMsg (" QgsGeometry::exportToWkt: entered" );
2112
2111
2113
2112
if (geom)
2114
2113
{
@@ -2133,6 +2132,7 @@ bool QgsGeometry::exportToWkt(unsigned char * geom) const
2133
2132
}
2134
2133
case QGis::WKBLineString:
2135
2134
{
2135
+ QgsDebugMsg (" QgsGeometry::exportToWkt: LINESTRING found" );
2136
2136
unsigned char *ptr;
2137
2137
int *nPoints;
2138
2138
int idx;
@@ -2161,6 +2161,7 @@ bool QgsGeometry::exportToWkt(unsigned char * geom) const
2161
2161
}
2162
2162
case QGis::WKBPolygon:
2163
2163
{
2164
+ QgsDebugMsg (" QgsGeometry::exportToWkt: POLYGON found" );
2164
2165
unsigned char *ptr;
2165
2166
int idx, jdx;
2166
2167
int *numRings, *nPoints;
@@ -2240,6 +2241,7 @@ bool QgsGeometry::exportToWkt(unsigned char * geom) const
2240
2241
2241
2242
case QGis::WKBMultiLineString:
2242
2243
{
2244
+ QgsDebugMsg (" QgsGeometry::exportToWkt: MULTILINESTRING found" );
2243
2245
unsigned char *ptr;
2244
2246
int idx, jdx, numLineStrings;
2245
2247
int *nPoints;
@@ -2279,6 +2281,7 @@ bool QgsGeometry::exportToWkt(unsigned char * geom) const
2279
2281
2280
2282
case QGis::WKBMultiPolygon:
2281
2283
{
2284
+ QgsDebugMsg (" QgsGeometry::exportToWkt: MULTIPOLYGON found" );
2282
2285
unsigned char *ptr;
2283
2286
int idx, jdx, kdx;
2284
2287
int *numPolygons, *numRings, *nPoints;
@@ -2308,6 +2311,10 @@ bool QgsGeometry::exportToWkt(unsigned char * geom) const
2308
2311
ptr += 4 ;
2309
2312
for (jdx = 0 ; jdx < *nPoints; jdx++)
2310
2313
{
2314
+ if (jdx!=0 )
2315
+ {
2316
+ mWkt +=" ," ;
2317
+ }
2311
2318
x = (double *) ptr;
2312
2319
mWkt +=QString::number (*x,' f' ,6 );
2313
2320
ptr += sizeof (double );
0 commit comments