PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ srs_state_codes()

static void srs_state_codes ( const char *  auth_name,
struct srs_data state 
)
static

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

431 {
432  /*
433  * Only a subset of supported proj types actually
434  * show up in spatial_ref_sys
435  */
436  #define ntypes 3
437  PJ_TYPE types[ntypes] = {PJ_TYPE_PROJECTED_CRS, PJ_TYPE_GEOGRAPHIC_CRS, PJ_TYPE_COMPOUND_CRS};
438  uint32_t j;
439 
440  for (j = 0; j < ntypes; j++)
441  {
442  PJ_CONTEXT *ctx = NULL;
443  int allow_deprecated = 0;
444  PJ_TYPE type = types[j];
445  PROJ_STRING_LIST codes_ptr = proj_get_codes_from_database(ctx, auth_name, type, allow_deprecated);
446  PROJ_STRING_LIST codes = codes_ptr;
447  const char *code;
448  while(codes && *codes)
449  {
450  /* Read current code and move forward one entry */
451  code = *codes++;
452  /* Ensure there is space in the entry list */
453  srs_state_memcheck(state);
454 
455  /* Write the entry into the entry list and increment */
456  state->entries[state->num_entries].auth_name = cstring_to_text(auth_name);
457  state->entries[state->num_entries].auth_code = cstring_to_text(code);
458  state->num_entries++;
459  }
460  /* Clean up system allocated memory */
461  proj_string_list_destroy(codes_ptr);
462  }
463 }
type
Definition: ovdump.py:42
static void srs_state_memcheck(struct srs_data *state)
#define ntypes
struct srs_entry * entries
text * auth_name
text * auth_code

References srs_entry::auth_code, srs_entry::auth_name, srs_data::entries, ntypes, srs_data::num_entries, srs_state_memcheck(), and ovdump::type.

Referenced by postgis_srs_codes(), and postgis_srs_entry_all().

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