PostGIS  2.5.7dev-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 468 of file lwout_svg.c.

469 {
470  int type = geom->type;
471  char *ptr=output;
472 
473  switch (type)
474  {
475  case POINTTYPE:
476  ptr += assvg_point_buf((LWPOINT*)geom, ptr, relative, precision);
477  break;
478 
479  case LINETYPE:
480  ptr += assvg_line_buf((LWLINE*)geom, ptr, relative, precision);
481  break;
482 
483  case POLYGONTYPE:
484  ptr += assvg_polygon_buf((LWPOLY*)geom, ptr, relative, precision);
485  break;
486 
487  case MULTIPOINTTYPE:
488  ptr += assvg_multipoint_buf((LWMPOINT*)geom, ptr, relative, precision);
489  break;
490 
491  case MULTILINETYPE:
492  ptr += assvg_multiline_buf((LWMLINE*)geom, ptr, relative, precision);
493  break;
494 
495  case MULTIPOLYGONTYPE:
496  ptr += assvg_multipolygon_buf((LWMPOLY*)geom, ptr, relative, precision);
497  break;
498 
499  default:
500  lwerror("assvg_geom_buf: '%s' geometry type not supported.",
501  lwtype_name(type));
502  }
503 
504  return (ptr-output);
505 }
static uint8_t precision
Definition: cu_in_twkb.c:25
#define MULTILINETYPE
Definition: liblwgeom.h:89
#define LINETYPE
Definition: liblwgeom.h:86
#define MULTIPOINTTYPE
Definition: liblwgeom.h:88
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:85
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:90
#define POLYGONTYPE
Definition: liblwgeom.h:87
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:218
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
static size_t assvg_multipoint_buf(const LWMPOINT *mpoint, char *output, int relative, int precision)
Definition: lwout_svg.c:274
static size_t assvg_multiline_buf(const LWMLINE *mline, char *output, int relative, int precision)
Definition: lwout_svg.c:326
static size_t assvg_line_buf(const LWLINE *line, char *output, int relative, int precision)
Definition: lwout_svg.c:167
static size_t assvg_point_buf(const LWPOINT *point, char *output, int circle, int precision)
Definition: lwout_svg.c:119
static size_t assvg_multipolygon_buf(const LWMPOLY *mpoly, char *output, int relative, int precision)
Definition: lwout_svg.c:378
static size_t assvg_polygon_buf(const LWPOLY *poly, char *output, int relative, int precision)
Definition: lwout_svg.c:213
type
Definition: ovdump.py:41
uint8_t type
Definition: liblwgeom.h:399

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, precision, LWGEOM::type, and ovdump::type.

Referenced by assvg_collection_buf().

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