750 char *in_ewkt, *out_ewkt;
757 in_ewkt =
"POLYGON((0 0,0 10,10 10,10 0,0 0))";
759 if (strcmp(in_ewkt, out_ewkt))
760 fprintf(stderr,
"\nExp: %s\nObt: %s\n", in_ewkt, out_ewkt);
770 in_ewkt =
"POLYGON((0 0,0 10,10 10,10 0,0 0))";
772 if (strcmp(in_ewkt, out_ewkt))
773 fprintf(stderr,
"\nExp: %s\nObt: %s\n", in_ewkt, out_ewkt);
779 geom =
lwgeom_from_wkt(
"POLYGON((0 0,10 0,10 10,0 10,0 0),(2 2,2 4,4 2,2 2),(6 2,8 2,8 4,6 2))",
LW_PARSER_CHECK_NONE);
782 in_ewkt =
"POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,2 4,2 2),(6 2,8 2,8 4,6 2))";
784 if (strcmp(in_ewkt, out_ewkt))
785 fprintf(stderr,
"\nExp: %s\nObt: %s\n", in_ewkt, out_ewkt);
791 geom =
lwgeom_from_wkt(
"POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,2 4,2 2),(6 2,8 4,8 2,6 2))",
LW_PARSER_CHECK_NONE);
795 in_ewkt =
"POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,2 4,2 2),(6 2,8 2,8 4,6 2))";
797 if (strcmp(in_ewkt, out_ewkt))
798 fprintf(stderr,
"\nExp: %s\nObt: %s\n", in_ewkt, out_ewkt);
805 in_ewkt =
"0103000000010000000500000000917E9BA468294100917E9B8AEA2841C976BE1FA4682941C976BE9F8AEA2841B39ABE1FA46829415ACCC29F8AEA284137894120A4682941C976BE9F8AEA284100917E9BA468294100917E9B8AEA2841";
#define ASSERT_STRING_EQUAL(o, e)
char lwgeom_same(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2)
geom1 same as geom2 iff
int lwgeom_has_orientation(const LWGEOM *lwgeom, int orientation)
Tests that geometry is oriented LW_CLOCKWISE or LW_COUNTERCLOCKWISE.
LWGEOM * lwgeom_from_hexwkb(const char *hexwkb, const char check)
void lwgeom_free(LWGEOM *geom)
#define LW_PARSER_CHECK_NONE
char * lwgeom_to_ewkt(const LWGEOM *lwgeom)
Return an allocated string.
void lwgeom_force_clockwise(LWGEOM *lwgeom)
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
#define LW_CLOCKWISE
Constants for orientation checking and forcing.
#define LW_COUNTERCLOCKWISE