[postgis-tickets] r16572 - Fixes bounding box handling in twkb_input #4089

nicklas.aven at jordogskog.no nicklas.aven at jordogskog.no
Wed May 16 02:36:24 PDT 2018


Author: nicklas
Date: 2018-05-16 14:36:23 -0700 (Wed, 16 May 2018)
New Revision: 16572

Modified:
   trunk/liblwgeom/lwin_twkb.c
   trunk/regress/tickets.sql
   trunk/regress/tickets_expected
Log:
Fixes bounding box handling in twkb_input #4089

Modified: trunk/liblwgeom/lwin_twkb.c
===================================================================
--- trunk/liblwgeom/lwin_twkb.c	2018-05-12 20:31:49 UTC (rev 16571)
+++ trunk/liblwgeom/lwin_twkb.c	2018-05-16 21:36:23 UTC (rev 16572)
@@ -598,7 +598,7 @@
 			bbox.zmax = bbox.zmin + twkb_parse_state_double(s, s->factor_z);
 		}
 		/* M */
-		if ( s->has_z )
+		if ( s->has_m )
 		{
 			bbox.mmin = twkb_parse_state_double(s, s->factor_m);
 			bbox.mmax = bbox.mmin + twkb_parse_state_double(s, s->factor_m);

Modified: trunk/regress/tickets.sql
===================================================================
--- trunk/regress/tickets.sql	2018-05-12 20:31:49 UTC (rev 16571)
+++ trunk/regress/tickets.sql	2018-05-16 21:36:23 UTC (rev 16572)
@@ -1085,5 +1085,8 @@
 SELECT '#4055a', ST_SRID(unnest(ST_ClusterWithin(ARRAY['SRID=4326;POINT (3 7)'::geometry, 'SRID=4326;LINESTRING (3 0, 3 9)'], 0)));
 SELECT '#4055b', ST_SRID(unnest(ST_ClusterIntersecting(ARRAY['SRID=4326;POINT (3 7)'::geometry, 'SRID=4326;LINESTRING (3 0, 3 9)'])));
 
+--#4089
+select '#4089', st_astext(st_geomfromtwkb(st_AsTWKB(st_GeometryFromText('LINESTRING Z(1 1 1, 3 3 1)'), 1, 0, 0, false, true)));
+
 -- Clean up
 DELETE FROM spatial_ref_sys;

Modified: trunk/regress/tickets_expected
===================================================================
--- trunk/regress/tickets_expected	2018-05-12 20:31:49 UTC (rev 16571)
+++ trunk/regress/tickets_expected	2018-05-16 21:36:23 UTC (rev 16572)
@@ -348,3 +348,4 @@
 #4037.4|POLYGON((0 0,2 2,2 8,0 10,10 10,8 8,8 2,10 0,0 0))
 #4055a|4326
 #4055b|4326
+#4089|LINESTRING Z (1 1 1,3 3 1)



More information about the postgis-tickets mailing list