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

Definition at line 834 of file lwout_gml.c.

References IS_DIMS, LW_GML_SHORTLINE, pointArray_GMLsize(), and LWLINE::points.

Referenced by asgml3_collection_size(), asgml3_line(), asgml3_multi_size(), and asgml3_multicurve_size().

835 {
836  int size;
837  size_t prefixlen = strlen(prefix);
838 
839  size = pointArray_GMLsize(line->points, precision);
840  if ( opts & LW_GML_SHORTLINE )
841  {
842  size += (
843  sizeof("<LineString><posList>/") +
844  ( prefixlen * 2 )
845  ) * 2;
846  }
847  else
848  {
849  size += (
850  sizeof("<Curve><segments><LineStringSegment><posList>/") +
851  ( prefixlen * 4 )
852  ) * 2;
853  }
854  if (srs) size += strlen(srs) + sizeof(" srsName=..");
855  if (id) size += strlen(id) + strlen(prefix) + sizeof(" id=..");
856  if (IS_DIMS(opts)) size += sizeof(" srsDimension='x'");
857  return size;
858 }
#define LW_GML_SHORTLINE
For GML3, use rather than for lines.
Definition: liblwgeom.h:1473
#define IS_DIMS(x)
Definition: liblwgeom.h:1478
uint8_t precision
Definition: cu_in_twkb.c:25
static size_t pointArray_GMLsize(POINTARRAY *pa, int precision)
Definition: lwout_gml.c:1974
POINTARRAY * points
Definition: liblwgeom.h:406

Here is the call graph for this function:

Here is the caller graph for this function: