PostGIS  2.5.0dev-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 828 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().

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

Here is the call graph for this function:

Here is the caller graph for this function: