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

Definition at line 59 of file cu_out_svg.c.

References do_svg_test().

Referenced by out_svg_suite_setup().

60 {
61  /* 0 precision, i.e a round - with Circle point */
63  "POINT(1.1111111111111 1.1111111111111)",
64  "cx=\"1\" cy=\"-1\"",
65  0, 0);
66 
67  /* 0 precision, i.e a round - with Point */
69  "POINT(1.1111111111111 1.1111111111111)",
70  "x=\"1\" y=\"-1\"",
71  0, 1);
72 
73  /* 0 precision, i.e a round - with PointArray */
75  "LINESTRING(1.1111111111111 1.1111111111111,1.1111111111111 1.1111111111111)",
76  "M 1 -1 L 1 -1",
77  0, 0);
78 
79  /* 0 precision, i.e a round - with relative PointArray */
81  "LINESTRING(1.1111111111111 1.1111111111111,1.1111111111111 1.1111111111111)",
82  "M 1 -1 l 0 0",
83  0, 1);
84 
85 
86  /* 9 digits precision - with Circle point */
88  "POINT(1.2345678901234 1.2345678901234)",
89  "cx=\"1.23456789\" cy=\"-1.23456789\"",
90  9, 0);
91 
92  /* 9 digits precision - with Point */
94  "POINT(1.2345678901234 1.2345678901234)",
95  "x=\"1.23456789\" y=\"-1.23456789\"",
96  9, 1);
97 
98  /* 9 digits precision - with PointArray */
100  "LINESTRING(1.2345678901234 1.2345678901234,2.3456789012345 2.3456789012345)",
101  "M 1.23456789 -1.23456789 L 2.345678901 -2.345678901",
102  9, 0);
103 
104  /* 9 digits precision - with relative PointArray */
105  do_svg_test(
106  "LINESTRING(1.2345678901234 1.2345678901234,2.3456789012345 2.3456789012345)",
107  "M 1.23456789 -1.23456789 l 1.111111011 -1.111111011",
108  9, 1);
109 
110 
111  /* huge data - with Circle point */
112  do_svg_test(
113  "POINT(1E300 -1E300)",
114  "cx=\"1e+300\" cy=\"1e+300\"",
115  0, 0);
116 
117  /* huge data - with Point */
118  do_svg_test(
119  "POINT(1E300 -1E300)",
120  "x=\"1e+300\" y=\"1e+300\"",
121  0, 1);
122 
123  /* huge data - with PointArray */
124  do_svg_test(
125  "LINESTRING(1E300 -1E300,1E301 -1E301)",
126  "M 1e+300 1e+300 L 1e+301 1e+301",
127  0, 0);
128 
129  /* huge data - with relative PointArray */
130  do_svg_test(
131  "LINESTRING(1E300 -1E300,1E301 -1E301)",
132  "M 1e+300 1e+300 l 9e+300 9e+300",
133  0, 1);
134 }
static void do_svg_test(char *in, char *out, int precision, int relative)
Definition: cu_out_svg.c:21

Here is the call graph for this function:

Here is the caller graph for this function: