PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ parse_coordinates()

static json_object* parse_coordinates ( json_object *  geojson)
inlinestatic

Definition at line 87 of file lwin_geojson.c.

88 {
89  json_object *coordinates = findMemberByName(geojson, "coordinates");
90  if (!coordinates)
91  {
92  lwerror("Unable to find 'coordinates' in GeoJSON string");
93  return NULL;
94  }
95 
96  if (json_type_array != json_object_get_type(coordinates))
97  {
98  lwerror("The 'coordinates' in GeoJSON are not an array");
99  return NULL;
100  }
101  return coordinates;
102 }
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
static json_object * findMemberByName(json_object *poObj, const char *pszName)
Definition: lwin_geojson.c:52

References findMemberByName(), and lwerror().

Referenced by parse_geojson_linestring(), parse_geojson_multilinestring(), parse_geojson_multipoint(), parse_geojson_multipolygon(), parse_geojson_point(), and parse_geojson_polygon().

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