PostGIS  2.4.9dev-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 847 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().

848 {
849  int size;
850  size_t prefixlen = strlen(prefix);
851 
852  size = pointArray_GMLsize(line->points, precision);
853  if ( opts & LW_GML_SHORTLINE )
854  {
855  size += (
856  sizeof("<LineString><posList>/") +
857  ( prefixlen * 2 )
858  ) * 2;
859  }
860  else
861  {
862  size += (
863  sizeof("<Curve><segments><LineStringSegment><posList>/") +
864  ( prefixlen * 4 )
865  ) * 2;
866  }
867  if (srs) size += strlen(srs) + sizeof(" srsName=..");
868  if (id) size += strlen(id) + strlen(prefix) + sizeof(" id=..");
869  if (IS_DIMS(opts)) size += sizeof(" srsDimension='x'");
870  return size;
871 }
#define LW_GML_SHORTLINE
For GML3, use <LineString> rather than <Curve> 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:1987
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: