\r
\r
ptr += sprintf(ptr, "<Coordinate point='");\r
- ptr += pointArray_toX3D3(line->points, ptr, precision, opts, lwline_is_closed(line));\r
+ ptr += pointArray_toX3D3(line->points, ptr, precision, opts, lwline_is_closed((LWLINE *) line));\r
\r
ptr += sprintf(ptr, "' />");\r
\r
{\r
char *ptr=output;\r
LWPOLY *patch;\r
- int i, j, k, l, si;\r
+ int i, j, k, l;\r
int np;\r
j = 0;\r
for (i=0; i<psur->ngeoms; i++)\r
static size_t\r
asx3d3_multi_buf(const LWCOLLECTION *col, char *srs, char *output, int precision, int opts, const char *defid)\r
{\r
- int type = col->type;\r
char *ptr, *x3dtype;\r
int i;\r
LWGEOM *subgeom;\r
- POINTARRAY *pa;\r
-\r
ptr = output;\r
x3dtype="";\r
\r
\r
- if (type == MULTIPOINTTYPE)\r
- {\r
- x3dtype = "PointSet";\r
- ptr += sprintf(ptr, "<%s %s>", x3dtype, defid);\r
- }\r
- else if (type == MULTILINETYPE)\r
+ switch (col->type)\r
{\r
- x3dtype = "IndexedLineSet";\r
- ptr += sprintf(ptr, "<%s %s coordIndex='", x3dtype, defid);\r
- ptr += asx3d3_mline_coordindex(col, ptr);\r
- ptr += sprintf(ptr, "'>");\r
- }\r
- else if (type == MULTIPOLYGONTYPE)\r
- {\r
- x3dtype = "IndexedFaceSet";\r
- ptr += sprintf(ptr, "<%s %s coordIndex='", x3dtype, defid);\r
- ptr += asx3d3_mpoly_coordindex(col,ptr);\r
- ptr += sprintf(ptr, "'>");\r
- }\r
+ case MULTIPOINTTYPE:\r
+ x3dtype = "PointSet";\r
+ ptr += sprintf(ptr, "<%s %s>", x3dtype, defid);\r
+ break;\r
+ case MULTILINETYPE:\r
+ x3dtype = "IndexedLineSet";\r
+ ptr += sprintf(ptr, "<%s %s coordIndex='", x3dtype, defid);\r
+ ptr += asx3d3_mline_coordindex(col, ptr);\r
+ ptr += sprintf(ptr, "'>");\r
+ break;\r
+ case MULTIPOLYGONTYPE:\r
+ x3dtype = "IndexedFaceSet";\r
+ ptr += sprintf(ptr, "<%s %s coordIndex='", x3dtype, defid);\r
+ ptr += asx3d3_mpoly_coordindex(col,ptr);\r
+ ptr += sprintf(ptr, "'>");\r
+ break;\r
+ default:\r
+ lwerror("asx3d3_multi_buf: '%s' geometry type not supported", lwtype_name(col->type));\r
+ return NULL;\r
+ }\r
\r
ptr += sprintf(ptr, "<Coordinate point='");\r
\r
* 2 * pa->npoints;\r
\r
return (OUT_MAX_DIGS_DOUBLE + precision + sizeof(" ")) * 3 * pa->npoints;\r
-}
\ No newline at end of file
+}\r