Skip to content

Get the central longitude from any transformation / projection #306

@asinghvi17

Description

@asinghvi17

It's possible to do this arbitrarily by using Proj:

PJ *proj_get_prime_meridian(PJ_CONTEXT *ctx, const PJ *obj)
Get the prime meridian of a CRS or a GeodeticReferenceFrame.

The returned object must be unreferenced with proj_destroy() after use. It should be used by at most one thread at a time.

Parameters
:
ctx -- PROJ context, or NULL for default context

obj -- Object of type CRS or GeodeticReferenceFrame (must not be NULL)

Returns
:
Object that must be unreferenced with proj_destroy(), or NULL in case of error.

int proj_prime_meridian_get_parameters(PJ_CONTEXT *ctx, const PJ *prime_meridian, double *out_longitude, double *out_unit_conv_factor, const char **out_unit_name)
Return prime meridian parameters.

Parameters
:
ctx -- PROJ context, or NULL for default context

prime_meridian -- Object of type PrimeMeridian (must not be NULL)

out_longitude -- Pointer to a value to store the longitude of the prime meridian, in its native unit. or NULL

out_unit_conv_factor -- Pointer to a value to store the conversion factor of the prime meridian longitude unit to radian. or NULL

out_unit_name -- Pointer to a string value to store the unit name. or NULL

Returns
:
TRUE in case of success.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions