PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ out_svg_test_geoms()

static void out_svg_test_geoms ( void  )
static

Definition at line 164 of file cu_out_svg.c.

165 {
166  /* Linestring */
167  do_svg_test(
168  "LINESTRING(0 1,2 3,4 5)",
169  "M 0 -1 L 2 -3 4 -5",
170  0, 0);
171 
172  /* Polygon */
173  do_svg_test(
174  "POLYGON((0 1,2 3,4 5,0 1))",
175  "M 0 -1 L 2 -3 4 -5 Z",
176  0, 0);
177 
178  /* Polygon - with internal ring */
179  do_svg_test(
180  "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
181  "M 0 -1 L 2 -3 4 -5 Z M 6 -7 L 8 -9 10 -11 Z",
182  0, 0);
183 
184  /* MultiPoint */
185  do_svg_test(
186  "MULTIPOINT(0 1,2 3)",
187  "cx=\"0\" cy=\"-1\",cx=\"2\" cy=\"-3\"",
188  0, 0);
189 
190  /* MultiLine */
191  do_svg_test(
192  "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
193  "M 0 -1 L 2 -3 4 -5 M 6 -7 L 8 -9 10 -11",
194  0, 0);
195 
196  /* MultiPolygon */
197  do_svg_test(
198  "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
199  "M 0 -1 L 2 -3 4 -5 Z M 6 -7 L 8 -9 10 -11 Z",
200  0, 0);
201 
202  /* GeometryCollection */
203  do_svg_test(
204  "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))",
205  "cx=\"0\" cy=\"-1\";M 2 -3 L 4 -5",
206  0, 0);
207 
208  /* Empty GeometryCollection */
209  do_svg_test(
210  "GEOMETRYCOLLECTION EMPTY",
211  "",
212  0, 0);
213 
214  /* Nested GeometryCollection */
216  "GEOMETRYCOLLECTION(POINT(0 1),GEOMETRYCOLLECTION(LINESTRING(2 3,4 5)))",
217  "assvg_geom_buf: 'GeometryCollection' geometry type not supported.");
218 
219  /* CircularString */
221  "CIRCULARSTRING(-2 0,0 2,2 0,0 2,2 4)",
222  "lwgeom_to_svg: 'CircularString' geometry type not supported");
223 
224  /* CompoundCurve */
226  "COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1))",
227  "lwgeom_to_svg: 'CompoundCurve' geometry type not supported");
228 
229  /* CurvePolygon */
231  "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))",
232  "lwgeom_to_svg: 'CurvePolygon' geometry type not supported");
233 
234  /* MultiCurve */
236  "MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,2 1,2 2))",
237  "lwgeom_to_svg: 'MultiCurve' geometry type not supported");
238 
239  /* MultiSurface */
241  "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)))",
242  "lwgeom_to_svg: 'MultiSurface' geometry type not supported");
243 }
static void do_svg_unsupported(char *in, char *out)
Definition: cu_out_svg.c:38
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: