75 lwerror(
"lwgeom_collect_endpoints: invalid type %s",
109 gepu = GEOSUnaryUnion(gepall);
111 GEOSGeom_destroy(gepall);
115 GEOSGeom_destroy(gepall);
118 GEOSGeom_destroy(gepu);
120 lwerror(
"Error during GEOS2LWGEOM");
132 GEOSGeometry *g1, *gn, *gm;
138 lwerror(
"Noding geometries of dimension != 1 is unsupported");
151 GEOSGeom_destroy(g1);
152 lwerror(
"Error extracting unique endpoints from input");
157 GEOSGeom_destroy(g1);
164 gm = GEOSLineMerge(gn);
165 GEOSGeom_destroy(gn);
173 GEOSGeom_destroy(gm);
176 lwerror(
"Error during GEOS2LWGEOM");
194 for (pn=0; pn<np; ++pn) {
199 for (ln=0; ln<nl; ++ln) {
int lwgeom_is_collection(const LWGEOM *lwgeom)
Determine whether a LWGEOM can contain sub-geometries or not.
static LWGEOM * lwgeom_extract_unique_endpoints(const LWGEOM *lwg)
LWGEOM * lwgeom_node(const LWGEOM *lwgeom_in)
LWGEOM * lwcollection_getsubgeom(LWCOLLECTION *col, int gnum)
void lwgeom_free(LWGEOM *geom)
static int lwgeom_ngeoms(const LWGEOM *n)
char lwgeom_geos_errmsg[LWGEOM_GEOS_ERRMSG_MAXSIZE]
void lwmpoint_free(LWMPOINT *mpt)
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
void lwgeom_geos_error(const char *fmt,...)
static const LWGEOM * lwgeom_subgeom(const LWGEOM *g, int n)
#define SRID_UNKNOWN
Unknown SRID value.
LWMPOINT * lwmpoint_construct_empty(int srid, char hasz, char hasm)
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
GEOSGeometry * LWGEOM2GEOS(const LWGEOM *lwgeom, int autofix)
LWCOLLECTION * lwcollection_clone_deep(const LWCOLLECTION *lwgeom)
Deep clone LWCOLLECTION object.
static void lwgeom_collect_endpoints(const LWGEOM *lwg, LWMPOINT *col)
LWCOLLECTION * lwgeom_as_lwcollection(const LWGEOM *lwgeom)
int lwgeom_dimension(const LWGEOM *geom)
For an LWGEOM, returns 0 for points, 1 for lines, 2 for polygons, 3 for volume, and the max dimension...
LWMPOINT * lwmpoint_add_lwpoint(LWMPOINT *mobj, const LWPOINT *obj)
#define FLAGS_GET_M(flags)
LWGEOM * GEOS2LWGEOM(const GEOSGeometry *geom, char want3d)
LWPOINT * lwline_get_lwpoint(const LWLINE *line, int where)
Returns freshly allocated LWPOINT that corresponds to the index where.
void lwcollection_free(LWCOLLECTION *col)
LWCOLLECTION * lwcollection_construct_empty(uint8_t type, int srid, char hasz, char hasm)
static LWMPOINT * lwgeom_extract_endpoints(const LWGEOM *lwg)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
void lwcollection_reserve(LWCOLLECTION *col, int ngeoms)
Ensure the collection can hold at least up to ngeoms geometries.
int lwline_split_by_point_to(const LWLINE *ln, const LWPOINT *pt, LWMLINE *to)
Split a line by a point and push components to the provided multiline.