PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ assvg_geom_buf()

static size_t assvg_geom_buf ( const LWGEOM geom,
char *  output,
int  relative,
int  precision 
)
static

Definition at line 478 of file lwout_svg.c.

References assvg_line_buf(), assvg_multiline_buf(), assvg_multipoint_buf(), assvg_multipolygon_buf(), assvg_point_buf(), assvg_polygon_buf(), LINETYPE, lwerror(), lwtype_name(), MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, POINTTYPE, POLYGONTYPE, ovdump::type, and LWGEOM::type.

Referenced by assvg_collection_buf().

479 {
480  int type = geom->type;
481  char *ptr=output;
482 
483  switch (type)
484  {
485  case POINTTYPE:
486  ptr += assvg_point_buf((LWPOINT*)geom, ptr, relative, precision);
487  break;
488 
489  case LINETYPE:
490  ptr += assvg_line_buf((LWLINE*)geom, ptr, relative, precision);
491  break;
492 
493  case POLYGONTYPE:
494  ptr += assvg_polygon_buf((LWPOLY*)geom, ptr, relative, precision);
495  break;
496 
497  case MULTIPOINTTYPE:
498  ptr += assvg_multipoint_buf((LWMPOINT*)geom, ptr, relative, precision);
499  break;
500 
501  case MULTILINETYPE:
502  ptr += assvg_multiline_buf((LWMLINE*)geom, ptr, relative, precision);
503  break;
504 
505  case MULTIPOLYGONTYPE:
506  ptr += assvg_multipolygon_buf((LWMPOLY*)geom, ptr, relative, precision);
507  break;
508 
509  default:
510  lwerror("assvg_geom_buf: '%s' geometry type not supported.",
511  lwtype_name(type));
512  }
513 
514  return (ptr-output);
515 }
#define LINETYPE
Definition: liblwgeom.h:85
static size_t assvg_line_buf(const LWLINE *line, char *output, int relative, int precision)
Definition: lwout_svg.c:177
#define POLYGONTYPE
Definition: liblwgeom.h:86
#define MULTIPOINTTYPE
Definition: liblwgeom.h:87
static size_t assvg_polygon_buf(const LWPOLY *poly, char *output, int relative, int precision)
Definition: lwout_svg.c:223
static size_t assvg_multipoint_buf(const LWMPOINT *mpoint, char *output, int relative, int precision)
Definition: lwout_svg.c:284
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:216
static size_t assvg_multiline_buf(const LWMLINE *mline, char *output, int relative, int precision)
Definition: lwout_svg.c:336
uint8_t precision
Definition: cu_in_twkb.c:25
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:89
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:84
static size_t assvg_point_buf(const LWPOINT *point, char *output, int circle, int precision)
Definition: lwout_svg.c:119
uint8_t type
Definition: liblwgeom.h:395
type
Definition: ovdump.py:41
static size_t assvg_multipolygon_buf(const LWMPOLY *mpoly, char *output, int relative, int precision)
Definition: lwout_svg.c:388
#define MULTILINETYPE
Definition: liblwgeom.h:88
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:102
Here is the call graph for this function:
Here is the caller graph for this function: