return 0;
}
+static void cu_wkb_out_from_hexwkb(char *hexwkb)
+{
+ LWGEOM *g = lwgeom_from_hexwkb(hexwkb, PARSER_CHECK_NONE);
+ if ( s ) free(s);
+ if ( t ) free(t);
+ s = lwgeom_to_wkb(g, WKB_HEX | WKB_XDR | WKB_EXTENDED, NULL);
+ t = lwgeom_to_hexwkb_old(g, PARSER_CHECK_NONE, XDR);
+ lwgeom_free(g);
+}
+
static void cu_wkb_out(char *wkt)
{
LWGEOM *g = lwgeom_from_ewkt(wkt, PARSER_CHECK_NONE);
cu_wkb_out("POLYGON EMPTY");
// printf("new: %s\nold: %s\n",s,t);
CU_ASSERT_STRING_EQUAL(s, t);
+
+ /*
+ * POLYGON with EMPTY shell
+ * See http://http://trac.osgeo.org/postgis/ticket/937
+ */
+ cu_wkb_out_from_hexwkb("01030000000100000000000000");
+ CU_ASSERT_STRING_EQUAL(s, t);
}
static void test_wkb_out_multipoint(void)
{
int dims = 2;
size_t size = 0;
+#if 0
+/* see http://trac.osgeo.org/postgis/ticket/937 */
if ( pa->npoints < 1 )
return 0;
+#endif
+
if ( variant & (WKB_ISO | WKB_EXTENDED) )
dims = FLAGS_NDIMS(pa->flags);
int i, j;
double *dbl_ptr;
+#if 0
+/* see http://trac.osgeo.org/postgis/ticket/937 */
/* Nothing to do with a pointarray with no ordinates */
if ( pa->npoints < 1 )
{
- lwerror("Point array has < 1 ordinates!");
+ lwnotice("Point array has < 1 ordinates!");
return buf;
}
+#endif
/* SFSQL is always 2-d. Extended and ISO use all available dimensions */
if ( (variant & WKB_ISO) || (variant & WKB_EXTENDED) )