PostGIS  3.0.6dev-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 827 of file lwout_gml.c.

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

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: