PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ lwgeom_set_effective_area()

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

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 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)
static LWLINE * lwline_set_effective_area(const LWLINE *iline, 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:216
#define COLLECTIONTYPE
Definition liblwgeom.h:108
#define MULTILINETYPE
Definition liblwgeom.h:106
#define LINETYPE
Definition liblwgeom.h:103
#define MULTIPOINTTYPE
Definition liblwgeom.h:105
LWGEOM * lwgeom_clone(const LWGEOM *lwgeom)
Clone LWGEOM object.
Definition lwgeom.c:519
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition liblwgeom.h:102
#define MULTIPOLYGONTYPE
Definition liblwgeom.h:107
#define POLYGONTYPE
Definition liblwgeom.h:104
#define LWDEBUG(level, msg)
Definition lwgeom_log.h:101
void void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error handler.
uint8_t type
Definition liblwgeom.h:462

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: