PostGIS  2.1.10dev-r@@SVN_REVISION@@
static size_t asx3d3_line_buf ( const LWLINE line,
char *  srs,
char *  output,
int  precision,
int  opts,
const char *  defid 
)
static

Definition at line 158 of file lwout_x3d.c.

References lwline_is_closed(), POINTARRAY::npoints, pointArray_toX3D3(), and LWLINE::points.

Referenced by asx3d3_collection_buf(), and asx3d3_line().

159 {
160  char *ptr=output;
161  /* int dimension=2; */
162  POINTARRAY *pa;
163 
164 
165  /* if (FLAGS_GET_Z(line->flags)) dimension = 3; */
166 
167  pa = line->points;
168  ptr += sprintf(ptr, "<LineSet %s vertexCount='%d'>", defid, pa->npoints);
169 
170 
171  ptr += sprintf(ptr, "<Coordinate point='");
172  ptr += pointArray_toX3D3(line->points, ptr, precision, opts, lwline_is_closed((LWLINE *) line));
173 
174  ptr += sprintf(ptr, "' />");
175 
176  ptr += sprintf(ptr, "</LineSet>");
177  return (ptr-output);
178 }
int npoints
Definition: liblwgeom.h:327
int lwline_is_closed(const LWLINE *line)
Definition: lwline.c:435
static size_t pointArray_toX3D3(POINTARRAY *pa, char *buf, int precision, int opts, int is_closed)
In X3D3, coordinates are separated by a space separator.
Definition: lwout_x3d.c:775
POINTARRAY * points
Definition: liblwgeom.h:378

Here is the call graph for this function:

Here is the caller graph for this function: