PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ parse_geojson_point()

static LWGEOM* parse_geojson_point ( json_object *  geojson,
int *  hasz 
)
inlinestatic

Definition at line 147 of file lwin_geojson.c.

148 {
149  json_object *coords = parse_coordinates(geojson);
150  if (!coords)
151  return NULL;
152  POINTARRAY *pa = ptarray_construct_empty(1, 0, 1);
153  parse_geojson_coord(coords, hasz, pa);
154  return (LWGEOM *)lwpoint_construct(0, NULL, pa);
155 }
LWPOINT * lwpoint_construct(int32_t srid, GBOX *bbox, POINTARRAY *point)
Definition: lwpoint.c:129
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
Definition: ptarray.c:59
static json_object * parse_coordinates(json_object *geojson)
Definition: lwin_geojson.c:87
static int parse_geojson_coord(json_object *poObj, int *hasz, POINTARRAY *pa)
Definition: lwin_geojson.c:106

References lwpoint_construct(), parse_coordinates(), parse_geojson_coord(), and ptarray_construct_empty().

Referenced by parse_geojson().

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