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

nicklas.aven at jordogskog.no nicklas.aven at jordogskog.no
Wed May 16 02:38:00 PDT 2018


Author: nicklas
Date: 2018-05-16 14:38:00 -0700 (Wed, 16 May 2018)
New Revision: 16573

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

Modified: branches/2.4/liblwgeom/lwin_twkb.c
===================================================================
--- branches/2.4/liblwgeom/lwin_twkb.c	2018-05-16 21:36:23 UTC (rev 16572)
+++ branches/2.4/liblwgeom/lwin_twkb.c	2018-05-16 21:38:00 UTC (rev 16573)
@@ -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: branches/2.4/regress/tickets.sql
===================================================================
--- branches/2.4/regress/tickets.sql	2018-05-16 21:36:23 UTC (rev 16572)
+++ branches/2.4/regress/tickets.sql	2018-05-16 21:38:00 UTC (rev 16573)
@@ -1029,5 +1029,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: branches/2.4/regress/tickets_expected
===================================================================
--- branches/2.4/regress/tickets_expected	2018-05-16 21:36:23 UTC (rev 16572)
+++ branches/2.4/regress/tickets_expected	2018-05-16 21:38:00 UTC (rev 16573)
@@ -308,3 +308,4 @@
 #3774|t
 #4055a|4326
 #4055b|4326
+#4089|LINESTRING Z (1 1 1,3 3 1)



More information about the postgis-tickets mailing list