51{
55 int toltype;
56
57
58
59
60
61
62
64
65
67
73
74
80
83 CU_ASSERT( out == NULL );
86
89 CU_ASSERT( out == NULL );
92
95 CU_ASSERT( out == NULL );
99
100
101 in =
lwgeom_from_text(
"CIRCULARSTRING(29.2893218813453 70.7106781186548,100 100,200 0)");
102
108
114
115
121
122#ifndef SKIP_TEST_RETAIN_ANGLE
123
127 );
132#endif
133
135
136
138
140
144
145
146
147
148
149
150
152
154
155
161
164 CU_ASSERT( out == NULL );
166
169 CU_ASSERT( out == NULL );
171
177
183
189
190#ifndef SKIP_TEST_RETAIN_ANGLE
191
195 );
200#endif
201
203
204
205
206
207
208
209
212
213
220
221
222
223
224
225
226
229
230
236
237
238
239
240
241
247
249
250
251
252
253
254
255
258 "2696000.553 1125699.831999999936670, "
259 "2695950.552000000141561 1125749.833000000100583, "
260 "2695865.195999999996275 1125835.189000)");
271#ifndef SKIP_TEST_RETAIN_ANGLE
275 );
280#endif
282
283
284
285
286
287
288
290
292
293
299
302 CU_ASSERT( out == NULL );
304
307 CU_ASSERT( out == NULL );
309
316
322
328
329#ifndef SKIP_TEST_RETAIN_ANGLE
330
334 );
339#endif
340
342
343
344
345
346
347
348
359 {
360 fprintf(stderr, "linearization is not direction neutral:\n");
362 fprintf(stderr,
"OUT1: %s\n",
str);
365 fprintf(stderr,
"OUT2: %s\n",
str);
367 }
372}
static LWGEOM * lwgeom_from_text(const char *str)
static char * lwgeom_to_text(const LWGEOM *geom, int prec)
void cu_error_msg_reset()
char cu_error_msg[MAX_CUNIT_ERROR_LENGTH+1]
#define ASSERT_INT_EQUAL(o, e)
#define ASSERT_STRING_EQUAL(o, e)
@ LW_LINEARIZE_TOLERANCE_TYPE_MAX_ANGLE
Tolerance expresses the maximum angle between the radii generating approximation line vertices,...
@ LW_LINEARIZE_TOLERANCE_TYPE_SEGS_PER_QUAD
Tolerance expresses the number of segments to use for each quarter of circle (quadrant).
@ LW_LINEARIZE_TOLERANCE_TYPE_MAX_DEVIATION
Tolerance expresses the maximum distance between an arbitrary point on the curve and the closest poin...
char lwgeom_same(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2)
geom1 same as geom2 iff
void lwgeom_free(LWGEOM *geom)
char * lwgeom_to_wkt(const LWGEOM *geom, uint8_t variant, int precision, size_t *size_out)
WKT emitter function.
uint32_t lwgeom_count_vertices(const LWGEOM *geom)
Count the total number of vertices in any LWGEOM.
@ LW_LINEARIZE_FLAG_SYMMETRIC
Symmetric linearization means that the output vertices would be the same no matter the order of the p...
@ LW_LINEARIZE_FLAG_RETAIN_ANGLE
Retain angle instructs the engine to try its best to retain the requested angle between generating ra...
LWGEOM * lwcurve_linearize(const LWGEOM *geom, double tol, LW_LINEARIZE_TOLERANCE_TYPE type, int flags)
void lwgeom_reverse_in_place(LWGEOM *lwgeom)
Reverse vertex order of LWGEOM.