PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ out_svg_test_precision()

static void out_svg_test_precision ( void  )
static

Definition at line 58 of file cu_out_svg.c.

References do_svg_test().

Referenced by out_svg_suite_setup().

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