394 json_object* poObjPolys = NULL;
412 if( json_type_array == json_object_get_type( poObjPolys ) )
414 const int nPolys = json_object_array_length( poObjPolys );
416 for(i = 0; i < nPolys; ++i)
418 json_object* poObjPoly = json_object_array_get_idx( poObjPolys, i );
420 if( json_type_array == json_object_get_type( poObjPoly ) )
423 int nRings = json_object_array_length( poObjPoly );
425 for(j = 0; j < nRings; ++j)
427 json_object* points = json_object_array_get_idx( poObjPoly, j );
429 if( json_type_array == json_object_get_type( points ) )
434 int nPoints = json_object_array_length( points );
435 for ( k=0; k < nPoints; k++ )
437 json_object* coords = json_object_array_get_idx( points, k );
LWCOLLECTION * lwcollection_construct_empty(uint8_t type, int srid, char hasz, char hasm)
int lwpoly_add_ring(LWPOLY *poly, POINTARRAY *pa)
Add a ring, allocating extra space if necessary.
int lwgeom_has_z(const LWGEOM *geom)
Return LW_TRUE if geometry has Z ordinates.
LWMPOLY * lwmpoly_add_lwpoly(LWMPOLY *mobj, const LWPOLY *obj)
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
int lwgeom_has_m(const LWGEOM *geom)
Return LW_TRUE if geometry has M ordinates.
LWPOLY * lwpoly_construct_empty(int srid, char hasz, char hasm)
static int parse_geojson_coord(json_object *poObj, int *hasz, POINTARRAY *pa)
static void geojson_lwerror(char *msg, __attribute__((__unused__)) int error_code)
static json_object * findMemberByName(json_object *poObj, const char *pszName)