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

Definition at line 165 of file cu_out_svg.c.

References do_svg_test(), and do_svg_unsupported().

Referenced by out_svg_suite_setup().

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

Here is the call graph for this function:

Here is the caller graph for this function: