]> granicus.if.org Git - postgis/commitdiff
Fixes bounding box handling in twkb_input #4089
authorNicklas Avén <nicklas.aven@jordogskog.no>
Wed, 16 May 2018 21:36:23 +0000 (21:36 +0000)
committerNicklas Avén <nicklas.aven@jordogskog.no>
Wed, 16 May 2018 21:36:23 +0000 (21:36 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@16572 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwin_twkb.c
regress/tickets.sql
regress/tickets_expected

index a947adbfc196ca1fef480ca33879211dcf867960..ed838035f65420313d8d4ccca5b7b0407fd0c9c6 100644 (file)
@@ -598,7 +598,7 @@ LWGEOM* lwgeom_from_twkb_state(twkb_parse_state *s)
                        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);
index 47d96a9f6ddd70810687d8b572d38d03e630a419..9560f3866e8bc7df711bcae8c655e20417d954cf 100644 (file)
@@ -1085,5 +1085,8 @@ SELECT '#4037.4', ST_AsText(ST_Union('POLYGON((0 0, 10 10, 0 10, 10 0, 0 0))', S
 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;
index 7005d1110f226a89b807ebca425be06cfdf595c8..26873ddfdb289d9086eebd349c35ace27d7da4d7 100644 (file)
@@ -348,3 +348,4 @@ NOTICE:  Self-intersection
 #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)