PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ asx3d3_line_size()

static size_t asx3d3_line_size ( const LWLINE line,
char *  srs,
int  precision,
int  opts,
const char *  defid 
)
static

Definition at line 162 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().

163 {
164  int size;
165  size_t defidlen = strlen(defid);
166 
167  size = pointArray_X3Dsize(line->points, precision)*2;
168 
169  if ( X3D_USE_GEOCOORDS(opts) ) {
170  size += (
171  sizeof("<LineSet vertexCount=''><GeoCoordinate geoSystem='\"GD\" \"WE\" \"longitude_first\"' point='' /></LineSet>") + defidlen
172  ) * 2;
173  }
174  else {
175  size += (
176  sizeof("<LineSet vertexCount=''><Coordinate point='' /></LineSet>") + defidlen
177  ) * 2;
178  }
179 
180  /* if (srs) size += strlen(srs) + sizeof(" srsName=.."); */
181  return size;
182 }
static size_t pointArray_X3Dsize(POINTARRAY *pa, int precision)
Returns maximum size of rendered pointarray in bytes.
Definition: lwout_x3d.c:930
#define X3D_USE_GEOCOORDS(x)
Definition: liblwgeom.h:1555
uint8_t precision
Definition: cu_in_twkb.c:25
opts
Definition: ovdump.py:44
POINTARRAY * points
Definition: liblwgeom.h:422
Here is the call graph for this function:
Here is the caller graph for this function: