PostGIS  3.3.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 836 of file lwout_gml.c.

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

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: