PostGIS  3.3.9dev-r@@SVN_REVISION@@

◆ assvg_geom_size()

static size_t assvg_geom_size ( const LWGEOM geom,
int  relative,
int  precision 
)
static

Definition at line 488 of file lwout_svg.c.

489 {
490  int type = geom->type;
491  size_t size = 0;
492 
493  switch (type)
494  {
495  case POINTTYPE:
496  size = assvg_point_size((LWPOINT*)geom, relative, precision);
497  break;
498 
499  case LINETYPE:
500  size = assvg_line_size((LWLINE*)geom, relative, precision);
501  break;
502 
503  case POLYGONTYPE:
504  size = assvg_polygon_size((LWPOLY*)geom, relative, precision);
505  break;
506 
507  case MULTIPOINTTYPE:
508  size = assvg_multipoint_size((LWMPOINT*)geom, relative, precision);
509  break;
510 
511  case MULTILINETYPE:
512  size = assvg_multiline_size((LWMLINE*)geom, relative, precision);
513  break;
514 
515  case MULTIPOLYGONTYPE:
516  size = assvg_multipolygon_size((LWMPOLY*)geom, relative, precision);
517  break;
518 
519  default:
520  lwerror("assvg_geom_size: '%s' geometry type not supported.",
521  lwtype_name(type));
522  }
523 
524  return size;
525 }
static uint8_t precision
Definition: cu_in_twkb.c:25
#define MULTILINETYPE
Definition: liblwgeom.h:121
#define LINETYPE
Definition: liblwgeom.h:118
#define MULTIPOINTTYPE
Definition: liblwgeom.h:120
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:117
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:122
#define POLYGONTYPE
Definition: liblwgeom.h:119
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:216
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
static size_t assvg_multipoint_size(const LWMPOINT *mpoint, int relative, int precision)
Multipoint Geometry.
Definition: lwout_svg.c:248
static size_t assvg_line_size(const LWLINE *line, __attribute__((__unused__)) int relative, int precision)
Line Geometry.
Definition: lwout_svg.c:153
static size_t assvg_multipolygon_size(const LWMPOLY *mpoly, int relative, int precision)
Definition: lwout_svg.c:346
static size_t assvg_multiline_size(const LWMLINE *mline, int relative, int precision)
Multiline Geometry.
Definition: lwout_svg.c:297
static size_t assvg_point_size(__attribute__((__unused__)) const LWPOINT *point, int circle, int precision)
Point Geometry.
Definition: lwout_svg.c:107
static size_t assvg_polygon_size(const LWPOLY *poly, __attribute__((__unused__)) int relative, int precision)
Polygon Geometry.
Definition: lwout_svg.c:194
type
Definition: ovdump.py:42
uint8_t type
Definition: liblwgeom.h:477

References assvg_line_size(), assvg_multiline_size(), assvg_multipoint_size(), assvg_multipolygon_size(), assvg_point_size(), assvg_polygon_size(), LINETYPE, lwerror(), lwtype_name(), MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, POINTTYPE, POLYGONTYPE, precision, LWGEOM::type, and ovdump::type.

Referenced by assvg_collection_size().

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