342 Datum tuple_data[7] = {0, 0, 0, 0, 0, 0, 0};
343 bool tuple_null[7] = {
true,
true,
true,
true,
true,
true,
true};
344 PJ_CONTEXT * ctx = NULL;
345 const char *
const empty_options[2] = {NULL};
346 const char *
const wkt_options[2] = {
"MULTILINE=NO", NULL};
348 const char * proj4text;
350 double w_lon, s_lat, e_lon, n_lat;
353 PJ *obj = proj_create_from_database(ctx,
356 PJ_CATEGORY_CRS, 0, empty_options);
361 srtext = proj_as_wkt(ctx, obj, PJ_WKT1_GDAL, wkt_options);
362 proj4text = proj_as_proj_string(ctx, obj, PJ_PROJ_4, empty_options);
363 srname = proj_get_name(obj);
364 ok = proj_get_area_of_use(ctx, obj, &w_lon, &s_lat, &e_lon, &n_lat, NULL);
367 tuple_data[0] = PointerGetDatum(entry->
auth_name);
368 tuple_null[0] =
false;
372 tuple_data[1] = PointerGetDatum(entry->
auth_code);
373 tuple_null[1] =
false;
377 tuple_data[2] = PointerGetDatum(cstring_to_text(srname));
378 tuple_null[2] =
false;
382 tuple_data[3] = PointerGetDatum(cstring_to_text(srtext));
383 tuple_null[3] =
false;
387 tuple_data[4] = PointerGetDatum(cstring_to_text(proj4text));
388 tuple_null[4] =
false;
396 tuple_data[5] = PointerGetDatum(g_sw);
397 tuple_null[5] =
false;
398 tuple_data[6] = PointerGetDatum(g_ne);
399 tuple_null[6] =
false;
402 tuple = heap_form_tuple(tuple_desc, tuple_data, tuple_null);
405 return HeapTupleGetDatum(tuple);
LWPOINT * lwpoint_make2d(int32_t srid, double x, double y)