From 3ff4a9541679ae2b9f06fc992829cd64f41f624f Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Fri, 21 Sep 2018 13:33:51 +0200 Subject: Replace calls to rtodms/dmstor with proj.h equivalents --- src/proj.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/proj.c b/src/proj.c index 6fe579ee..9d477fc0 100644 --- a/src/proj.c +++ b/src/proj.c @@ -245,8 +245,8 @@ static void vprocess(FILE *fid) { } dat_ll = pj_inv(dat_xy, Proj); } else { - dat_ll.lam = dmstor(s, &s); - dat_ll.phi = dmstor(s, &s); + dat_ll.lam = proj_dmstor(s, &s); + dat_ll.phi = proj_dmstor(s, &s); if (dat_ll.lam == HUGE_VAL || dat_ll.phi == HUGE_VAL) { emess(-1,"lon-lat input conversion failure\n"); continue; @@ -283,10 +283,10 @@ static void vprocess(FILE *fid) { (void)fputs(s, stdout); (void)fputs("Longitude: ", stdout); - (void)fputs(rtodms(pline, dat_ll.lam, 'E', 'W'), stdout); + (void)fputs(proj_rtodms(pline, dat_ll.lam, 'E', 'W'), stdout); (void)printf(" [ %.11g ]\n", dat_ll.lam * RAD_TO_DEG); (void)fputs("Latitude: ", stdout); - (void)fputs(rtodms(pline, dat_ll.phi, 'N', 'S'), stdout); + (void)fputs(proj_rtodms(pline, dat_ll.phi, 'N', 'S'), stdout); (void)printf(" [ %.11g ]\n", dat_ll.phi * RAD_TO_DEG); (void)fputs("Easting (x): ", stdout); (void)printf(oform, dat_xy.x); putchar('\n'); @@ -298,7 +298,7 @@ static void vprocess(FILE *fid) { (void)printf("Angular distortion (w): %.3f\n", facs.omega * RAD_TO_DEG); (void)printf("Meridian/Parallel angle: %.5f\n", facs.thetap * RAD_TO_DEG); (void)printf("Convergence : "); - (void)fputs(rtodms(pline, facs.conv, 0, 0), stdout); + (void)fputs(proj_rtodms(pline, facs.conv, 0, 0), stdout); (void)printf(" [ %.8f ]\n", facs.conv * RAD_TO_DEG); (void)printf("Max-min (Tissot axis a-b) scale error: %.5f %.5f\n\n", facs.a, facs.b); } @@ -530,7 +530,7 @@ int main(int argc, char **argv) { if (inverse) informat = strtod; else { - informat = dmstor; + informat = proj_dmstor; if (!oform) oform = "%.2f"; } -- cgit v1.2.3 From ddc672ee93bd749c81a212379339beb846b5bdf2 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Fri, 21 Sep 2018 14:23:55 +0200 Subject: Replace calls to pj_factors with proj_factors --- src/proj.c | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/src/proj.c b/src/proj.c index 9d477fc0..009ce9d6 100644 --- a/src/proj.c +++ b/src/proj.c @@ -39,7 +39,6 @@ static int inverse = 0, /* != 0 then inverse projection */ prescale = 0, /* != 0 apply cartesian scale factor */ dofactors = 0, /* determine scale factors */ - facs_bad = 0, /* return condition from pj_factors */ very_verby = 0, /* very verbose mode */ postscale = 0; @@ -52,7 +51,7 @@ static const char *oterr = "*\t*", /* output line for unprojectable input */ *usage = "%s\nusage: %s [ -bdeEfiIlmorsStTvVwW [args] ] [ +opts[=arg] ] [ files ]\n"; -static struct FACTORS facs; +static PJ_FACTORS facs; static double (*informat)(const char *, char **), /* input data deformatter function */ fscale = 0.; /* cartesian scale factor */ @@ -79,6 +78,7 @@ static void process(FILE *fid) { PJ_COORD data; for (;;) { + int facs_bad = 0; ++emess_dat.File_line; if (bin_in) { /* binary input */ @@ -124,13 +124,20 @@ static void process(FILE *fid) { } if (data.uv.u != HUGE_VAL) { + PJ_COORD coord; + coord.lp = data.lp; if (prescale) { data.uv.u *= fscale; data.uv.v *= fscale; } - if (dofactors && !inverse) - facs_bad = pj_factors(data.lp, Proj, 0., &facs); + if (dofactors && !inverse) { + facs = proj_factors(Proj, coord); + facs_bad = proj_errno(Proj); + } + data.xy = (*proj.fwd)(data.lp, Proj); - if (dofactors && inverse) - facs_bad = pj_factors(data.lp, Proj, 0., &facs); + if (dofactors && inverse) { + facs = proj_factors(Proj, coord); + facs_bad = proj_errno(Proj); + } if (postscale && data.uv.u != HUGE_VAL) { data.uv.u *= fscale; data.uv.v *= fscale; } @@ -177,8 +184,8 @@ static void process(FILE *fid) { if (dofactors) { if (!facs_bad) (void)printf("\t<%g %g %g %g %g %g>", - facs.h, facs.k, facs.s, - facs.omega * RAD_TO_DEG, facs.a, facs.b); + facs.meridional_scale, facs.parallel_scale, facs.areal_scale, + facs.angular_distortion * RAD_TO_DEG, facs.tissot_semimajor, facs.tissot_semiminor); else (void)fputs("\t<* * * * * *>", stdout); } @@ -192,6 +199,7 @@ static void vprocess(FILE *fid) { LP dat_ll; projXY dat_xy; int linvers; + PJ_COORD coord; if (!oform) @@ -274,7 +282,9 @@ static void vprocess(FILE *fid) { } if (!*s && (s > line)) --s; /* assumed we gobbled \n */ - if (pj_factors(dat_ll, Proj, 0., &facs)) { + coord.lp = dat_ll; + facs = proj_factors(Proj, coord); + if (proj_errno(Proj)) { emess(-1,"failed to compute factors\n\n"); continue; } @@ -292,15 +302,15 @@ static void vprocess(FILE *fid) { (void)printf(oform, dat_xy.x); putchar('\n'); (void)fputs("Northing (y): ", stdout); (void)printf(oform, dat_xy.y); putchar('\n'); - (void)printf("Meridian scale (h) : %.8f ( %.4g %% error )\n", facs.h, (facs.h-1.)*100.); - (void)printf("Parallel scale (k) : %.8f ( %.4g %% error )\n", facs.k, (facs.k-1.)*100.); - (void)printf("Areal scale (s): %.8f ( %.4g %% error )\n", facs.s, (facs.s-1.)*100.); - (void)printf("Angular distortion (w): %.3f\n", facs.omega * RAD_TO_DEG); - (void)printf("Meridian/Parallel angle: %.5f\n", facs.thetap * RAD_TO_DEG); + (void)printf("Meridian scale (h) : %.8f ( %.4g %% error )\n", facs.meridional_scale, (facs.meridional_scale-1.)*100.); + (void)printf("Parallel scale (k) : %.8f ( %.4g %% error )\n", facs.parallel_scale, (facs.parallel_scale-1.)*100.); + (void)printf("Areal scale (s): %.8f ( %.4g %% error )\n", facs.areal_scale, (facs.areal_scale-1.)*100.); + (void)printf("Angular distortion (w): %.3f\n", facs.angular_distortion * RAD_TO_DEG); + (void)printf("Meridian/Parallel angle: %.5f\n", facs.meridian_parallel_angle * RAD_TO_DEG); (void)printf("Convergence : "); - (void)fputs(proj_rtodms(pline, facs.conv, 0, 0), stdout); - (void)printf(" [ %.8f ]\n", facs.conv * RAD_TO_DEG); - (void)printf("Max-min (Tissot axis a-b) scale error: %.5f %.5f\n\n", facs.a, facs.b); + (void)fputs(proj_rtodms(pline, facs.meridian_convergence, 0, 0), stdout); + (void)printf(" [ %.8f ]\n", facs.meridian_convergence * RAD_TO_DEG); + (void)printf("Max-min (Tissot axis a-b) scale error: %.5f %.5f\n\n", facs.tissot_semimajor, facs.tissot_semiminor); } } -- cgit v1.2.3 From b38050198ef10bbdd64905baf090e4dd3d19fce8 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Fri, 21 Sep 2018 14:37:57 +0200 Subject: Remove misspelled-constant PJD_ERR_UNKNOW_UNIT_ID Closes #853 --- src/projects.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/projects.h b/src/projects.h index c4f09a8d..39540fe2 100644 --- a/src/projects.h +++ b/src/projects.h @@ -540,7 +540,6 @@ enum deprecated_constants_for_now_dropped_analytical_factors { #define PJD_ERR_PROJ_NOT_NAMED -4 #define PJD_ERR_UNKNOWN_PROJECTION_ID -5 #define PJD_ERR_ECCENTRICITY_IS_ONE -6 -#define PJD_ERR_UNKNOW_UNIT_ID -7 /* deprecated: typo */ #define PJD_ERR_UNKNOWN_UNIT_ID -7 #define PJD_ERR_INVALID_BOOLEAN_PARAM -8 #define PJD_ERR_UNKNOWN_ELLP_PARAM -9 -- cgit v1.2.3 From a3e88d098bd511ff915ff667be7adbd7ca94938c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Rivi=C3=A8re?= Date: Sat, 22 Sep 2018 21:51:51 +0200 Subject: Fix typo in Plate Carree projection name (#1132) --- src/PJ_eqc.c | 2 +- src/pj_list.h | 2 +- test/gie/builtins.gie | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PJ_eqc.c b/src/PJ_eqc.c index 86845aa3..07d6141c 100644 --- a/src/PJ_eqc.c +++ b/src/PJ_eqc.c @@ -10,7 +10,7 @@ struct pj_opaque { double rc; }; -PROJ_HEAD(eqc, "Equidistant Cylindrical (Plate Caree)") +PROJ_HEAD(eqc, "Equidistant Cylindrical (Plate Carree)") "\n\tCyl, Sph\n\tlat_ts=[, lat_0=0]"; diff --git a/src/pj_list.h b/src/pj_list.h index 0a8d9d1b..dfcfe30a 100644 --- a/src/pj_list.h +++ b/src/pj_list.h @@ -36,7 +36,7 @@ PROJ_HEAD(eck4, "Eckert IV") PROJ_HEAD(eck5, "Eckert V") PROJ_HEAD(eck6, "Eckert VI") PROJ_HEAD(eqearth, "Equal Earth") -PROJ_HEAD(eqc, "Equidistant Cylindrical (Plate Caree)") +PROJ_HEAD(eqc, "Equidistant Cylindrical (Plate Carree)") PROJ_HEAD(eqdc, "Equidistant Conic") PROJ_HEAD(euler, "Euler") PROJ_HEAD(etmerc, "Extended Transverse Mercator" ) diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index b5dc3ab1..1ee968f4 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -1174,7 +1174,7 @@ expect -0.002029979 -0.000789630 =============================================================================== -Equidistant Cylindrical (Plate Caree) +Equidistant Cylindrical (Plate Carree) Cyl, Sph lat_ts=[, lat_0=0] =============================================================================== -- cgit v1.2.3 From a5bc68334f5905111f5e06ce0fd04b6692919710 Mon Sep 17 00:00:00 2001 From: Ivan Veselov Date: Sun, 23 Sep 2018 21:11:10 +0100 Subject: Fix mistakes in function comments --- src/pj_transform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pj_transform.c b/src/pj_transform.c index a2c9950e..f6210822 100644 --- a/src/pj_transform.c +++ b/src/pj_transform.c @@ -128,8 +128,8 @@ static int adjust_axes (PJ *P, PJ_DIRECTION dir, long n, int dist, double *x, do /* ----------------------------------------------------------------------- */ -/* Transform cartesian ("geocentric") source coordinates to lat/long, */ -/* if needed */ +/* Transform geographic (lat/long) source coordinates to */ +/* cartesian ("geocentric"), if needed */ /* ----------------------------------------------------------------------- */ static int geographic_to_cartesian (PJ *P, PJ_DIRECTION dir, long n, int dist, double *x, double *y, double *z) { int res; @@ -632,7 +632,7 @@ int pj_geodetic_to_geocentric( double a, double es, } /************************************************************************/ -/* pj_geodetic_to_geocentric() */ +/* pj_geocentric_to_geodetic() */ /************************************************************************/ int pj_geocentric_to_geodetic( double a, double es, -- cgit v1.2.3 From b65cc5d50414212efa0029e7715c92e880967a4f Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 27 Sep 2018 19:15:13 +0200 Subject: cs2cs_emulation_setup: fix issue with non C-locale in +towgs84 case, we use sprintf() with floating-point formatter to output the ellipsoid parameters. For a locale with decimal separtor != dot, the resulting string will not be parsed correctly by proj_atof(), leading to wrong numeric result. The fix is similar to the one done in pj_latlong_from_proj() Note for later: if using C++, we could use a locale-independent formatting solution to avoid such issue. --- src/pj_utils.c | 2 ++ src/proj_4D_api.c | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/pj_utils.c b/src/pj_utils.c index 3f18cc7e..81a80b45 100644 --- a/src/pj_utils.c +++ b/src/pj_utils.c @@ -105,6 +105,8 @@ PJ *pj_latlong_from_proj( PJ *pj_in ) { char* ptr = defn+strlen(defn); sprintf( ptr, " +es=%.16g", pj_in->es ); + /* TODO later: use C++ ostringstream with imbue(std::locale::classic()) */ + /* to be locale unaware */ for(; *ptr; ptr++) { if( *ptr == ',' ) diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c index 74cf45d6..81967a1d 100644 --- a/src/proj_4D_api.c +++ b/src/proj_4D_api.c @@ -519,6 +519,17 @@ Returns 1 on success, 0 on failure if (P->is_geocent || P->helmert || do_cart) { char def[150]; sprintf (def, "break_cs2cs_recursion proj=cart a=%40.20g es=%40.20g", P->a_orig, P->es_orig); + { + /* In case the current locale does not use dot but comma as decimal */ + /* separator, replace it with dot, so that proj_atof() behaves */ + /* correctly. */ + /* TODO later: use C++ ostringstream with imbue(std::locale::classic()) */ + /* to be locale unaware */ + char* next_pos; + for (next_pos = def; (next_pos = strchr (next_pos, ',')) != NULL; next_pos++) { + *next_pos = '.'; + } + } Q = proj_create (P->ctx, def); if (0==Q) return 0; -- cgit v1.2.3 From 570f569cb6338c3b830b76a55c9f9961da06e6e8 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 29 Sep 2018 13:32:34 +0200 Subject: Doc building: fix warning regarding Altamimi2002 citation not found There was an issue since transformation.rst which uses this citation is alphabetically after references.rst. The documented workaround in https://github.com/mcmtroffaes/sphinxcontrib-bibtex/issues/8 is to rename references.rst as zrefereces.rst, so it is alphabetically last. --- docs/source/index.rst | 2 +- docs/source/references.rst | 11 ----------- docs/source/zreferences.rst | 11 +++++++++++ travis/build_docs.sh | 3 --- 4 files changed, 12 insertions(+), 15 deletions(-) delete mode 100644 docs/source/references.rst create mode 100644 docs/source/zreferences.rst diff --git a/docs/source/index.rst b/docs/source/index.rst index d09424c8..c367cafb 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -20,7 +20,7 @@ PROJ community/index faq glossary - references + zreferences .. only:: html diff --git a/docs/source/references.rst b/docs/source/references.rst deleted file mode 100644 index 384281cd..00000000 --- a/docs/source/references.rst +++ /dev/null @@ -1,11 +0,0 @@ -.. _references: - -.. only:: not latex - - ================================================================================ - References - ================================================================================ - -.. bibliography:: references.bib - :cited: - :style: customstyle diff --git a/docs/source/zreferences.rst b/docs/source/zreferences.rst new file mode 100644 index 00000000..384281cd --- /dev/null +++ b/docs/source/zreferences.rst @@ -0,0 +1,11 @@ +.. _references: + +.. only:: not latex + + ================================================================================ + References + ================================================================================ + +.. bibliography:: references.bib + :cited: + :style: customstyle diff --git a/travis/build_docs.sh b/travis/build_docs.sh index d62384f1..d6d38b3a 100755 --- a/travis/build_docs.sh +++ b/travis/build_docs.sh @@ -9,9 +9,6 @@ fi cd docs echo "building docs for $TRAVIS_BUILD_DIR/docs" docker run --user $(id -u):$(id -g) -v $TRAVIS_BUILD_DIR:/data -w /data/docs osgeo/proj-docs make html -# workaround for issue with sphinxcontrib-bibtex -docker run --user $(id -u):$(id -g) -v $TRAVIS_BUILD_DIR:/data -w /data/docs osgeo/proj-docs touch source/references.rst -docker run --user $(id -u):$(id -g) -v $TRAVIS_BUILD_DIR:/data -w /data/docs osgeo/proj-docs make html docker run --user $(id -u):$(id -g) -v $TRAVIS_BUILD_DIR:/data -w /data/docs osgeo/proj-docs make latexpdf -- cgit v1.2.3 From 3bb6d226fe1252924d60a28a0378a6979cd72c9c Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 29 Sep 2018 13:34:54 +0200 Subject: Doc building: enforce warning as errors mode --- docs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Makefile b/docs/Makefile index ec0a2e6e..2540fdff 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -2,7 +2,7 @@ # # You can set these variables from the command line. -SPHINXOPTS = +SPHINXOPTS = -W SPHINXBUILD = sphinx-build PAPER = BUILDDIR = build -- cgit v1.2.3 From 1583a566a208d2451fb1acc8bcf16fbd8151983e Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 29 Sep 2018 10:01:48 +0200 Subject: Add geographic offset transformation method. The Geographic offsets transformation adds an offset to the geographic longitude, latitude coordinates, and an offset to the ellipsoidal height. This method is normally only used when low accuracy is tolerated. It is documented as coordinate operation method code 9619 (for geographic 2D) and 9660 (for geographic 3D) in the EPSG dataset. It can also be used to implement the method Geographic2D with Height Offsets (code 9618) by noting that the input vertical component is a gravity-related height and the output vertical component is the ellispoid height (dh being the geoid undulation). It can also be used to implement the method Vertical offset (code 9616) It is used for example to transform: - from the old Greek geographic 2D CRS to the newer GGRS87 CRS - from Tokyo + JSLD69 height to WGS 84 - from Baltic 1977 height to Black Sea height It is also useful to document the implicit zero-offset transformation we do in pipelines such as +proj=pipeline +step +inv +proj=longlat +ellps=A +step +proj=longlat +ellps=B that can be explicited as +proj=pipeline +step +inv +proj=longlat +ellps=A +step +proj=geogoffset [+dlon=0 +dlat=0 +dh=0] +step +proj=longlat +ellps=B --- .../operations/transformations/geogoffset.rst | 68 +++++++++++++ docs/source/operations/transformations/index.rst | 1 + docs/source/references.bib | 8 ++ src/Makefile.am | 2 +- src/PJ_geogoffset.c | 111 +++++++++++++++++++++ src/lib_proj.cmake | 1 + src/makefile.vc | 2 +- src/pj_list.h | 1 + test/gie/more_builtins.gie | 32 ++++++ 9 files changed, 224 insertions(+), 2 deletions(-) create mode 100644 docs/source/operations/transformations/geogoffset.rst create mode 100644 src/PJ_geogoffset.c diff --git a/docs/source/operations/transformations/geogoffset.rst b/docs/source/operations/transformations/geogoffset.rst new file mode 100644 index 00000000..91c91c83 --- /dev/null +++ b/docs/source/operations/transformations/geogoffset.rst @@ -0,0 +1,68 @@ +.. _geogoffset: + +================================================================================ +Geographic offsets +================================================================================ + +.. versionadded:: 6.0.0 + +The Geographic offsets transformation adds an offset to the geographic longitude, +latitude coordinates, and an offset to the ellipsoidal height. + ++---------------------+----------------------------------------------------------+ +| **Alias** | geogoffset | ++---------------------+----------------------------------------------------------+ +| **Domain** | 3D | ++---------------------+----------------------------------------------------------+ +| **Input type** | Geodetic coordinates (horizontal), meters (vertical) | ++---------------------+----------------------------------------------------------+ +| **output type** | Geodetic coordinates (horizontal), meters (vertical) | ++---------------------+----------------------------------------------------------+ + +This method is normally only used when low accuracy is tolerated. It is documented +as coordinate operation method code 9619 (for geographic 2D) and 9660 (for +geographic 3D) in the EPSG dataset (:cite:`EPSGGuidanceNumber7Part2`) + +It can also be used to implement the method Geographic2D with Height Offsets +(code 9618) by noting that the input vertical component is a gravity-related +height and the output vertical component is the ellispoid height (dh being +the geoid undulation). + +It can also be used to implement the method Vertical offset (code 9616) + +The reverse transformation simply consists in subtracting the offsets. + +Examples +############################################################################### + +Geographic offset from the old Greek geographic 2D CRS to the newer GGRS87 CRS:: + + proj=geogoffset dlon=0.28 dlat=-5.86 + +Conversion from Tokyo + JSLD69 height to WGS 84:: + + proj=geogoffset dlon=-13.97 dlat=7.94 dh=26.9 + +Conversion from Baltic 1977 height to Black Sea height:: + + proj=geogoffset dh=0.4 + + +Parameters +################################################################################ + +Optional +------------------------------------------------------------------------------- + +.. option:: +dlon= + + Offset in longitude, expressed in arc-second, to add. + +.. option:: +dlat= + + Offset in latitude, expressed in arc-second, to add. + +.. option:: +dh= + + Offset in height, expressed in meter, to add. + diff --git a/docs/source/operations/transformations/index.rst b/docs/source/operations/transformations/index.rst index 5112ffa2..c2fe6baa 100644 --- a/docs/source/operations/transformations/index.rst +++ b/docs/source/operations/transformations/index.rst @@ -11,6 +11,7 @@ systems are based on different datums. :maxdepth: 1 deformation + geogoffset helmert molodensky hgridshift diff --git a/docs/source/references.bib b/docs/source/references.bib index bd3089ee..0fb077ec 100644 --- a/docs/source/references.bib +++ b/docs/source/references.bib @@ -82,6 +82,14 @@ Url = {http://www.calcofi.org/publications/calcofireports/v20/Vol_20_Eber___Hewitt.pdf} } +@Manual{EPSGGuidanceNumber7Part2, + Title = {Geomatics Guidance Note 7, part 2 - Coordinate Conversions & Transformations including Formulas}, + Institution = {International Association For Oil And Gas Producers}, + Year = {2018}, + + Url = {https://www.iogp.org/bookstore/product/coordinate-conversions-and-transformation-including-formulas/} +} + @Manual{Evenden2005, Title = {libproj4: A Comprehensive Library of Cartographic Projection Functions (Preliminary Draft)}, Author = {G. I. Evenden}, diff --git a/src/Makefile.am b/src/Makefile.am index 84846c1c..2320e812 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -89,7 +89,7 @@ libproj_la_SOURCES = \ \ proj_4D_api.c PJ_cart.c PJ_pipeline.c PJ_horner.c PJ_helmert.c \ PJ_vgridshift.c PJ_hgridshift.c PJ_unitconvert.c PJ_molodensky.c \ - PJ_deformation.c pj_internal.c PJ_axisswap.c + PJ_deformation.c pj_internal.c PJ_axisswap.c PJ_geogoffset.c install-exec-local: rm -f $(DESTDIR)$(bindir)/invproj$(EXEEXT) diff --git a/src/PJ_geogoffset.c b/src/PJ_geogoffset.c new file mode 100644 index 00000000..7f917fd7 --- /dev/null +++ b/src/PJ_geogoffset.c @@ -0,0 +1,111 @@ +/************************************************************************ +* Copyright (c) 2018, Even Rouault +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included +* in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +* DEALINGS IN THE SOFTWARE. +* +***********************************************************************/ +#define PJ_LIB__ + +#include +#include + +#include "proj.h" +#include "projects.h" + +PROJ_HEAD(geogoffset, "Geographic Offset"); + +struct pj_opaque_geogoffset { + double dlon; + double dlat; + double dh; +}; + + +static PJ_COORD forward_4d(PJ_COORD obs, PJ *P) { + struct pj_opaque_geogoffset *Q = (struct pj_opaque_geogoffset *) P->opaque; + /* offset coordinate */ + obs.lpz.lam += Q->dlon; + obs.lpz.phi += Q->dlat; + obs.lpz.z += Q->dh; + return obs; +} + +static XYZ forward_3d(LPZ lpz, PJ *P) { + PJ_COORD point = {{0,0,0,0}}; + point.lpz = lpz; + return forward_4d(point, P).xyz; +} + + +static XY forward_2d(LP lp, PJ *P) { + PJ_COORD point = {{0,0,0,0}}; + point.lp = lp; + return forward_4d(point, P).xy; +} + + +static PJ_COORD reverse_4d(PJ_COORD obs, PJ *P) { + struct pj_opaque_geogoffset *Q = (struct pj_opaque_geogoffset *) P->opaque; + /* offset coordinate */ + obs.lpz.lam -= Q->dlon; + obs.lpz.phi -= Q->dlat; + obs.lpz.z -= Q->dh; + return obs; +} + +static LPZ reverse_3d(XYZ xyz, PJ *P) { + PJ_COORD point = {{0,0,0,0}}; + point.xyz = xyz; + return reverse_4d(point, P).lpz; +} + +static LP reverse_2d(XY xy, PJ *P) { + PJ_COORD point = {{0,0,0,0}}; + point.xy = xy; + return reverse_4d(point, P).lp; +} + + +/* Arcsecond to radians */ +#define ARCSEC_TO_RAD (DEG_TO_RAD / 3600.0) + + +PJ *TRANSFORMATION(geogoffset,0 /* no need for ellipsoid */) { + struct pj_opaque_geogoffset *Q = pj_calloc(1, sizeof(struct pj_opaque_geogoffset)); + if (0==Q) + return pj_default_destructor(P, ENOMEM); + P->opaque = (void *) Q; + + P->fwd4d = forward_4d; + P->inv4d = reverse_4d; + P->fwd3d = forward_3d; + P->inv3d = reverse_3d; + P->fwd = forward_2d; + P->inv = reverse_2d; + + P->left = PJ_IO_UNITS_ANGULAR; + P->right = PJ_IO_UNITS_ANGULAR; + + /* read args */ + Q->dlon = pj_param(P->ctx, P->params, "ddlon").f * ARCSEC_TO_RAD; + Q->dlat = pj_param(P->ctx, P->params, "ddlat").f * ARCSEC_TO_RAD; + Q->dh = pj_param(P->ctx, P->params, "ddh").f; + + return P; +} diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake index 0779568a..f1e76ff3 100644 --- a/src/lib_proj.cmake +++ b/src/lib_proj.cmake @@ -72,6 +72,7 @@ SET(SRC_LIBPROJ_PJ PJ_fouc_s.c PJ_gall.c PJ_geoc.c + PJ_geogoffset.c PJ_geos.c PJ_gins8.c PJ_gnom.c diff --git a/src/makefile.vc b/src/makefile.vc index cf9d878c..21db1362 100644 --- a/src/makefile.vc +++ b/src/makefile.vc @@ -61,7 +61,7 @@ support = \ pipeline = \ proj_4D_api.obj PJ_cart.obj PJ_pipeline.obj PJ_horner.obj PJ_helmert.obj \ PJ_vgridshift.obj PJ_hgridshift.obj PJ_unitconvert.obj PJ_molodensky.obj \ - PJ_deformation.obj PJ_axisswap.obj + PJ_deformation.obj PJ_axisswap.obj PJ_geogoffset.obj geodesic = geodesic.obj diff --git a/src/pj_list.h b/src/pj_list.h index dfcfe30a..6d94f4fd 100644 --- a/src/pj_list.h +++ b/src/pj_list.h @@ -46,6 +46,7 @@ PROJ_HEAD(fouc_s, "Foucaut Sinusoidal") PROJ_HEAD(gall, "Gall (Gall Stereographic)") PROJ_HEAD(geoc, "Geocentric Latitude") PROJ_HEAD(geocent, "Geocentric") +PROJ_HEAD(geogoffset, "Geographic Offset") PROJ_HEAD(geos, "Geostationary Satellite View") PROJ_HEAD(gins8, "Ginsburg VIII (TsNIIGAiK)") PROJ_HEAD(gn_sinu, "General Sinusoidal Series") diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie index 96212cba..d3fe64f6 100644 --- a/test/gie/more_builtins.gie +++ b/test/gie/more_builtins.gie @@ -557,6 +557,38 @@ expect 0 -90 ------------------------------------------------------------------------------- + +------------------------------------------------------------------------------- +Test for PJ_geogoffset +------------------------------------------------------------------------------- +------------------------------------------------------------------------------- +operation +proj=geogoffset +------------------------------------------------------------------------------- +direction forward +tolerance 1mm + +accept 10 20 +expect 10 20 +roundtrip 1 + +------------------------------------------------------------------------------- +operation +proj=geogoffset +dlon=3600 +dlat=-3600 +dh=3 +------------------------------------------------------------------------------- +direction forward +tolerance 1mm + +accept 10 20 +expect 11 19 +roundtrip 1 + +accept 10 20 30 +expect 11 19 33 +roundtrip 1 + +accept 10 20 30 40 +expect 11 19 33 40 +roundtrip 1 + ------------------------------------------------------------------------------- run the few gie-builtin tests, which are currently either awkward or impossible to express in the gie command set -- cgit v1.2.3 From fe29f8acdce81607c11a597f4bffc7ff61fa9c19 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 1 Oct 2018 12:32:52 +0200 Subject: Add a affine transformation method, and make geogoffset as a particular case of it (fixes #535) --- docs/source/operations/transformations/affine.rst | 123 +++++++++++ .../operations/transformations/geogoffset.rst | 2 + docs/source/operations/transformations/index.rst | 1 + src/Makefile.am | 2 +- src/PJ_affine.c | 246 +++++++++++++++++++++ src/PJ_geogoffset.c | 111 ---------- src/lib_proj.cmake | 2 +- src/makefile.vc | 2 +- src/pj_list.h | 1 + test/gie/more_builtins.gie | 46 +++- 10 files changed, 421 insertions(+), 115 deletions(-) create mode 100644 docs/source/operations/transformations/affine.rst create mode 100644 src/PJ_affine.c delete mode 100644 src/PJ_geogoffset.c diff --git a/docs/source/operations/transformations/affine.rst b/docs/source/operations/transformations/affine.rst new file mode 100644 index 00000000..8b1681b3 --- /dev/null +++ b/docs/source/operations/transformations/affine.rst @@ -0,0 +1,123 @@ +.. _affine: + +================================================================================ +Affine transformation +================================================================================ + +.. versionadded:: 6.0.0 + +The affine transformation applies translation and scaling/rotation terms on the +x,y,z coordinates, and translation and scaling on the temporal cordinate. + ++---------------------+----------------------------------------------------------+ +| **Alias** | affine | ++---------------------+----------------------------------------------------------+ +| **Domain** | 4D | ++---------------------+----------------------------------------------------------+ +| **Input type** | XYZT | ++---------------------+----------------------------------------------------------+ +| **output type** | XYZT | ++---------------------+----------------------------------------------------------+ + +By default, the parameters are set for an identity transforms. The transformation +is reversible unless the determinant of the sji matrix is 0, or `tscale` is 0 + + +Parameters +################################################################################ + +Optional +------------------------------------------------------------------------------- + +.. option:: +xoff= + + Offset in X. Default value: 0 + +.. option:: +yoff= + + Offset in Y. Default value: 0 + +.. option:: +zoff= + + Offset in Z. Default value: 0 + +.. option:: +toff= + + Offset in T. Default value: 0 + +.. option:: +s11= + + Rotation/scaling term. Default value: 1 + +.. option:: +s12= + + Rotation/scaling term. Default value: 0 + +.. option:: +s13= + + Rotation/scaling term. Default value: 0 + +.. option:: +s21= + + Rotation/scaling term. Default value: 0 + +.. option:: +s22= + + Rotation/scaling term. Default value: 1 + +.. option:: +s23= + + Rotation/scaling term. Default value: 0 + +.. option:: +s31= + + Rotation/scaling term. Default value: 0 + +.. option:: +s32= + + Rotation/scaling term. Default value: 0 + +.. option:: +s33= + + Rotation/scaling term. Default value: 1 + +.. option:: +tscale= + + Time scaling term. Default value: 1 + + + +Mathematical description ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. math:: + :label: formula + + \begin{align} + \begin{bmatrix} + X \\ + Y \\ + Z \\ + T \\ + \end{bmatrix}^{dest} = + \begin{bmatrix} + xoff \\ + yoff \\ + zoff \\ + toff \\ + \end{bmatrix} + + \begin{bmatrix} + s11 & s12 & s13 & 0 \\ + s21 & s22 & s23 & 0 \\ + s31 & s32 & s33 & 0 \\ + 0 & 0 & 0 & tscale \\ + \end{bmatrix} + \begin{bmatrix} + X \\ + Y \\ + Z \\ + T \\ + \end{bmatrix}^{source} + \end{align} + + diff --git a/docs/source/operations/transformations/geogoffset.rst b/docs/source/operations/transformations/geogoffset.rst index 91c91c83..f643485e 100644 --- a/docs/source/operations/transformations/geogoffset.rst +++ b/docs/source/operations/transformations/geogoffset.rst @@ -32,6 +32,8 @@ It can also be used to implement the method Vertical offset (code 9616) The reverse transformation simply consists in subtracting the offsets. +This method is a conveniency wrapper for the more general :ref:`affine`. + Examples ############################################################################### diff --git a/docs/source/operations/transformations/index.rst b/docs/source/operations/transformations/index.rst index c2fe6baa..121215f7 100644 --- a/docs/source/operations/transformations/index.rst +++ b/docs/source/operations/transformations/index.rst @@ -10,6 +10,7 @@ systems are based on different datums. .. toctree:: :maxdepth: 1 + affine deformation geogoffset helmert diff --git a/src/Makefile.am b/src/Makefile.am index 2320e812..c1fbc12e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -89,7 +89,7 @@ libproj_la_SOURCES = \ \ proj_4D_api.c PJ_cart.c PJ_pipeline.c PJ_horner.c PJ_helmert.c \ PJ_vgridshift.c PJ_hgridshift.c PJ_unitconvert.c PJ_molodensky.c \ - PJ_deformation.c pj_internal.c PJ_axisswap.c PJ_geogoffset.c + PJ_deformation.c pj_internal.c PJ_axisswap.c PJ_affine.c install-exec-local: rm -f $(DESTDIR)$(bindir)/invproj$(EXEEXT) diff --git a/src/PJ_affine.c b/src/PJ_affine.c new file mode 100644 index 00000000..0d8b6374 --- /dev/null +++ b/src/PJ_affine.c @@ -0,0 +1,246 @@ +/************************************************************************ +* Copyright (c) 2018, Even Rouault +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included +* in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +* DEALINGS IN THE SOFTWARE. +* +***********************************************************************/ +#define PJ_LIB__ + +#include +#include + +#include "proj_internal.h" +#include "proj.h" +#include "projects.h" + +PROJ_HEAD(affine, "Affine transformation"); +PROJ_HEAD(geogoffset, "Geographic Offset"); + +struct pj_affine_coeffs { + double s11; + double s12; + double s13; + double s21; + double s22; + double s23; + double s31; + double s32; + double s33; + double tscale; +}; + +struct pj_opaque_affine { + double xoff; + double yoff; + double zoff; + double toff; + struct pj_affine_coeffs forward; + struct pj_affine_coeffs reverse; +}; + + +static PJ_COORD forward_4d(PJ_COORD obs, PJ *P) { + PJ_COORD newObs; + const struct pj_opaque_affine *Q = (const struct pj_opaque_affine *) P->opaque; + const struct pj_affine_coeffs *C = &(Q->forward); + newObs.xyzt.x = Q->xoff + C->s11 * obs.xyzt.x + C->s12 * obs.xyzt.y + C->s13 * obs.xyzt.z; + newObs.xyzt.y = Q->yoff + C->s21 * obs.xyzt.x + C->s22 * obs.xyzt.y + C->s23 * obs.xyzt.z; + newObs.xyzt.z = Q->zoff + C->s31 * obs.xyzt.x + C->s32 * obs.xyzt.y + C->s33 * obs.xyzt.z; + newObs.xyzt.t = Q->toff + C->tscale * obs.xyzt.t; + return newObs; +} + +static XYZ forward_3d(LPZ lpz, PJ *P) { + PJ_COORD point = {{0,0,0,0}}; + point.lpz = lpz; + return forward_4d(point, P).xyz; +} + + +static XY forward_2d(LP lp, PJ *P) { + PJ_COORD point = {{0,0,0,0}}; + point.lp = lp; + return forward_4d(point, P).xy; +} + + +static PJ_COORD reverse_4d(PJ_COORD obs, PJ *P) { + PJ_COORD newObs; + const struct pj_opaque_affine *Q = (const struct pj_opaque_affine *) P->opaque; + const struct pj_affine_coeffs *C = &(Q->reverse); + obs.xyzt.x -= Q->xoff; + obs.xyzt.y -= Q->yoff; + obs.xyzt.z -= Q->zoff; + newObs.xyzt.x = C->s11 * obs.xyzt.x + C->s12 * obs.xyzt.y + C->s13 * obs.xyzt.z; + newObs.xyzt.y = C->s21 * obs.xyzt.x + C->s22 * obs.xyzt.y + C->s23 * obs.xyzt.z; + newObs.xyzt.z = C->s31 * obs.xyzt.x + C->s32 * obs.xyzt.y + C->s33 * obs.xyzt.z; + newObs.xyzt.t = C->tscale * (obs.xyzt.t - Q->toff); + return newObs; +} + +static LPZ reverse_3d(XYZ xyz, PJ *P) { + PJ_COORD point = {{0,0,0,0}}; + point.xyz = xyz; + return reverse_4d(point, P).lpz; +} + +static LP reverse_2d(XY xy, PJ *P) { + PJ_COORD point = {{0,0,0,0}}; + point.xy = xy; + return reverse_4d(point, P).lp; +} + +static struct pj_opaque_affine * initQ() { + struct pj_opaque_affine *Q = pj_calloc(1, sizeof(struct pj_opaque_affine)); + if (0==Q) + return 0; + + /* default values */ + Q->forward.s11 = 1.0; + Q->forward.s22 = 1.0; + Q->forward.s33 = 1.0; + Q->forward.tscale = 1.0; + + Q->reverse.s11 = 1.0; + Q->reverse.s22 = 1.0; + Q->reverse.s33 = 1.0; + Q->reverse.tscale = 1.0; + + return Q; +} + +static void computeReverseParameters(PJ* P) +{ + struct pj_opaque_affine *Q = (struct pj_opaque_affine *) P->opaque; + + /* cf https://en.wikipedia.org/wiki/Invertible_matrix#Inversion_of_3_%C3%97_3_matrices */ + const double a = Q->forward.s11; + const double b = Q->forward.s12; + const double c = Q->forward.s13; + const double d = Q->forward.s21; + const double e = Q->forward.s22; + const double f = Q->forward.s23; + const double g = Q->forward.s31; + const double h = Q->forward.s32; + const double i = Q->forward.s33; + const double A = e * i - f * h; + const double B = -(d * i - f * g); + const double C = (d * h - e * g); + const double D = -(b * i - c * h); + const double E = (a * i - c * g); + const double F = -(a * h - b * g); + const double G = b * f - c * e; + const double H = -(a * f - c * d); + const double I = a * e - b * d; + const double det = a * A + b * B + c * C; + if( det == 0.0 || Q->forward.tscale == 0.0 ) { + if (proj_log_level(P->ctx, PJ_LOG_TELL) >= PJ_LOG_DEBUG) { + proj_log_debug(P, "Affine: matrix non invertible"); + } + P->inv4d = NULL; + P->inv3d = NULL; + P->inv = NULL; + } else { + Q->reverse.s11 = A / det; + Q->reverse.s12 = D / det; + Q->reverse.s13 = G / det; + Q->reverse.s21 = B / det; + Q->reverse.s22 = E / det; + Q->reverse.s23 = H / det; + Q->reverse.s31 = C / det; + Q->reverse.s32 = F / det; + Q->reverse.s33 = I / det; + Q->reverse.tscale = 1.0 / Q->forward.tscale; + } +} + +PJ *TRANSFORMATION(affine,0 /* no need for ellipsoid */) { + struct pj_opaque_affine *Q = initQ(); + if (0==Q) + return pj_default_destructor(P, ENOMEM); + P->opaque = (void *) Q; + + P->fwd4d = forward_4d; + P->inv4d = reverse_4d; + P->fwd3d = forward_3d; + P->inv3d = reverse_3d; + P->fwd = forward_2d; + P->inv = reverse_2d; + + P->left = PJ_IO_UNITS_WHATEVER; + P->right = PJ_IO_UNITS_WHATEVER; + + /* read args */ + Q->xoff = pj_param(P->ctx, P->params, "dxoff").f; + Q->yoff = pj_param(P->ctx, P->params, "dyoff").f; + Q->zoff = pj_param(P->ctx, P->params, "dzoff").f; + Q->toff = pj_param(P->ctx, P->params, "dtoff").f; + + if(pj_param (P->ctx, P->params, "ts11").i) { + Q->forward.s11 = pj_param(P->ctx, P->params, "ds11").f; + } + Q->forward.s12 = pj_param(P->ctx, P->params, "ds12").f; + Q->forward.s13 = pj_param(P->ctx, P->params, "ds13").f; + Q->forward.s21 = pj_param(P->ctx, P->params, "ds21").f; + if(pj_param (P->ctx, P->params, "ts22").i) { + Q->forward.s22 = pj_param(P->ctx, P->params, "ds22").f; + } + Q->forward.s23 = pj_param(P->ctx, P->params, "ds23").f; + Q->forward.s31 = pj_param(P->ctx, P->params, "ds31").f; + Q->forward.s32 = pj_param(P->ctx, P->params, "ds32").f; + if(pj_param (P->ctx, P->params, "ts33").i) { + Q->forward.s33 = pj_param(P->ctx, P->params, "ds33").f; + } + if(pj_param (P->ctx, P->params, "ttscale").i) { + Q->forward.tscale = pj_param(P->ctx, P->params, "dtscale").f; + } + + computeReverseParameters(P); + + return P; +} + + +/* Arcsecond to radians */ +#define ARCSEC_TO_RAD (DEG_TO_RAD / 3600.0) + + +PJ *TRANSFORMATION(geogoffset,0 /* no need for ellipsoid */) { + struct pj_opaque_affine *Q = initQ(); + if (0==Q) + return pj_default_destructor(P, ENOMEM); + P->opaque = (void *) Q; + + P->fwd4d = forward_4d; + P->inv4d = reverse_4d; + P->fwd3d = forward_3d; + P->inv3d = reverse_3d; + P->fwd = forward_2d; + P->inv = reverse_2d; + + P->left = PJ_IO_UNITS_ANGULAR; + P->right = PJ_IO_UNITS_ANGULAR; + + /* read args */ + Q->xoff = pj_param(P->ctx, P->params, "ddlon").f * ARCSEC_TO_RAD; + Q->yoff = pj_param(P->ctx, P->params, "ddlat").f * ARCSEC_TO_RAD; + Q->zoff = pj_param(P->ctx, P->params, "ddh").f; + + return P; +} diff --git a/src/PJ_geogoffset.c b/src/PJ_geogoffset.c deleted file mode 100644 index 7f917fd7..00000000 --- a/src/PJ_geogoffset.c +++ /dev/null @@ -1,111 +0,0 @@ -/************************************************************************ -* Copyright (c) 2018, Even Rouault -* -* Permission is hereby granted, free of charge, to any person obtaining a -* copy of this software and associated documentation files (the "Software"), -* to deal in the Software without restriction, including without limitation -* the rights to use, copy, modify, merge, publish, distribute, sublicense, -* and/or sell copies of the Software, and to permit persons to whom the -* Software is furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included -* in all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -* DEALINGS IN THE SOFTWARE. -* -***********************************************************************/ -#define PJ_LIB__ - -#include -#include - -#include "proj.h" -#include "projects.h" - -PROJ_HEAD(geogoffset, "Geographic Offset"); - -struct pj_opaque_geogoffset { - double dlon; - double dlat; - double dh; -}; - - -static PJ_COORD forward_4d(PJ_COORD obs, PJ *P) { - struct pj_opaque_geogoffset *Q = (struct pj_opaque_geogoffset *) P->opaque; - /* offset coordinate */ - obs.lpz.lam += Q->dlon; - obs.lpz.phi += Q->dlat; - obs.lpz.z += Q->dh; - return obs; -} - -static XYZ forward_3d(LPZ lpz, PJ *P) { - PJ_COORD point = {{0,0,0,0}}; - point.lpz = lpz; - return forward_4d(point, P).xyz; -} - - -static XY forward_2d(LP lp, PJ *P) { - PJ_COORD point = {{0,0,0,0}}; - point.lp = lp; - return forward_4d(point, P).xy; -} - - -static PJ_COORD reverse_4d(PJ_COORD obs, PJ *P) { - struct pj_opaque_geogoffset *Q = (struct pj_opaque_geogoffset *) P->opaque; - /* offset coordinate */ - obs.lpz.lam -= Q->dlon; - obs.lpz.phi -= Q->dlat; - obs.lpz.z -= Q->dh; - return obs; -} - -static LPZ reverse_3d(XYZ xyz, PJ *P) { - PJ_COORD point = {{0,0,0,0}}; - point.xyz = xyz; - return reverse_4d(point, P).lpz; -} - -static LP reverse_2d(XY xy, PJ *P) { - PJ_COORD point = {{0,0,0,0}}; - point.xy = xy; - return reverse_4d(point, P).lp; -} - - -/* Arcsecond to radians */ -#define ARCSEC_TO_RAD (DEG_TO_RAD / 3600.0) - - -PJ *TRANSFORMATION(geogoffset,0 /* no need for ellipsoid */) { - struct pj_opaque_geogoffset *Q = pj_calloc(1, sizeof(struct pj_opaque_geogoffset)); - if (0==Q) - return pj_default_destructor(P, ENOMEM); - P->opaque = (void *) Q; - - P->fwd4d = forward_4d; - P->inv4d = reverse_4d; - P->fwd3d = forward_3d; - P->inv3d = reverse_3d; - P->fwd = forward_2d; - P->inv = reverse_2d; - - P->left = PJ_IO_UNITS_ANGULAR; - P->right = PJ_IO_UNITS_ANGULAR; - - /* read args */ - Q->dlon = pj_param(P->ctx, P->params, "ddlon").f * ARCSEC_TO_RAD; - Q->dlat = pj_param(P->ctx, P->params, "ddlat").f * ARCSEC_TO_RAD; - Q->dh = pj_param(P->ctx, P->params, "ddh").f; - - return P; -} diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake index f1e76ff3..a359369e 100644 --- a/src/lib_proj.cmake +++ b/src/lib_proj.cmake @@ -40,6 +40,7 @@ SET(SRC_LIBPROJ_PJ nad_init.c PJ_aea.c PJ_aeqd.c + PJ_affine.c PJ_airy.c PJ_aitoff.c PJ_august.c @@ -72,7 +73,6 @@ SET(SRC_LIBPROJ_PJ PJ_fouc_s.c PJ_gall.c PJ_geoc.c - PJ_geogoffset.c PJ_geos.c PJ_gins8.c PJ_gnom.c diff --git a/src/makefile.vc b/src/makefile.vc index 21db1362..73c68c0f 100644 --- a/src/makefile.vc +++ b/src/makefile.vc @@ -61,7 +61,7 @@ support = \ pipeline = \ proj_4D_api.obj PJ_cart.obj PJ_pipeline.obj PJ_horner.obj PJ_helmert.obj \ PJ_vgridshift.obj PJ_hgridshift.obj PJ_unitconvert.obj PJ_molodensky.obj \ - PJ_deformation.obj PJ_axisswap.obj PJ_geogoffset.obj + PJ_deformation.obj PJ_axisswap.obj PJ_affine.obj geodesic = geodesic.obj diff --git a/src/pj_list.h b/src/pj_list.h index 6d94f4fd..72a9af7f 100644 --- a/src/pj_list.h +++ b/src/pj_list.h @@ -7,6 +7,7 @@ static const char PJ_LIST_H_ID[] = "@(#)pj_list.h 4.5 95/08/09 GIE REL"; */ PROJ_HEAD(aea, "Albers Equal Area") PROJ_HEAD(aeqd, "Azimuthal Equidistant") +PROJ_HEAD(affine, "Affine transformation") PROJ_HEAD(airy, "Airy") PROJ_HEAD(aitoff, "Aitoff") PROJ_HEAD(alsk, "Mod. Stererographics of Alaska") diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie index d3fe64f6..10feea70 100644 --- a/test/gie/more_builtins.gie +++ b/test/gie/more_builtins.gie @@ -559,7 +559,7 @@ expect 0 -90 ------------------------------------------------------------------------------- -Test for PJ_geogoffset +Test for PJ_affine ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- operation +proj=geogoffset @@ -589,6 +589,50 @@ accept 10 20 30 40 expect 11 19 33 40 roundtrip 1 +------------------------------------------------------------------------------- +operation +proj=affine +------------------------------------------------------------------------------- +direction forward +tolerance 1mm + +accept 10 20 30 40 +expect 10 20 30 40 +roundtrip 1 + +------------------------------------------------------------------------------- +operation +proj=affine +xoff=1 +yoff=2 +zoff=3 +toff=4 +s11=11 +s12=12 +s13=13 +s21=21 +s22=22 +s23=23 +s31=-31 +s32=32 +s33=33 +tscale=34 +------------------------------------------------------------------------------- +direction forward +tolerance 1mm + +accept 2 49 10 100 +expect 741.0000 1352.0000 1839.0000 3404.0000 +roundtrip 1 + +accept 2 49 10 +expect 741.0000 1352.0000 1839.0000 +roundtrip 1 + +accept 2 49 +expect 611.0000 1122.0000 +roundtrip 1 + +------------------------------------------------------------------------------- +# Non invertible +operation +proj=affine +s11=0 +s22=0 +s23=0 +------------------------------------------------------------------------------- +direction reverse +accept 0 0 0 0 +expect failure + +------------------------------------------------------------------------------- +# Non invertible +operation +proj=affine +tscale=0 +------------------------------------------------------------------------------- +direction reverse +accept 0 0 0 0 +expect failure + ------------------------------------------------------------------------------- run the few gie-builtin tests, which are currently either awkward or impossible to express in the gie command set -- cgit v1.2.3 From d4a1ea307207b0d28d4a139c881302198d296d33 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 28 Sep 2018 16:09:32 +0200 Subject: Remove nmake build system --- Makefile.am | 2 +- README.md | 26 -------- appveyor.yml | 70 +++++++-------------- data/Makefile.am | 2 +- data/makefile.vc | 32 ---------- docs/source/faq.rst | 3 - makefile.vc | 30 --------- nmake.opt | 38 ------------ src/Makefile.am | 2 +- src/makefile.vc | 171 ---------------------------------------------------- 10 files changed, 25 insertions(+), 351 deletions(-) delete mode 100644 data/makefile.vc delete mode 100644 makefile.vc delete mode 100644 nmake.opt delete mode 100644 src/makefile.vc diff --git a/Makefile.am b/Makefile.am index 9e5787e0..760a4da9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ SUBDIRS = src man data jniwrap cmake test -EXTRA_DIST = makefile.vc nmake.opt CMakeLists.txt CITATION +EXTRA_DIST = CMakeLists.txt CITATION pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = proj.pc diff --git a/README.md b/README.md index b82db7c2..8767fc01 100644 --- a/README.md +++ b/README.md @@ -91,32 +91,6 @@ If you are building from the git repository you have to first run which will generate a configure script that can be used as described above. -### Building on Windows with NMAKE - -PROJ can be built with Microsoft Visual C/C++ using the `makefile.vc` -in the `PROJ` directory. First edit the `PROJ\nmake.opt` and -modify the `INSTDIR` value at the top to point to the directory -where the PROJ tree shall be installed. -If you want to install into `C:\PROJ`, it can remain unchanged. -Then use the `makefile.vc` to build the software e.g.: - - C:\> cd proj - C:\PROJ> nmake /f makefile.vc - C:\PROJ> nmake /f makefile.vc install-all - -Note that you have to have the VC++ environment variables, and path -setup properly. This may involve running the `VCVARS32.BAT` -script out of the Visual C++ tree. - -The `makefile.vc` builds `proj.exe`, `proj.dll` and `proj.lib`. - -On Windows you have to set the `PROJ_LIB` environment variable to make -sure that PROJ can find the resource files that it needs. For the -default install directory you can set `PROJ_LIB` with: - - C:\> set PROJ_LIB=C:\PROJ\share - - ### Distribution files and format Sources are distributed in one or more files. The principle elements diff --git a/appveyor.yml b/appveyor.yml index 1fdc27ca..11059e92 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,76 +6,50 @@ environment: matrix: # VS 2015 - - BUILD_TYPE: cmake - VS_VERSION: Visual Studio 14 + - VS_VERSION: Visual Studio 14 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 # VS 2017 - - BUILD_TYPE: cmake - VS_VERSION: Visual Studio 15 + - VS_VERSION: Visual Studio 15 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - - BUILD_TYPE: nmake - shallow_clone: true build_script: - echo build_script - - if "%BUILD_TYPE%" == "nmake" if "%platform%" == "x86" call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" - - if "%BUILD_TYPE%" == "nmake" if "%platform%" == "x64" "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 - - if "%BUILD_TYPE%" == "nmake" if "%platform%" == "x64" call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64 - - if "%BUILD_TYPE%" == "nmake" nmake /f makefile.vc - - if "%BUILD_TYPE%" == "nmake" nmake /f makefile.vc install-all - - if "%BUILD_TYPE%" == "nmake" if "%platform%" == "x64" cd src - - if "%BUILD_TYPE%" == "nmake" if "%platform%" == "x64" nmake /f makefile.vc multistresstest.exe -# Disabled for now as it scales badly -# - if "%BUILD_TYPE%" == "nmake" if "%platform%" == "x64" multistresstest.exe - - if "%BUILD_TYPE%" == "nmake" if "%platform%" == "x64" cd .. - - if "%BUILD_TYPE%" == "cmake" if "%platform%" == "x64" SET VS_FULL=%VS_VERSION% Win64 - - if "%BUILD_TYPE%" == "cmake" if "%platform%" == "x86" SET VS_FULL=%VS_VERSION% - - if "%BUILD_TYPE%" == "cmake" echo "%VS_FULL%" + - if "%platform%" == "x64" SET VS_FULL=%VS_VERSION% Win64 + - if "%platform%" == "x86" SET VS_FULL=%VS_VERSION% + - echo "%VS_FULL%" # - - if "%BUILD_TYPE%" == "cmake" if "%platform%" == "x64" mkdir build_dll - - if "%BUILD_TYPE%" == "cmake" if "%platform%" == "x64" cd build_dll - - if "%BUILD_TYPE%" == "cmake" if "%platform%" == "x64" cmake -G "%VS_FULL%" .. -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBPROJ_SHARED=ON -DCMAKE_C_FLAGS="/WX" - - if "%BUILD_TYPE%" == "cmake" if "%platform%" == "x64" cmake --build . --config Release - - if "%BUILD_TYPE%" == "cmake" if "%platform%" == "x64" cd .. + - if "%platform%" == "x64" mkdir build_dll + - if "%platform%" == "x64" cd build_dll + - if "%platform%" == "x64" cmake -G "%VS_FULL%" .. -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBPROJ_SHARED=ON -DCMAKE_C_FLAGS="/WX" + - if "%platform%" == "x64" cmake --build . --config Release + - if "%platform%" == "x64" cd .. # - - if "%BUILD_TYPE%" == "cmake" if "%platform%" == "x86" mkdir build_static - - if "%BUILD_TYPE%" == "cmake" if "%platform%" == "x86" cd build_static - - if "%BUILD_TYPE%" == "cmake" if "%platform%" == "x86" cmake -G "%VS_FULL%" .. -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBPROJ_SHARED=OFF -DCMAKE_C_FLAGS="/WX" - - if "%BUILD_TYPE%" == "cmake" if "%platform%" == "x86" cmake --build . --config Release - - if "%BUILD_TYPE%" == "cmake" if "%platform%" == "x86" cd .. + - if "%platform%" == "x86" mkdir build_static + - if "%platform%" == "x86" cd build_static + - if "%platform%" == "x86" cmake -G "%VS_FULL%" .. -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBPROJ_SHARED=OFF -DCMAKE_C_FLAGS="/WX" + - if "%platform%" == "x86" cmake --build . --config Release + - if "%platform%" == "x86" cd .. test_script: - echo test_script - - if "%BUILD_TYPE%" == "cmake" set PROJ_LIB=C:\projects\proj-4\data - - if "%BUILD_TYPE%" == "nmake" set PROJ_LIB=C:\PROJ\SHARE - - if "%BUILD_TYPE%" == "nmake" mkdir %PROJ_LIB%\tests - - if "%BUILD_TYPE%" == "nmake" copy data\tests\*.* %PROJ_LIB%\tests + - set PROJ_LIB=C:\projects\proj-4\data - set CURDIR=%CD% - cd %PROJ_LIB% - curl -O http://download.osgeo.org/proj/proj-datumgrid-1.7.zip - 7z e -aoa -y proj-datumgrid-1.7.zip - dir - cd .. - - if "%BUILD_TYPE%" == "nmake" dir - - if "%BUILD_TYPE%" == "nmake" cd bin - - if "%BUILD_TYPE%" == "nmake" echo "Contents of current directory:" - - if "%BUILD_TYPE%" == "nmake" dir - - if "%BUILD_TYPE%" == "nmake" echo "Contents of ..\test\gie:" - - if "%BUILD_TYPE%" == "nmake" dir ..\test\gie - - if "%BUILD_TYPE%" == "nmake" echo "Contents of PROJ_LIB " %PROJ_LIB% - - if "%BUILD_TYPE%" == "nmake" dir %PROJ_LIB% - - if "%BUILD_TYPE%" == "nmake" gie.exe ..\test\gie\*.gie ..\test\gigs\*.gie - cd %CURDIR% # - - if "%BUILD_TYPE%" == "cmake" if "%platform%" == "x64" cd build_dll - - if "%BUILD_TYPE%" == "cmake" if "%platform%" == "x64" ctest -C Release - - if "%BUILD_TYPE%" == "cmake" if "%platform%" == "x64" cd .. + - if "%platform%" == "x64" cd build_dll + - if "%platform%" == "x64" ctest -C Release + - if "%platform%" == "x64" cd .. # - - if "%BUILD_TYPE%" == "cmake" if "%platform%" == "x86" cd build_static - - if "%BUILD_TYPE%" == "cmake" if "%platform%" == "x86" ctest -C Release - - if "%BUILD_TYPE%" == "cmake" if "%platform%" == "x86" cd .. + - if "%platform%" == "x86" cd build_static + - if "%platform%" == "x86" ctest -C Release + - if "%platform%" == "x86" cd .. deploy: off diff --git a/data/Makefile.am b/data/Makefile.am index c77efc8b..917e113a 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -10,7 +10,7 @@ EXTRA_DIST = GL27 nad.lst proj_def.dat nad27 nad83 \ esri.extra other.extra \ CH IGNF \ ITRF2000 ITRF2008 ITRF2014 \ - makefile.vc CMakeLists.txt tests/test_nodata.gtx null.lla + CMakeLists.txt tests/test_nodata.gtx null.lla process-nad2bin: @if [ -f $(DATAPATH)/null.lla -a ! -f null ] || [ -f $(DATAPATH)/conus.lla -a ! -f conus ] ; then \ diff --git a/data/makefile.vc b/data/makefile.vc deleted file mode 100644 index e235e8d8..00000000 --- a/data/makefile.vc +++ /dev/null @@ -1,32 +0,0 @@ -# -# makefile.vc - builds PROJ.4 library with Visual C++ -# - -!INCLUDE ..\nmake.opt - -OLD_GRIDS = conus MD TN WI WO alaska hawaii prvi stgeorge stlrnc stpaul null - -OTHER_FILES = FL GL27 nad.lst nad27 nad83 proj_def.dat world epsg esri \ - esri.extra other.extra IGNF ITRF2000 ITRF2008 ITRF2014 - - - -default: - if exist conus.lla $(MAKE) /f makefile.vc nadshift - -nadshift: - for %f in ( $(OLD_GRIDS) ) do ..\src\nad2bin.exe %f < %f.lla - -clean: - -for %f in ( $(OLD_GRIDS) ) do del %f - -install-nadgrids: - for %f in ( $(OLD_GRIDS) ) do copy %f $(PROJ_LIB_DIR) - -install-all: - -mkdir $(INSTDIR) - -mkdir $(PROJ_LIB_DIR) - for %f in ( $(OTHER_FILES) ) do copy %f $(PROJ_LIB_DIR) - if exist conus $(MAKE) /f makefile.vc install-nadgrids - -copy *.gsb $(PROJ_LIB_DIR) - -copy ntv1_can.dat $(PROJ_LIB_DIR) diff --git a/docs/source/faq.rst b/docs/source/faq.rst index a03eae31..a218e1a8 100644 --- a/docs/source/faq.rst +++ b/docs/source/faq.rst @@ -49,9 +49,6 @@ After downloading and unpacking the PROJ source, also download and unpack the set of datum shift files. See :ref:`download` for instructions how to fetch and install these files -On Windows the extra nadshift target must be used. For instance -``nmake /f makefile.vc nadshift`` in the ``proj/src`` directory. - A default build and install on Unix will normally build knowledge of the directory where the grid shift files are installed into the PROJ library (usually ``/usr/local/share/proj``). On Windows the library is normally built diff --git a/makefile.vc b/makefile.vc deleted file mode 100644 index d4fb12bd..00000000 --- a/makefile.vc +++ /dev/null @@ -1,30 +0,0 @@ -# -# NMAKE Makefile to build PROJ.4 on Windows -# -# This makefile.vc delegates making targets to src\makefile.vc -# so it's just a thin wrapper. -# -MAKE = nmake -RM = -del - -default: - cd src - $(MAKE) /f makefile.vc - cd ..\data - $(MAKE) /f makefile.vc - cd .. - -clean: - cd src - $(MAKE) /f makefile.vc clean - cd ..\data - $(MAKE) /f makefile.vc clean - cd .. - -install-all: - cd src - $(MAKE) /f makefile.vc install - cd ..\data - $(MAKE) /f makefile.vc install-all - cd .. - diff --git a/nmake.opt b/nmake.opt deleted file mode 100644 index edf608e1..00000000 --- a/nmake.opt +++ /dev/null @@ -1,38 +0,0 @@ -!IFDEF EXT_NMAKE_OPT -!INCLUDE $(EXT_NMAKE_OPT) -!ENDIF - -# Directory tree where PROJ will be installed. -!IFNDEF INSTDIR -INSTDIR=C:\PROJ -!ENDIF - -# Set the following to the directory where the PROJ distribution data files -# (ie, the contents of ..\data) are to be installed. It is possible to later -# move the data files to another directory, and define the PROJ_LIB -# environment variable to point to that directory. It is also possible to -# have PROJ_LIB name the original data directory of the unpacked PROJ -# distribution. Any setting of the PROJ_LIB environment variable takes -# precedence at runtime over the setting of the PROJ_LIB_DIR macro stored in -# the compiled software. -!IFNDEF PROJ_LIB_DIR -PROJ_LIB_DIR=$(INSTDIR)\SHARE -!ENDIF - -# Uncomment the first for an optimized build, or the second for debug. -!IFNDEF OPTFLAGS -!IFNDEF DEBUG -OPTFLAGS= /Ox /Op /MD -!ELSE -OPTFLAGS= /Zi /MDd /Fdproj.pdb -!ENDIF -!ENDIF - -# Uncomment the first for linking exes against DLL or second for static -EXE_PROJ = proj_i.lib -#EXE_PROJ = proj.lib - -# Set the version number for the DLL. Normally we leave this blank since -# we want software that is dynamically loading the DLL to have no problem -# with version numbers. -VERSION= diff --git a/src/Makefile.am b/src/Makefile.am index c1fbc12e..ae5e0a2e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -13,7 +13,7 @@ AM_CPPFLAGS = -DPROJ_LIB=\"$(pkgdatadir)\" \ include_HEADERS = proj.h proj_api.h geodesic.h \ org_proj4_PJ.h -EXTRA_DIST = makefile.vc proj.def bin_cct.cmake bin_gie.cmake bin_cs2cs.cmake \ +EXTRA_DIST = proj.def bin_cct.cmake bin_gie.cmake bin_cs2cs.cmake \ bin_geod.cmake bin_nad2bin.cmake bin_proj.cmake \ lib_proj.cmake CMakeLists.txt bin_geodtest.cmake geodtest.c diff --git a/src/makefile.vc b/src/makefile.vc deleted file mode 100644 index 73c68c0f..00000000 --- a/src/makefile.vc +++ /dev/null @@ -1,171 +0,0 @@ -# -# makefile.vc - builds PROJ.4 library with Visual C++ -# -!INCLUDE ..\nmake.opt - -azimuthal = \ - PJ_aeqd.obj PJ_gnom.obj PJ_laea.obj PJ_mod_ster.obj \ - PJ_nsper.obj PJ_nzmg.obj PJ_ortho.obj PJ_stere.obj PJ_sterea.obj \ - proj_rouss.obj - -conic = \ - PJ_aea.obj PJ_bipc.obj PJ_bonne.obj PJ_eqdc.obj \ - PJ_imw_p.obj PJ_lcc.obj PJ_poly.obj \ - PJ_rpoly.obj PJ_sconics.obj PJ_lcca.obj PJ_ccon.obj - -cylinder = \ - PJ_cass.obj PJ_cc.obj PJ_cea.obj PJ_eqc.obj \ - PJ_gall.obj PJ_labrd.obj PJ_lsat.obj PJ_misrsom.obj PJ_merc.obj \ - PJ_mill.obj PJ_ocea.obj PJ_omerc.obj PJ_patterson.obj PJ_somerc.obj \ - PJ_tcc.obj PJ_tcea.obj PJ_tmerc.obj PJ_geos.obj \ - PJ_gstmerc.obj proj_etmerc.obj PJ_comill.obj - -misc = \ - PJ_airy.obj PJ_aitoff.obj PJ_august.obj PJ_bacon.obj \ - PJ_chamb.obj PJ_hammer.obj PJ_lagrng.obj PJ_larr.obj \ - PJ_lask.obj PJ_nocol.obj PJ_ob_tran.obj PJ_oea.obj \ - PJ_sch.obj PJ_tpeqd.obj PJ_vandg.obj PJ_vandg2.obj \ - PJ_vandg4.obj PJ_wag7.obj PJ_latlong.obj PJ_krovak.obj \ - PJ_geoc.obj pj_geocent.obj PJ_healpix.obj PJ_qsc.obj - -pseudo = \ - PJ_boggs.obj PJ_collg.obj PJ_crast.obj PJ_denoy.obj \ - PJ_eck1.obj PJ_eck2.obj PJ_eck3.obj PJ_eck4.obj \ - PJ_eck5.obj PJ_fahey.obj PJ_fouc_s.obj PJ_gins8.obj \ - PJ_gn_sinu.obj PJ_goode.obj PJ_igh.obj PJ_hatano.obj PJ_loxim.obj \ - PJ_mbt_fps.obj PJ_mbtfpp.obj PJ_mbtfpq.obj PJ_moll.obj \ - PJ_nell.obj PJ_nell_h.obj PJ_putp2.obj PJ_putp3.obj \ - PJ_putp4p.obj PJ_putp5.obj PJ_putp6.obj PJ_robin.obj \ - PJ_sts.obj PJ_urm5.obj PJ_urmfps.obj PJ_wag2.obj \ - PJ_wag3.obj PJ_wink1.obj PJ_wink2.obj PJ_isea.obj \ - PJ_calcofi.obj PJ_natearth.obj PJ_natearth2.obj PJ_times.obj \ - PJ_eqearth.obj - -support = \ - aasincos.obj adjlon.obj bch2bps.obj bchgen.obj pj_gauss.obj \ - biveval.obj dmstor.obj mk_cheby.obj pj_auth.obj \ - pj_deriv.obj pj_ell_set.obj pj_ellps.obj pj_errno.obj \ - pj_factors.obj pj_fwd.obj pj_init.obj pj_inv.obj \ - pj_list.obj pj_malloc.obj pj_mlfn.obj pj_msfn.obj \ - pj_open_lib.obj pj_param.obj pj_phi2.obj pj_pr_list.obj \ - pj_qsfn.obj pj_strerrno.obj pj_tsfn.obj pj_units.obj \ - pj_zpoly1.obj rtodms.obj vector1.obj pj_release.obj \ - geocent.obj pj_transform.obj pj_datum_set.obj pj_datums.obj \ - pj_apply_gridshift.obj pj_gc_reader.obj pj_gridcatalog.obj \ - nad_cvt.obj nad_init.obj nad_intr.obj \ - pj_utils.obj pj_gridlist.obj pj_gridinfo.obj \ - proj_mdist.obj pj_mutex.obj pj_initcache.obj \ - pj_ctx.obj pj_fileapi.obj pj_log.obj pj_apply_vgridshift.obj \ - pj_strtod.obj pj_internal.obj pj_math.obj - -pipeline = \ - proj_4D_api.obj PJ_cart.obj PJ_pipeline.obj PJ_horner.obj PJ_helmert.obj \ - PJ_vgridshift.obj PJ_hgridshift.obj PJ_unitconvert.obj PJ_molodensky.obj \ - PJ_deformation.obj PJ_axisswap.obj PJ_affine.obj - -geodesic = geodesic.obj - -LIBOBJ = $(support) $(pseudo) $(azimuthal) $(conic) $(cylinder) $(misc) \ - $(geodesic) $(pipeline) -PROJEXE_OBJ = proj.obj gen_cheb.obj p_series.obj emess.obj -CS2CSEXE_OBJ = cs2cs.obj gen_cheb.obj p_series.obj emess.obj -GEODEXE_OBJ = geod.obj geod_set.obj geod_interface.obj emess.obj -CCTEXE_OBJ = cct.obj proj_strtod.obj -GIEEXE_OBJ = gie.obj proj_strtod.obj - -MULTISTRESSTEST_OBJ = multistresstest.obj -PROJ_DLL = proj$(VERSION).dll -PROJ_EXE = proj.exe -CS2CS_EXE = cs2cs.exe -GEOD_EXE = geod.exe -CCT_EXE = cct.exe -GIE_EXE = gie.exe -NAD2BIN_EXE = nad2bin.exe -MULTISTRESSTEST_EXE = multistresstest.exe - -CFLAGS = /nologo -I. -DPROJ_LIB=\"$(PROJ_LIB_DIR)\" \ - -DHAVE_STRERROR=1 -DHAVE_LOCALECONV=1 $(OPTFLAGS) - -default: all - -all: proj.lib $(PROJ_EXE) $(CS2CS_EXE) $(GEOD_EXE) $(CCT_EXE) $(GIE_EXE) $(NAD2BIN_EXE) - -proj.lib: $(LIBOBJ) - if exist proj.lib del proj.lib - lib /out:proj.lib $(LIBOBJ) - -$(PROJ_DLL): proj_i.lib - -proj_i.lib: $(LIBOBJ) - link /debug /dll /def:proj.def /out:$(PROJ_DLL) /implib:proj_i.lib \ - $(LIBOBJ) - if exist $(PROJ_DLL).manifest mt -manifest $(PROJ_DLL).manifest -outputresource:$(PROJ_DLL);2 - -$(PROJ_EXE): $(PROJEXE_OBJ) $(EXE_PROJ) - cl $(PROJEXE_OBJ) $(EXE_PROJ) /link setargv.obj - if exist $(PROJ_EXE).manifest mt -manifest $(PROJ_EXE).manifest -outputresource:$(PROJ_EXE);1 - -$(CS2CS_EXE): $(CS2CSEXE_OBJ) $(EXE_PROJ) - cl $(CS2CSEXE_OBJ) $(EXE_PROJ) /link setargv.obj - if exist $(CS2CS_EXE).manifest mt -manifest $(CS2CS_EXE).manifest -outputresource:$(CS2CS_EXE);1 - -$(GEOD_EXE): $(GEODEXE_OBJ) $(EXE_PROJ) - cl $(GEODEXE_OBJ) $(EXE_PROJ) /link setargv.obj - if exist $(GEOD_EXE).manifest mt -manifest $(GEOD_EXE).manifest -outputresource:$(GEOD_EXE);1 - -$(CCT_EXE): $(CCTEXE_OBJ) $(EXE_PROJ) - cl $(CCTEXE_OBJ) $(EXE_PROJ) /link setargv.obj - if exist $(CCT_EXE).manifest mt -manifest $(CCT_EXE).manifest -outputresource:$(CCT_EXE);1 - -$(GIE_EXE): $(GIEEXE_OBJ) $(EXE_PROJ) - cl $(GIEEXE_OBJ) $(EXE_PROJ) /link setargv.obj - if exist $(GIE_EXE).manifest mt -manifest $(GIE_EXE).manifest -outputresource:$(GIE_EXE);1 - -$(NAD2BIN_EXE): nad2bin.obj emess.obj $(EXE_PROJ) - cl nad2bin.obj emess.obj $(EXE_PROJ) /link setargv.obj - -$(MULTISTRESSTEST_EXE): $(MULTISTRESSTEST_OBJ) - cl $(MULTISTRESSTEST_OBJ) $(EXE_PROJ) - if exist $(MULTISTRESSTEST_EXE).manifest mt -manifest $(MULTISTRESSTEST_EXE).manifest -outputresource:$(MULTISTRESSTEST_EXE);1 - -nadshift: nad2bin.exe - cd ..\data - ..\src\nad2bin.exe < conus.lla conus - ..\src\nad2bin.exe < MD.lla MD - ..\src\nad2bin.exe < TN.lla TN - ..\src\nad2bin.exe < WI.lla WI - ..\src\nad2bin.exe < WO.lla WO - ..\src\nad2bin.exe < alaska.lla alaska - ..\src\nad2bin.exe < hawaii.lla hawaii - ..\src\nad2bin.exe < prvi.lla prvi - ..\src\nad2bin.exe < stgeorge.lla stgeorge - ..\src\nad2bin.exe < stlrnc.lla stlrnc - ..\src\nad2bin.exe < stpaul.lla stpaul - ..\src\nad2bin.exe < null.lla null - cd ..\src - -clean: - del *.dll - del *.exe - del *.exp - del *.manifest - del *.lib - del *.obj - del *.pdb - -install: all - -mkdir $(INSTDIR) - -mkdir $(INSTDIR)\bin - -mkdir $(INSTDIR)\share - -mkdir $(INSTDIR)\lib - -mkdir $(INSTDIR)\include - -mkdir $(INSTDIR)\test - -mkdir $(INSTDIR)\test\gie - copy *.exe $(INSTDIR)\bin - copy *.dll $(INSTDIR)\bin - copy *.lib $(INSTDIR)\lib - copy proj.h $(INSTDIR)\include - copy proj_api.h $(INSTDIR)\include - copy projects.h $(INSTDIR)\include - copy geodesic.h $(INSTDIR)\include - copy ..\test\gie\*.gie $(INSTDIR)\test\gie -- cgit v1.2.3 From 31f9b9294fd806b6be726575faa6544bcaaa42f4 Mon Sep 17 00:00:00 2001 From: Ivan Veselov Date: Sat, 6 Oct 2018 22:14:08 +0100 Subject: Make PROJ_HEAD descriptions more uniform Before that, approximately half of the descriptions had a period at the end, e.g. 'Cyl.' or 'Sph.' and the other half did not have those periods. This commit drops all the dots in PROJ_HEAD descriptions. --- src/PJ_airy.c | 2 +- src/PJ_august.c | 2 +- src/PJ_bacon.c | 6 +++--- src/PJ_bipc.c | 2 +- src/PJ_boggs.c | 2 +- src/PJ_ccon.c | 2 +- src/PJ_chamb.c | 2 +- src/PJ_collg.c | 2 +- src/PJ_comill.c | 2 +- src/PJ_crast.c | 2 +- src/PJ_denoy.c | 2 +- src/PJ_eck1.c | 2 +- src/PJ_eck2.c | 2 +- src/PJ_eck3.c | 8 ++++---- src/PJ_eck4.c | 2 +- src/PJ_eck5.c | 2 +- src/PJ_eqearth.c | 4 ++-- src/PJ_fahey.c | 2 +- src/PJ_fouc_s.c | 2 +- src/PJ_gins8.c | 2 +- src/PJ_gn_sinu.c | 6 +++--- src/PJ_gnom.c | 2 +- src/PJ_goode.c | 2 +- src/PJ_hatano.c | 2 +- src/PJ_healpix.c | 4 ++-- src/PJ_igh.c | 2 +- src/PJ_krovak.c | 2 +- src/PJ_larr.c | 2 +- src/PJ_lask.c | 2 +- src/PJ_mbt_fps.c | 2 +- src/PJ_mbtfpp.c | 2 +- src/PJ_mbtfpq.c | 2 +- src/PJ_moll.c | 6 +++--- src/PJ_natearth.c | 2 +- src/PJ_natearth2.c | 2 +- src/PJ_nell.c | 2 +- src/PJ_nell_h.c | 2 +- src/PJ_nocol.c | 2 +- src/PJ_ortho.c | 2 +- src/PJ_patterson.c | 2 +- src/PJ_putp2.c | 2 +- src/PJ_putp3.c | 4 ++-- src/PJ_putp4p.c | 4 ++-- src/PJ_putp5.c | 4 ++-- src/PJ_putp6.c | 4 ++-- src/PJ_qsc.c | 2 +- src/PJ_robin.c | 2 +- src/PJ_rpoly.c | 2 +- src/PJ_sts.c | 8 ++++---- src/PJ_tcc.c | 2 +- src/PJ_urm5.c | 2 +- src/PJ_urmfps.c | 4 ++-- src/PJ_vandg2.c | 4 ++-- src/PJ_vandg4.c | 2 +- src/PJ_wag2.c | 2 +- src/PJ_wag3.c | 2 +- src/PJ_wag7.c | 2 +- src/PJ_wink1.c | 2 +- src/PJ_wink2.c | 2 +- src/proj_rouss.c | 2 +- 60 files changed, 80 insertions(+), 80 deletions(-) diff --git a/src/PJ_airy.c b/src/PJ_airy.c index 6addea7d..75f95780 100644 --- a/src/PJ_airy.c +++ b/src/PJ_airy.c @@ -31,7 +31,7 @@ #include #include "projects.h" -PROJ_HEAD(airy, "Airy") "\n\tMisc Sph, no inv.\n\tno_cut lat_b="; +PROJ_HEAD(airy, "Airy") "\n\tMisc Sph, no inv\n\tno_cut lat_b="; enum Mode { diff --git a/src/PJ_august.c b/src/PJ_august.c index 4c197114..e891e84e 100644 --- a/src/PJ_august.c +++ b/src/PJ_august.c @@ -4,7 +4,7 @@ #include "projects.h" -PROJ_HEAD(august, "August Epicycloidal") "\n\tMisc Sph, no inv."; +PROJ_HEAD(august, "August Epicycloidal") "\n\tMisc Sph, no inv"; #define M 1.333333333333333 diff --git a/src/PJ_bacon.c b/src/PJ_bacon.c index ae25bce1..f0f11c9d 100644 --- a/src/PJ_bacon.c +++ b/src/PJ_bacon.c @@ -12,9 +12,9 @@ struct pj_opaque { int ortl; }; -PROJ_HEAD(apian, "Apian Globular I") "\n\tMisc Sph, no inv."; -PROJ_HEAD(ortel, "Ortelius Oval") "\n\tMisc Sph, no inv."; -PROJ_HEAD(bacon, "Bacon Globular") "\n\tMisc Sph, no inv."; +PROJ_HEAD(apian, "Apian Globular I") "\n\tMisc Sph, no inv"; +PROJ_HEAD(ortel, "Ortelius Oval") "\n\tMisc Sph, no inv"; +PROJ_HEAD(bacon, "Bacon Globular") "\n\tMisc Sph, no inv"; static XY s_forward (LP lp, PJ *P) { /* Spheroidal, forward */ diff --git a/src/PJ_bipc.c b/src/PJ_bipc.c index ea7883a5..e4a69077 100644 --- a/src/PJ_bipc.c +++ b/src/PJ_bipc.c @@ -6,7 +6,7 @@ #include "projects.h" #include "proj_math.h" -PROJ_HEAD(bipc, "Bipolar conic of western hemisphere") "\n\tConic Sph."; +PROJ_HEAD(bipc, "Bipolar conic of western hemisphere") "\n\tConic Sph"; # define EPS 1e-10 # define EPS10 1e-10 diff --git a/src/PJ_boggs.c b/src/PJ_boggs.c index 83bafc18..119357c0 100644 --- a/src/PJ_boggs.c +++ b/src/PJ_boggs.c @@ -3,7 +3,7 @@ #include "projects.h" -PROJ_HEAD(boggs, "Boggs Eumorphic") "\n\tPCyl., no inv., Sph."; +PROJ_HEAD(boggs, "Boggs Eumorphic") "\n\tPCyl, no inv, Sph"; # define NITER 20 # define EPS 1e-7 # define FXC 2.00276 diff --git a/src/PJ_ccon.c b/src/PJ_ccon.c index aed59fb6..0b8b70cb 100644 --- a/src/PJ_ccon.c +++ b/src/PJ_ccon.c @@ -37,7 +37,7 @@ struct pj_opaque { }; PROJ_HEAD(ccon, "Central Conic") - "\n\tCentral Conic, Sph.\n\tlat_1="; + "\n\tCentral Conic, Sph\n\tlat_1="; diff --git a/src/PJ_chamb.c b/src/PJ_chamb.c index 0d14b95e..6951d6a1 100644 --- a/src/PJ_chamb.c +++ b/src/PJ_chamb.c @@ -19,7 +19,7 @@ struct pj_opaque { double beta_0, beta_1, beta_2; }; -PROJ_HEAD(chamb, "Chamberlin Trimetric") "\n\tMisc Sph, no inv." +PROJ_HEAD(chamb, "Chamberlin Trimetric") "\n\tMisc Sph, no inv" "\n\tlat_1= lon_1= lat_2= lon_2= lat_3= lon_3="; #include diff --git a/src/PJ_collg.c b/src/PJ_collg.c index ef712905..7904de29 100644 --- a/src/PJ_collg.c +++ b/src/PJ_collg.c @@ -5,7 +5,7 @@ #include "proj.h" #include "projects.h" -PROJ_HEAD(collg, "Collignon") "\n\tPCyl, Sph."; +PROJ_HEAD(collg, "Collignon") "\n\tPCyl, Sph"; #define FXC 1.12837916709551257390 #define FYC 1.77245385090551602729 #define ONEEPS 1.0000001 diff --git a/src/PJ_comill.c b/src/PJ_comill.c index ce5bb392..b6e0192e 100644 --- a/src/PJ_comill.c +++ b/src/PJ_comill.c @@ -12,7 +12,7 @@ Port to PROJ.4 by Bojan Savric, 4 April 2016 #include "projects.h" -PROJ_HEAD(comill, "Compact Miller") "\n\tCyl., Sph."; +PROJ_HEAD(comill, "Compact Miller") "\n\tCyl, Sph"; #define K1 0.9902 #define K2 0.1604 diff --git a/src/PJ_crast.c b/src/PJ_crast.c index 6db617d0..4e4dee8b 100644 --- a/src/PJ_crast.c +++ b/src/PJ_crast.c @@ -3,7 +3,7 @@ #include "projects.h" -PROJ_HEAD(crast, "Craster Parabolic (Putnins P4)") "\n\tPCyl., Sph."; +PROJ_HEAD(crast, "Craster Parabolic (Putnins P4)") "\n\tPCyl, Sph"; #define XM 0.97720502380583984317 #define RXM 1.02332670794648848847 diff --git a/src/PJ_denoy.c b/src/PJ_denoy.c index 64de1f9f..5c337c45 100644 --- a/src/PJ_denoy.c +++ b/src/PJ_denoy.c @@ -3,7 +3,7 @@ #include "projects.h" -PROJ_HEAD(denoy, "Denoyer Semi-Elliptical") "\n\tPCyl., no inv., Sph."; +PROJ_HEAD(denoy, "Denoyer Semi-Elliptical") "\n\tPCyl, no inv, Sph"; #define C0 0.95 #define C1 -0.08333333333333333333 diff --git a/src/PJ_eck1.c b/src/PJ_eck1.c index 069aa185..88a7430c 100644 --- a/src/PJ_eck1.c +++ b/src/PJ_eck1.c @@ -3,7 +3,7 @@ #include "projects.h" -PROJ_HEAD(eck1, "Eckert I") "\n\tPCyl., Sph."; +PROJ_HEAD(eck1, "Eckert I") "\n\tPCyl, Sph"; #define FC 0.92131773192356127802 #define RP 0.31830988618379067154 diff --git a/src/PJ_eck2.c b/src/PJ_eck2.c index e9ef1229..f76ab4ec 100644 --- a/src/PJ_eck2.c +++ b/src/PJ_eck2.c @@ -5,7 +5,7 @@ #include "proj.h" #include "projects.h" -PROJ_HEAD(eck2, "Eckert II") "\n\tPCyl. Sph."; +PROJ_HEAD(eck2, "Eckert II") "\n\tPCyl, Sph"; #define FXC 0.46065886596178063902 #define FYC 1.44720250911653531871 diff --git a/src/PJ_eck3.c b/src/PJ_eck3.c index 674f6919..8f91c8bb 100644 --- a/src/PJ_eck3.c +++ b/src/PJ_eck3.c @@ -5,10 +5,10 @@ #include "projects.h" -PROJ_HEAD(eck3, "Eckert III") "\n\tPCyl, Sph."; -PROJ_HEAD(putp1, "Putnins P1") "\n\tPCyl, Sph."; -PROJ_HEAD(wag6, "Wagner VI") "\n\tPCyl, Sph."; -PROJ_HEAD(kav7, "Kavraisky VII") "\n\tPCyl, Sph."; +PROJ_HEAD(eck3, "Eckert III") "\n\tPCyl, Sph"; +PROJ_HEAD(putp1, "Putnins P1") "\n\tPCyl, Sph"; +PROJ_HEAD(wag6, "Wagner VI") "\n\tPCyl, Sph"; +PROJ_HEAD(kav7, "Kavraisky VII") "\n\tPCyl, Sph"; struct pj_opaque { double C_x, C_y, A, B; diff --git a/src/PJ_eck4.c b/src/PJ_eck4.c index 367d9cc9..4fa4c21f 100644 --- a/src/PJ_eck4.c +++ b/src/PJ_eck4.c @@ -4,7 +4,7 @@ #include "projects.h" -PROJ_HEAD(eck4, "Eckert IV") "\n\tPCyl, Sph."; +PROJ_HEAD(eck4, "Eckert IV") "\n\tPCyl, Sph"; #define C_x .42223820031577120149 #define C_y 1.32650042817700232218 diff --git a/src/PJ_eck5.c b/src/PJ_eck5.c index 275430d8..f9f28460 100644 --- a/src/PJ_eck5.c +++ b/src/PJ_eck5.c @@ -4,7 +4,7 @@ #include "projects.h" -PROJ_HEAD(eck5, "Eckert V") "\n\tPCyl, Sph."; +PROJ_HEAD(eck5, "Eckert V") "\n\tPCyl, Sph"; #define XF 0.44101277172455148219 #define RXF 2.26750802723822639137 diff --git a/src/PJ_eqearth.c b/src/PJ_eqearth.c index 5a2e74fd..bbe1295f 100644 --- a/src/PJ_eqearth.c +++ b/src/PJ_eqearth.c @@ -18,7 +18,7 @@ Added ellipsoidal equations by Bojan Savric, 22 August 2018 #include "projects.h" -PROJ_HEAD(eqearth, "Equal Earth") "\n\tPCyl., Sph&Ell"; +PROJ_HEAD(eqearth, "Equal Earth") "\n\tPCyl, Sph&Ell"; /* A1..A4, polynomial coefficients */ #define A1 1.340264 @@ -62,7 +62,7 @@ static XY e_forward (LP lp, PJ *P) { /* Ellipsoidal/spheroidal, forwar xy.x = lp.lam * cos(psi) / (M * (A1 + 3 * A2 * psi2 + psi6 * (7 * A3 + 9 * A4 * psi2))); xy.y = psi * (A1 + A2 * psi2 + psi6 * (A3 + A4 * psi2)); - + /* Adjusting x and y for authalic radius */ xy.x *= Q->rqda; xy.y *= Q->rqda; diff --git a/src/PJ_fahey.c b/src/PJ_fahey.c index 18be5ea0..85e0ab69 100644 --- a/src/PJ_fahey.c +++ b/src/PJ_fahey.c @@ -4,7 +4,7 @@ #include "projects.h" -PROJ_HEAD(fahey, "Fahey") "\n\tPcyl, Sph."; +PROJ_HEAD(fahey, "Fahey") "\n\tPcyl, Sph"; #define TOL 1e-6 diff --git a/src/PJ_fouc_s.c b/src/PJ_fouc_s.c index 10bd1765..6efe34bd 100644 --- a/src/PJ_fouc_s.c +++ b/src/PJ_fouc_s.c @@ -6,7 +6,7 @@ #include "proj.h" #include "projects.h" -PROJ_HEAD(fouc_s, "Foucaut Sinusoidal") "\n\tPCyl., Sph."; +PROJ_HEAD(fouc_s, "Foucaut Sinusoidal") "\n\tPCyl, Sph"; #define MAX_ITER 10 #define LOOP_TOL 1e-7 diff --git a/src/PJ_gins8.c b/src/PJ_gins8.c index ae0d4dee..c1a2fff0 100644 --- a/src/PJ_gins8.c +++ b/src/PJ_gins8.c @@ -1,7 +1,7 @@ #define PJ_LIB__ #include "projects.h" -PROJ_HEAD(gins8, "Ginsburg VIII (TsNIIGAiK)") "\n\tPCyl, Sph., no inv."; +PROJ_HEAD(gins8, "Ginsburg VIII (TsNIIGAiK)") "\n\tPCyl, Sph, no inv"; #define Cl 0.000952426 #define Cp 0.162388 diff --git a/src/PJ_gn_sinu.c b/src/PJ_gn_sinu.c index 21cba308..2ef0f263 100644 --- a/src/PJ_gn_sinu.c +++ b/src/PJ_gn_sinu.c @@ -6,10 +6,10 @@ #include "proj.h" #include "projects.h" -PROJ_HEAD(gn_sinu, "General Sinusoidal Series") "\n\tPCyl, Sph.\n\tm= n="; +PROJ_HEAD(gn_sinu, "General Sinusoidal Series") "\n\tPCyl, Sph\n\tm= n="; PROJ_HEAD(sinu, "Sinusoidal (Sanson-Flamsteed)") "\n\tPCyl, Sph&Ell"; -PROJ_HEAD(eck6, "Eckert VI") "\n\tPCyl, Sph."; -PROJ_HEAD(mbtfps, "McBryde-Thomas Flat-Polar Sinusoidal") "\n\tPCyl, Sph."; +PROJ_HEAD(eck6, "Eckert VI") "\n\tPCyl, Sph"; +PROJ_HEAD(mbtfps, "McBryde-Thomas Flat-Polar Sinusoidal") "\n\tPCyl, Sph"; #define EPS10 1e-10 #define MAX_ITER 8 diff --git a/src/PJ_gnom.c b/src/PJ_gnom.c index 9c2c7106..635ae49e 100644 --- a/src/PJ_gnom.c +++ b/src/PJ_gnom.c @@ -7,7 +7,7 @@ #include "projects.h" #include "proj_math.h" -PROJ_HEAD(gnom, "Gnomonic") "\n\tAzi, Sph."; +PROJ_HEAD(gnom, "Gnomonic") "\n\tAzi, Sph"; #define EPS10 1.e-10 diff --git a/src/PJ_goode.c b/src/PJ_goode.c index 4f299b54..8d8ac24d 100644 --- a/src/PJ_goode.c +++ b/src/PJ_goode.c @@ -6,7 +6,7 @@ #include "proj.h" #include "projects.h" -PROJ_HEAD(goode, "Goode Homolosine") "\n\tPCyl, Sph."; +PROJ_HEAD(goode, "Goode Homolosine") "\n\tPCyl, Sph"; #define Y_COR 0.05280 #define PHI_LIM 0.71093078197902358062 diff --git a/src/PJ_hatano.c b/src/PJ_hatano.c index 4e852888..019671cc 100644 --- a/src/PJ_hatano.c +++ b/src/PJ_hatano.c @@ -5,7 +5,7 @@ #include "proj.h" #include "projects.h" -PROJ_HEAD(hatano, "Hatano Asymmetrical Equal Area") "\n\tPCyl, Sph."; +PROJ_HEAD(hatano, "Hatano Asymmetrical Equal Area") "\n\tPCyl, Sph"; #define NITER 20 #define EPS 1e-7 diff --git a/src/PJ_healpix.c b/src/PJ_healpix.c index d76ca33d..ee575abf 100644 --- a/src/PJ_healpix.c +++ b/src/PJ_healpix.c @@ -37,8 +37,8 @@ #include "proj.h" #include "projects.h" -PROJ_HEAD(healpix, "HEALPix") "\n\tSph., Ellps."; -PROJ_HEAD(rhealpix, "rHEALPix") "\n\tSph., Ellps.\n\tnorth_square= south_square="; +PROJ_HEAD(healpix, "HEALPix") "\n\tSph&Ell"; +PROJ_HEAD(rhealpix, "rHEALPix") "\n\tSph&Ell\n\tnorth_square= south_square="; /* Matrix for counterclockwise rotation by pi/2: */ # define R1 {{ 0,-1},{ 1, 0}} diff --git a/src/PJ_igh.c b/src/PJ_igh.c index 23614ac5..c991649a 100644 --- a/src/PJ_igh.c +++ b/src/PJ_igh.c @@ -5,7 +5,7 @@ #include "projects.h" -PROJ_HEAD(igh, "Interrupted Goode Homolosine") "\n\tPCyl, Sph."; +PROJ_HEAD(igh, "Interrupted Goode Homolosine") "\n\tPCyl, Sph"; C_NAMESPACE PJ *pj_sinu(PJ *), *pj_moll(PJ *); diff --git a/src/PJ_krovak.c b/src/PJ_krovak.c index afb7847b..5ca21214 100644 --- a/src/PJ_krovak.c +++ b/src/PJ_krovak.c @@ -82,7 +82,7 @@ #include "projects.h" -PROJ_HEAD(krovak, "Krovak") "\n\tPCyl., Ellps."; +PROJ_HEAD(krovak, "Krovak") "\n\tPCyl, Ell"; #define EPS 1e-15 #define UQ 1.04216856380474 /* DU(2, 59, 42, 42.69689) */ diff --git a/src/PJ_larr.c b/src/PJ_larr.c index e4e39dc9..e4d5d240 100644 --- a/src/PJ_larr.c +++ b/src/PJ_larr.c @@ -4,7 +4,7 @@ #include "projects.h" -PROJ_HEAD(larr, "Larrivee") "\n\tMisc Sph, no inv."; +PROJ_HEAD(larr, "Larrivee") "\n\tMisc Sph, no inv"; #define SIXTH .16666666666666666 diff --git a/src/PJ_lask.c b/src/PJ_lask.c index 0bb3812c..46f23edb 100644 --- a/src/PJ_lask.c +++ b/src/PJ_lask.c @@ -1,7 +1,7 @@ #define PJ_LIB__ #include "projects.h" -PROJ_HEAD(lask, "Laskowski") "\n\tMisc Sph, no inv."; +PROJ_HEAD(lask, "Laskowski") "\n\tMisc Sph, no inv"; #define a10 0.975534 #define a12 -0.119161 diff --git a/src/PJ_mbt_fps.c b/src/PJ_mbt_fps.c index b689014f..66ed9458 100644 --- a/src/PJ_mbt_fps.c +++ b/src/PJ_mbt_fps.c @@ -4,7 +4,7 @@ #include "projects.h" -PROJ_HEAD(mbt_fps, "McBryde-Thomas Flat-Pole Sine (No. 2)") "\n\tCyl., Sph."; +PROJ_HEAD(mbt_fps, "McBryde-Thomas Flat-Pole Sine (No. 2)") "\n\tCyl, Sph"; #define MAX_ITER 10 #define LOOP_TOL 1e-7 diff --git a/src/PJ_mbtfpp.c b/src/PJ_mbtfpp.c index 5e5b2d50..276a43eb 100644 --- a/src/PJ_mbtfpp.c +++ b/src/PJ_mbtfpp.c @@ -5,7 +5,7 @@ #include "proj.h" #include "projects.h" -PROJ_HEAD(mbtfpp, "McBride-Thomas Flat-Polar Parabolic") "\n\tCyl., Sph."; +PROJ_HEAD(mbtfpp, "McBride-Thomas Flat-Polar Parabolic") "\n\tCyl, Sph"; #define CS .95257934441568037152 #define FXC .92582009977255146156 diff --git a/src/PJ_mbtfpq.c b/src/PJ_mbtfpq.c index 75c71708..b7c0eb16 100644 --- a/src/PJ_mbtfpq.c +++ b/src/PJ_mbtfpq.c @@ -5,7 +5,7 @@ #include "proj.h" #include "projects.h" -PROJ_HEAD(mbtfpq, "McBryde-Thomas Flat-Polar Quartic") "\n\tCyl., Sph."; +PROJ_HEAD(mbtfpq, "McBryde-Thomas Flat-Polar Quartic") "\n\tCyl, Sph"; #define NITER 20 #define EPS 1e-7 diff --git a/src/PJ_moll.c b/src/PJ_moll.c index 7c0e6f85..4ac73841 100644 --- a/src/PJ_moll.c +++ b/src/PJ_moll.c @@ -5,9 +5,9 @@ #include "projects.h" -PROJ_HEAD(moll, "Mollweide") "\n\tPCyl., Sph."; -PROJ_HEAD(wag4, "Wagner IV") "\n\tPCyl., Sph."; -PROJ_HEAD(wag5, "Wagner V") "\n\tPCyl., Sph."; +PROJ_HEAD(moll, "Mollweide") "\n\tPCyl, Sph"; +PROJ_HEAD(wag4, "Wagner IV") "\n\tPCyl, Sph"; +PROJ_HEAD(wag5, "Wagner V") "\n\tPCyl, Sph"; #define MAX_ITER 10 #define LOOP_TOL 1e-7 diff --git a/src/PJ_natearth.c b/src/PJ_natearth.c index df015222..27a6b137 100644 --- a/src/PJ_natearth.c +++ b/src/PJ_natearth.c @@ -18,7 +18,7 @@ Port to PROJ.4 by Bernhard Jenny, 6 June 2011 #include "projects.h" -PROJ_HEAD(natearth, "Natural Earth") "\n\tPCyl., Sph."; +PROJ_HEAD(natearth, "Natural Earth") "\n\tPCyl, Sph"; #define A0 0.8707 #define A1 -0.131979 diff --git a/src/PJ_natearth2.c b/src/PJ_natearth2.c index 0498f186..f6aba671 100644 --- a/src/PJ_natearth2.c +++ b/src/PJ_natearth2.c @@ -11,7 +11,7 @@ Port to PROJ.4 by Bojan Savric, 4 April 2016 #include "projects.h" -PROJ_HEAD(natearth2, "Natural Earth 2") "\n\tPCyl., Sph."; +PROJ_HEAD(natearth2, "Natural Earth 2") "\n\tPCyl, Sph"; #define A0 0.84719 #define A1 -0.13063 diff --git a/src/PJ_nell.c b/src/PJ_nell.c index 751c01c8..2a7ea32c 100644 --- a/src/PJ_nell.c +++ b/src/PJ_nell.c @@ -4,7 +4,7 @@ #include "projects.h" -PROJ_HEAD(nell, "Nell") "\n\tPCyl., Sph."; +PROJ_HEAD(nell, "Nell") "\n\tPCyl, Sph"; #define MAX_ITER 10 #define LOOP_TOL 1e-7 diff --git a/src/PJ_nell_h.c b/src/PJ_nell_h.c index db9e9de0..28c3ace7 100644 --- a/src/PJ_nell_h.c +++ b/src/PJ_nell_h.c @@ -4,7 +4,7 @@ #include "projects.h" -PROJ_HEAD(nell_h, "Nell-Hammer") "\n\tPCyl., Sph."; +PROJ_HEAD(nell_h, "Nell-Hammer") "\n\tPCyl, Sph"; #define NITER 9 #define EPS 1e-7 diff --git a/src/PJ_nocol.c b/src/PJ_nocol.c index 93e128ea..541d08b2 100644 --- a/src/PJ_nocol.c +++ b/src/PJ_nocol.c @@ -4,7 +4,7 @@ #include "projects.h" -PROJ_HEAD(nicol, "Nicolosi Globular") "\n\tMisc Sph, no inv."; +PROJ_HEAD(nicol, "Nicolosi Globular") "\n\tMisc Sph, no inv"; #define EPS 1e-10 diff --git a/src/PJ_ortho.c b/src/PJ_ortho.c index 2b037819..d442aa8a 100644 --- a/src/PJ_ortho.c +++ b/src/PJ_ortho.c @@ -5,7 +5,7 @@ #include "proj_math.h" #include "projects.h" -PROJ_HEAD(ortho, "Orthographic") "\n\tAzi, Sph."; +PROJ_HEAD(ortho, "Orthographic") "\n\tAzi, Sph"; enum Mode { N_POLE = 0, diff --git a/src/PJ_patterson.c b/src/PJ_patterson.c index b54847f2..0d19414e 100644 --- a/src/PJ_patterson.c +++ b/src/PJ_patterson.c @@ -44,7 +44,7 @@ #include "projects.h" -PROJ_HEAD(patterson, "Patterson Cylindrical") "\n\tCyl."; +PROJ_HEAD(patterson, "Patterson Cylindrical") "\n\tCyl"; #define K1 1.0148 #define K2 0.23185 diff --git a/src/PJ_putp2.c b/src/PJ_putp2.c index 0b4397e5..d7a847c8 100644 --- a/src/PJ_putp2.c +++ b/src/PJ_putp2.c @@ -4,7 +4,7 @@ #include "projects.h" -PROJ_HEAD(putp2, "Putnins P2") "\n\tPCyl., Sph."; +PROJ_HEAD(putp2, "Putnins P2") "\n\tPCyl, Sph"; #define C_x 1.89490 #define C_y 1.71848 diff --git a/src/PJ_putp3.c b/src/PJ_putp3.c index d0db876e..695ea877 100644 --- a/src/PJ_putp3.c +++ b/src/PJ_putp3.c @@ -6,8 +6,8 @@ struct pj_opaque { double A; }; -PROJ_HEAD(putp3, "Putnins P3") "\n\tPCyl., Sph."; -PROJ_HEAD(putp3p, "Putnins P3'") "\n\tPCyl., Sph."; +PROJ_HEAD(putp3, "Putnins P3") "\n\tPCyl, Sph"; +PROJ_HEAD(putp3p, "Putnins P3'") "\n\tPCyl, Sph"; #define C 0.79788456 #define RPISQ 0.1013211836 diff --git a/src/PJ_putp4p.c b/src/PJ_putp4p.c index b716060a..6448dc19 100644 --- a/src/PJ_putp4p.c +++ b/src/PJ_putp4p.c @@ -9,8 +9,8 @@ struct pj_opaque { double C_x, C_y; }; -PROJ_HEAD(putp4p, "Putnins P4'") "\n\tPCyl., Sph."; -PROJ_HEAD(weren, "Werenskiold I") "\n\tPCyl., Sph."; +PROJ_HEAD(putp4p, "Putnins P4'") "\n\tPCyl, Sph"; +PROJ_HEAD(weren, "Werenskiold I") "\n\tPCyl, Sph"; static XY s_forward (LP lp, PJ *P) { /* Spheroidal, forward */ diff --git a/src/PJ_putp5.c b/src/PJ_putp5.c index 6836f71d..96b0670d 100644 --- a/src/PJ_putp5.c +++ b/src/PJ_putp5.c @@ -9,8 +9,8 @@ struct pj_opaque { double A, B; }; -PROJ_HEAD(putp5, "Putnins P5") "\n\tPCyl., Sph."; -PROJ_HEAD(putp5p, "Putnins P5'") "\n\tPCyl., Sph."; +PROJ_HEAD(putp5, "Putnins P5") "\n\tPCyl, Sph"; +PROJ_HEAD(putp5p, "Putnins P5'") "\n\tPCyl, Sph"; #define C 1.01346 #define D 1.2158542 diff --git a/src/PJ_putp6.c b/src/PJ_putp6.c index 68c10701..fa9290b4 100644 --- a/src/PJ_putp6.c +++ b/src/PJ_putp6.c @@ -9,8 +9,8 @@ struct pj_opaque { double C_x, C_y, A, B, D; }; -PROJ_HEAD(putp6, "Putnins P6") "\n\tPCyl., Sph."; -PROJ_HEAD(putp6p, "Putnins P6'") "\n\tPCyl., Sph."; +PROJ_HEAD(putp6, "Putnins P6") "\n\tPCyl, Sph"; +PROJ_HEAD(putp6p, "Putnins P6'") "\n\tPCyl, Sph"; #define EPS 1e-10 #define NITER 10 diff --git a/src/PJ_qsc.c b/src/PJ_qsc.c index 4b463b46..3b8b7fe2 100644 --- a/src/PJ_qsc.c +++ b/src/PJ_qsc.c @@ -62,7 +62,7 @@ struct pj_opaque { double one_minus_f; double one_minus_f_squared; }; -PROJ_HEAD(qsc, "Quadrilateralized Spherical Cube") "\n\tAzi, Sph."; +PROJ_HEAD(qsc, "Quadrilateralized Spherical Cube") "\n\tAzi, Sph"; #define EPS10 1.e-10 diff --git a/src/PJ_robin.c b/src/PJ_robin.c index ca9e5fc7..19bdc2dc 100644 --- a/src/PJ_robin.c +++ b/src/PJ_robin.c @@ -4,7 +4,7 @@ #include "proj.h" #include "projects.h" -PROJ_HEAD(robin, "Robinson") "\n\tPCyl., Sph."; +PROJ_HEAD(robin, "Robinson") "\n\tPCyl, Sph"; #define V(C,z) (C.c0 + z * (C.c1 + z * (C.c2 + z * C.c3))) #define DV(C,z) (C.c1 + z * (C.c2 + C.c2 + z * 3. * C.c3)) diff --git a/src/PJ_rpoly.c b/src/PJ_rpoly.c index 57c4fc92..03c2b161 100644 --- a/src/PJ_rpoly.c +++ b/src/PJ_rpoly.c @@ -13,7 +13,7 @@ struct pj_opaque { }; PROJ_HEAD(rpoly, "Rectangular Polyconic") - "\n\tConic, Sph., no inv.\n\tlat_ts="; + "\n\tConic, Sph, no inv\n\tlat_ts="; #define EPS 1e-9 diff --git a/src/PJ_sts.c b/src/PJ_sts.c index 8409d86a..66094178 100644 --- a/src/PJ_sts.c +++ b/src/PJ_sts.c @@ -5,10 +5,10 @@ #include "projects.h" -PROJ_HEAD(kav5, "Kavraisky V") "\n\tPCyl., Sph."; -PROJ_HEAD(qua_aut, "Quartic Authalic") "\n\tPCyl., Sph."; -PROJ_HEAD(fouc, "Foucaut") "\n\tPCyl., Sph."; -PROJ_HEAD(mbt_s, "McBryde-Thomas Flat-Polar Sine (No. 1)") "\n\tPCyl., Sph."; +PROJ_HEAD(kav5, "Kavraisky V") "\n\tPCyl, Sph"; +PROJ_HEAD(qua_aut, "Quartic Authalic") "\n\tPCyl, Sph"; +PROJ_HEAD(fouc, "Foucaut") "\n\tPCyl, Sph"; +PROJ_HEAD(mbt_s, "McBryde-Thomas Flat-Polar Sine (No. 1)") "\n\tPCyl, Sph"; struct pj_opaque { diff --git a/src/PJ_tcc.c b/src/PJ_tcc.c index 14255325..60ded63e 100644 --- a/src/PJ_tcc.c +++ b/src/PJ_tcc.c @@ -5,7 +5,7 @@ #include "proj.h" #include "projects.h" -PROJ_HEAD(tcc, "Transverse Central Cylindrical") "\n\tCyl, Sph, no inv."; +PROJ_HEAD(tcc, "Transverse Central Cylindrical") "\n\tCyl, Sph, no inv"; #define EPS10 1.e-10 diff --git a/src/PJ_urm5.c b/src/PJ_urm5.c index 416cb866..293de8cf 100644 --- a/src/PJ_urm5.c +++ b/src/PJ_urm5.c @@ -6,7 +6,7 @@ #include "proj.h" #include "projects.h" -PROJ_HEAD(urm5, "Urmaev V") "\n\tPCyl., Sph., no inv.\n\tn= q= alpha="; +PROJ_HEAD(urm5, "Urmaev V") "\n\tPCyl, Sph, no inv\n\tn= q= alpha="; struct pj_opaque { double m, rmn, q3, n; diff --git a/src/PJ_urmfps.c b/src/PJ_urmfps.c index 5749059b..467fc9bc 100644 --- a/src/PJ_urmfps.c +++ b/src/PJ_urmfps.c @@ -6,8 +6,8 @@ #include "proj.h" #include "projects.h" -PROJ_HEAD(urmfps, "Urmaev Flat-Polar Sinusoidal") "\n\tPCyl, Sph.\n\tn="; -PROJ_HEAD(wag1, "Wagner I (Kavraisky VI)") "\n\tPCyl, Sph."; +PROJ_HEAD(urmfps, "Urmaev Flat-Polar Sinusoidal") "\n\tPCyl, Sph\n\tn="; +PROJ_HEAD(wag1, "Wagner I (Kavraisky VI)") "\n\tPCyl, Sph"; struct pj_opaque { double n, C_y; diff --git a/src/PJ_vandg2.c b/src/PJ_vandg2.c index 20b7601a..447cb782 100644 --- a/src/PJ_vandg2.c +++ b/src/PJ_vandg2.c @@ -9,8 +9,8 @@ struct pj_opaque { int vdg3; }; -PROJ_HEAD(vandg2, "van der Grinten II") "\n\tMisc Sph, no inv."; -PROJ_HEAD(vandg3, "van der Grinten III") "\n\tMisc Sph, no inv."; +PROJ_HEAD(vandg2, "van der Grinten II") "\n\tMisc Sph, no inv"; +PROJ_HEAD(vandg3, "van der Grinten III") "\n\tMisc Sph, no inv"; #define TOL 1e-10 diff --git a/src/PJ_vandg4.c b/src/PJ_vandg4.c index 770594f1..d9a53c87 100644 --- a/src/PJ_vandg4.c +++ b/src/PJ_vandg4.c @@ -4,7 +4,7 @@ #include "projects.h" -PROJ_HEAD(vandg4, "van der Grinten IV") "\n\tMisc Sph, no inv."; +PROJ_HEAD(vandg4, "van der Grinten IV") "\n\tMisc Sph, no inv"; #define TOL 1e-10 diff --git a/src/PJ_wag2.c b/src/PJ_wag2.c index d12cade1..1bee737a 100644 --- a/src/PJ_wag2.c +++ b/src/PJ_wag2.c @@ -4,7 +4,7 @@ #include "projects.h" -PROJ_HEAD(wag2, "Wagner II") "\n\tPCyl., Sph."; +PROJ_HEAD(wag2, "Wagner II") "\n\tPCyl, Sph"; #define C_x 0.92483 #define C_y 1.38725 diff --git a/src/PJ_wag3.c b/src/PJ_wag3.c index 6ae9ad28..ccd19d4d 100644 --- a/src/PJ_wag3.c +++ b/src/PJ_wag3.c @@ -5,7 +5,7 @@ #include "projects.h" -PROJ_HEAD(wag3, "Wagner III") "\n\tPCyl., Sph.\n\tlat_ts="; +PROJ_HEAD(wag3, "Wagner III") "\n\tPCyl, Sph\n\tlat_ts="; #define TWOTHIRD 0.6666666666666666666667 diff --git a/src/PJ_wag7.c b/src/PJ_wag7.c index 3cd332ad..2009e672 100644 --- a/src/PJ_wag7.c +++ b/src/PJ_wag7.c @@ -4,7 +4,7 @@ #include "projects.h" -PROJ_HEAD(wag7, "Wagner VII") "\n\tMisc Sph, no inv."; +PROJ_HEAD(wag7, "Wagner VII") "\n\tMisc Sph, no inv"; diff --git a/src/PJ_wink1.c b/src/PJ_wink1.c index 10392fe9..865cc6ac 100644 --- a/src/PJ_wink1.c +++ b/src/PJ_wink1.c @@ -5,7 +5,7 @@ #include "projects.h" -PROJ_HEAD(wink1, "Winkel I") "\n\tPCyl., Sph.\n\tlat_ts="; +PROJ_HEAD(wink1, "Winkel I") "\n\tPCyl, Sph\n\tlat_ts="; struct pj_opaque { double cosphi1; diff --git a/src/PJ_wink2.c b/src/PJ_wink2.c index d02ca567..f8e9af09 100644 --- a/src/PJ_wink2.c +++ b/src/PJ_wink2.c @@ -5,7 +5,7 @@ #include "projects.h" -PROJ_HEAD(wink2, "Winkel II") "\n\tPCyl., Sph., no inv.\n\tlat_1="; +PROJ_HEAD(wink2, "Winkel II") "\n\tPCyl, Sph, no inv\n\tlat_1="; struct pj_opaque { double cosphi1; }; diff --git a/src/proj_rouss.c b/src/proj_rouss.c index ca4476bb..0e0f9982 100644 --- a/src/proj_rouss.c +++ b/src/proj_rouss.c @@ -39,7 +39,7 @@ struct pj_opaque { double D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11; void *en; }; -PROJ_HEAD(rouss, "Roussilhe Stereographic") "\n\tAzi., Ellps."; +PROJ_HEAD(rouss, "Roussilhe Stereographic") "\n\tAzi, Ell"; static XY e_forward (LP lp, PJ *P) { /* Ellipsoidal, forward */ -- cgit v1.2.3 From d6c97c29fa54d69e56475e155a5a208055eb3c13 Mon Sep 17 00:00:00 2001 From: Marco Bernasocchi Date: Mon, 8 Oct 2018 17:50:57 +0200 Subject: Update install.rst --- docs/source/install.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/source/install.rst b/docs/source/install.rst index ea11f5ee..b8190c6b 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -26,13 +26,12 @@ from the ``conda-forge`` channel:: conda install -c conda-forge proj4 -Docker +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ A `Docker`_ image with just PROJ binaries and a full compliment of grid shift files is available on `DockerHub`_. Get the package with:: - docker pull osgeo/proj.4 + docker pull osgeo/proj .. _`Docker`: https://docker.org .. _`DockerHub`: https://hub.docker.com/r/osgeo/proj.4/ -- cgit v1.2.3 From 1f74ed59a8d7e267d86ce576f2653e04e5c2bffc Mon Sep 17 00:00:00 2001 From: Marco Bernasocchi Date: Mon, 8 Oct 2018 17:56:40 +0200 Subject: fix typo --- docs/source/install.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/install.rst b/docs/source/install.rst index b8190c6b..240f81f9 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -26,6 +26,7 @@ from the ``conda-forge`` channel:: conda install -c conda-forge proj4 +Docker +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ A `Docker`_ image with just PROJ binaries and a full compliment of grid shift -- cgit v1.2.3 From 6c203a4395f30eae4f49230d2e2cb7652006b959 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 9 Oct 2018 21:04:47 +0200 Subject: Fix typos --- docs/source/faq.rst | 2 +- docs/source/operations/projections/lsat.rst | 4 ++-- scripts/fix_typos.sh | 2 +- src/PJ_eqearth.c | 2 +- src/PJ_vgridshift.c | 2 +- src/cct.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/source/faq.rst b/docs/source/faq.rst index a218e1a8..f72ec132 100644 --- a/docs/source/faq.rst +++ b/docs/source/faq.rst @@ -130,7 +130,7 @@ How do I use 3 parameter and 7 parameter datum shifting Datum shifts can be approximated with 3 and 7 parameter transformations. Their use with :program:`cs2cs` is more fully described in the -:ref:`geodetic tranformation` section. +:ref:`geodetic transformation` section. More generically, the :ref:`helmert` can be used with :program:`cct`. diff --git a/docs/source/operations/projections/lsat.rst b/docs/source/operations/projections/lsat.rst index 4df944b5..c2b2d902 100644 --- a/docs/source/operations/projections/lsat.rst +++ b/docs/source/operations/projections/lsat.rst @@ -19,11 +19,11 @@ Required .. option:: +lsat= - Landsat satelite used for the projection. Value between 1 and 5. + Landsat satellite used for the projection. Value between 1 and 5. .. option:: +path= - Selected path of satelite. Value between 1 and 253 when :option:`+lsat` is + Selected path of satellite. Value between 1 and 253 when :option:`+lsat` is set to 1,2 or 3, otherwise valid input is between 1 and 233. diff --git a/scripts/fix_typos.sh b/scripts/fix_typos.sh index 0e1b5a10..06dfa821 100755 --- a/scripts/fix_typos.sh +++ b/scripts/fix_typos.sh @@ -46,7 +46,7 @@ if ! test -d fix_typos; then cd .. fi -EXCLUDED_FILES="*configure,config.status,config.sub,*/autom4te.cache/*,libtool,aclocal.m4,depcomp,ltmain.sh,*.pdf,./m4/*,./nad/epsg,./fix_typos/*" +EXCLUDED_FILES="*configure,config.status,config.sub,*/autom4te.cache/*,libtool,aclocal.m4,depcomp,ltmain.sh,*.pdf,./m4/*,./nad/epsg,./fix_typos/*,./docs/build/*" WORDS_WHITE_LIST="metres,als,lsat,twon,ang,PJD_ERR_UNKNOW_UNIT_ID,PJD_ERR_LSAT_NOT_IN_RANGE,COLOR_GRAT" python3 fix_typos/codespell/codespell.py -w -i 3 -q 2 -S $EXCLUDED_FILES \ diff --git a/src/PJ_eqearth.c b/src/PJ_eqearth.c index bbe1295f..a0d4467b 100644 --- a/src/PJ_eqearth.c +++ b/src/PJ_eqearth.c @@ -155,7 +155,7 @@ PJ *PROJECTION(eqearth) { if (0 == Q->apa) return destructor(P, ENOMEM); Q->qp = pj_qsfn(1.0, P->e, P->one_es); /* For auth_lat(). */ - Q->rqda = sqrt(0.5*Q->qp); /* Authalic radius devided by major axis */ + Q->rqda = sqrt(0.5*Q->qp); /* Authalic radius divided by major axis */ } return P; diff --git a/src/PJ_vgridshift.c b/src/PJ_vgridshift.c index f88527f7..ac5d26ef 100644 --- a/src/PJ_vgridshift.c +++ b/src/PJ_vgridshift.c @@ -113,7 +113,7 @@ PJ *TRANSFORMATION(vgridshift,0) { if (pj_param(P->ctx, P->params, "tt_epoch").i) Q->t_epoch = pj_param (P->ctx, P->params, "dt_epoch").f; - /* historical: the forward direction substracts the grid offset. */ + /* historical: the forward direction subtracts the grid offset. */ Q->forward_multiplier = -1.0; if (pj_param(P->ctx, P->params, "tmultiplier").i) { Q->forward_multiplier = pj_param(P->ctx, P->params, "dmultiplier").f; diff --git a/src/cct.c b/src/cct.c index 7d02eaac..54734b98 100644 --- a/src/cct.c +++ b/src/cct.c @@ -280,7 +280,7 @@ int main(int argc, char **argv) { if (opt_given (o, "c")) { int ncols; - /* reset colum numbers to ease comment output later on */ + /* reset column numbers to ease comment output later on */ for (i=0; i<4; i++) columns_xyzt[i] = 0; -- cgit v1.2.3