PostGIS  3.3.9dev-r@@SVN_REVISION@@

◆ out_svg_test_geoms()

static void out_svg_test_geoms ( void  )
static

Definition at line 148 of file cu_out_svg.c.

149 {
150  /* Linestring */
151  do_svg_test(
152  "LINESTRING(0 1,2 3,4 5)",
153  "M 0 -1 L 2 -3 4 -5",
154  0, 0);
155 
156  /* Polygon */
157  do_svg_test(
158  "POLYGON((0 1,2 3,4 5,0 1))",
159  "M 0 -1 L 2 -3 4 -5 Z",
160  0, 0);
161 
162  /* Polygon - with internal ring */
163  do_svg_test(
164  "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
165  "M 0 -1 L 2 -3 4 -5 Z M 6 -7 L 8 -9 10 -11 Z",
166  0, 0);
167 
168  /* MultiPoint */
169  do_svg_test(
170  "MULTIPOINT(0 1,2 3)",
171  "cx=\"0\" cy=\"-1\",cx=\"2\" cy=\"-3\"",
172  0, 0);
173 
174  /* MultiLine */
175  do_svg_test(
176  "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
177  "M 0 -1 L 2 -3 4 -5 M 6 -7 L 8 -9 10 -11",
178  0, 0);
179 
180  /* MultiPolygon */
181  do_svg_test(
182  "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
183  "M 0 -1 L 2 -3 4 -5 Z M 6 -7 L 8 -9 10 -11 Z",
184  0, 0);
185 
186  /* GeometryCollection */
187  do_svg_test(
188  "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))",
189  "cx=\"0\" cy=\"-1\";M 2 -3 L 4 -5",
190  0, 0);
191 
192  /* Empty GeometryCollection */
193  do_svg_test(
194  "GEOMETRYCOLLECTION EMPTY",
195  "",
196  0, 0);
197 
198  /* Nested GeometryCollection */
200  "GEOMETRYCOLLECTION(POINT(0 1),GEOMETRYCOLLECTION(LINESTRING(2 3,4 5)))",
201  "assvg_geom_buf: 'GeometryCollection' geometry type not supported.");
202 
203  /* CircularString */
205  "CIRCULARSTRING(-2 0,0 2,2 0,0 2,2 4)",
206  "lwgeom_to_svg: 'CircularString' geometry type not supported");
207 
208  /* CompoundCurve */
210  "COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1))",
211  "lwgeom_to_svg: 'CompoundCurve' geometry type not supported");
212 
213  /* CurvePolygon */
215  "CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0))",
216  "lwgeom_to_svg: 'CurvePolygon' geometry type not supported");
217 
218  /* MultiCurve */
220  "MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,2 1,2 2))",
221  "lwgeom_to_svg: 'MultiCurve' geometry type not supported");
222 
223  /* MultiSurface */
225  "MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8)))",
226  "lwgeom_to_svg: 'MultiSurface' geometry type not supported");
227 }
static void do_svg_unsupported(char *in, char *out)
Definition: cu_out_svg.c:32
static void do_svg_test(char *in, char *out, int precision, int relative)
Definition: cu_out_svg.c:20

References do_svg_test(), and do_svg_unsupported().

Referenced by out_svg_suite_setup().

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