Data types

This section describes the numerous data types in use in PROJ. As a rule of thumb PROJ data types are prefixed with PJ_, or in one particular case, is simply called PJ. A few notable exceptions can be traced back to the very early days of PROJ when the PJ_ prefix was not consistently used.

Transformation objects

type PJ

Object containing everything related to a given projection or transformation. As a user of the PROJ library you are only exposed to pointers to this object and the contents is hidden behind the public API. PJ objects are created with proj_create() and destroyed with proj_destroy().

type PJ_DIRECTION

Enumeration that is used to convey in which direction a given transformation should be performed. Used in transformation function call as described in the section on transformation functions.

Forward transformations are defined with the :c:

typedef enum proj_direction {
    PJ_FWD   =  1,   /* Forward    */
    PJ_IDENT =  0,   /* Do nothing */
    PJ_INV   = -1    /* Inverse    */
} PJ_DIRECTION;
enumerator PJ_FWD

Perform transformation in the forward direction.

enumerator PJ_IDENT

Identity. Do nothing.

enumerator PJ_INV

Perform transformation in the inverse direction.

type PJ_CONTEXT

Context objects enable safe multi-threaded usage of PROJ. Each PJ object is connected to a context (if not specified, the default context is used). All operations within a context should be performed in the same thread. PJ_CONTEXT objects are created with proj_context_create() and destroyed with proj_context_destroy().

type PJ_AREA

Added in version 6.0.0.

Opaque object describing an area in which a transformation is performed.

It is used with proj_create_crs_to_crs() to select the best transformation between the two input coordinate reference systems.

2 dimensional coordinates

Various 2-dimensional coordinate data types.

type PJ_LP

Geodetic coordinate, latitude and longitude. Usually in radians.

typedef struct { double lam, phi; } PJ_LP;
double PJ_LP.lam

Longitude. Lambda.

double PJ_LP.phi

Latitude. Phi.

type PJ_XY

2-dimensional cartesian coordinate.

typedef struct { double x, y; } PJ_XY;
double PJ_XY.x

Easting.

double PJ_XY.y

Northing.

type PJ_UV

2-dimensional generic coordinate. Usually used when contents can be either a PJ_XY or PJ_LP.

typedef struct {double u, v; } PJ_UV;
double PJ_UV.u

Longitude or easting, depending on use.

double PJ_UV.v

Latitude or northing, depending on use.

3 dimensional coordinates

The following data types are the 3-dimensional equivalents to the data types above.

type PJ_LPZ

3-dimensional version of PJ_LP. Holds longitude, latitude and a vertical component.

typedef struct { double lam, phi, z; } PJ_LPZ;
double PJ_LPZ.lam

Longitude. Lambda.

double PJ_LPZ.phi

Latitude. Phi.

double PJ_LPZ.z

Vertical component.

type PJ_XYZ

Cartesian coordinate in 3 dimensions. Extension of PJ_XY.

typedef struct { double x, y, z; } PJ_XYZ;
double PJ_XYZ.x

Easting or the X component of a 3D cartesian system.

double PJ_XYZ.y

Northing or the Y component of a 3D cartesian system.

double PJ_XYZ.z

Vertical component or the Z component of a 3D cartesian system.

type PJ_UVW

3-dimensional extension of PJ_UV.

typedef struct {double u, v, w; } PJ_UVW;
double PJ_UVW.u

Longitude or easting, depending on use.

double PJ_UVW.v

Latitude or northing, depending on use.

double PJ_UVW.w

Vertical component.

Spatiotemporal coordinate types

The following data types are extensions of the triplets above into the time domain.

type PJ_LPZT

Spatiotemporal version of PJ_LPZ.

typedef struct {
    double lam;
    double phi;
    double z;
    double t;
} PJ_LPZT;
double PJ_LPZT.lam

Longitude.

double PJ_LPZT.phi

Latitude

double PJ_LPZT.z

Vertical component.

double PJ_LPZT.t

Time component.

type PJ_XYZT

Generic spatiotemporal coordinate. Useful for e.g. cartesian coordinates with an attached time-stamp.

typedef struct {
    double x;
    double y;
    double z;
    double t;
} PJ_XYZT;
double PJ_XYZT.x

Easting or the X component of a 3D cartesian system.

double PJ_XYZT.y

Northing or the Y component of a 3D cartesian system.

double PJ_XYZT.z

Vertical or the Z component of a 3D cartesian system.

double PJ_XYZT.t

Time component.

type PJ_UVWT

Spatiotemporal version of PJ_UVW.

typedef struct { double u, v, w, t; } PJ_UVWT;
double PJ_UVWT.e

First horizontal component.

double PJ_UVWT.n

Second horizontal component.

double PJ_UVWT.w

Vertical component.

double PJ_UVWT.t

Temporal component.

Ancillary types for geodetic computations

type PJ_OPK

Rotations, for instance three euler angles.

typedef struct { double o, p, k; } PJ_OPK;
double PJ_OPK.o

First rotation angle, omega.

double PJ_OPK.p

Second rotation angle, phi.

double PJ_OPK.k

Third rotation angle, kappa.

type PJ_ENU

East, north and up components.

typedef struct { double e, n, u; }          PJ_ENU;
double PJ_ENU.e

East component.

double PJ_ENU.n

North component.

double PJ_ENU.u

Up component.

type PJ_GEOD

Geodesic length, forward and reverse azimuths.

typedef struct { double s, a1, a2; }        PJ_GEOD;
double PJ_GEOD.s

Geodesic length.

double PJ_GEOD.a1

Forward azimuth.

double PJ_GEOD.a2

Reverse azimuth.

Complex coordinate types

type PJ_COORD

General purpose coordinate union type, applicable in two, three and four dimensions. This is the default coordinate datatype used in PROJ.

typedef union {
    double v[4];
    PJ_XYZT xyzt;
    PJ_UVWT uvwt;
    PJ_LPZT lpzt;
    PJ_GEOD geod;
    PJ_OPK opk;
    PJ_ENU enu;
    PJ_XYZ  xyz;
    PJ_UVW  uvw;
    PJ_LPZ  lpz;
    PJ_XY   xy;
    PJ_UV   uv;
    PJ_LP   lp;
} PJ_COORD ;
double v[4]

Generic four-dimensional vector.

PJ_XYZT PJ_COORD.xyzt

Spatiotemporal cartesian coordinate.

PJ_UVWT PJ_COORD.uvwt

Spatiotemporal generic coordinate.

PJ_LPZT PJ_COORD.lpzt

Longitude, latitude, vertical and time components.

PJ_GEOD PJ_COORD.geod

Geodesic length, forward and reverse azimuths.

PJ_OPK PJ_COORD.opk

Rotations, for instance three euler angles.

PJ_ENU PJ_COORD.enu

East, north and up components.

PJ_XYZ PJ_COORD.xyz

3-dimensional cartesian coordinate.

PJ_UVW PJ_COORD.uvw

3-dimensional generic coordinate.

PJ_LPZ PJ_COORD.lpz

Longitude, latitude and vertical component.

PJ_XY PJ_COORD.xy

2-dimensional cartesian coordinate.

PJ_UV PJ_COORD.uv

2-dimensional generic coordinate.

PJ_LP PJ_COORD.lp

Longitude and latitude.

Projection derivatives

type PJ_FACTORS

Various cartographic properties, such as scale factors, angular distortion and meridian convergence. Calculated with proj_factors().

typedef struct {
    double meridional_scale;
    double parallel_scale;
    double areal_scale;

    double angular_distortion;
    double meridian_parallel_angle;
    double meridian_convergence;

    double tissot_semimajor;
    double tissot_semiminor;

    double dx_dlam;
    double dx_dphi;
    double dy_dlam;
    double dy_dphi;
} PJ_FACTORS;
double PJ_FACTORS.meridional_scale

Meridional scale at coordinate \(\left(\lambda,\phi\right)\).

double PJ_FACTORS.parallel_scale

Parallel scale at coordinate \(\left(\lambda,\phi\right)\).

double PJ_FACTORS.areal_scale

Areal scale factor at coordinate \(\left(\lambda,\phi\right)\).

double PJ_FACTORS.angular_distortion

Angular distortion at coordinate \(\left(\lambda,\phi\right)\).

double PJ_FACTORS.meridian_parallel_angle

Meridian/parallel angle, \(\theta^\prime\), at coordinate \(\left(\lambda,\phi\right)\).

double PJ_FACTORS.meridian_convergence

Meridian convergence at coordinate \(\left(\lambda,\phi\right)\). Sometimes also described as grid declination.

double PJ_FACTORS.tissot_semimajor

Maximum scale factor.

double PJ_FACTORS.tissot_semiminor

Minimum scale factor.

double PJ_FACTORS.dx_dlam

Partial derivative \(\frac{\partial x}{\partial \lambda}\) of coordinate \(\left(\lambda,\phi\right)\).

double PJ_FACTORS.dy_dlam

Partial derivative \(\frac{\partial y}{\partial \lambda}\) of coordinate \(\left(\lambda,\phi\right)\).

double PJ_FACTORS.dx_dphi

Partial derivative \(\frac{\partial x}{\partial \phi}\) of coordinate \(\left(\lambda,\phi\right)\).

double PJ_FACTORS.dy_dphi

Partial derivative \(\frac{\partial y}{\partial \phi}\) of coordinate \(\left(\lambda,\phi\right)\).

List structures

type PJ_OPERATIONS

Description a PROJ operation

struct PJ_OPERATIONS {
    const char  *id;            /* operation keyword */
    PJ *(*proj)(PJ *);          /* operation  entry point */
    char    * const *descr;     /* description text */
};
const char *id

Operation keyword.

PJ *(*op)(PJ*)

Operation entry point.

char *const *descr

Description of operation.

type PJ_ELLPS

Description of ellipsoids defined in PROJ

struct PJ_ELLPS {
    const char  *id;
    const char  *major;
    const char  *ell;
    const char  *name;
};
const char *id

Keyword name of the ellipsoid.

const char *major

Semi-major axis of the ellipsoid, or radius in case of a sphere.

const char *ell

Elliptical parameter, e.g. rf=298.257 or b=6356772.2.

const char *name

Name of the ellipsoid

type PJ_UNITS

Distance units defined in PROJ.

struct PJ_UNITS {
    const char  *id;        /* units keyword */
    const char  *to_meter;  /* multiply by value to get meters */
    const char  *name;      /* comments */
    double      factor;     /* to_meter factor in actual numbers */
};
const char *id

Keyword for the unit.

const char *to_meter

Text representation of the factor that converts a given unit to meters

const char *name

Name of the unit.

double factor

Conversion factor that converts the unit to meters.

type PJ_PRIME_MERIDIANS

Hard-coded prime meridians defined in PROJ. Note that the structure is no longer updated, and some values may conflict with other sources.

struct PJ_PRIME_MERIDIANS {
    const char  *id;
    const char  *defn;
};
const char *id

Keyword for the prime meridian

const char *def

Offset from Greenwich in DMS format.

Info structures

type PJ_INFO

Struct holding information about the current instance of PROJ. Struct is populated by proj_info().

typedef struct {
    int           major;
    int           minor;
    int           patch;
    const char   *release;
    const char   *version;
    const char   *searchpath;
} PJ_INFO;
const char *PJ_INFO.release

Release info. Version number and release date, e.g. "Rel. 4.9.3, 15 August 2016".

const char *PJ_INFO.version

Text representation of the full version number, e.g. "4.9.3".

int PJ_INFO.major

Major version number.

int PJ_INFO.minor

Minor version number.

int PJ_INFO.patch

Patch level of release.

const char PJ_INFO.searchpath

Search path for PROJ. List of directories separated by semicolons (Windows) or colons (non-Windows), e.g. C:\\Users\\doctorwho;C:\\OSGeo4W64\\share\\proj. Grids and init files are looked for in directories in the search path.

type PJ_PROJ_INFO

Struct holding information about a PJ object. Populated by proj_pj_info(). The PJ_PROJ_INFO object provides a view into the internals of a PJ, so once the PJ is destroyed or otherwise becomes invalid, so does the PJ_PROJ_INFO

typedef struct {
    const char  *id;
    const char  *description;
    const char  *definition;
    int          has_inverse;
    double       accuracy;
} PJ_PROJ_INFO;
const char *PJ_PROJ_INFO.id

Short ID of the operation the PJ object is based on, that is, what comes after the +proj= in a proj-string, e.g. "merc".

const char *PJ_PROJ_INFO.description

Long describes of the operation the PJ object is based on, e.g. "Mercator Cyl, Sph&Ell lat_ts=".

const char *PJ_PROJ_INFO.definition

The proj-string that was used to create the PJ object with, e.g. "+proj=merc +lat_0=24 +lon_0=53 +ellps=WGS84".

int PJ_PROJ_INFO.has_inverse

1 if an inverse mapping of the defined operation exists, otherwise 0.

double PJ_PROJ_INFO.accuracy

Expected accuracy of the transformation. -1 if unknown.

type PJ_GRID_INFO

Struct holding information about a specific grid in the search path of PROJ. Populated with the function proj_grid_info().

typedef struct {
    char        gridname[32];
    char        filename[260];
    char        format[8];
    LP          lowerleft;
    LP          upperright;
    int         n_lon, n_lat;
    double      cs_lon, cs_lat;
} PJ_GRID_INFO;
char PJ_GRID_INFO.gridname[32]

Name of grid, e.g. "BETA2007.gsb".

char PJ_GRID_INFO.filename[260]

Full path of grid file, e.g. "C:\OSGeo4W64\share\proj\BETA2007.gsb"

char PJ_GRID_INFO.format[8]

File format of grid file, e.g. "ntv2"

LP PJ_GRID_INFO.lowerleft

Geodetic coordinate of lower left corner of grid.

LP PJ_GRID_INFO.upperright

Geodetic coordinate of upper right corner of grid.

int PJ_GRID_INFO.n_lon

Number of grid cells in the longitudinal direction.

int PJ_GRID_INFO.n_lat

Number of grid cells in the latitudinal direction.

double PJ_GRID_INFO.cs_lon

Cell size in the longitudinal direction. In radians.

double PJ_GRID_INFO.cs_lat

Cell size in the latitudinal direction. In radians.

type PJ_INIT_INFO

Struct holding information about a specific init file in the search path of PROJ. Populated with the function proj_init_info().

typedef struct {
    char        name[32];
    char        filename[260];
    char        version[32];
    char        origin[32];
    char        lastupdate[16];
} PJ_INIT_INFO;
char PJ_INIT_INFO.name[32]

Name of init file, e.g. "epsg".

char PJ_INIT_INFO.filename[260]

Full path of init file, e.g. "C:\OSGeo4W64\share\proj\epsg"

char PJ_INIT_INFO.version[32]

Version number of init file, e.g. "9.0.0"

char PJ_INIT_INFO.origin[32]

Originating entity of the init file, e.g. "EPSG"

char PJ_INIT_INFO.lastupdate

Date of last update of the init file.

Error codes

Added in version 8.0.0.

Three classes of errors are defined below. The belonging of a given error code to a class can bit tested with a binary and test. The error class itself can be used as an error value in some rare cases where the error does not fit into a more precise error value.

Those error codes are still quite generic for a number of them. Details on the actual errors will be typically logged with the PJ_LOG_ERROR level.

Errors in class PROJ_ERR_INVALID_OP

PROJ_ERR_INVALID_OP

Class of error codes typically related to coordinate operation initialization, typically when creating a PJ* object from a PROJ string.

Note

some of them can also be emitted during coordinate transformation, like PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID in case the resource loading is deferred until it is really needed.

PROJ_ERR_INVALID_OP_WRONG_SYNTAX

Invalid pipeline structure, missing +proj argument, etc.

PROJ_ERR_INVALID_OP_MISSING_ARG

Missing required operation parameter

PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE

One of the operation parameter has an illegal value.

PROJ_ERR_INVALID_OP_MUTUALLY_EXCLUSIVE_ARGS

Mutually exclusive arguments

PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID

File not found or with invalid content (particular case of PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE)

Errors in class PROJ_ERR_COORD_TRANSFM

PROJ_ERR_COORD_TRANSFM

Class of error codes related to transformation on a specific coordinate.

PROJ_ERR_COORD_TRANSFM_INVALID_COORD

Invalid input coordinate. e.g. a latitude > 90°.

PROJ_ERR_COORD_TRANSFM_OUTSIDE_PROJECTION_DOMAIN

Coordinate is outside of the projection domain. e.g. approximate mercator with |longitude - lon_0| > 90°, or iterative convergence method failed.

PROJ_ERR_COORD_TRANSFM_NO_OPERATION

No operation found, e.g. if no match the required accuracy, or if ballpark transformations were asked to not be used and they would be only such candidate.

PROJ_ERR_COORD_TRANSFM_OUTSIDE_GRID

Point to transform falls outside grid/subgrid/TIN.

PROJ_ERR_COORD_TRANSFM_GRID_AT_NODATA

Point to transform falls in a grid cell that evaluates to nodata.

Errors in class PROJ_ERR_OTHER

PROJ_ERR_OTHER

Class of error codes that do not fit into one of the above class.

PROJ_ERR_OTHER_API_MISUSE

Error related to a misuse of PROJ API.

PROJ_ERR_OTHER_NO_INVERSE_OP

No inverse method available

PROJ_ERR_OTHER_NETWORK_ERROR

Failure when accessing a network resource.

Logging

type PJ_LOG_LEVEL

Enum of logging levels in PROJ. Used to set the logging level in PROJ. Usually using proj_log_level().

enumerator PJ_LOG_NONE

Don't log anything.

enumerator PJ_LOG_ERROR

Log only errors.

enumerator PJ_LOG_DEBUG

Log errors and additional debug information.

enumerator PJ_LOG_TRACE

Highest logging level. Log everything including very detailed debug information.

enumerator PJ_LOG_TELL

Special logging level that when used in proj_log_level() will return the current logging level set in PROJ.

Added in version 5.1.0.

type PJ_LOG_FUNC

Function prototype for the logging function used by PROJ. Defined as

typedef void (*PJ_LOG_FUNCTION)(void *, int, const char *);

where the first argument (void pointer) references a data structure used by the calling application, the second argument (int type) is used to set the logging level and the third argument (const char pointer) is the string that will be logged by the function.

Added in version 5.1.0.

Setting custom I/O functions

Added in version 7.0.0.

struct PROJ_FILE_API

File API callbacks

Public Members

int version

Version of this structure. Should be set to 1 currently.

PROJ_FILE_HANDLE *(*open_cbk)(PJ_CONTEXT *ctx, const char *filename, PROJ_OPEN_ACCESS access, void *user_data)

Open file. Return NULL if error

size_t (*read_cbk)(PJ_CONTEXT *ctx, PROJ_FILE_HANDLE*, void *buffer, size_t sizeBytes, void *user_data)

Read sizeBytes into buffer from current position and return number of bytes read

size_t (*write_cbk)(PJ_CONTEXT *ctx, PROJ_FILE_HANDLE*, const void *buffer, size_t sizeBytes, void *user_data)

Write sizeBytes into buffer from current position and return number of bytes written

int (*seek_cbk)(PJ_CONTEXT *ctx, PROJ_FILE_HANDLE*, long long offset, int whence, void *user_data)

Seek to offset using whence=SEEK_SET/SEEK_CUR/SEEK_END. Return TRUE in case of success

unsigned long long (*tell_cbk)(PJ_CONTEXT *ctx, PROJ_FILE_HANDLE*, void *user_data)

Return current file position

void (*close_cbk)(PJ_CONTEXT *ctx, PROJ_FILE_HANDLE*, void *user_data)

Close file

int (*exists_cbk)(PJ_CONTEXT *ctx, const char *filename, void *user_data)

Return TRUE if a file exists

int (*mkdir_cbk)(PJ_CONTEXT *ctx, const char *filename, void *user_data)

Return TRUE if directory exists or could be created

Return TRUE if file could be removed

int (*rename_cbk)(PJ_CONTEXT *ctx, const char *oldPath, const char *newPath, void *user_data)

Return TRUE if file could be renamed

typedef struct PROJ_FILE_HANDLE PROJ_FILE_HANDLE

Opaque structure for PROJ for a file handle. Implementations might cast it to their structure/class of choice.

enum PROJ_OPEN_ACCESS

Open access / mode

Values:

enumerator PROJ_OPEN_ACCESS_READ_ONLY

Read-only access. Equivalent to "rb"

enumerator PROJ_OPEN_ACCESS_READ_UPDATE

Read-update access. File should be created if not existing. Equivalent to "r+b"

enumerator PROJ_OPEN_ACCESS_CREATE

Create access. File should be truncated to 0-byte if already existing. Equivalent to "w+b"

C API for ISO-19111 functionality

enum PJ_GUESSED_WKT_DIALECT

Guessed WKT "dialect".

Values:

enumerator PJ_GUESSED_WKT2_2019

WKT2:2019

enumerator PJ_GUESSED_WKT2_2018

Deprecated alias for PJ_GUESSED_WKT2_2019

enumerator PJ_GUESSED_WKT2_2015

WKT2:2015

enumerator PJ_GUESSED_WKT1_GDAL

WKT1 specification

enumerator PJ_GUESSED_WKT1_ESRI

ESRI variant of WKT1

enumerator PJ_GUESSED_NOT_WKT

Not WKT / unrecognized

enum PJ_CATEGORY

Object category.

Values:

enumerator PJ_CATEGORY_ELLIPSOID
enumerator PJ_CATEGORY_PRIME_MERIDIAN
enumerator PJ_CATEGORY_DATUM
enumerator PJ_CATEGORY_CRS
enumerator PJ_CATEGORY_COORDINATE_OPERATION
enumerator PJ_CATEGORY_DATUM_ENSEMBLE
enum PJ_TYPE

Object type.

Values:

enumerator PJ_TYPE_UNKNOWN
enumerator PJ_TYPE_ELLIPSOID
enumerator PJ_TYPE_PRIME_MERIDIAN
enumerator PJ_TYPE_GEODETIC_REFERENCE_FRAME
enumerator PJ_TYPE_DYNAMIC_GEODETIC_REFERENCE_FRAME
enumerator PJ_TYPE_VERTICAL_REFERENCE_FRAME
enumerator PJ_TYPE_DYNAMIC_VERTICAL_REFERENCE_FRAME
enumerator PJ_TYPE_DATUM_ENSEMBLE
enumerator PJ_TYPE_CRS

Abstract type, not returned by proj_get_type()

enumerator PJ_TYPE_GEODETIC_CRS
enumerator PJ_TYPE_GEOCENTRIC_CRS
enumerator PJ_TYPE_GEOGRAPHIC_CRS

proj_get_type() will never return that type, but PJ_TYPE_GEOGRAPHIC_2D_CRS or PJ_TYPE_GEOGRAPHIC_3D_CRS.

enumerator PJ_TYPE_GEOGRAPHIC_2D_CRS
enumerator PJ_TYPE_GEOGRAPHIC_3D_CRS
enumerator PJ_TYPE_VERTICAL_CRS
enumerator PJ_TYPE_PROJECTED_CRS
enumerator PJ_TYPE_COMPOUND_CRS
enumerator PJ_TYPE_TEMPORAL_CRS
enumerator PJ_TYPE_ENGINEERING_CRS
enumerator PJ_TYPE_BOUND_CRS
enumerator PJ_TYPE_OTHER_CRS
enumerator PJ_TYPE_CONVERSION
enumerator PJ_TYPE_TRANSFORMATION
enumerator PJ_TYPE_CONCATENATED_OPERATION
enumerator PJ_TYPE_OTHER_COORDINATE_OPERATION
enumerator PJ_TYPE_TEMPORAL_DATUM
enumerator PJ_TYPE_ENGINEERING_DATUM
enumerator PJ_TYPE_PARAMETRIC_DATUM
enumerator PJ_TYPE_DERIVED_PROJECTED_CRS
enumerator PJ_TYPE_COORDINATE_METADATA
enum PJ_COMPARISON_CRITERION

Comparison criterion.

Values:

enumerator PJ_COMP_STRICT

All properties are identical.

enumerator PJ_COMP_EQUIVALENT

The objects are equivalent for the purpose of coordinate operations. They can differ by the name of their objects, identifiers, other metadata. Parameters may be expressed in different units, provided that the value is (with some tolerance) the same once expressed in a common unit.

enumerator PJ_COMP_EQUIVALENT_EXCEPT_AXIS_ORDER_GEOGCRS

Same as EQUIVALENT, relaxed with an exception that the axis order of the base CRS of a DerivedCRS/ProjectedCRS or the axis order of a GeographicCRS is ignored. Only to be used with DerivedCRS/ProjectedCRS/GeographicCRS

enum PJ_WKT_TYPE

WKT version.

Values:

enumerator PJ_WKT2_2015

cf osgeo::proj::io::WKTFormatter::Convention::WKT2

enumerator PJ_WKT2_2015_SIMPLIFIED

cf osgeo::proj::io::WKTFormatter::Convention::WKT2_SIMPLIFIED

enumerator PJ_WKT2_2019

cf osgeo::proj::io::WKTFormatter::Convention::WKT2_2019

enumerator PJ_WKT2_2018

Deprecated alias for PJ_WKT2_2019

enumerator PJ_WKT2_2019_SIMPLIFIED

cf osgeo::proj::io::WKTFormatter::Convention::WKT2_2019_SIMPLIFIED

enumerator PJ_WKT2_2018_SIMPLIFIED

Deprecated alias for PJ_WKT2_2019

enumerator PJ_WKT1_GDAL

cf osgeo::proj::io::WKTFormatter::Convention::WKT1_GDAL

enumerator PJ_WKT1_ESRI

cf osgeo::proj::io::WKTFormatter::Convention::WKT1_ESRI

enum PROJ_CRS_EXTENT_USE

Specify how source and target CRS extent should be used to restrict candidate operations (only taken into account if no explicit area of interest is specified.

Values:

enumerator PJ_CRS_EXTENT_NONE

Ignore CRS extent

enumerator PJ_CRS_EXTENT_BOTH

Test coordinate operation extent against both CRS extent.

enumerator PJ_CRS_EXTENT_INTERSECTION

Test coordinate operation extent against the intersection of both CRS extent.

enumerator PJ_CRS_EXTENT_SMALLEST

Test coordinate operation against the smallest of both CRS extent.

enum PROJ_GRID_AVAILABILITY_USE

Describe how grid availability is used.

Values:

enumerator PROJ_GRID_AVAILABILITY_USED_FOR_SORTING

Grid availability is only used for sorting results. Operations where some grids are missing will be sorted last.

enumerator PROJ_GRID_AVAILABILITY_DISCARD_OPERATION_IF_MISSING_GRID

Completely discard an operation if a required grid is missing.

enumerator PROJ_GRID_AVAILABILITY_IGNORED

Ignore grid availability at all. Results will be presented as if all grids were available.

enumerator PROJ_GRID_AVAILABILITY_KNOWN_AVAILABLE

Results will be presented as if grids known to PROJ (that is registered in the grid_alternatives table of its database) were available. Used typically when networking is enabled.

enum PJ_PROJ_STRING_TYPE

PROJ string version.

Values:

enumerator PJ_PROJ_5

cf osgeo::proj::io::PROJStringFormatter::Convention::PROJ_5

enumerator PJ_PROJ_4

cf osgeo::proj::io::PROJStringFormatter::Convention::PROJ_4

enum PROJ_SPATIAL_CRITERION

Spatial criterion to restrict candidate operations.

Values:

enumerator PROJ_SPATIAL_CRITERION_STRICT_CONTAINMENT

The area of validity of transforms should strictly contain the are of interest.

enumerator PROJ_SPATIAL_CRITERION_PARTIAL_INTERSECTION

The area of validity of transforms should at least intersect the area of interest.

enum PROJ_INTERMEDIATE_CRS_USE

Describe if and how intermediate CRS should be used

Values:

enumerator PROJ_INTERMEDIATE_CRS_USE_ALWAYS

Always search for intermediate CRS.

enumerator PROJ_INTERMEDIATE_CRS_USE_IF_NO_DIRECT_TRANSFORMATION

Only attempt looking for intermediate CRS if there is no direct transformation available.

enumerator PROJ_INTERMEDIATE_CRS_USE_NEVER
enum PJ_COORDINATE_SYSTEM_TYPE

Type of coordinate system.

Values:

enumerator PJ_CS_TYPE_UNKNOWN
enumerator PJ_CS_TYPE_CARTESIAN
enumerator PJ_CS_TYPE_ELLIPSOIDAL
enumerator PJ_CS_TYPE_VERTICAL
enumerator PJ_CS_TYPE_SPHERICAL
enumerator PJ_CS_TYPE_ORDINAL
enumerator PJ_CS_TYPE_PARAMETRIC
enumerator PJ_CS_TYPE_DATETIMETEMPORAL
enumerator PJ_CS_TYPE_TEMPORALCOUNT
enumerator PJ_CS_TYPE_TEMPORALMEASURE
typedef char **PROJ_STRING_LIST

Type representing a NULL terminated list of NULL-terminate strings.

struct PROJ_CRS_INFO
#include <proj.h>

Structure given overall description of a CRS.

This structure may grow over time, and should not be directly allocated by client code.

Public Members

char *auth_name

Authority name.

char *code

Object code.

char *name

Object name.

PJ_TYPE type

Object type.

int deprecated

Whether the object is deprecated

int bbox_valid

Whereas the west_lon_degree, south_lat_degree, east_lon_degree and north_lat_degree fields are valid.

double west_lon_degree

Western-most longitude of the area of use, in degrees.

double south_lat_degree

Southern-most latitude of the area of use, in degrees.

double east_lon_degree

Eastern-most longitude of the area of use, in degrees.

double north_lat_degree

Northern-most latitude of the area of use, in degrees.

char *area_name

Name of the area of use.

char *projection_method_name

Name of the projection method for a projected CRS. Might be NULL even for projected CRS in some cases.

char *celestial_body_name

Name of the celestial body of the CRS (e.g. "Earth").

Since

8.1

struct PROJ_CRS_LIST_PARAMETERS
#include <proj.h>

Structure describing optional parameters for proj_get_crs_list();.

This structure may grow over time, and should not be directly allocated by client code.

Public Members

const PJ_TYPE *types

Array of allowed object types. Should be NULL if all types are allowed

size_t typesCount

Size of types. Should be 0 if all types are allowed

int crs_area_of_use_contains_bbox

If TRUE and bbox_valid == TRUE, then only CRS whose area of use entirely contains the specified bounding box will be returned. If FALSE and bbox_valid == TRUE, then only CRS whose area of use intersects the specified bounding box will be returned.

int bbox_valid

To set to TRUE so that west_lon_degree, south_lat_degree, east_lon_degree and north_lat_degree fields are taken into account.

double west_lon_degree

Western-most longitude of the area of use, in degrees.

double south_lat_degree

Southern-most latitude of the area of use, in degrees.

double east_lon_degree

Eastern-most longitude of the area of use, in degrees.

double north_lat_degree

Northern-most latitude of the area of use, in degrees.

int allow_deprecated

Whether deprecated objects are allowed. Default to FALSE.

const char *celestial_body_name

Celestial body of the CRS (e.g. "Earth"). The default value, NULL, means no restriction

Since

8.1

struct PROJ_UNIT_INFO
#include <proj.h>

Structure given description of a unit.

This structure may grow over time, and should not be directly allocated by client code.

Since

7.1

Public Members

char *auth_name

Authority name.

char *code

Object code.

char *name

Object name. For example "metre", "US survey foot", etc.

char *category

Category of the unit: one of "linear", "linear_per_time", "angular", "angular_per_time", "scale", "scale_per_time" or "time"

double conv_factor

Conversion factor to apply to transform from that unit to the corresponding SI unit (metre for "linear", radian for "angular", etc.). It might be 0 in some cases to indicate no known conversion factor.

char *proj_short_name

PROJ short name, like "m", "ft", "us-ft", etc... Might be NULL

int deprecated

Whether the object is deprecated

struct PROJ_CELESTIAL_BODY_INFO
#include <proj.h>

Structure given description of a celestial body.

This structure may grow over time, and should not be directly allocated by client code.

Since

8.1

Public Members

char *auth_name

Authority name.

char *name

Object name. For example "Earth"

enum PJ_UNIT_TYPE

Type of unit of measure.

Values:

enumerator PJ_UT_ANGULAR

Angular unit of measure

enumerator PJ_UT_LINEAR

Linear unit of measure

enumerator PJ_UT_SCALE

Scale unit of measure

enumerator PJ_UT_TIME

Time unit of measure

enumerator PJ_UT_PARAMETRIC

Parametric unit of measure

enum PJ_CARTESIAN_CS_2D_TYPE

Type of Cartesian 2D coordinate system.

Values:

enumerator PJ_CART2D_EASTING_NORTHING

Easting-Norting

enumerator PJ_CART2D_NORTHING_EASTING

Northing-Easting

enumerator PJ_CART2D_NORTH_POLE_EASTING_SOUTH_NORTHING_SOUTH

North Pole Easting/SOUTH-Norting/SOUTH

enumerator PJ_CART2D_SOUTH_POLE_EASTING_NORTH_NORTHING_NORTH

South Pole Easting/NORTH-Norting/NORTH

enumerator PJ_CART2D_WESTING_SOUTHING

Westing-southing

enum PJ_ELLIPSOIDAL_CS_2D_TYPE

Type of Ellipsoidal 2D coordinate system.

Values:

enumerator PJ_ELLPS2D_LONGITUDE_LATITUDE

Longitude-Latitude

enumerator PJ_ELLPS2D_LATITUDE_LONGITUDE

Latitude-Longitude

enum PJ_ELLIPSOIDAL_CS_3D_TYPE

Type of Ellipsoidal 3D coordinate system.

Values:

enumerator PJ_ELLPS3D_LONGITUDE_LATITUDE_HEIGHT

Longitude-Latitude-Height(up)

enumerator PJ_ELLPS3D_LATITUDE_LONGITUDE_HEIGHT

Latitude-Longitude-Height(up)

struct PJ_AXIS_DESCRIPTION
#include <proj.h>

Axis description.

struct PJ_PARAM_DESCRIPTION
#include <proj.h>

Description of a parameter value for a Conversion.