[geos-commits] r2946 - in trunk: . capi

svn_geos at osgeo.org svn_geos at osgeo.org
Fri Mar 19 11:14:00 EDT 2010


Author: strk
Date: 2010-03-19 11:13:59 -0400 (Fri, 19 Mar 2010)
New Revision: 2946

Modified:
   trunk/NEWS
   trunk/capi/geos_ts_c.cpp
Log:
Improve formatting for GEOSisValidReason_r (#329)


Modified: trunk/NEWS
===================================================================
--- trunk/NEWS	2010-03-19 15:09:52 UTC (rev 2945)
+++ trunk/NEWS	2010-03-19 15:13:59 UTC (rev 2946)
@@ -17,6 +17,7 @@
     ownership of vector elements
 - Bug fixes:
   - Invalid compound geometries reported as valid (#333)
+  - Return up to 15 digits of precision from GEOSisValidReason_t (#329)
 
 Changes in 3.2.0 
 

Modified: trunk/capi/geos_ts_c.cpp
===================================================================
--- trunk/capi/geos_ts_c.cpp	2010-03-19 15:09:52 UTC (rev 2945)
+++ trunk/capi/geos_ts_c.cpp	2010-03-19 15:13:59 UTC (rev 2946)
@@ -639,7 +639,10 @@
         TopologyValidationError *err = ivo.getValidationError();
         if (0 != err)
         {
-            const std::string errloc = err->getCoordinate().toString();
+            std::ostringstream ss;
+            ss.precision(15);
+            ss << err->getCoordinate();
+            const std::string errloc = ss.str();
             std::string errmsg(err->getMessage());
             errmsg += "[" + errloc + "]";
             result = gstrdup(errmsg);



More information about the geos-commits mailing list