PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ postgis_proj_version()

Datum postgis_proj_version ( PG_FUNCTION_ARGS  )

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

203 {
204  stringbuffer_t sb;
205 
206 #if POSTGIS_PROJ_VERSION < 61
207  stringbuffer_init(&sb);
208  stringbuffer_append(&sb, pj_get_release());
209 #else
210  PJ_INFO pji = proj_info();
211  stringbuffer_init(&sb);
212  stringbuffer_append(&sb, pji.version);
213 #endif
214 
215 #if POSTGIS_PROJ_VERSION >= 70
216 
218  " NETWORK_ENABLED=%s",
219  proj_context_is_network_enabled(NULL) ? "ON" : "OFF");
220 
221  if (proj_context_get_url_endpoint(NULL))
222  stringbuffer_aprintf(&sb, " URL_ENDPOINT=%s", proj_context_get_url_endpoint(NULL));
223 
224  if (proj_context_get_user_writable_directory(NULL, 0))
225  stringbuffer_aprintf(&sb, " USER_WRITABLE_DIRECTORY=%s", proj_context_get_user_writable_directory(NULL, 0));
226 
227  if (proj_context_get_database_path(NULL))
228  stringbuffer_aprintf(&sb, " DATABASE_PATH=%s", proj_context_get_database_path(NULL));
229 
230 #endif
231 
232  PG_RETURN_POINTER(cstring_to_text(stringbuffer_getstring(&sb)));
233 }
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:247
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:122
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: