PostGIS  2.5.7dev-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.

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 }
static uint8_t precision
Definition: cu_in_twkb.c:25
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
#define WKT_EXTENDED
Definition: liblwgeom.h:2077
LWGEOM * lwgeom_from_encoded_polyline(const char *encodedpolyline, int precision)
Create an LWGEOM object from an Encoded Polyline representation.
void lwfree(void *mem)
Definition: lwutil.c:244
char * lwgeom_to_wkt(const LWGEOM *geom, uint8_t variant, int precision, size_t *size_out)
WKT emitter function.
Definition: lwout_wkt.c:676

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

Referenced by in_encoded_polyline_test_geoms(), and in_encoded_polyline_test_precision().

Here is the call graph for this function:
Here is the caller graph for this function: