[postgis-tickets] r16575 - Fixes bounding box handling in twkb_input #4089
nicklas.aven at jordogskog.no
nicklas.aven at jordogskog.no
Wed May 16 02:39:45 PDT 2018
Author: nicklas
Date: 2018-05-16 14:39:45 -0700 (Wed, 16 May 2018)
New Revision: 16575
Modified:
branches/2.2/liblwgeom/lwin_twkb.c
branches/2.2/regress/tickets.sql
branches/2.2/regress/tickets_expected
Log:
Fixes bounding box handling in twkb_input #4089
Modified: branches/2.2/liblwgeom/lwin_twkb.c
===================================================================
--- branches/2.2/liblwgeom/lwin_twkb.c 2018-05-16 21:39:00 UTC (rev 16574)
+++ branches/2.2/liblwgeom/lwin_twkb.c 2018-05-16 21:39:45 UTC (rev 16575)
@@ -584,7 +584,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.2/regress/tickets.sql
===================================================================
--- branches/2.2/regress/tickets.sql 2018-05-16 21:39:00 UTC (rev 16574)
+++ branches/2.2/regress/tickets.sql 2018-05-16 21:39:45 UTC (rev 16575)
@@ -999,5 +999,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.2/regress/tickets_expected
===================================================================
--- branches/2.2/regress/tickets_expected 2018-05-16 21:39:00 UTC (rev 16574)
+++ branches/2.2/regress/tickets_expected 2018-05-16 21:39:45 UTC (rev 16575)
@@ -300,3 +300,4 @@
#3627b|t
#4055a|4326
#4055b|4326
+#4089|LINESTRING Z (1 1 1,3 3 1)
More information about the postgis-tickets
mailing list