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

◆ parse_geojson_multipolygon()

static LWGEOM * parse_geojson_multipolygon ( json_object *  geojson,
int *  hasz 
)
inlinestatic

Definition at line 312 of file lwin_geojson.c.

313{
314 json_object *polys = parse_coordinates(geojson);
315 if (!polys)
316 return NULL;
318 int nPolys = json_object_array_length(polys);
319
320 for (int i = 0; i < nPolys; ++i)
321 {
322 json_object *rings = json_object_array_get_idx(polys, i);
323 LWPOLY *poly = parse_geojson_poly_rings(rings, hasz);
324 if (poly)
325 geom = (LWGEOM *)lwmpoly_add_lwpoly((LWMPOLY *)geom, poly);
326 }
327
328 return geom;
329}
#define MULTIPOLYGONTYPE
Definition liblwgeom.h:107
LWMPOLY * lwmpoly_add_lwpoly(LWMPOLY *mobj, const LWPOLY *obj)
Definition lwmpoly.c:47
LWCOLLECTION * lwcollection_construct_empty(uint8_t type, int32_t srid, char hasz, char hasm)
static json_object * parse_coordinates(json_object *geojson)
static LWPOLY * parse_geojson_poly_rings(json_object *rings, int *hasz)

References lwcollection_construct_empty(), lwmpoly_add_lwpoly(), MULTIPOLYGONTYPE, parse_coordinates(), and parse_geojson_poly_rings().

Referenced by parse_geojson().

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