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

Definition at line 265 of file cu_out_gml.c.

References do_gml2_test(), do_gml3_test(), do_gml3_test_opts(), and LW_GML_SHORTLINE.

Referenced by out_gml_suite_setup().

266 {
267  /* GML2 - Point with SRID */
268  do_gml2_test(
269  "POINT(0 1)",
270  "<gml:Point srsName=\"EPSG:4326\"><gml:coordinates>0,1</gml:coordinates></gml:Point>",
271  "EPSG:4326", 0);
272 
273  /* GML3 - Point with SRID */
274  do_gml3_test(
275  "POINT(0 1)",
276  "<gml:Point srsName=\"EPSG:4326\"><gml:pos srsDimension=\"2\">0 1</gml:pos></gml:Point>",
277  "EPSG:4326", 0, 0);
278 
279 
280  /* GML2 - Linestring with SRID */
281  do_gml2_test(
282  "LINESTRING(0 1,2 3,4 5)",
283  "<gml:LineString srsName=\"EPSG:4326\"><gml:coordinates>0,1 2,3 4,5</gml:coordinates></gml:LineString>",
284  "EPSG:4326", 0);
285 
286  /* GML3 - Linestring with SRID */
287  do_gml3_test(
288  "LINESTRING(0 1,2 3,4 5)",
289  "<gml:Curve srsName=\"EPSG:4326\"><gml:segments><gml:LineStringSegment><gml:posList srsDimension=\"2\">0 1 2 3 4 5</gml:posList></gml:LineStringSegment></gml:segments></gml:Curve>",
290  "EPSG:4326", 0, 0);
291 
292  /* GML3 - Linestring with SRID and short tag*/
294  "LINESTRING(0 1,2 3,4 5)",
295  "<gml:LineString srsName=\"EPSG:4326\"><gml:posList>0 1 2 3 4 5</gml:posList></gml:LineString>",
296  "EPSG:4326", 0, LW_GML_SHORTLINE);
297 
298 
299  /* GML2 Polygon with SRID */
300  do_gml2_test(
301  "POLYGON((0 1,2 3,4 5,0 1))",
302  "<gml:Polygon srsName=\"EPSG:4326\"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>0,1 2,3 4,5 0,1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon>",
303  "EPSG:4326", 0);
304 
305  /* GML3 Polygon with SRID */
306  do_gml3_test(
307  "POLYGON((0 1,2 3,4 5,0 1))",
308  "<gml:Polygon srsName=\"EPSG:4326\"><gml:exterior><gml:LinearRing><gml:posList srsDimension=\"2\">0 1 2 3 4 5 0 1</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon>",
309  "EPSG:4326", 0, 0);
310 
311 
312  /* GML2 MultiPoint with SRID */
313  do_gml2_test(
314  "MULTIPOINT(0 1,2 3)",
315  "<gml:MultiPoint srsName=\"EPSG:4326\"><gml:pointMember><gml:Point><gml:coordinates>0,1</gml:coordinates></gml:Point></gml:pointMember><gml:pointMember><gml:Point><gml:coordinates>2,3</gml:coordinates></gml:Point></gml:pointMember></gml:MultiPoint>",
316  "EPSG:4326", 0);
317 
318  /* GML3 MultiPoint with SRID */
319  do_gml3_test(
320  "MULTIPOINT(0 1,2 3)",
321  "<gml:MultiPoint srsName=\"EPSG:4326\"><gml:pointMember><gml:Point><gml:pos srsDimension=\"2\">0 1</gml:pos></gml:Point></gml:pointMember><gml:pointMember><gml:Point><gml:pos srsDimension=\"2\">2 3</gml:pos></gml:Point></gml:pointMember></gml:MultiPoint>",
322  "EPSG:4326", 0, 0);
323 
324 
325  /* GML2 Multiline with SRID */
326  do_gml2_test(
327  "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
328  "<gml:MultiLineString srsName=\"EPSG:4326\"><gml:lineStringMember><gml:LineString><gml:coordinates>0,1 2,3 4,5</gml:coordinates></gml:LineString></gml:lineStringMember><gml:lineStringMember><gml:LineString><gml:coordinates>6,7 8,9 10,11</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString>",
329  "EPSG:4326", 0);
330 
331 
332  /* GML3 Multiline with SRID */
333  do_gml3_test(
334  "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
335  "<gml:MultiCurve srsName=\"EPSG:4326\"><gml:curveMember><gml:Curve><gml:segments><gml:LineStringSegment><gml:posList srsDimension=\"2\">0 1 2 3 4 5</gml:posList></gml:LineStringSegment></gml:segments></gml:Curve></gml:curveMember><gml:curveMember><gml:Curve><gml:segments><gml:LineStringSegment><gml:posList srsDimension=\"2\">6 7 8 9 10 11</gml:posList></gml:LineStringSegment></gml:segments></gml:Curve></gml:curveMember></gml:MultiCurve>",
336  "EPSG:4326", 0, 0);
337 
338  /* GML3 Multiline with SRID and LineString tag */
340  "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
341  "<gml:MultiCurve srsName=\"EPSG:4326\"><gml:curveMember><gml:LineString><gml:posList>0 1 2 3 4 5</gml:posList></gml:LineString></gml:curveMember><gml:curveMember><gml:LineString><gml:posList>6 7 8 9 10 11</gml:posList></gml:LineString></gml:curveMember></gml:MultiCurve>",
342  "EPSG:4326", 0, LW_GML_SHORTLINE);
343 
344 
345  /* GML2 MultiPolygon with SRID */
346  do_gml2_test(
347  "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
348  "<gml:MultiPolygon srsName=\"EPSG:4326\"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>0,1 2,3 4,5 0,1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>6,7 8,9 10,11 6,7</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon>",
349  "EPSG:4326", 0);
350 
351  /* GML3 MultiPolygon with SRID */
352  do_gml3_test(
353  "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
354  "<gml:MultiSurface srsName=\"EPSG:4326\"><gml:surfaceMember><gml:Polygon><gml:exterior><gml:LinearRing><gml:posList srsDimension=\"2\">0 1 2 3 4 5 0 1</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></gml:surfaceMember><gml:surfaceMember><gml:Polygon><gml:exterior><gml:LinearRing><gml:posList srsDimension=\"2\">6 7 8 9 10 11 6 7</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></gml:surfaceMember></gml:MultiSurface>",
355  "EPSG:4326", 0, 0);
356 
357  /* GML3 PolyhedralSurface with SRID */
358  do_gml3_test(
359  "POLYHEDRALSURFACE(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
360  "<gml:PolyhedralSurface srsName=\"EPSG:4326\"><gml:polygonPatches><gml:PolygonPatch><gml:exterior><gml:LinearRing><gml:posList srsDimension=\"2\">0 1 2 3 4 5 0 1</gml:posList></gml:LinearRing></gml:exterior></gml:PolygonPatch><gml:PolygonPatch><gml:exterior><gml:LinearRing><gml:posList srsDimension=\"2\">6 7 8 9 10 11 6 7</gml:posList></gml:LinearRing></gml:exterior></gml:PolygonPatch></gml:polygonPatches></gml:PolyhedralSurface>",
361  "EPSG:4326", 0, 0);
362 
363  /* GML3 Tin with SRID */
364  do_gml3_test(
365  "TIN(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
366  "<gml:Tin srsName=\"EPSG:4326\"><gml:trianglePatches><gml:Triangle><gml:exterior><gml:LinearRing><gml:posList srsDimension=\"2\">0 1 2 3 4 5 0 1</gml:posList></gml:LinearRing></gml:exterior></gml:Triangle><gml:Triangle><gml:exterior><gml:LinearRing><gml:posList srsDimension=\"2\">6 7 8 9 10 11 6 7</gml:posList></gml:LinearRing></gml:exterior></gml:Triangle></gml:trianglePatches></gml:Tin>",
367  "EPSG:4326", 0, 0);
368 
369 
370  /* GML2 GeometryCollection with SRID */
371  do_gml2_test(
372  "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))",
373  "<gml:MultiGeometry srsName=\"EPSG:4326\"><gml:geometryMember><gml:Point><gml:coordinates>0,1</gml:coordinates></gml:Point></gml:geometryMember><gml:geometryMember><gml:LineString><gml:coordinates>2,3 4,5</gml:coordinates></gml:LineString></gml:geometryMember></gml:MultiGeometry>",
374  "EPSG:4326", 0);
375 
376  /* GML3 GeometryCollection with SRID */
377  do_gml3_test(
378  "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))",
379  "<gml:MultiGeometry srsName=\"EPSG:4326\"><gml:geometryMember><gml:Point><gml:pos srsDimension=\"2\">0 1</gml:pos></gml:Point></gml:geometryMember><gml:geometryMember><gml:Curve><gml:segments><gml:LineStringSegment><gml:posList srsDimension=\"2\">2 3 4 5</gml:posList></gml:LineStringSegment></gml:segments></gml:Curve></gml:geometryMember></gml:MultiGeometry>",
380  "EPSG:4326", 0, 0);
381 }
static void do_gml3_test_opts(char *in, char *out, char *srs, int precision, int opts)
Definition: cu_out_gml.c:56
#define LW_GML_SHORTLINE
For GML3, use rather than for lines.
Definition: liblwgeom.h:1362
static void do_gml3_test(char *in, char *out, char *srs, int precision, int is_geodetic)
Definition: cu_out_gml.c:73
static void do_gml2_test(char *in, char *out, char *srs, int precision)
Definition: cu_out_gml.c:22

Here is the call graph for this function:

Here is the caller graph for this function: