Skip to content

Commit

Permalink
Doc: reference C API that used to be proj_experimental.h
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Jan 29, 2024
1 parent c3032fb commit ea7b223
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 32 deletions.
3 changes: 3 additions & 0 deletions docs/source/development/reference/datatypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -996,4 +996,7 @@ C API for ISO-19111 functionality
:content-only:
:members:

.. doxygengroup:: iso19111_advanced_types
:project: doxygen_api
:content-only:

3 changes: 3 additions & 0 deletions docs/source/development/reference/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1047,3 +1047,6 @@ will return an error when used with functions of this section.
:project: doxygen_api
:content-only:
.. doxygengroup:: iso19111_advanced_functions
:project: doxygen_api
:content-only:
72 changes: 40 additions & 32 deletions src/proj.h
Original file line number Diff line number Diff line change
Expand Up @@ -1511,7 +1511,7 @@ double PROJ_DLL proj_coordinate_metadata_get_epoch(PJ_CONTEXT *ctx,
/* ------------------------------------------------------------------------- */

/**
* \defgroup advanced_cpp_binding Binding in C of advanced methods from the C++
* \defgroup iso19111_advanced_types C types for advanced methods from the C++
* API
* @{
*/
Expand Down Expand Up @@ -1546,9 +1546,6 @@ typedef struct {
PJ_UNIT_TYPE unit_type;
} PJ_AXIS_DESCRIPTION;

PJ PROJ_DLL *proj_create_cs(PJ_CONTEXT *ctx, PJ_COORDINATE_SYSTEM_TYPE type,
int axis_count, const PJ_AXIS_DESCRIPTION *axis);

/** Type of Cartesian 2D coordinate system. */
typedef enum {
/* Easting-Norting */
Expand All @@ -1563,11 +1560,6 @@ typedef enum {
PJ_CART2D_WESTING_SOUTHING,
} PJ_CARTESIAN_CS_2D_TYPE;

PJ PROJ_DLL *proj_create_cartesian_2D_cs(PJ_CONTEXT *ctx,
PJ_CARTESIAN_CS_2D_TYPE type,
const char *unit_name,
double unit_conv_factor);

/** Type of Ellipsoidal 2D coordinate system. */
typedef enum {
/* Longitude-Latitude */
Expand All @@ -1576,11 +1568,6 @@ typedef enum {
PJ_ELLPS2D_LATITUDE_LONGITUDE,
} PJ_ELLIPSOIDAL_CS_2D_TYPE;

PJ PROJ_DLL *proj_create_ellipsoidal_2D_cs(PJ_CONTEXT *ctx,
PJ_ELLIPSOIDAL_CS_2D_TYPE type,
const char *unit_name,
double unit_conv_factor);

/** Type of Ellipsoidal 3D coordinate system. */
typedef enum {
/* Longitude-Latitude-Height(up) */
Expand All @@ -1589,6 +1576,45 @@ typedef enum {
PJ_ELLPS3D_LATITUDE_LONGITUDE_HEIGHT,
} PJ_ELLIPSOIDAL_CS_3D_TYPE;

/** Description of a parameter value for a Conversion. */
typedef struct {
/** Parameter name. */
const char *name;
/** Parameter authority name. */
const char *auth_name;
/** Parameter code. */
const char *code;
/** Parameter value. */
double value;
/** Name of unit in which parameter value is expressed. */
const char *unit_name;
/** Conversion factor to SI of the unit. */
double unit_conv_factor;
/** Type of unit */
PJ_UNIT_TYPE unit_type;
} PJ_PARAM_DESCRIPTION;

/**@}*/

/**
* \defgroup iso19111_advanced_functions Binding in C of advanced methods from
* the C++ API
* @{
*/

PJ PROJ_DLL *proj_create_cs(PJ_CONTEXT *ctx, PJ_COORDINATE_SYSTEM_TYPE type,
int axis_count, const PJ_AXIS_DESCRIPTION *axis);

PJ PROJ_DLL *proj_create_cartesian_2D_cs(PJ_CONTEXT *ctx,
PJ_CARTESIAN_CS_2D_TYPE type,
const char *unit_name,
double unit_conv_factor);

PJ PROJ_DLL *proj_create_ellipsoidal_2D_cs(PJ_CONTEXT *ctx,
PJ_ELLIPSOIDAL_CS_2D_TYPE type,
const char *unit_name,
double unit_conv_factor);

PJ PROJ_DLL *
proj_create_ellipsoidal_3D_cs(PJ_CONTEXT *ctx, PJ_ELLIPSOIDAL_CS_3D_TYPE type,
const char *horizontal_angular_unit_name,
Expand Down Expand Up @@ -1684,24 +1710,6 @@ PJ PROJ_DLL *proj_create_vertical_crs_ex(
PJ PROJ_DLL *proj_create_compound_crs(PJ_CONTEXT *ctx, const char *crs_name,
PJ *horiz_crs, PJ *vert_crs);

/** Description of a parameter value for a Conversion. */
typedef struct {
/** Parameter name. */
const char *name;
/** Parameter authority name. */
const char *auth_name;
/** Parameter code. */
const char *code;
/** Parameter value. */
double value;
/** Name of unit in which parameter value is expressed. */
const char *unit_name;
/** Conversion factor to SI of the unit. */
double unit_conv_factor;
/** Type of unit */
PJ_UNIT_TYPE unit_type;
} PJ_PARAM_DESCRIPTION;

PJ PROJ_DLL *proj_create_conversion(PJ_CONTEXT *ctx, const char *name,
const char *auth_name, const char *code,
const char *method_name,
Expand Down

0 comments on commit ea7b223

Please sign in to comment.