PostGIS  2.1.10dev-r@@SVN_REVISION@@
static void out_gml_test_precision ( void  )
static

Definition at line 211 of file cu_out_gml.c.

References do_gml2_test(), and do_gml3_test().

Referenced by out_gml_suite_setup().

212 {
213  /* GML2 - 0 precision, i.e a round */
214  do_gml2_test(
215  "POINT(1.1111111111111 1.1111111111111)",
216  "<gml:Point><gml:coordinates>1,1</gml:coordinates></gml:Point>",
217  NULL, 0);
218 
219  /* GML3 - 0 precision, i.e a round */
220  do_gml3_test(
221  "POINT(1.1111111111111 1.1111111111111)",
222  "<gml:Point><gml:pos srsDimension=\"2\">1 1</gml:pos></gml:Point>",
223  NULL, 0, 0);
224 
225 
226  /* GML2 - 3 digits precision */
227  do_gml2_test(
228  "POINT(1.1111111111111 1.1111111111111)",
229  "<gml:Point><gml:coordinates>1.111,1.111</gml:coordinates></gml:Point>",
230  NULL, 3);
231 
232  /* GML3 - 3 digits precision */
233  do_gml3_test(
234  "POINT(1.1111111111111 1.1111111111111)",
235  "<gml:Point><gml:pos srsDimension=\"2\">1.111 1.111</gml:pos></gml:Point>",
236  NULL, 3, 0);
237 
238 
239  /* GML2 - 9 digits precision */
240  do_gml2_test(
241  "POINT(1.2345678901234 1.2345678901234)",
242  "<gml:Point><gml:coordinates>1.23456789,1.23456789</gml:coordinates></gml:Point>",
243  NULL, 9);
244 
245  /* GML3 - 9 digits precision */
246  do_gml3_test(
247  "POINT(1.2345678901234 1.2345678901234)",
248  "<gml:Point><gml:pos srsDimension=\"2\">1.23456789 1.23456789</gml:pos></gml:Point>",
249  NULL, 9, 0);
250 
251 
252  /* GML2 - huge data */
253  do_gml2_test(
254  "POINT(1E300 -1E300)",
255  "<gml:Point><gml:coordinates>1e+300,-1e+300</gml:coordinates></gml:Point>",
256  NULL, 0);
257 
258  /* GML3 - huge data */
259  do_gml3_test(
260  "POINT(1E300 -1E300)",
261  "<gml:Point><gml:pos srsDimension=\"2\">1e+300 -1e+300</gml:pos></gml:Point>",
262  NULL, 0, 0);
263 }
static void do_gml3_test(char *in, char *out, char *srs, int precision, int is_geodetic)
Definition: cu_out_gml.c:73
static void do_gml2_test(char *in, char *out, char *srs, int precision)
Definition: cu_out_gml.c:22

Here is the call graph for this function:

Here is the caller graph for this function: