PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ lwgeom_set_effective_area()

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

Definition at line 540 of file effectivearea.c.

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 }
static LWLINE * lwline_set_effective_area(const LWLINE *iline, int set_area, double trshld)
static LWPOLY * lwpoly_set_effective_area(const LWPOLY *ipoly, int set_area, double trshld)
static LWCOLLECTION * lwcollection_set_effective_area(const LWCOLLECTION *igeom, int set_area, double trshld)
#define COLLECTIONTYPE
Definition: liblwgeom.h:91
#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
LWGEOM * lwgeom_clone(const LWGEOM *lwgeom)
Clone LWGEOM object.
Definition: lwgeom.c:482
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:83
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
uint8_t type
Definition: liblwgeom.h:399

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 LWLINE::type.

Referenced by lwcollection_set_effective_area(), and LWGEOM_SetEffectiveArea().

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