Changeset: 686d25c00dac for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=686d25c00dac
Modified Files:
geom/monetdb5/geom.c
Branch: geo
Log Message:
chech the correct relation of coordinates before finalising them in MakeBox2D
diffs (20 lines):
diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -4108,11 +4108,12 @@ str wkbBox2D(mbr** box, wkb** point1, wk
}
+ //Assign the coordinates. Ensure that they are in correct order
*box = (mbr*) GDKmalloc(sizeof(mbr));
- (*box)->xmin = (float) xmin;
- (*box)->ymin = (float) ymin;
- (*box)->xmax = (float) xmax;
- (*box)->ymax = (float) ymax;
+ (*box)->xmin = (float) (xmin < xmax ? xmin : xmax);
+ (*box)->ymin = (float) (ymin < ymax ? ymin : ymax);
+ (*box)->xmax = (float) (xmax > xmin ? xmax : xmin);
+ (*box)->ymax = (float) (ymax > ymin ? ymax : ymin);
return MAL_SUCCEED;
}
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list