PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ out_svg_test_precision()

static void out_svg_test_precision ( void  )
static

Definition at line 45 of file cu_out_svg.c.

46{
47 /* 0 precision, i.e a round - with Circle point */
49 "POINT(1.1111111111111 1.1111111111111)",
50 "cx=\"1\" cy=\"-1\"",
51 0, 0);
52
53 /* 0 precision, i.e a round - with Point */
55 "POINT(1.1111111111111 1.1111111111111)",
56 "x=\"1\" y=\"-1\"",
57 0, 1);
58
59 /* 0 precision, i.e a round - with PointArray */
61 "LINESTRING(1.1111111111111 1.1111111111111,1.1111111111111 1.1111111111111)",
62 "M 1 -1 L 1 -1",
63 0, 0);
64
65 /* 0 precision, i.e a round - with relative PointArray */
67 "LINESTRING(1.1111111111111 1.1111111111111,1.1111111111111 1.1111111111111)",
68 "M 1 -1 l 0 0",
69 0, 1);
70
71
72 /* 9 digits precision - with Circle point */
74 "POINT(1.2345678901234 1.2345678901234)",
75 "cx=\"1.23456789\" cy=\"-1.23456789\"",
76 9, 0);
77
78 /* 9 digits precision - with Point */
80 "POINT(1.2345678901234 1.2345678901234)",
81 "x=\"1.23456789\" y=\"-1.23456789\"",
82 9, 1);
83
84 /* 9 digits precision - with PointArray */
86 "LINESTRING(1.2345678901234 1.2345678901234,2.3456789012345 2.3456789012345)",
87 "M 1.23456789 -1.23456789 L 2.345678901 -2.345678901",
88 9, 0);
89
90 /* 9 digits precision - with relative PointArray */
92 "LINESTRING(1.2345678901234 1.2345678901234,2.3456789012345 2.3456789012345)",
93 "M 1.23456789 -1.23456789 l 1.111111011 -1.111111011",
94 9, 1);
95
96
97 /* huge data - with Circle point */
99 "POINT(1E300 -1E300)",
100 "cx=\"1e+300\" cy=\"1e+300\"",
101 0, 0);
102
103 /* huge data - with Point */
105 "POINT(1E300 -1E300)",
106 "x=\"1e+300\" y=\"1e+300\"",
107 0, 1);
108
109 /* huge data - with PointArray */
111 "LINESTRING(1E300 -1E300,1E301 -1E301)",
112 "M 1e+300 1e+300 L 1e+301 1e+301",
113 0, 0);
114
115 /* huge data - with relative PointArray */
116 do_svg_test("LINESTRING(1E300 -1E300,1E301 -1E301)", "M 1e+300 1e+300 l 9e+300 9e+300", 0, 1);
117}
static void do_svg_test(char *in, char *out, int precision, int relative)
Definition cu_out_svg.c:20

References do_svg_test().

Referenced by out_svg_suite_setup().

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