pe_proj_geog

Converts between projected and geographic coordinate systems

Usage syntax

int pe_proj_geog (PE_PROJCS projcs, int n, double coord[][2], int transform_direction);

Parameters
projcs Projected coordinate system object
n Number of points
coord Array of points
transform_direction The direction of the projection (forward or reverse)
Description

Pe_proj_geog applies the map projection transformation to the specified array of points. This function combines pe_geog_to_proj and pe_proj_to_geog by including a parameter that specifies the directionality of the map projection. If the transform_direction parameter is set to PE_TRANSFORM_1_TO_2, the input values are assumed to be in a geographic coordinate system and will be projected to the specified projected coordinate system. If transform_direction is PE_TRANSFORM_2_TO_1, the input values are assumed to be in the specified projected coordinate system and will not be projected to a geographic coordinate system.

Returns

Number of points projected successfully

Examples

double pnt[2][2] = {{10,20},{10,30}};
int out = pe_proj_geog(pcs,2,pnt,PE_TRANSFORM_1_TO_2);