PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ lwgeom_set_effective_area()

LWGEOM* lwgeom_set_effective_area ( const LWGEOM igeom,
int  set_area,
double  trshld 
)

Definition at line 526 of file effectivearea.c.

References COLLECTIONTYPE, LINETYPE, lwcollection_set_effective_area(), LWDEBUG, lwerror(), lwgeom_clone(), lwline_set_effective_area(), lwpoly_set_effective_area(), lwtype_name(), MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, POINTTYPE, POLYGONTYPE, LWGEOM::type, and LWCOLLECTION::type.

Referenced by lwcollection_set_effective_area(), and LWGEOM_SetEffectiveArea().

527 {
528  LWDEBUG(2, "Entered lwgeom_set_effective_area");
529  switch (igeom->type)
530  {
531  case POINTTYPE:
532  case MULTIPOINTTYPE:
533  return lwgeom_clone(igeom);
534  case LINETYPE:
535  return (LWGEOM*)lwline_set_effective_area((LWLINE*)igeom,set_area, trshld);
536  case POLYGONTYPE:
537  return (LWGEOM*)lwpoly_set_effective_area((LWPOLY*)igeom,set_area, trshld);
538  case MULTILINETYPE:
539  case MULTIPOLYGONTYPE:
540  case COLLECTIONTYPE:
541  return (LWGEOM*)lwcollection_set_effective_area((LWCOLLECTION *)igeom,set_area, trshld);
542  default:
543  lwerror("lwgeom_simplify: unsupported geometry type: %s",lwtype_name(igeom->type));
544  }
545  return NULL;
546 }
#define LINETYPE
Definition: liblwgeom.h:71
#define POLYGONTYPE
Definition: liblwgeom.h:72
#define MULTIPOINTTYPE
Definition: liblwgeom.h:73
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:50
static LWPOLY * lwpoly_set_effective_area(const LWPOLY *ipoly, int set_area, double trshld)
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:188
static LWCOLLECTION * lwcollection_set_effective_area(const LWCOLLECTION *igeom, int set_area, double trshld)
LWGEOM * lwgeom_clone(const LWGEOM *lwgeom)
Clone LWGEOM object.
Definition: lwgeom.c:395
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:75
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:70
uint8_t type
Definition: liblwgeom.h:380
#define MULTILINETYPE
Definition: liblwgeom.h:74
static LWLINE * lwline_set_effective_area(const LWLINE *iline, int set_area, double trshld)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:74
#define COLLECTIONTYPE
Definition: liblwgeom.h:76
Here is the call graph for this function:
Here is the caller graph for this function: