107 LWDEBUGF(3,
"parse_geojson_coord called for object %s.", json_object_to_json_string( poObj ) );
109 if( json_type_array == json_object_get_type( poObj ) )
112 json_object* poObjCoord = NULL;
113 const int nSize = json_object_array_length( poObj );
114 LWDEBUGF(3,
"parse_geojson_coord called for array size %d.", nSize );
123 poObjCoord = json_object_array_get_idx( poObj, 0 );
124 pt.
x = json_object_get_double( poObjCoord );
125 LWDEBUGF(3,
"parse_geojson_coord pt.x = %f.", pt.
x );
128 poObjCoord = json_object_array_get_idx( poObj, 1 );
129 pt.
y = json_object_get_double( poObjCoord );
130 LWDEBUGF(3,
"parse_geojson_coord pt.y = %f.", pt.
y );
135 poObjCoord = json_object_array_get_idx( poObj, 2 );
136 pt.
z = json_object_get_double( poObjCoord );
137 LWDEBUGF(3,
"parse_geojson_coord pt.z = %f.", pt.
z );
140 else if ( nSize == 2 )
static void geojson_lwerror(char *msg, __attribute__((__unused__)) int error_code)
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, then a duplicate point will not be added.
#define LW_TRUE
Return types for functions with status returns.
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
#define FLAGS_GET_M(flags)
#define LWDEBUGF(level, msg,...)