PROJ.4

Datum
You can use the +nadgrids-Parameter to select an existing gridfile or define your own datum with the +towgs84 Parameter to use a 3- or 7-Parameter Transformation. To use the buildin "datums" (or dati?) you can use the +datum-Parameter and select one of the DatumCode in the following list from pj_datums.c (e.g. +datum=NAD27).

Prime Meridian
To define a Primemeridian for your Projection, you can use the +pm-Parameter with a numeric value (e.g. +pm=5) or use one of the cities in the PrimeMeridianCode column (e.g. +pm=madrid) from the table below - extracted from pj_datums.c

Spheroid
To define a Spheroid (Ellipsoid or Sphere) for your Projection, you can use the +a-, +es-, +e-, +f-, +b- and +rf-Parameters (see Table below), or you can use the +ellps-Parameter (e.g. +ellps=clrk66) with one of the predefined SpheroidCodes from the following table - extracted from pj_ellps.c.

Units
If you don't set Units, the default is 'm'=Meter. If you want to define other Units for your Projection with the +units- or the +vunits-Parameter, you MUST use one of the UnitCode from the following table - extracted from pj_units.c. But you can overwrite the internal calculation, when you define your own Multiplier to convert map units to 1.0m with the +to_meter- and +vto_meter-Parameter (e.g. to_meter=1.1).

Errors
If no Error occures, the global int variable 'pj_errno' is set to 0. If trapped errors occures, the value should be one of the ErrNum in the following table - extracted from pj_strerrno.c. All definded Errors are negative to not overlap with C-[Runtime]-Errors. But not all input is checked in all Projections and no try-catch is performed. So calculate with overflows, Infs and NaNs.

If Error occures during Projection, sometimes an error is set, but often the returned Coordinates are set to HUGE_VAL (e.g. PJ_lsat.c, PJ_mod_ster.c). So check your returned Coordinates for HUGE_VAL. HUGE_VAL is a valid double value (NOT NotANumer NaN). HUGE_VAL is defined in math.h and exported from crt as _HUGE = Positive infinity = 1,#INF. If you can not direct access or define HUGE_VAL, then use DBL_MAX defined in float.h as '#define DBL_MAX 1.7976931348623158e+308' and check, if the returned Coordinates are below (e.g. fabs(x) < DBL_MAX).

Parameters
The Projection is initialised with the functions pj_init, pj_init_ctx, pj_init_plus or pj_init_plus_ctx. These function can handle up to 200 Parameters defining (or NOT) the Projection.

All Parameters are case sensitive (C-Style). So if you want to store all Parameters in a Database-Table as Primary-Key, use a DataType of varchar which is case sensitive (in MsSQL use: 'Create Table tbl_Params(ParamName Varchar(50) Not Null Collate Latin1_General_Bin Primary Key)' ; in MsAccess/Jet4 use DataDefinition-Query with SQL 'Create Table tbl_Params(ParamName Varbinary(100) Not Null Primary Key)').

There is no central *.pdf-, *.doc-, *.ini-, *.def-, *.c. or *.h-File describing all Parameters. You can find the description of some Parameters in 'General Parameters' (http://trac.osgeo.org/proj/wiki/GenParms, and http://proj.maptools.org/gen_parms.html). But the most developer of the Package (a lot), use the build in function pj_param to query their Parameters. The following List is just an extraction of all sourcefiles (Version 4.33++) where the pj_param is used. The Parameters Flagged with CheckedOnInit=1 should be save, because they are evaluated by the init-functions (pj_init, pj_init_ctx, pj_init_plus or pj_init_plus_ctx) and everyone depends on it. All others Parameters could have a Multi-DataType-Multi-Meaning depending on the Projection which is initialised with the +proj-Parameter. For example: +xx=20001231 could be a date, string, long or double in different Projections (see +n- and +south-Paramter below). You even can use your own Parameters like +title=xxx to query it in some derived Softwarepackages.

Every developer can use his/her own style, Datatype and NamingConvention to create Parameters and Variables for his/her Projection Implementation. That is a problem, but maybe the reason for the great success of this Library.

Projections
SinceVersion means the first version that support the projection, a blank in the field means the projection has not been implemented. This table has been updated to PROJ.4 version 4.9.2.