Changeset: 435860efb8ed for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=435860efb8ed
Modified Files:
        geom/monetdb5/geom.c
        geom/sql/conformance/Tests/T13.stable.out
        geom/sql/conformance/Tests/T14.stable.out
        geom/sql/conformance/Tests/T17.stable.out
        geom/sql/conformance/Tests/T18.stable.out
        geom/sql/conformance/Tests/T23.stable.out
        geom/sql/conformance/Tests/T24.stable.out
        geom/sql/conformance/Tests/T27.stable.out
        geom/sql/conformance/Tests/T29.stable.out
        geom/sql/conformance/Tests/T31.stable.out
        geom/sql/conformance/Tests/T34.stable.out
        geom/sql/conformance/Tests/T47.stable.out
        geom/sql/conformance/Tests/T48.stable.out
        geom/sql/conformance/Tests/T49.stable.out
        geom/sql/conformance/Tests/T50.stable.out
        geom/sql/conformance/Tests/T52.stable.out
        geom/sql/conformance/Tests/T8.stable.out
        geom/sql/functions/Tests/ST_AsEWKT.stable.out
        geom/sql/functions/Tests/ST_AsText.stable.out
        geom/sql/functions/Tests/ST_NumPoints.stable.err
        geom/sql/pg_regression/Tests/boundary.stable.out
        geom/sql/pg_regression/Tests/delaunaytriangles.stable.out
        sql/test/pg_regress/Tests/path.stable.out
        sql/test/pg_regress/Tests/point.stable.out
        sql/test/pg_regress/Tests/polygon.stable.out
Branch: default
Log Message:

Trim useless decimals from geometry strings.


diffs (truncated from 1180 to 300 lines):

diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -4922,6 +4922,7 @@ int wkbTOSTR(char **geomWKT, int* len, w
                //set the number of dimensions in the writer so that it can
                //read correctly the geometry coordinates
                GEOSWKTWriter_setOutputDimension(WKT_wr, 
GEOSGeom_getCoordinateDimension(geosGeometry));
+               GEOSWKTWriter_setTrim(WKT_wr, 1);
                wkt = GEOSWKTWriter_write(WKT_wr, geosGeometry);
                l = strlen(wkt);
                assert(l < GDK_int_max);
diff --git a/geom/sql/conformance/Tests/T13.stable.out 
b/geom/sql/conformance/Tests/T13.stable.out
--- a/geom/sql/conformance/Tests/T13.stable.out
+++ b/geom/sql/conformance/Tests/T13.stable.out
@@ -29,8 +29,8 @@ Ready.
 % sys.L # table_name
 % st_boundary_boundary # name
 % clob # type
-% 218 # length
-[ "\"LINESTRING (67.0000000000000000 13.0000000000000000, 67.0000000000000000 
18.0000000000000000, 59.0000000000000000 18.0000000000000000, 
59.0000000000000000 13.0000000000000000, 67.0000000000000000 
13.0000000000000000)\""       ]
+% 48 # length
+[ "\"LINESTRING (67 13, 67 18, 59 18, 59 13, 67 13)\"" ]
 
 # 14:23:22 >  
 # 14:23:22 >  "Done."
diff --git a/geom/sql/conformance/Tests/T14.stable.out 
b/geom/sql/conformance/Tests/T14.stable.out
--- a/geom/sql/conformance/Tests/T14.stable.out
+++ b/geom/sql/conformance/Tests/T14.stable.out
@@ -29,8 +29,8 @@ Ready.
 % sys.L # table_name
 % st_envelope_boundary # name
 % clob # type
-% 217 # length
-[ "\"POLYGON ((59.0000000000000000 13.0000000000000000, 67.0000000000000000 
13.0000000000000000, 67.0000000000000000 18.0000000000000000, 
59.0000000000000000 18.0000000000000000, 59.0000000000000000 
13.0000000000000000))\""        ]
+% 47 # length
+[ "\"POLYGON ((59 13, 67 13, 67 18, 59 18, 59 13))\""  ]
 
 # 14:23:22 >  
 # 14:23:22 >  "Done."
diff --git a/geom/sql/conformance/Tests/T17.stable.out 
b/geom/sql/conformance/Tests/T17.stable.out
--- a/geom/sql/conformance/Tests/T17.stable.out
+++ b/geom/sql/conformance/Tests/T17.stable.out
@@ -29,8 +29,8 @@ Ready.
 % sys.L # table_name
 % st_startpoint_centerline # name
 % clob # type
-% 48 # length
-[ "\"POINT (0.0000000000000000 18.0000000000000000)\"" ]
+% 14 # length
+[ "\"POINT (0 18)\""   ]
 
 # 14:23:23 >  
 # 14:23:23 >  "Done."
diff --git a/geom/sql/conformance/Tests/T18.stable.out 
b/geom/sql/conformance/Tests/T18.stable.out
--- a/geom/sql/conformance/Tests/T18.stable.out
+++ b/geom/sql/conformance/Tests/T18.stable.out
@@ -29,8 +29,8 @@ Ready.
 % sys.L # table_name
 % st_endpoint_centerline # name
 % clob # type
-% 49 # length
-[ "\"POINT (44.0000000000000000 31.0000000000000000)\""        ]
+% 15 # length
+[ "\"POINT (44 31)\""  ]
 
 # 14:23:23 >  
 # 14:23:23 >  "Done."
diff --git a/geom/sql/conformance/Tests/T23.stable.out 
b/geom/sql/conformance/Tests/T23.stable.out
--- a/geom/sql/conformance/Tests/T23.stable.out
+++ b/geom/sql/conformance/Tests/T23.stable.out
@@ -29,8 +29,8 @@ Ready.
 % sys.L # table_name
 % st_pointn_centerline # name
 % clob # type
-% 49 # length
-[ "\"POINT (10.0000000000000000 21.0000000000000000)\""        ]
+% 15 # length
+[ "\"POINT (10 21)\""  ]
 
 # 14:52:43 >  
 # 14:52:43 >  "Done."
diff --git a/geom/sql/conformance/Tests/T24.stable.out 
b/geom/sql/conformance/Tests/T24.stable.out
--- a/geom/sql/conformance/Tests/T24.stable.out
+++ b/geom/sql/conformance/Tests/T24.stable.out
@@ -29,8 +29,8 @@ Ready.
 % sys.L # table_name
 % st_centroid_boundary # name
 % clob # type
-% 49 # length
-[ "\"POINT (63.0000000000000000 15.5000000000000000)\""        ]
+% 17 # length
+[ "\"POINT (63 15.5)\""        ]
 
 # 14:52:43 >  
 # 14:52:43 >  "Done."
diff --git a/geom/sql/conformance/Tests/T27.stable.out 
b/geom/sql/conformance/Tests/T27.stable.out
--- a/geom/sql/conformance/Tests/T27.stable.out
+++ b/geom/sql/conformance/Tests/T27.stable.out
@@ -29,8 +29,8 @@ Ready.
 % sys.L # table_name
 % st_exteriorring_shore # name
 % clob # type
-% 216 # length
-[ "\"LINESTRING (52.0000000000000000 18.0000000000000000, 66.0000000000000000 
23.0000000000000000, 73.0000000000000000 9.0000000000000000, 
48.0000000000000000 6.0000000000000000, 52.0000000000000000 
18.0000000000000000)\"" ]
+% 46 # length
+[ "\"LINESTRING (52 18, 66 23, 73 9, 48 6, 52 18)\""   ]
 
 # 14:52:44 >  
 # 14:52:44 >  "Done."
diff --git a/geom/sql/conformance/Tests/T29.stable.out 
b/geom/sql/conformance/Tests/T29.stable.out
--- a/geom/sql/conformance/Tests/T29.stable.out
+++ b/geom/sql/conformance/Tests/T29.stable.out
@@ -29,8 +29,8 @@ Ready.
 % sys.L # table_name
 % st_interiorringn_shore # name
 % clob # type
-% 218 # length
-[ "\"LINESTRING (59.0000000000000000 18.0000000000000000, 67.0000000000000000 
18.0000000000000000, 67.0000000000000000 13.0000000000000000, 
59.0000000000000000 13.0000000000000000, 59.0000000000000000 
18.0000000000000000)\""       ]
+% 48 # length
+[ "\"LINESTRING (59 18, 67 18, 67 13, 59 13, 59 18)\"" ]
 
 # 14:52:45 >  
 # 14:52:45 >  "Done."
diff --git a/geom/sql/conformance/Tests/T31.stable.out 
b/geom/sql/conformance/Tests/T31.stable.out
--- a/geom/sql/conformance/Tests/T31.stable.out
+++ b/geom/sql/conformance/Tests/T31.stable.out
@@ -29,8 +29,8 @@ Ready.
 % sys.L # table_name
 % st_geometryn_centerlines # name
 % clob # type
-% 135 # length
-[ "\"LINESTRING (16.0000000000000000 0.0000000000000000, 16.0000000000000000 
23.0000000000000000, 16.0000000000000000 48.0000000000000000)\""  ]
+% 33 # length
+[ "\"LINESTRING (16 0, 16 23, 16 48)\""        ]
 
 # 15:05:52 >  
 # 15:05:52 >  "Done."
diff --git a/geom/sql/conformance/Tests/T34.stable.out 
b/geom/sql/conformance/Tests/T34.stable.out
--- a/geom/sql/conformance/Tests/T34.stable.out
+++ b/geom/sql/conformance/Tests/T34.stable.out
@@ -29,8 +29,8 @@ Ready.
 % sys.L # table_name
 % st_centroid_shores # name
 % clob # type
-% 49 # length
-[ "\"POINT (25.0000000000000000 42.0000000000000000)\""        ]
+% 15 # length
+[ "\"POINT (25 42)\""  ]
 
 # 15:05:53 >  
 # 15:05:53 >  "Done."
diff --git a/geom/sql/conformance/Tests/T47.stable.out 
b/geom/sql/conformance/Tests/T47.stable.out
--- a/geom/sql/conformance/Tests/T47.stable.out
+++ b/geom/sql/conformance/Tests/T47.stable.out
@@ -29,8 +29,8 @@ Ready.
 % sys.L # table_name
 % st_intersection_centerline # name
 % clob # type
-% 49 # length
-[ "\"POINT (52.0000000000000000 18.0000000000000000)\""        ]
+% 15 # length
+[ "\"POINT (52 18)\""  ]
 
 # 15:15:54 >  
 # 15:15:54 >  "Done."
diff --git a/geom/sql/conformance/Tests/T48.stable.out 
b/geom/sql/conformance/Tests/T48.stable.out
--- a/geom/sql/conformance/Tests/T48.stable.out
+++ b/geom/sql/conformance/Tests/T48.stable.out
@@ -29,8 +29,8 @@ Ready.
 % sys.L # table_name
 % st_difference_boundary # name
 % clob # type
-% 217 # length
-[ "\"POLYGON ((62.0000000000000000 48.0000000000000000, 84.0000000000000000 
48.0000000000000000, 84.0000000000000000 42.0000000000000000, 
56.0000000000000000 34.0000000000000000, 62.0000000000000000 
48.0000000000000000))\""        ]
+% 47 # length
+[ "\"POLYGON ((62 48, 84 48, 84 42, 56 34, 62 48))\""  ]
 
 # 15:15:54 >  
 # 15:15:54 >  "Done."
diff --git a/geom/sql/conformance/Tests/T49.stable.out 
b/geom/sql/conformance/Tests/T49.stable.out
--- a/geom/sql/conformance/Tests/T49.stable.out
+++ b/geom/sql/conformance/Tests/T49.stable.out
@@ -29,8 +29,8 @@ Ready.
 % sys.L # table_name
 % st_astext_st_union_shore # name
 % clob # type
-% 215 # length
-[ "\"POLYGON ((52.0000000000000000 18.0000000000000000, 66.0000000000000000 
23.0000000000000000, 73.0000000000000000 9.0000000000000000, 
48.0000000000000000 6.0000000000000000, 52.0000000000000000 
18.0000000000000000))\""  ]
+% 45 # length
+[ "\"POLYGON ((52 18, 66 23, 73 9, 48 6, 52 18))\""    ]
 
 # 15:15:54 >  
 # 15:15:54 >  "Done."
diff --git a/geom/sql/conformance/Tests/T50.stable.out 
b/geom/sql/conformance/Tests/T50.stable.out
--- a/geom/sql/conformance/Tests/T50.stable.out
+++ b/geom/sql/conformance/Tests/T50.stable.out
@@ -29,8 +29,8 @@ Ready.
 % sys.L # table_name
 % st_symdifference_shore # name
 % clob # type
-% 679 # length
-[ "\"MULTIPOLYGON (((52.0000000000000000 18.0000000000000000, 
66.0000000000000000 23.0000000000000000, 73.0000000000000000 
9.0000000000000000, 48.0000000000000000 6.0000000000000000, 52.0000000000000000 
18.0000000000000000), (59.0000000000000000 18.0000000000000000, 
67.0000000000000000 18.0000000000000000, 67.0000000000000000 
13.0000000000000000, 59.0000000000000000 13.0000000000000000, 
59.0000000000000000 18.0000000000000000)), ((62.0000000000000000 
48.0000000000000000, 84.0000000000000000 48.0000000000000000, 
84.0000000000000000 30.0000000000000000, 56.0000000000000000 
30.0000000000000000, 56.0000000000000000 34.0000000000000000, 
62.0000000000000000 48.0000000000000000)))\""  ]
+% 135 # length
+[ "\"MULTIPOLYGON (((52 18, 66 23, 73 9, 48 6, 52 18), (59 18, 67 18, 67 13, 
59 13, 59 18)), ((62 48, 84 48, 84 30, 56 30, 56 34, 62 48)))\""  ]
 
 # 15:20:22 >  
 # 15:20:22 >  "Done."
diff --git a/geom/sql/conformance/Tests/T52.stable.out 
b/geom/sql/conformance/Tests/T52.stable.out
--- a/geom/sql/conformance/Tests/T52.stable.out
+++ b/geom/sql/conformance/Tests/T52.stable.out
@@ -29,8 +29,8 @@ Ready.
 % sys.L # table_name
 % st_convexhull_shore # name
 % clob # type
-% 214 # length
-[ "\"POLYGON ((48.0000000000000000 6.0000000000000000, 52.0000000000000000 
18.0000000000000000, 66.0000000000000000 23.0000000000000000, 
73.0000000000000000 9.0000000000000000, 48.0000000000000000 
6.0000000000000000))\""   ]
+% 44 # length
+[ "\"POLYGON ((48 6, 52 18, 66 23, 73 9, 48 6))\""     ]
 
 # 15:20:22 >  
 # 15:20:22 >  "Done."
diff --git a/geom/sql/conformance/Tests/T8.stable.out 
b/geom/sql/conformance/Tests/T8.stable.out
--- a/geom/sql/conformance/Tests/T8.stable.out
+++ b/geom/sql/conformance/Tests/T8.stable.out
@@ -29,8 +29,8 @@ Ready.
 % sys.L # table_name
 % st_astext_boundary # name
 % clob # type
-% 217 # length
-[ "\"POLYGON ((67.0000000000000000 13.0000000000000000, 67.0000000000000000 
18.0000000000000000, 59.0000000000000000 18.0000000000000000, 
59.0000000000000000 13.0000000000000000, 67.0000000000000000 
13.0000000000000000))\""        ]
+% 47 # length
+[ "\"POLYGON ((67 13, 67 18, 59 18, 59 13, 67 13))\""  ]
 
 # 14:02:52 >  
 # 14:02:52 >  "Done."
diff --git a/geom/sql/functions/Tests/ST_AsEWKT.stable.out 
b/geom/sql/functions/Tests/ST_AsEWKT.stable.out
--- a/geom/sql/functions/Tests/ST_AsEWKT.stable.out
+++ b/geom/sql/functions/Tests/ST_AsEWKT.stable.out
@@ -34,164 +34,164 @@ Ready.
 % .L # table_name
 % st_pointfromtext_single_value # name
 % clob # type
-% 56 # length
-[ "SRID:0;\"POINT (10.0000000000000000 10.0000000000000000)\"" ]
+% 22 # length
+[ "SRID:0;\"POINT (10 10)\""   ]
 #select st_asEWKT(st_pointfromtext('point(20 20)', 4326));
 % .L # table_name
 % st_pointfromtext_single_value # name
 % clob # type
-% 59 # length
-[ "SRID:4326;\"POINT (20.0000000000000000 20.0000000000000000)\""      ]
+% 25 # length
+[ "SRID:4326;\"POINT (20 20)\""        ]
 #select st_asEWKT(st_pointfromtext('point(10 10 10)'));
 % .L # table_name
 % st_pointfromtext_single_value # name
 % clob # type
-% 78 # length
-[ "SRID:0;\"POINT Z (10.0000000000000000 10.0000000000000000 
10.0000000000000000)\""   ]
+% 27 # length
+[ "SRID:0;\"POINT Z (10 10 10)\""      ]
 #select st_asEWKT(st_makepoint(10, 10));
 % .L # table_name
 % st_makepoint_single_value # name
 % clob # type
-% 56 # length
-[ "SRID:0;\"POINT (10.0000000000000000 10.0000000000000000)\"" ]
+% 22 # length
+[ "SRID:0;\"POINT (10 10)\""   ]
 #select st_asEWKT(st_point(20, 20));
 % .L # table_name
 % st_point_single_value # name
 % clob # type
-% 56 # length
-[ "SRID:0;\"POINT (20.0000000000000000 20.0000000000000000)\"" ]
+% 22 # length
+[ "SRID:0;\"POINT (20 20)\""   ]
 #select st_asEWKT(st_makepoint(10, 10, 10));
 % .L # table_name
 % st_makepoint_single_value # name
 % clob # type
-% 78 # length
-[ "SRID:0;\"POINT Z (10.0000000000000000 10.0000000000000000 
10.0000000000000000)\""   ]
+% 27 # length
+[ "SRID:0;\"POINT Z (10 10 10)\""      ]
 #select st_asEWKT(st_linefromtext('linestring(10 10, 20 20, 30 30)'));
 % .L # table_name
 % st_linefromtext_single_value # name
 % clob # type
-% 143 # length
-[ "SRID:0;\"LINESTRING (10.0000000000000000 10.0000000000000000, 
20.0000000000000000 20.0000000000000000, 30.0000000000000000 
30.0000000000000000)\""  ]
+% 41 # length
+[ "SRID:0;\"LINESTRING (10 10, 20 20, 30 30)\""        ]
 #select st_asEWKT(st_linefromtext('linestring(20 20, 30 30, 40 40)', 4326));
 % .L # table_name
 % st_linefromtext_single_value # name
 % clob # type
-% 146 # length
-[ "SRID:4326;\"LINESTRING (20.0000000000000000 20.0000000000000000, 
30.0000000000000000 30.0000000000000000, 40.0000000000000000 
40.0000000000000000)\""       ]
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to