Changeset: d7946b4f3a04 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d7946b4f3a04 Modified Files: geom/monetdb5/geom.c geom/monetdb5/geom.h Branch: Jul2017 Log Message:
GEOSCoordSeq_getOrdinate returns a NaN for missing coordinate. diffs (38 lines): diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c --- a/geom/monetdb5/geom.c +++ b/geom/monetdb5/geom.c @@ -14,6 +14,10 @@ #include "geom.h" #include "mal_exception.h" +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && _MSC_VER < 1800 +#define isnan(x) _isnan(x) +#endif + int TYPE_mbr; static wkb *geos2wkb(const GEOSGeometry *geosGeometry); @@ -2964,6 +2968,8 @@ wkbGetCoordinate(dbl *out, wkb **geom, i err = createException(MAL, "geom.GetCoordinate", "GEOSGeom_getCoordSeq failed"); } else if (!GEOSCoordSeq_getOrdinate(gcs, 0, *dimNum, out)) err = createException(MAL, "geom.GetCoordinate", "GEOSCoordSeq_getOrdinate failed"); + else if (isnan(*out)) + *out = dbl_nil; GEOSGeom_destroy(geosGeometry); return err; diff --git a/geom/monetdb5/geom.h b/geom/monetdb5/geom.h --- a/geom/monetdb5/geom.h +++ b/geom/monetdb5/geom.h @@ -22,7 +22,11 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#if defined(_MSC_VER) && defined(__INTEL_COMPILER) +#include <mathimf.h> +#else #include <math.h> +#endif #include <time.h> #include <gdk_logger.h> _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list