PostGIS  2.1.10dev-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 806 of file lwout_gml.c.

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

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

807 {
808  int size;
809  size_t prefixlen = strlen(prefix);
810 
811  size = pointArray_GMLsize(line->points, precision);
812  if ( opts & LW_GML_SHORTLINE )
813  {
814  size += (
815  sizeof("<LineString><posList>/") +
816  ( prefixlen * 2 )
817  ) * 2;
818  }
819  else
820  {
821  size += (
822  sizeof("<Curve><segments><LineStringSegment><posList>/") +
823  ( prefixlen * 4 )
824  ) * 2;
825  }
826  if (srs) size += strlen(srs) + sizeof(" srsName=..");
827  if (id) size += strlen(id) + strlen(prefix) + sizeof(" id=..");
828  if (IS_DIMS(opts)) size += sizeof(" srsDimension='x'");
829  return size;
830 }
#define LW_GML_SHORTLINE
For GML3, use rather than for lines.
Definition: liblwgeom.h:1362
#define IS_DIMS(x)
Definition: liblwgeom.h:1367
static size_t pointArray_GMLsize(POINTARRAY *pa, int precision)
Definition: lwout_gml.c:1471
POINTARRAY * points
Definition: liblwgeom.h:378

Here is the call graph for this function:

Here is the caller graph for this function: