PostGIS  2.1.10dev-r@@SVN_REVISION@@
static size_t assvg_geom_buf ( const LWGEOM geom,
char *  output,
int  relative,
int  precision 
)
static

Definition at line 465 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, and LWGEOM::type.

Referenced by assvg_collection_buf().

466 {
467  int type = geom->type;
468  char *ptr=output;
469 
470  switch (type)
471  {
472  case POINTTYPE:
473  ptr += assvg_point_buf((LWPOINT*)geom, ptr, relative, precision);
474  break;
475 
476  case LINETYPE:
477  ptr += assvg_line_buf((LWLINE*)geom, ptr, relative, precision);
478  break;
479 
480  case POLYGONTYPE:
481  ptr += assvg_polygon_buf((LWPOLY*)geom, ptr, relative, precision);
482  break;
483 
484  case MULTIPOINTTYPE:
485  ptr += assvg_multipoint_buf((LWMPOINT*)geom, ptr, relative, precision);
486  break;
487 
488  case MULTILINETYPE:
489  ptr += assvg_multiline_buf((LWMLINE*)geom, ptr, relative, precision);
490  break;
491 
492  case MULTIPOLYGONTYPE:
493  ptr += assvg_multipolygon_buf((LWMPOLY*)geom, ptr, relative, precision);
494  break;
495 
496  default:
497  lwerror("assvg_geom_buf: '%s' geometry type not supported.",
498  lwtype_name(type));
499  }
500 
501  return (ptr-output);
502 }
#define LINETYPE
Definition: liblwgeom.h:61
static size_t assvg_line_buf(const LWLINE *line, char *output, int relative, int precision)
Definition: lwout_svg.c:164
#define POLYGONTYPE
Definition: liblwgeom.h:62
#define MULTIPOINTTYPE
Definition: liblwgeom.h:63
static size_t assvg_polygon_buf(const LWPOLY *poly, char *output, int relative, int precision)
Definition: lwout_svg.c:210
static size_t assvg_multipoint_buf(const LWMPOINT *mpoint, char *output, int relative, int precision)
Definition: lwout_svg.c:271
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:67
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:164
static size_t assvg_multiline_buf(const LWMLINE *mline, char *output, int relative, int precision)
Definition: lwout_svg.c:323
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:65
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:60
static size_t assvg_point_buf(const LWPOINT *point, char *output, int circle, int precision)
Definition: lwout_svg.c:106
uint8_t type
Definition: liblwgeom.h:352
static size_t assvg_multipolygon_buf(const LWMPOLY *mpoly, char *output, int relative, int precision)
Definition: lwout_svg.c:375
#define MULTILINETYPE
Definition: liblwgeom.h:64

Here is the call graph for this function:

Here is the caller graph for this function: