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

Definition at line 141 of file lwout_x3d.c.

References pointArray_X3Dsize(), LWLINE::points, and X3D_USE_GEOCOORDS.

Referenced by asx3d3_collection_size(), asx3d3_line(), and asx3d3_multi_size().

142 {
143  int size;
144  size_t defidlen = strlen(defid);
145 
146  size = pointArray_X3Dsize(line->points, precision)*2;
147 
148  if ( X3D_USE_GEOCOORDS(opts) ) {
149  size += (
150  sizeof("<LineSet vertexCount=''><GeoCoordinate geoSystem='\"GD\" \"WE\" \"longitude_first\"' point='' /></LineSet>") + defidlen
151  ) * 2;
152  }
153  else {
154  size += (
155  sizeof("<LineSet vertexCount=''><Coordinate point='' /></LineSet>") + defidlen
156  ) * 2;
157  }
158 
159  /* if (srs) size += strlen(srs) + sizeof(" srsName=.."); */
160  return size;
161 }
static size_t pointArray_X3Dsize(POINTARRAY *pa, int precision)
Returns maximum size of rendered pointarray in bytes.
Definition: lwout_x3d.c:909
#define X3D_USE_GEOCOORDS(x)
Definition: liblwgeom.h:1489
uint8_t precision
Definition: cu_in_twkb.c:25
POINTARRAY * points
Definition: liblwgeom.h:406

Here is the call graph for this function:

Here is the caller graph for this function: