@@ -87,11 +87,7 @@ func (e *Ellipsoid) initialize(op *System) error {
8787 if err != nil {
8888 return err
8989 }
90- err = e .doCalcParams (e .A , 0 )
91- if err != nil {
92- return err
93- }
94- return nil
90+ return e .doCalcParams (e .A , 0 )
9591 }
9692
9793 /* If an ellps argument is specified, start by using that */
@@ -119,21 +115,7 @@ func (e *Ellipsoid) initialize(op *System) error {
119115 }
120116
121117 /* And finally, we may turn it into a sphere */
122- err = e .doSpherification (op .ProjString )
123- if err != nil {
124- return err
125- }
126-
127- //proj_log_debug (P, "pj_ellipsoid - final: a=%.3f f=1/%7.3f, errno=%d",
128- // P->a, P->f!=0? 1/P->f: 0, proj_errno (P));
129- //proj_log_debug (P, "pj_ellipsoid - final: %s %s %s %s",
130- // P->def_size? P->def_size: empty,
131- // P->def_shape? P->def_shape: empty,
132- // P->def_spherification? P->def_spherification: empty,
133- // P->def_ellps? P->def_ellps: empty );
134-
135- /* success */
136- return nil
118+ return e .doSpherification (op .ProjString )
137119}
138120
139121func (e * Ellipsoid ) doCalcParams (a float64 , es float64 ) error {
@@ -241,12 +223,7 @@ func (e *Ellipsoid) doEllps(ps *support.ProjString) error {
241223 return err
242224 }
243225
244- err = e .doShape (newPS )
245- if err != nil {
246- return err
247- }
248-
249- return nil
226+ return e .doShape (newPS )
250227}
251228
252229func (e * Ellipsoid ) doSize (ps * support.ProjString ) error {
@@ -500,10 +477,5 @@ func (e *Ellipsoid) doSpherification(ps *support.ProjString) error {
500477 P .Rf = math .MaxFloat64
501478 P .B = P .A
502479
503- err := e .doCalcParams (P .A , 0 )
504- if err != nil {
505- return err
506- }
507-
508- return nil
480+ return e .doCalcParams (P .A , 0 )
509481}
0 commit comments