PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ out_x3d3_test_geoms()

static void out_x3d3_test_geoms ( void  )
static

do_x3d3_test( "POLYGON((0 1 3,2 3 3,4 5 3,0 1 3),(6 7 3,8 9 3,10 11 3,6 7 3))", "", NULL, 0);

do_x3d3_test( "GEOMETRYCOLLECTION(POINT(0 1 3),LINESTRING(2 3 3,4 5 3))", "", NULL, 0);

do_x3d3_test( "GEOMETRYCOLLECTION EMPTY", "", NULL, 0);

Definition at line 86 of file cu_out_x3d.c.

References do_x3d3_test(), and do_x3d3_unsupported().

Referenced by out_x3d_suite_setup().

87 {
88  /* Linestring */
90  "LINESTRING(0 1 5,2 3 6,4 5 7)",
91  "<LineSet vertexCount='3'><Coordinate point='0 1 5 2 3 6 4 5 7' /></LineSet>",
92  NULL, 0, 0);
93 
94  /* Polygon **/
96  "POLYGON((15 10 3,13.536 6.464 3,10 5 3,6.464 6.464 3,5 10 3,6.464 13.536 3,10 15 3,13.536 13.536 3,15 10 3))",
97  "<IndexedFaceSet convex='false' coordIndex='0 1 2 3 4 5 6 7'><Coordinate point='15 10 3 13.536 6.464 3 10 5 3 6.464 6.464 3 5 10 3 6.464 13.536 3 10 15 3 13.536 13.536 3 ' /></IndexedFaceSet>",
98  NULL, 3, 0);
99 
100  /* TODO: Polygon - with internal ring - the answer is clearly wrong */
106  /* 2D MultiPoint */
107  do_x3d3_test(
108  "MULTIPOINT(0 1,2 3,4 5)",
109  "<Polypoint2D point='0 1 2 3 4 5 ' />",
110  NULL, 0, 0);
111 
112  /* 3D MultiPoint */
113  do_x3d3_test(
114  "MULTIPOINT Z(0 1 1,2 3 4,4 5 5)",
115  "<PointSet ><Coordinate point='0 1 1 2 3 4 4 5 5 ' /></PointSet>",
116  NULL, 0, 0);
117  /* 3D Multiline */
118  do_x3d3_test(
119  "MULTILINESTRING Z((0 1 1,2 3 4,4 5 5),(6 7 5,8 9 8,10 11 5))",
120  "<IndexedLineSet coordIndex='0 1 2 -1 3 4 5'><Coordinate point='0 1 1 2 3 4 4 5 5 6 7 5 8 9 8 10 11 5 ' /></IndexedLineSet>",
121  NULL, 0, 0);
122 
123  /* MultiPolygon */
124  do_x3d3_test(
125  "MULTIPOLYGON(((0 1 1,2 3 1,4 5 1,0 1 1)),((6 7 1,8 9 1,10 11 1,6 7 1)))",
126  "<IndexedFaceSet convex='false' coordIndex='0 1 2 -1 3 4 5'><Coordinate point='0 1 1 2 3 1 4 5 1 6 7 1 8 9 1 10 11 1 ' /></IndexedFaceSet>",
127  NULL, 0, 0);
128 
129  /* PolyhedralSurface */
130  do_x3d3_test(
131  "POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), ((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)), ((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) )",
132  "<IndexedFaceSet convex='false' coordIndex='0 1 2 3 -1 4 5 6 7 -1 8 9 10 11 -1 12 13 14 15 -1 16 17 18 19 -1 20 21 22 23'><Coordinate point='0 0 0 0 0 1 0 1 1 0 1 0 0 0 0 0 1 0 1 1 0 1 0 0 0 0 0 1 0 0 1 0 1 0 0 1 1 1 0 1 1 1 1 0 1 1 0 0 0 1 0 0 1 1 1 1 1 1 1 0 0 0 1 1 0 1 1 1 1 0 1 1' /></IndexedFaceSet>",
133  NULL, 0, 0);
134 
135  /* TODO: returns garbage at moment correctly implement GeometryCollection -- */
141  /* TODO: Implement Empty GeometryCollection correctly or throw a not-implemented */
147  /* CircularString */
149  "CIRCULARSTRING(-2 0 1,0 2 1,2 0 1,0 2 1,2 4 1)",
150  "lwgeom_to_x3d3: 'CircularString' geometry type not supported");
151 
152  /* CompoundCurve */
154  "COMPOUNDCURVE(CIRCULARSTRING(0 0 1,1 1 1,1 0 1),(1 0 1,0 1 1))",
155  "lwgeom_to_x3d3: 'CompoundCurve' geometry type not supported");
156 
157 }
static void do_x3d3_unsupported(char *in, char *out)
Definition: cu_out_x3d.c:38
static void do_x3d3_test(char *in, char *out, char *srs, int precision, int option)
Definition: cu_out_x3d.c:20
Here is the call graph for this function:
Here is the caller graph for this function: