aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/PJ_pipeline.c4
-rw-r--r--src/cct.c2
-rw-r--r--src/geodesic.c6
-rw-r--r--src/gie.c36
-rw-r--r--src/pj_apply_gridshift.c10
-rw-r--r--src/pj_gridcatalog.c8
-rw-r--r--src/pj_transform.c96
7 files changed, 81 insertions, 81 deletions
diff --git a/src/PJ_pipeline.c b/src/PJ_pipeline.c
index aa7d76f8..2e5863fd 100644
--- a/src/PJ_pipeline.c
+++ b/src/PJ_pipeline.c
@@ -118,8 +118,8 @@ static PJ_COORD pipeline_forward_4d (PJ_COORD, PJ *P);
static PJ_COORD pipeline_reverse_4d (PJ_COORD, PJ *P);
static XYZ pipeline_forward_3d (LPZ lpz, PJ *P);
static LPZ pipeline_reverse_3d (XYZ xyz, PJ *P);
-static XY pipeline_forward (LP lpz, PJ *P);
-static LP pipeline_reverse (XY xyz, PJ *P);
+static XY pipeline_forward (LP lp, PJ *P);
+static LP pipeline_reverse (XY xy, PJ *P);
diff --git a/src/cct.c b/src/cct.c
index d9d25329..8dd1e0ad 100644
--- a/src/cct.c
+++ b/src/cct.c
@@ -88,7 +88,7 @@ Thomas Knudsen, thokn@sdfe.dk, 2016-05-25/2017-10-26
double proj_strtod(const char *str, char **endptr);
double proj_atof(const char *str);
static void logger(void *data, int level, const char *msg);
-static void print(PJ_LOG_LEVEL verbosity, const char *fmt, ...);
+static void print(PJ_LOG_LEVEL log_level, const char *fmt, ...);
/* Prototypes from functions in this file */
char *column (char *buf, int n);
diff --git a/src/geodesic.c b/src/geodesic.c
index 9904c7fa..3fcfd1c9 100644
--- a/src/geodesic.c
+++ b/src/geodesic.c
@@ -331,7 +331,7 @@ static real Lambda12(const struct geod_geodesic* g,
real* pssig1, real* pcsig1,
real* pssig2, real* pcsig2,
real* peps,
- real* pgomg12,
+ real* pdomg12,
boolx diffp, real* pdlam12,
/* Scratch area of the right size */
real Ca[]);
@@ -481,10 +481,10 @@ void geod_lineinit(struct geod_geodesicline* l,
void geod_gendirectline(struct geod_geodesicline* l,
const struct geod_geodesic* g,
real lat1, real lon1, real azi1,
- unsigned flags, real a12_s12,
+ unsigned flags, real s12_a12,
unsigned caps) {
geod_lineinit(l, g, lat1, lon1, azi1, caps);
- geod_gensetdistance(l, flags, a12_s12);
+ geod_gensetdistance(l, flags, s12_a12);
}
void geod_directline(struct geod_geodesicline* l,
diff --git a/src/gie.c b/src/gie.c
index b81e6bdc..2f3e477d 100644
--- a/src/gie.c
+++ b/src/gie.c
@@ -134,15 +134,15 @@ typedef struct ffio {
size_t level;
} ffio;
-static int get_inp (ffio *F);
-static int skip_to_next_tag (ffio *F);
-static int step_into_gie_block (ffio *F);
-static int locate_tag (ffio *F, const char *tag);
-static int nextline (ffio *F);
-static int at_end_delimiter (ffio *F);
-static const char *at_tag (ffio *F);
-static int at_decorative_element (ffio *F);
-static ffio *ffio_destroy (ffio *F);
+static int get_inp (ffio *G);
+static int skip_to_next_tag (ffio *G);
+static int step_into_gie_block (ffio *G);
+static int locate_tag (ffio *G, const char *tag);
+static int nextline (ffio *G);
+static int at_end_delimiter (ffio *G);
+static const char *at_tag (ffio *G);
+static int at_decorative_element (ffio *G);
+static ffio *ffio_destroy (ffio *G);
static ffio *ffio_create (const char **tags, size_t n_tags, size_t max_record_size);
static const char *gie_tags[] = {
@@ -1172,15 +1172,15 @@ See the PROJ ".gie" test suites for examples of supported formatting.
-static int get_inp (ffio *F);
-static int skip_to_next_tag (ffio *F);
-static int step_into_gie_block (ffio *F);
-static int locate_tag (ffio *F, const char *tag);
-static int nextline (ffio *F);
-static int at_end_delimiter (ffio *F);
-static const char *at_tag (ffio *F);
-static int at_decorative_element (ffio *F);
-static ffio *ffio_destroy (ffio *F);
+static int get_inp (ffio *G);
+static int skip_to_next_tag (ffio *G);
+static int step_into_gie_block (ffio *G);
+static int locate_tag (ffio *G, const char *tag);
+static int nextline (ffio *G);
+static int at_end_delimiter (ffio *G);
+static const char *at_tag (ffio *G);
+static int at_decorative_element (ffio *G);
+static ffio *ffio_destroy (ffio *G);
static ffio *ffio_create (const char **tags, size_t n_tags, size_t max_record_size);
diff --git a/src/pj_apply_gridshift.c b/src/pj_apply_gridshift.c
index 1ef39b20..424dfb11 100644
--- a/src/pj_apply_gridshift.c
+++ b/src/pj_apply_gridshift.c
@@ -174,7 +174,7 @@ static struct CTABLE* find_ctable(projCtx ctx, LP input, int grid_count, PJ_GRID
/* This is the real workhorse, given a gridlist. */
/************************************************************************/
-int pj_apply_gridshift_3( projCtx ctx, PJ_GRIDINFO **tables, int grid_count,
+int pj_apply_gridshift_3( projCtx ctx, PJ_GRIDINFO **gridlist, int gridlist_count,
int inverse, long point_count, int point_offset,
double *x, double *y, double *z )
{
@@ -183,7 +183,7 @@ int pj_apply_gridshift_3( projCtx ctx, PJ_GRIDINFO **tables, int grid_count,
static int debug_count = 0;
(void) z;
- if( tables == NULL || grid_count == 0 )
+ if( gridlist== NULL || gridlist_count == 0 )
{
pj_ctx_set_errno(ctx, PJD_ERR_FAILED_TO_LOAD_GRID);
return PJD_ERR_FAILED_TO_LOAD_GRID;
@@ -202,7 +202,7 @@ int pj_apply_gridshift_3( projCtx ctx, PJ_GRIDINFO **tables, int grid_count,
output.phi = HUGE_VAL;
output.lam = HUGE_VAL;
- ct = find_ctable(ctx, input, grid_count, tables);
+ ct = find_ctable(ctx, input, gridlist_count, gridlist);
if( ct != NULL )
{
output = nad_cvt( input, inverse, ct );
@@ -220,9 +220,9 @@ int pj_apply_gridshift_3( projCtx ctx, PJ_GRIDINFO **tables, int grid_count,
" location (%.7fdW,%.7fdN)",
x[io] * RAD_TO_DEG,
y[io] * RAD_TO_DEG );
- for( itable = 0; itable < grid_count; itable++ )
+ for( itable = 0; itable < gridlist_count; itable++ )
{
- PJ_GRIDINFO *gi = tables[itable];
+ PJ_GRIDINFO *gi = gridlist[itable];
if( itable == 0 )
pj_log( ctx, PJ_LOG_DEBUG_MAJOR, " tried: %s", gi->gridname );
else
diff --git a/src/pj_gridcatalog.c b/src/pj_gridcatalog.c
index 0498d5b0..45876ead 100644
--- a/src/pj_gridcatalog.c
+++ b/src/pj_gridcatalog.c
@@ -234,7 +234,7 @@ int pj_gc_apply_gridshift( PJ *defn, int inverse,
PJ_GRIDINFO *pj_gc_findgrid( projCtx ctx, PJ_GridCatalog *catalog, int after,
LP location, double date,
- PJ_Region *optimal_region,
+ PJ_Region *optional_region,
double *grid_date )
{
int iEntry;
@@ -264,15 +264,15 @@ PJ_GRIDINFO *pj_gc_findgrid( projCtx ctx, PJ_GridCatalog *catalog, int after,
{
if( grid_date )
*grid_date = 0.0;
- if( optimal_region != NULL )
- memset( optimal_region, 0, sizeof(PJ_Region));
+ if( optional_region != NULL )
+ memset( optional_region, 0, sizeof(PJ_Region));
return NULL;
}
if( grid_date )
*grid_date = entry->date;
- if( optimal_region )
+ if( optional_region )
{
}
diff --git a/src/pj_transform.c b/src/pj_transform.c
index 168711ba..3d7bd5c8 100644
--- a/src/pj_transform.c
+++ b/src/pj_transform.c
@@ -495,66 +495,66 @@ static int long_wrap (PJ *P, long n, int dist, double *x) {
/************************************************************************/
int pj_transform(
- PJ *srcdefn, PJ *dstdefn,
+ PJ *src, PJ *dst,
long point_count, int point_offset,
double *x, double *y, double *z
){
int err;
- srcdefn->ctx->last_errno = 0;
- dstdefn->ctx->last_errno = 0;
+ src->ctx->last_errno = 0;
+ dst->ctx->last_errno = 0;
if( point_offset == 0 )
point_offset = 1;
/* Bring input to "normal form": longitude, latitude, ellipsoidal height */
- err = adjust_axes (srcdefn, PJ_INV, point_count, point_offset, x, y, z);
+ err = adjust_axes (src, PJ_INV, point_count, point_offset, x, y, z);
if (err)
return err;
- err = geographic_to_cartesian (srcdefn, PJ_INV, point_count, point_offset, x, y, z);
+ err = geographic_to_cartesian (src, PJ_INV, point_count, point_offset, x, y, z);
if (err)
return err;
- err = projected_to_geographic (srcdefn, point_count, point_offset, x, y, z);
+ err = projected_to_geographic (src, point_count, point_offset, x, y, z);
if (err)
return err;
- err = prime_meridian (srcdefn, PJ_INV, point_count, point_offset, x);
+ err = prime_meridian (src, PJ_INV, point_count, point_offset, x);
if (err)
return err;
- err = height_unit (srcdefn, PJ_INV, point_count, point_offset, z);
+ err = height_unit (src, PJ_INV, point_count, point_offset, z);
if (err)
return err;
- err = geometric_to_orthometric (srcdefn, PJ_INV, point_count, point_offset, x, y, z);
+ err = geometric_to_orthometric (src, PJ_INV, point_count, point_offset, x, y, z);
if (err)
return err;
/* At the center of the process we do the datum shift (if needed) */
- err = datum_transform(srcdefn, dstdefn, point_count, point_offset, x, y, z );
+ err = datum_transform(src, dst, point_count, point_offset, x, y, z );
if (err)
return err;
/* Now get out on the other side: Bring "normal form" to output form */
- err = geometric_to_orthometric (dstdefn, PJ_FWD, point_count, point_offset, x, y, z);
+ err = geometric_to_orthometric (dst, PJ_FWD, point_count, point_offset, x, y, z);
if (err)
return err;
- err = height_unit (dstdefn, PJ_FWD, point_count, point_offset, z);
+ err = height_unit (dst, PJ_FWD, point_count, point_offset, z);
if (err)
return err;
- err = prime_meridian (dstdefn, PJ_FWD, point_count, point_offset, x);
+ err = prime_meridian (dst, PJ_FWD, point_count, point_offset, x);
if (err)
return err;
- err = geographic_to_cartesian (dstdefn, PJ_FWD, point_count, point_offset, x, y, z);
+ err = geographic_to_cartesian (dst, PJ_FWD, point_count, point_offset, x, y, z);
if (err)
return err;
- err = geographic_to_projected (dstdefn, point_count, point_offset, x, y, z);
+ err = geographic_to_projected (dst, point_count, point_offset, x, y, z);
if (err)
return err;
- err = long_wrap (dstdefn, point_count, point_offset, x);
+ err = long_wrap (dst, point_count, point_offset, x);
if (err)
return err;
- err = adjust_axes (dstdefn, PJ_FWD, point_count, point_offset, x, y, z);
+ err = adjust_axes (dst, PJ_FWD, point_count, point_offset, x, y, z);
if (err)
return err;
@@ -799,7 +799,7 @@ int pj_geocentric_from_wgs84( PJ *defn,
/* coordinates in radians in the destination datum. */
/************************************************************************/
-int pj_datum_transform( PJ *srcdefn, PJ *dstdefn,
+int pj_datum_transform( PJ *src, PJ *dst,
long point_count, int point_offset,
double *x, double *y, double *z )
@@ -813,21 +813,21 @@ int pj_datum_transform( PJ *srcdefn, PJ *dstdefn,
/* (ie. only a +ellps declaration, no +datum). This is new */
/* behavior for PROJ 4.6.0. */
/* -------------------------------------------------------------------- */
- if( srcdefn->datum_type == PJD_UNKNOWN
- || dstdefn->datum_type == PJD_UNKNOWN )
+ if( src->datum_type == PJD_UNKNOWN
+ || dst->datum_type == PJD_UNKNOWN )
return 0;
/* -------------------------------------------------------------------- */
/* Short cut if the datums are identical. */
/* -------------------------------------------------------------------- */
- if( pj_compare_datums( srcdefn, dstdefn ) )
+ if( pj_compare_datums( src, dst ) )
return 0;
- src_a = srcdefn->a_orig;
- src_es = srcdefn->es_orig;
+ src_a = src->a_orig;
+ src_es = src->es_orig;
- dst_a = dstdefn->a_orig;
- dst_es = dstdefn->es_orig;
+ dst_a = dst->a_orig;
+ dst_es = dst->es_orig;
/* -------------------------------------------------------------------- */
/* Create a temporary Z array if one is not provided. */
@@ -846,16 +846,16 @@ int pj_datum_transform( PJ *srcdefn, PJ *dstdefn,
/* If this datum requires grid shifts, then apply it to geodetic */
/* coordinates. */
/* -------------------------------------------------------------------- */
- if( srcdefn->datum_type == PJD_GRIDSHIFT )
+ if( src->datum_type == PJD_GRIDSHIFT )
{
- pj_apply_gridshift_2( srcdefn, 0, point_count, point_offset, x, y, z );
- CHECK_RETURN(srcdefn);
+ pj_apply_gridshift_2( src, 0, point_count, point_offset, x, y, z );
+ CHECK_RETURN(src);
src_a = SRS_WGS84_SEMIMAJOR;
src_es = SRS_WGS84_ESQUARED;
}
- if( dstdefn->datum_type == PJD_GRIDSHIFT )
+ if( dst->datum_type == PJD_GRIDSHIFT )
{
dst_a = SRS_WGS84_SEMIMAJOR;
dst_es = SRS_WGS84_ESQUARED;
@@ -865,52 +865,52 @@ int pj_datum_transform( PJ *srcdefn, PJ *dstdefn,
/* Do we need to go through geocentric coordinates? */
/* ==================================================================== */
if( src_es != dst_es || src_a != dst_a
- || srcdefn->datum_type == PJD_3PARAM
- || srcdefn->datum_type == PJD_7PARAM
- || dstdefn->datum_type == PJD_3PARAM
- || dstdefn->datum_type == PJD_7PARAM)
+ || src->datum_type == PJD_3PARAM
+ || src->datum_type == PJD_7PARAM
+ || dst->datum_type == PJD_3PARAM
+ || dst->datum_type == PJD_7PARAM)
{
/* -------------------------------------------------------------------- */
/* Convert to geocentric coordinates. */
/* -------------------------------------------------------------------- */
- srcdefn->ctx->last_errno =
+ src->ctx->last_errno =
pj_geodetic_to_geocentric( src_a, src_es,
point_count, point_offset, x, y, z );
- CHECK_RETURN(srcdefn);
+ CHECK_RETURN(src);
/* -------------------------------------------------------------------- */
/* Convert between datums. */
/* -------------------------------------------------------------------- */
- if( srcdefn->datum_type == PJD_3PARAM
- || srcdefn->datum_type == PJD_7PARAM )
+ if( src->datum_type == PJD_3PARAM
+ || src->datum_type == PJD_7PARAM )
{
- pj_geocentric_to_wgs84( srcdefn, point_count, point_offset,x,y,z);
- CHECK_RETURN(srcdefn);
+ pj_geocentric_to_wgs84( src, point_count, point_offset,x,y,z);
+ CHECK_RETURN(src);
}
- if( dstdefn->datum_type == PJD_3PARAM
- || dstdefn->datum_type == PJD_7PARAM )
+ if( dst->datum_type == PJD_3PARAM
+ || dst->datum_type == PJD_7PARAM )
{
- pj_geocentric_from_wgs84( dstdefn, point_count,point_offset,x,y,z);
- CHECK_RETURN(dstdefn);
+ pj_geocentric_from_wgs84( dst, point_count,point_offset,x,y,z);
+ CHECK_RETURN(dst);
}
/* -------------------------------------------------------------------- */
/* Convert back to geodetic coordinates. */
/* -------------------------------------------------------------------- */
- dstdefn->ctx->last_errno =
+ dst->ctx->last_errno =
pj_geocentric_to_geodetic( dst_a, dst_es,
point_count, point_offset, x, y, z );
- CHECK_RETURN(dstdefn);
+ CHECK_RETURN(dst);
}
/* -------------------------------------------------------------------- */
/* Apply grid shift to destination if required. */
/* -------------------------------------------------------------------- */
- if( dstdefn->datum_type == PJD_GRIDSHIFT )
+ if( dst->datum_type == PJD_GRIDSHIFT )
{
- pj_apply_gridshift_2( dstdefn, 1, point_count, point_offset, x, y, z );
- CHECK_RETURN(dstdefn);
+ pj_apply_gridshift_2( dst, 1, point_count, point_offset, x, y, z );
+ CHECK_RETURN(dst);
}
if( z_is_temp )