PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ do_encoded_polyline_test()

static void do_encoded_polyline_test ( char *  in,
int  precision,
char *  out 
)
static

Definition at line 22 of file cu_in_encoded_polyline.c.

References lwfree(), lwgeom_free(), lwgeom_from_encoded_polyline(), lwgeom_to_wkt(), and WKT_EXTENDED.

Referenced by in_encoded_polyline_test_geoms(), and in_encoded_polyline_test_precision().

23 {
24  LWGEOM *g;
25  char * h;
26  size_t size;
27 
29  h = lwgeom_to_wkt(g, WKT_EXTENDED, 15, &size);
30 
31  if (strcmp(h, out))
32  fprintf(stderr, "\nIn: %s\nOut: %s\nTheo: %s\n", in, h, out);
33 
34  CU_ASSERT_STRING_EQUAL(h, out);
35 
36  lwgeom_free(g);
37  if ( h ) lwfree(h);
38 }
char * lwgeom_to_wkt(const LWGEOM *geom, uint8_t variant, int precision, size_t *size_out)
WKT emitter function.
Definition: lwout_wkt.c:669
void lwfree(void *mem)
Definition: lwutil.c:244
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1099
LWGEOM * lwgeom_from_encoded_polyline(const char *encodedpolyline, int precision)
Create an LWGEOM object from an Encoded Polyline representation.
uint8_t precision
Definition: cu_in_twkb.c:25
#define WKT_EXTENDED
Definition: liblwgeom.h:2085
Here is the call graph for this function:
Here is the caller graph for this function: