PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ asgml3_line_size()

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.

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 }
static uint8_t precision
Definition: cu_in_twkb.c:25
#define IS_DIMS(x)
Definition: liblwgeom.h:1551
#define LW_GML_SHORTLINE
For GML3, use <LineString> rather than <Curve> for lines.
Definition: liblwgeom.h:1546
static size_t pointArray_GMLsize(POINTARRAY *pa, int precision)
Definition: lwout_gml.c:1949
opts
Definition: ovdump.py:44
POINTARRAY * points
Definition: liblwgeom.h:425

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

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

Here is the call graph for this function:
Here is the caller graph for this function: