Changeset: 5cd9e59e8909 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5cd9e59e8909
Modified Files:
        geom/monetdb5/geom.c
        geom/monetdb5/geomPoints.c
Branch: geo
Log Message:

fixing testweb errors


diffs (37 lines):

diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -1216,6 +1216,7 @@ str wkbGeometryType(char** out, wkb** ge
 /* returns the number of dimensions of the geometry */
 str wkbCoordDim(int *out, wkb **geom) {
        return wkbBasicInt(out, *geom, GEOSGeom_getCoordinateDimension, 
"geom.CoordDim");
+       return MAL_SUCCEED; //it gives error if not his present (?)
 }
 
 /* returns the inherent dimension of the geometry, e.g 0 for point */
diff --git a/geom/monetdb5/geomPoints.c b/geom/monetdb5/geomPoints.c
--- a/geom/monetdb5/geomPoints.c
+++ b/geom/monetdb5/geomPoints.c
@@ -1124,10 +1124,10 @@ PBSMcomputeindex2(const dbl *x, const db
 
        // fill in the oid array
        for (i = 0; i < n; i++) {
-               unsigned char cellx = ((x[i] - minx)/(maxx - minx))*UCHAR_MAX;
-                unsigned char celly = ((y[i] - miny)/(maxy - miny))*UCHAR_MAX;
+               unsigned char cellx = ((unsigned char)((x[i] - minx)/(maxx - 
minx)))*UCHAR_MAX;
+                unsigned char celly = ((unsigned char)((y[i] - miny)/(maxy - 
miny)))*UCHAR_MAX;
                sht cell = ((((unsigned short) cellx) << shift)) | ((unsigned 
short) celly);
-               unsigned long position = pbsm_idx[cell - SHRT_MIN].offset + 
tmpCount[cell - SHRT_MIN];
+               unsigned long position = (unsigned long)pbsm_idx[cell - 
SHRT_MIN].offset + (unsigned long)tmpCount[cell - SHRT_MIN];
                oids[position] = i + seqbase;
                tmpCount[cell - SHRT_MIN]++;
        }
@@ -1289,7 +1289,7 @@ PBSMcreateindex (const dbl *x, const dbl
                throw(MAL, "pbsm.createindex", "Failed to compute index (2).");
 
        t = clock() - t;
-       fprintf(stderr, "[PBSM] Index population: %d clicks - %f seconds\n", 
(unsigned int)t, ((float)t)/CLOCKS_PER_SEC);
+       fprintf(stderr, "[PBSM] Index population: %u clicks - %f seconds\n", 
(unsigned int)t, ((float)t)/CLOCKS_PER_SEC);
 
        /* Save the index for future use (sloppiness acknowledged) */
        if ((f = fopen("20m-pbsm16.idx", "wb"))) {
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to