Skip to content

Commit 7770918

Browse files
authored
Fixing build issue with Atanh and fixing some build warnings (#120)
1 parent 246879e commit 7770918

File tree

7 files changed

+70
-7
lines changed

7 files changed

+70
-7
lines changed

src/ProjNet/CoordinateSystemServices.cs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,11 @@ public ICoordinateTransformation CreateTransformation(CoordinateSystem source, C
305305
return _ctFactory.CreateFromCoordinateSystems(source, target);
306306
}
307307

308+
/// <summary>
309+
/// AddCoordinateSystem
310+
/// </summary>
311+
/// <param name="srid"></param>
312+
/// <param name="coordinateSystem"></param>
308313
protected void AddCoordinateSystem(int srid, CoordinateSystem coordinateSystem)
309314
{
310315
lock (((IDictionary) _csBySrid).SyncRoot)
@@ -332,6 +337,11 @@ protected void AddCoordinateSystem(int srid, CoordinateSystem coordinateSystem)
332337
}
333338
}
334339

340+
/// <summary>
341+
/// AddCoordinateSystem
342+
/// </summary>
343+
/// <param name="coordinateSystem"></param>
344+
/// <returns></returns>
335345
protected virtual int AddCoordinateSystem(CoordinateSystem coordinateSystem)
336346
{
337347
int srid = (int) coordinateSystem.AuthorityCode;
@@ -340,11 +350,17 @@ protected virtual int AddCoordinateSystem(CoordinateSystem coordinateSystem)
340350
return srid;
341351
}
342352

353+
/// <summary>
354+
/// Clear
355+
/// </summary>
343356
protected void Clear()
344357
{
345358
_csBySrid.Clear();
346359
}
347360

361+
/// <summary>
362+
/// Count
363+
/// </summary>
348364
protected int Count
349365
{
350366
get
@@ -354,11 +370,21 @@ protected int Count
354370
}
355371
}
356372

373+
/// <summary>
374+
/// RemoveCoordinateSystem
375+
/// </summary>
376+
/// <param name="srid"></param>
377+
/// <returns></returns>
378+
/// <exception cref="NotSupportedException"></exception>
357379
public bool RemoveCoordinateSystem(int srid)
358380
{
359381
throw new NotSupportedException();
360382
}
361383

384+
/// <summary>
385+
/// GetEnumerator
386+
/// </summary>
387+
/// <returns></returns>
362388
public IEnumerator<KeyValuePair<int, CoordinateSystem>> GetEnumerator()
363389
{
364390
_initialization.WaitOne();

src/ProjNet/CoordinateSystems/CoordinateSystemFactory.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,8 @@ namespace ProjNet.CoordinateSystems
2727
/// </summary>
2828
/// <remarks>
2929
/// <para>CoordinateSystemFactory allows applications to make coordinate systems that
30-
/// cannot be created by a <see cref="CoordinateSystemAuthorityFactory"/>. This factory is very
31-
/// flexible, whereas the authority factory is easier to use.</para>
32-
/// <para>So <see cref="ICoordinateSystemAuthorityFactory"/>can be used to make 'standard' coordinate
33-
/// systems, and <see cref="CoordinateSystemFactory"/> can be used to make 'special'
34-
/// coordinate systems.</para>
30+
/// is very flexible, whereas the other factories are easier to use.</para>
31+
/// <para>So this Factory can be used to make 'special' coordinate systems.</para>
3532
/// <para>For example, the EPSG authority has codes for USA state plane coordinate systems
3633
/// using the NAD83 datum, but these coordinate systems always use meters. EPSG does not
3734
/// have codes for NAD83 state plane coordinate systems that use feet units. This factory

src/ProjNet/CoordinateSystems/Info.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public abstract class Info : IInfo
3535
/// were specified in the Simple Features interfaces, so they have been kept here.</para>
3636
/// <para>This specification does not dictate what the contents of these items
3737
/// should be. However, the following guidelines are suggested:</para>
38-
/// <para>When <see cref="ICoordinateSystemAuthorityFactory"/> is used to create an object, the ‘Authority’
38+
/// <para>When <see href="ICoordinateSystemAuthorityFactory"/> is used to create an object, the ‘Authority’
3939
/// and 'AuthorityCode' values should be set to the authority name of the factory object, and the authority
4040
/// code supplied by the client, respectively. The other values may or may not be set. (If the authority is
4141
/// EPSG, the implementer may consider using the corresponding metadata values in the EPSG tables.)</para>

src/ProjNet/CoordinateSystems/Projections/MapProjection.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,19 @@ namespace ProjNet.CoordinateSystems.Projections
4949
[Serializable]
5050
public abstract class MapProjection : MathTransform, IProjection
5151
{
52+
/// <summary>
53+
/// EPS10 => 1e-10.
54+
/// </summary>
5255
protected const double EPS10 = 1e-10;
5356

57+
/// <summary>
58+
/// EPS7 => 1e-7.
59+
/// </summary>
5460
protected const double EPS7 = 1e-7;
5561

62+
/// <summary>
63+
/// HUGE_VAL => double.NaN.
64+
/// </summary>
5665
protected const double HUGE_VAL = double.NaN;
5766

5867
// ReSharper disable InconsistentNaming
@@ -1154,6 +1163,11 @@ protected static double LatitudeToRadians(double y, bool edge)
11541163
private const double P20 = 0.01677689594356261023; /* 761 / 45360 */
11551164

11561165

1166+
/// <summary>
1167+
/// authset
1168+
/// </summary>
1169+
/// <param name="es"></param>
1170+
/// <returns></returns>
11571171
protected static double[] authset(double es)
11581172
{
11591173
double[] APA = new double[3];
@@ -1169,6 +1183,12 @@ protected static double[] authset(double es)
11691183
return APA;
11701184
}
11711185

1186+
/// <summary>
1187+
/// authlat
1188+
/// </summary>
1189+
/// <param name="beta"></param>
1190+
/// <param name="APA"></param>
1191+
/// <returns></returns>
11721192
protected static double authlat(double beta, double[] APA)
11731193
{
11741194
double t = beta + beta;

src/ProjNet/CoordinateSystems/Projections/PolarStereographicProjection.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,18 @@ public override MathTransform Inverse()
212212
private double tsfn(double cosphi, double sinphi, double e)
213213
{
214214
double t = (sinphi > 0.0) ? cosphi / (1.0 + sinphi) : (1.0 - sinphi) / cosphi;
215-
return Math.Exp(e * Math.Atanh(e * sinphi)) * t;
215+
return Math.Exp(e * Atanh(e * sinphi)) * t;
216+
}
217+
218+
219+
/// <summary>
220+
/// Atanh - Inverse of Math.Tanh
221+
/// </summary>
222+
/// <remarks>The Math.Atanh is not available for netstandard2.0.</remarks>
223+
/// <param name="x"></param>
224+
private static double Atanh(double x)
225+
{
226+
return Math.Log((1 + x) / (1 - x)) * 0.5;
216227
}
217228
}
218229
}

src/ProjNet/CoordinateSystems/Transformations/GeographicTransform.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,17 @@ public override string XML
6565
}
6666
}
6767

68+
/// <summary>
69+
/// DimSource
70+
/// </summary>
6871
public override int DimSource
6972
{
7073
get { return SourceGCS.Dimension; }
7174
}
7275

76+
/// <summary>
77+
/// DimTarget
78+
/// </summary>
7379
public override int DimTarget
7480
{
7581
get { return TargetGCS.Dimension; }

src/ProjNet/CoordinateSystems/VerticalDatum.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ public VerticalDatum(DatumType type, string name, string authority, long code, s
2424
{
2525
}
2626

27+
/// <summary>
28+
/// ODN - VerticalDatum
29+
/// </summary>
2730
public static VerticalDatum ODN
2831
{
2932
get

0 commit comments

Comments
 (0)