PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ postgis_proj_version()

Datum postgis_proj_version ( PG_FUNCTION_ARGS  )

Definition at line 203 of file postgis/lwgeom_transform.c.

204 {
205  stringbuffer_t sb;
206 
207  PJ_INFO pji = proj_info();
208  stringbuffer_init(&sb);
209  stringbuffer_append(&sb, pji.version);
210 
211 #if POSTGIS_PROJ_VERSION >= 70100
212 
214  " NETWORK_ENABLED=%s",
215  proj_context_is_network_enabled(NULL) ? "ON" : "OFF");
216 
217  if (proj_context_get_url_endpoint(NULL))
218  stringbuffer_aprintf(&sb, " URL_ENDPOINT=%s", proj_context_get_url_endpoint(NULL));
219 
220  if (proj_context_get_user_writable_directory(NULL, 0))
221  stringbuffer_aprintf(&sb, " USER_WRITABLE_DIRECTORY=%s", proj_context_get_user_writable_directory(NULL, 0));
222 
223  if (proj_context_get_database_path(NULL))
224  stringbuffer_aprintf(&sb, " DATABASE_PATH=%s", proj_context_get_database_path(NULL));
225 
226 #endif
227 
228  PG_RETURN_POINTER(cstring_to_text(stringbuffer_getstring(&sb)));
229 }
int stringbuffer_aprintf(stringbuffer_t *s, const char *fmt,...)
Appends a formatted string to the current string buffer, using the format and argument list provided.
Definition: stringbuffer.c:254
void stringbuffer_init(stringbuffer_t *s)
Definition: stringbuffer.c:54
const char * stringbuffer_getstring(stringbuffer_t *s)
Returns a reference to the internal string being managed by the stringbuffer.
Definition: stringbuffer.c:125
static void stringbuffer_append(stringbuffer_t *s, const char *a)
Append the specified string to the stringbuffer_t.
Definition: stringbuffer.h:105

References stringbuffer_append(), stringbuffer_aprintf(), stringbuffer_getstring(), and stringbuffer_init().

Here is the call graph for this function: