pe_factory |
Creates the specified object
struct pe_struct_t *pe_factory (int code);
code | The code of the predefined object |
Pe_factory creates the predefined object with the specified code. You can generate any type of predefined object with pe_factory. If you know the object type, use the appropriate pe_factory_<object> function. The object-specific factory functions are faster and more efficient than pe_factory.
On success, the new object with attributes equal to the corresponding arguments; on failure, a null pointer
PE_DATUM adindan = pe_factory(PE_D_ADINDAN);
PE_DATUM adindan_fast = pe_factory_datum(PE_D_ADINDAN);
PE_GEOGCS gcs2 = pe_factory(PE_GCS_GDA_1994);
PE_GEOGCS gcs2_fast = pe_factory_geogcs(PE_GCS_GDA_1994);
PE_PARAMETER cm = pe_factory(PE_PAR_CENTRAL_MERIDIAN);
PE_PARAMETER cm_fast = pe_factory_parameter(PE_PAR_CENTRAL_MERIDIAN);
PE_METHOD three_par = pe_factory(PE_MTH_GEOCENTRIC_TRANSLATION);
PE_METHOD three_par_fast = pe_factory_method(PE_MTH_GEOCENTRIC_TRANSLATION);
PE_PRIMEM pm2 = pe_factory(PE_PM_GREENWICH);
PE_PRIMEM pm2_fast = pe_factory_primem(PE_PM_GREENWICH);
PE_PROJCS cal5 = pe_factory(PE_PCS_NAD_1927_CA_V);
PE_PROJCS cal5_fast = pe_factory_projcs(PE_PCS_NAD_1927_CA_V);
PE_PROJECTION mercator = pe_factory(PE_PRJ_MERCATOR);
PE_PROJECTION mercator_fast = pe_factory_projection(PE_PRJ_MERCATOR);
PE_SPHEROID wgs84 = pe_factory(PE_S_WGS_1984);
PE_SPHEROID wgs84_fast = pe_factory_spheroid(PE_S_WGS_1984);
PE_UNIT m = pe_factory(PE_U_METER);
PE_UNIT m_fast = pe_factory_unit(PE_U_METER);