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

Definition at line 128 of file cu_out_kml.c.

References do_kml_test(), and do_kml_unsupported().

Referenced by out_kml_suite_setup().

129 {
130  /* Linestring */
131  do_kml_test(
132  "LINESTRING(0 1,2 3,4 5)",
133  "<LineString><coordinates>0,1 2,3 4,5</coordinates></LineString>",
134  0);
135 
136  /* Polygon */
137  do_kml_test(
138  "POLYGON((0 1,2 3,4 5,0 1))",
139  "<Polygon><outerBoundaryIs><LinearRing><coordinates>0,1 2,3 4,5 0,1</coordinates></LinearRing></outerBoundaryIs></Polygon>",
140  0);
141 
142  /* Polygon - with internal ring */
143  do_kml_test(
144  "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
145  "<Polygon><outerBoundaryIs><LinearRing><coordinates>0,1 2,3 4,5 0,1</coordinates></LinearRing></outerBoundaryIs><innerBoundaryIs><LinearRing><coordinates>6,7 8,9 10,11 6,7</coordinates></LinearRing></innerBoundaryIs></Polygon>",
146  0);
147 
148  /* MultiPoint */
149  do_kml_test(
150  "MULTIPOINT(0 1,2 3)",
151  "<MultiGeometry><Point><coordinates>0,1</coordinates></Point><Point><coordinates>2,3</coordinates></Point></MultiGeometry>",
152  0);
153 
154  /* MultiLine */
155  do_kml_test(
156  "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
157  "<MultiGeometry><LineString><coordinates>0,1 2,3 4,5</coordinates></LineString><LineString><coordinates>6,7 8,9 10,11</coordinates></LineString></MultiGeometry>",
158  0);
159 
160  /* MultiPolygon */
161  do_kml_test(
162  "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
163  "<MultiGeometry><Polygon><outerBoundaryIs><LinearRing><coordinates>0,1 2,3 4,5 0,1</coordinates></LinearRing></outerBoundaryIs></Polygon><Polygon><outerBoundaryIs><LinearRing><coordinates>6,7 8,9 10,11 6,7</coordinates></LinearRing></outerBoundaryIs></Polygon></MultiGeometry>",
164  0);
165 
166  /* GeometryCollection */
168  "GEOMETRYCOLLECTION(POINT(0 1))",
169  "lwgeom_to_kml2: 'GeometryCollection' geometry type not supported");
170 
171  /* CircularString */
173  "CIRCULARSTRING(-2 0,0 2,2 0,0 2,2 4)",
174  "lwgeom_to_kml2: 'CircularString' geometry type not supported");
175 
176  /* CompoundCurve */
178  "COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1))",
179  "lwgeom_to_kml2: 'CompoundCurve' geometry type not supported");
180 
181  /* CurvePolygon */
183  "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))",
184  "lwgeom_to_kml2: 'CurvePolygon' geometry type not supported");
185 
186  /* MultiCurve */
188  "MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,2 1,2 2))",
189  "lwgeom_to_kml2: 'MultiCurve' geometry type not supported");
190 
191  /* MultiSurface */
193  "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)))",
194  "lwgeom_to_kml2: 'MultiSurface' geometry type not supported");
195 }
static void do_kml_unsupported(char *in, char *out)
Definition: cu_out_kml.c:39
static void do_kml_test(char *in, char *out, int precision)
Definition: cu_out_kml.c:21

Here is the call graph for this function:

Here is the caller graph for this function: