110 if (json_object_get_type(poObj) == json_type_array)
112 json_object *poObjCoord = NULL;
113 const int nSize = json_object_array_length(poObj);
118 lwerror(
"Too few ordinates in GeoJSON");
123 poObjCoord = json_object_array_get_idx(poObj, 0);
124 pt.
x = json_object_get_double(poObjCoord);
127 poObjCoord = json_object_array_get_idx(poObj, 1);
128 pt.
y = json_object_get_double(poObjCoord);
133 poObjCoord = json_object_array_get_idx(poObj, 2);
134 pt.
z = json_object_get_double(poObjCoord);
141 lwerror(
"The 'coordinates' in GeoJSON are not sufficiently nested");
int ptarray_append_point(POINTARRAY *pa, const POINT4D *pt, int allow_duplicates)
Append a point to the end of an existing POINTARRAY If allow_duplicate is LW_FALSE,...
#define LW_TRUE
Return types for functions with status returns.
void lwerror(const char *fmt,...)
Write a notice out to the error handler.