Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into Relicense
Browse files Browse the repository at this point in the history
  • Loading branch information
inforithmics committed Jul 14, 2024
2 parents ae73fcd + 7770918 commit a4c19cd
Show file tree
Hide file tree
Showing 11 changed files with 410 additions and 17 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/full-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
- name: Get source
uses: actions/checkout@v2

- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
- name: Setup .NET Core 6
uses: actions/setup-dotnet@v4
with:
dotnet-version: 3.1.406
dotnet-version: '6.x'

- name: Build
run: dotnet build -c Release -v minimal -p:WarningLevel=3
Expand All @@ -44,10 +44,10 @@ jobs:
if: github.event_name == 'push' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master')

steps:
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
- name: Setup .NET Core 6
uses: actions/setup-dotnet@v4
with:
dotnet-version: 3.1.406
dotnet-version: '6.x'

- name: Download Package Files
uses: actions/download-artifact@v2
Expand All @@ -69,10 +69,10 @@ jobs:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'

steps:
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
- name: Setup .NET Core 6
uses: actions/setup-dotnet@v4
with:
dotnet-version: 3.1.406
dotnet-version: '6.x'

- name: Download Package Files
uses: actions/download-artifact@v2
Expand Down
26 changes: 26 additions & 0 deletions src/ProjNet/CoordinateSystemServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,11 @@ public ICoordinateTransformation CreateTransformation(CoordinateSystem source, C
return _ctFactory.CreateFromCoordinateSystems(source, target);
}

/// <summary>
/// AddCoordinateSystem
/// </summary>
/// <param name="srid"></param>
/// <param name="coordinateSystem"></param>
protected void AddCoordinateSystem(int srid, CoordinateSystem coordinateSystem)
{
lock (((IDictionary) _csBySrid).SyncRoot)
Expand Down Expand Up @@ -332,6 +337,11 @@ protected void AddCoordinateSystem(int srid, CoordinateSystem coordinateSystem)
}
}

/// <summary>
/// AddCoordinateSystem
/// </summary>
/// <param name="coordinateSystem"></param>
/// <returns></returns>
protected virtual int AddCoordinateSystem(CoordinateSystem coordinateSystem)
{
int srid = (int) coordinateSystem.AuthorityCode;
Expand All @@ -340,11 +350,17 @@ protected virtual int AddCoordinateSystem(CoordinateSystem coordinateSystem)
return srid;
}

/// <summary>
/// Clear
/// </summary>
protected void Clear()
{
_csBySrid.Clear();
}

/// <summary>
/// Count
/// </summary>
protected int Count
{
get
Expand All @@ -354,11 +370,21 @@ protected int Count
}
}

/// <summary>
/// RemoveCoordinateSystem
/// </summary>
/// <param name="srid"></param>
/// <returns></returns>
/// <exception cref="NotSupportedException"></exception>
public bool RemoveCoordinateSystem(int srid)
{
throw new NotSupportedException();
}

/// <summary>
/// GetEnumerator
/// </summary>
/// <returns></returns>
public IEnumerator<KeyValuePair<int, CoordinateSystem>> GetEnumerator()
{
_initialization.WaitOne();
Expand Down
7 changes: 2 additions & 5 deletions src/ProjNet/CoordinateSystems/CoordinateSystemFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,8 @@ namespace ProjNet.CoordinateSystems
/// </summary>
/// <remarks>
/// <para>CoordinateSystemFactory allows applications to make coordinate systems that
/// cannot be created by a <see cref="CoordinateSystemAuthorityFactory"/>. This factory is very
/// flexible, whereas the authority factory is easier to use.</para>
/// <para>So <see cref="ICoordinateSystemAuthorityFactory"/>can be used to make 'standard' coordinate
/// systems, and <see cref="CoordinateSystemFactory"/> can be used to make 'special'
/// coordinate systems.</para>
/// is very flexible, whereas the other factories are easier to use.</para>
/// <para>So this Factory can be used to make 'special' coordinate systems.</para>
/// <para>For example, the EPSG authority has codes for USA state plane coordinate systems
/// using the NAD83 datum, but these coordinate systems always use meters. EPSG does not
/// have codes for NAD83 state plane coordinate systems that use feet units. This factory
Expand Down
2 changes: 1 addition & 1 deletion src/ProjNet/CoordinateSystems/Info.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public abstract class Info : IInfo
/// were specified in the Simple Features interfaces, so they have been kept here.</para>
/// <para>This specification does not dictate what the contents of these items
/// should be. However, the following guidelines are suggested:</para>
/// <para>When <see cref="ICoordinateSystemAuthorityFactory"/> is used to create an object, the ‘Authority’
/// <para>When <see href="ICoordinateSystemAuthorityFactory"/> is used to create an object, the ‘Authority’
/// and 'AuthorityCode' values should be set to the authority name of the factory object, and the authority
/// code supplied by the client, respectively. The other values may or may not be set. (If the authority is
/// EPSG, the implementer may consider using the corresponding metadata values in the EPSG tables.)</para>
Expand Down
20 changes: 20 additions & 0 deletions src/ProjNet/CoordinateSystems/Projections/MapProjection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,19 @@ namespace ProjNet.CoordinateSystems.Projections
[Serializable]
public abstract class MapProjection : MathTransform, IProjection
{
/// <summary>
/// EPS10 => 1e-10.
/// </summary>
protected const double EPS10 = 1e-10;

/// <summary>
/// EPS7 => 1e-7.
/// </summary>
protected const double EPS7 = 1e-7;

/// <summary>
/// HUGE_VAL => double.NaN.
/// </summary>
protected const double HUGE_VAL = double.NaN;

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


/// <summary>
/// authset
/// </summary>
/// <param name="es"></param>
/// <returns></returns>
protected static double[] authset(double es)
{
double[] APA = new double[3];
Expand All @@ -1169,6 +1183,12 @@ protected static double[] authset(double es)
return APA;
}

/// <summary>
/// authlat
/// </summary>
/// <param name="beta"></param>
/// <param name="APA"></param>
/// <returns></returns>
protected static double authlat(double beta, double[] APA)
{
double t = beta + beta;
Expand Down
Loading

0 comments on commit a4c19cd

Please sign in to comment.