aboutsummaryrefslogtreecommitdiff
path: root/src/PJ_hgridshift.c
diff options
context:
space:
mode:
authorThomas Knudsen <busstoptaktik@users.noreply.github.com>2017-11-13 00:33:40 +0100
committerGitHub <noreply@github.com>2017-11-13 00:33:40 +0100
commit06b2f944d7844bb898ace8a7973f9182aa2234b1 (patch)
tree8cdf833ad2e3ee2c84a53404cad23cc22c57db92 /src/PJ_hgridshift.c
parent1d54ce2b6f47b9d60bfd28ad0d33a883be3d510a (diff)
downloadPROJ-06b2f944d7844bb898ace8a7973f9182aa2234b1.tar.gz
PROJ-06b2f944d7844bb898ace8a7973f9182aa2234b1.zip
Removed remaining traces of the built in selftest system (#661)
* Removed remaining traces of the builtin selftest system. Moved all functionality to test/gie * Updated Appveyor and Travis build scripts * Another appveyor script update
Diffstat (limited to 'src/PJ_hgridshift.c')
-rw-r--r--src/PJ_hgridshift.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/PJ_hgridshift.c b/src/PJ_hgridshift.c
index d57af697..92275e51 100644
--- a/src/PJ_hgridshift.c
+++ b/src/PJ_hgridshift.c
@@ -73,53 +73,3 @@ PJ *TRANSFORMATION(hgridshift,0) {
return P;
}
-
-#ifndef PJ_SELFTEST
-/* selftest stub */
-int pj_hgridshift_selftest (void) {return 0;}
-#else
-int pj_hgridshift_selftest (void) {
- PJ *P;
- PJ_COORD expect, a, b;
- double dist;
-
- /* fail on purpose: +grids parameter is mandatory*/
- P = proj_create(PJ_DEFAULT_CTX, "+proj=hgridshift");
- if (0!=P) {
- proj_destroy (P);
- return 99;
- }
-
- /* fail on purpose: open non-existing grid */
- P = proj_create(PJ_DEFAULT_CTX, "+proj=hgridshift +grids=@nonexistinggrid.gsb,anothernonexistinggrid.gsb");
- if (0!=P) {
- proj_destroy (P);
- return 999;
- }
-
- /* Failure most likely means the grid is missing */
- P = proj_create(PJ_DEFAULT_CTX, "+proj=hgridshift +grids=nzgd2kgrid0005.gsb +ellps=GRS80");
- if (0==P)
- return 10;
-
- a = proj_coord (0,0,0,0);
- a.lpz.lam = PJ_TORAD(173);
- a.lpz.phi = PJ_TORAD(-45);
- b = a;
-
- dist = proj_roundtrip (P, PJ_FWD, 1, &b);
- if (dist > 0.00000001) {
- printf("dist: %f\n",dist);
- return 1;
- }
-
- expect.lpz.lam = PJ_TORAD(172.999892181021551);
- expect.lpz.phi = PJ_TORAD(-45.001620431954613);
- b = proj_trans(P, PJ_FWD, a);
- if (proj_xy_dist(expect.xy, b.xy) > 1e-4)
- return 2;
-
- proj_destroy(P);
- return 0;
-}
-#endif