PostGIS  2.2.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 464 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().

465 {
466  int type = geom->type;
467  char *ptr=output;
468 
469  switch (type)
470  {
471  case POINTTYPE:
472  ptr += assvg_point_buf((LWPOINT*)geom, ptr, relative, precision);
473  break;
474 
475  case LINETYPE:
476  ptr += assvg_line_buf((LWLINE*)geom, ptr, relative, precision);
477  break;
478 
479  case POLYGONTYPE:
480  ptr += assvg_polygon_buf((LWPOLY*)geom, ptr, relative, precision);
481  break;
482 
483  case MULTIPOINTTYPE:
484  ptr += assvg_multipoint_buf((LWMPOINT*)geom, ptr, relative, precision);
485  break;
486 
487  case MULTILINETYPE:
488  ptr += assvg_multiline_buf((LWMLINE*)geom, ptr, relative, precision);
489  break;
490 
491  case MULTIPOLYGONTYPE:
492  ptr += assvg_multipolygon_buf((LWMPOLY*)geom, ptr, relative, precision);
493  break;
494 
495  default:
496  lwerror("assvg_geom_buf: '%s' geometry type not supported.",
497  lwtype_name(type));
498  }
499 
500  return (ptr-output);
501 }
#define LINETYPE
Definition: liblwgeom.h:71
static size_t assvg_line_buf(const LWLINE *line, char *output, int relative, int precision)
Definition: lwout_svg.c:163
#define POLYGONTYPE
Definition: liblwgeom.h:72
#define MULTIPOINTTYPE
Definition: liblwgeom.h:73
static size_t assvg_polygon_buf(const LWPOLY *poly, char *output, int relative, int precision)
Definition: lwout_svg.c:209
static size_t assvg_multipoint_buf(const LWMPOINT *mpoint, char *output, int relative, int precision)
Definition: lwout_svg.c:270
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:188
static size_t assvg_multiline_buf(const LWMLINE *mline, char *output, int relative, int precision)
Definition: lwout_svg.c:322
uint8_t precision
Definition: cu_in_twkb.c:25
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:75
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:70
static size_t assvg_point_buf(const LWPOINT *point, char *output, int circle, int precision)
Definition: lwout_svg.c:105
uint8_t type
Definition: liblwgeom.h:380
type
Definition: ovdump.py:41
static size_t assvg_multipolygon_buf(const LWMPOLY *mpoly, char *output, int relative, int precision)
Definition: lwout_svg.c:374
#define MULTILINETYPE
Definition: liblwgeom.h:74
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:74
Here is the call graph for this function:
Here is the caller graph for this function: