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

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


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

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

Modified: branches/2.3/liblwgeom/lwin_twkb.c
===================================================================
--- branches/2.3/liblwgeom/lwin_twkb.c	2018-05-16 21:38:00 UTC (rev 16573)
+++ branches/2.3/liblwgeom/lwin_twkb.c	2018-05-16 21:39:00 UTC (rev 16574)
@@ -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.3/regress/tickets.sql
===================================================================
--- branches/2.3/regress/tickets.sql	2018-05-16 21:38:00 UTC (rev 16573)
+++ branches/2.3/regress/tickets.sql	2018-05-16 21:39:00 UTC (rev 16574)
@@ -1019,5 +1019,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.3/regress/tickets_expected
===================================================================
--- branches/2.3/regress/tickets_expected	2018-05-16 21:38:00 UTC (rev 16573)
+++ branches/2.3/regress/tickets_expected	2018-05-16 21:39:00 UTC (rev 16574)
@@ -304,3 +304,4 @@
 #3704|t
 #4055a|4326
 #4055b|4326
+#4089|LINESTRING Z (1 1 1,3 3 1)



More information about the postgis-tickets mailing list