110 if (json_object_get_type(poObj) == json_type_array)
112 json_object *poObjCoord = NULL;
113 const int nSize = json_object_array_length(poObj);
116 lwerror(
"Too few ordinates in GeoJSON");
121 poObjCoord = json_object_array_get_idx(poObj, 0);
122 pt.
x = json_object_get_double(poObjCoord);
125 poObjCoord = json_object_array_get_idx(poObj, 1);
126 pt.
y = json_object_get_double(poObjCoord);
131 poObjCoord = json_object_array_get_idx(poObj, 2);
132 pt.
z = json_object_get_double(poObjCoord);
139 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.