Commit 24364cc3 authored by Paul Ramsey's avatar Paul Ramsey

#3300, Box3D for curves calculation fix


git-svn-id: http://svn.osgeo.org/postgis/trunk@14136 b70326c6-7e19-0410-871a-916f4a2858ee
parent 47a13879
Pipeline #156389 skipped
......@@ -567,7 +567,7 @@ static int lwcircstring_calculate_gbox_cartesian(LWCIRCSTRING *curve, GBOX *gbox
/* Initialize */
gbox->xmin = gbox->ymin = gbox->zmin = gbox->mmin = FLT_MAX;
gbox->xmax = gbox->ymax = gbox->zmax = gbox->mmax = FLT_MIN;
gbox->xmax = gbox->ymax = gbox->zmax = gbox->mmax = -1*FLT_MAX;
for ( i = 2; i < curve->points->npoints; i += 2 )
{
......
......@@ -911,5 +911,7 @@ SELECT '#3172', ST_AsText(ST_AddMeasure('LINESTRING(0 0,0 0)', 1, 2));
--SELECT '#3244a', ST_AsText(ST_3DClosestPoint('POINT(0 0 0)', 'POINT(0 0)'));
--SELECT '#3244b', ST_AsText(ST_3DClosestPoint('POINT(0 0)', 'POINT(0 0 0)'));
SELECT '#3300', ST_AsText(ST_SnapToGrid(Box2D('CURVEPOLYGON(CIRCULARSTRING(-71.0821 42.3036,-71.4821 42.3036,-71.7821 42.7036,-71.0821 42.7036,-71.0821 42.3036),(-71.1821 42.4036,-71.3821 42.6036,-71.3821 42.4036,-71.1821 42.4036))'::Geometry)::geometry,0.0001));
-- Clean up
DELETE FROM spatial_ref_sys;
......@@ -276,3 +276,4 @@ ERROR: invalid GML representation
#2870|Point[GS]
#2956|t
#3172|LINESTRING M (0 0 1,0 0 2)
#3300|POLYGON((-71.7821 42.2622,-71.7821 42.9067,-71.029 42.9067,-71.029 42.2622,-71.7821 42.2622))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment