332 Datum tuple_data[7] = {0, 0, 0, 0, 0, 0, 0};
333 bool tuple_null[7] = {
true,
true,
true,
true,
true,
true,
true};
334 PJ_CONTEXT * ctx = NULL;
335 const char *
const empty_options[2] = {NULL};
336 const char *
const wkt_options[2] = {
"MULTILINE=NO", NULL};
338 const char * proj4text;
340 double w_lon, s_lat, e_lon, n_lat;
343 PJ *obj = proj_create_from_database(ctx,
346 PJ_CATEGORY_CRS, 0, empty_options);
351 srtext = proj_as_wkt(ctx, obj, PJ_WKT1_GDAL, wkt_options);
352 proj4text = proj_as_proj_string(ctx, obj, PJ_PROJ_4, empty_options);
353 srname = proj_get_name(obj);
354 ok = proj_get_area_of_use(ctx, obj, &w_lon, &s_lat, &e_lon, &n_lat, NULL);
357 tuple_data[0] = PointerGetDatum(entry->
auth_name);
358 tuple_null[0] =
false;
362 tuple_data[1] = PointerGetDatum(entry->
auth_code);
363 tuple_null[1] =
false;
367 tuple_data[2] = PointerGetDatum(cstring_to_text(srname));
368 tuple_null[2] =
false;
372 tuple_data[3] = PointerGetDatum(cstring_to_text(srtext));
373 tuple_null[3] =
false;
377 tuple_data[4] = PointerGetDatum(cstring_to_text(proj4text));
378 tuple_null[4] =
false;
386 tuple_data[5] = PointerGetDatum(g_sw);
387 tuple_null[5] =
false;
388 tuple_data[6] = PointerGetDatum(g_ne);
389 tuple_null[6] =
false;
392 tuple = heap_form_tuple(tuple_desc, tuple_data, tuple_null);
395 return HeapTupleGetDatum(tuple);
LWPOINT * lwpoint_make2d(int32_t srid, double x, double y)