PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ lwgeom_set_effective_area()

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

Definition at line 540 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().

541 {
542  LWDEBUG(2, "Entered lwgeom_set_effective_area");
543  switch (igeom->type)
544  {
545  case POINTTYPE:
546  case MULTIPOINTTYPE:
547  return lwgeom_clone(igeom);
548  case LINETYPE:
549  return (LWGEOM*)lwline_set_effective_area((LWLINE*)igeom,set_area, trshld);
550  case POLYGONTYPE:
551  return (LWGEOM*)lwpoly_set_effective_area((LWPOLY*)igeom,set_area, trshld);
552  case MULTILINETYPE:
553  case MULTIPOLYGONTYPE:
554  case COLLECTIONTYPE:
555  return (LWGEOM*)lwcollection_set_effective_area((LWCOLLECTION *)igeom,set_area, trshld);
556  default:
557  lwerror("lwgeom_simplify: unsupported geometry type: %s",lwtype_name(igeom->type));
558  }
559  return NULL;
560 }
#define LINETYPE
Definition: liblwgeom.h:86
#define POLYGONTYPE
Definition: liblwgeom.h:87
#define MULTIPOINTTYPE
Definition: liblwgeom.h:88
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:83
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:218
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:444
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:90
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:85
uint8_t type
Definition: liblwgeom.h:396
#define MULTILINETYPE
Definition: liblwgeom.h:89
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:190
#define COLLECTIONTYPE
Definition: liblwgeom.h:91
Here is the call graph for this function:
Here is the caller graph for this function: