mirror of
https://github.com/IeuanWalker/GeoUK.git
synced 2025-10-25 15:19:15 +00:00
Code updates based on Codacy and updated test project from .net framework to .net core
This commit is contained in:
@@ -3,9 +3,9 @@ using DemoProject.Examples;
|
||||
|
||||
namespace DemoProject
|
||||
{
|
||||
class Program
|
||||
internal class Program
|
||||
{
|
||||
static void Main()
|
||||
private static void Main()
|
||||
{
|
||||
EastingNorthingToLatitudeLongitude.Example();
|
||||
|
||||
|
||||
@@ -1,138 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\xunit.runner.visualstudio.2.4.1\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\packages\xunit.runner.visualstudio.2.4.1\build\net20\xunit.runner.visualstudio.props')" />
|
||||
<Import Project="..\packages\Microsoft.NET.Test.Sdk.16.2.0\build\net40\Microsoft.NET.Test.Sdk.props" Condition="Exists('..\packages\Microsoft.NET.Test.Sdk.16.2.0\build\net40\Microsoft.NET.Test.Sdk.props')" />
|
||||
<Import Project="..\packages\Microsoft.CodeCoverage.16.2.0\build\netstandard1.0\Microsoft.CodeCoverage.props" Condition="Exists('..\packages\Microsoft.CodeCoverage.16.2.0\build\netstandard1.0\Microsoft.CodeCoverage.props')" />
|
||||
<Import Project="..\packages\xunit.core.2.4.1\build\xunit.core.props" Condition="Exists('..\packages\xunit.core.2.4.1\build\xunit.core.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{7DAF4F03-B372-43B2-A22C-64C2790BCF68}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>GeoUK.OSTN.Tests</RootNamespace>
|
||||
<AssemblyName>GeoUK.OSTN.Tests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.VisualStudio.CodeCoverage.Shim, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeCoverage.16.2.0\lib\net45\Microsoft.VisualStudio.CodeCoverage.Shim.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\xunit.abstractions.2.0.3\lib\net35\xunit.abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="xunit.assert, Version=2.4.1.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\xunit.assert.2.4.1\lib\netstandard1.1\xunit.assert.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="xunit.core, Version=2.4.1.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\xunit.extensibility.core.2.4.1\lib\net452\xunit.core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="xunit.execution.desktop, Version=2.4.1.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\xunit.extensibility.execution.2.4.1\lib\net452\xunit.execution.desktop.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ExtensionMethods.cs" />
|
||||
<Compile Include="Models\DataPoint.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="TransformTests.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="TestDataFiles_OSGM15_OSTN15\OSGM15_NI_TestInput_ETRS89toIG.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="TestDataFiles_OSGM15_OSTN15\OSGM15_NI_TestInput_IGtoETRS89.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="TestDataFiles_OSGM15_OSTN15\OSGM15_NI_TestOutput_ETRS89toIG.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="TestDataFiles_OSGM15_OSTN15\OSGM15_NI_TestOutput_IGtoETRS89.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="TestDataFiles_OSGM15_OSTN15\OSTN15_OSGM15_TestFiles_README.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="TestDataFiles_OSGM15_OSTN15\OSTN15_OSGM15_TestInput_ETRStoOSGB.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="TestDataFiles_OSGM15_OSTN15\OSTN15_OSGM15_TestInput_OSGBtoETRS.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="TestDataFiles_OSGM15_OSTN15\OSTN15_OSGM15_TestOutput_ETRStoOSGB.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="TestDataFiles_OSGM15_OSTN15\OSTN15_OSGM15_TestOutput_OSGBtoETRS.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\GeoUK.OSTN\GeoUK.OSTN.csproj">
|
||||
<Project>{e7c614ac-e67d-4e04-ba4e-e1bbf4cac6fd}</Project>
|
||||
<Name>GeoUK.OSTN</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\GeoUK\GeoUK.csproj">
|
||||
<Project>{5c458fbf-4e2a-4f9d-acc2-9ce5bed34236}</Project>
|
||||
<Name>GeoUK</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Analyzer Include="..\packages\xunit.analyzers.0.10.0\analyzers\dotnet\cs\xunit.analyzers.dll" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\xunit.core.2.4.1\build\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.core.2.4.1\build\xunit.core.props'))" />
|
||||
<Error Condition="!Exists('..\packages\xunit.core.2.4.1\build\xunit.core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.core.2.4.1\build\xunit.core.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\Microsoft.CodeCoverage.16.2.0\build\netstandard1.0\Microsoft.CodeCoverage.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeCoverage.16.2.0\build\netstandard1.0\Microsoft.CodeCoverage.props'))" />
|
||||
<Error Condition="!Exists('..\packages\Microsoft.CodeCoverage.16.2.0\build\netstandard1.0\Microsoft.CodeCoverage.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeCoverage.16.2.0\build\netstandard1.0\Microsoft.CodeCoverage.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\Microsoft.NET.Test.Sdk.16.2.0\build\net40\Microsoft.NET.Test.Sdk.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.NET.Test.Sdk.16.2.0\build\net40\Microsoft.NET.Test.Sdk.props'))" />
|
||||
<Error Condition="!Exists('..\packages\Microsoft.NET.Test.Sdk.16.2.0\build\net40\Microsoft.NET.Test.Sdk.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.NET.Test.Sdk.16.2.0\build\net40\Microsoft.NET.Test.Sdk.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\xunit.runner.visualstudio.2.4.1\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.runner.visualstudio.2.4.1\build\net20\xunit.runner.visualstudio.props'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\xunit.core.2.4.1\build\xunit.core.targets" Condition="Exists('..\packages\xunit.core.2.4.1\build\xunit.core.targets')" />
|
||||
<Import Project="..\packages\Microsoft.CodeCoverage.16.2.0\build\netstandard1.0\Microsoft.CodeCoverage.targets" Condition="Exists('..\packages\Microsoft.CodeCoverage.16.2.0\build\netstandard1.0\Microsoft.CodeCoverage.targets')" />
|
||||
<Import Project="..\packages\Microsoft.NET.Test.Sdk.16.2.0\build\net40\Microsoft.NET.Test.Sdk.targets" Condition="Exists('..\packages\Microsoft.NET.Test.Sdk.16.2.0\build\net40\Microsoft.NET.Test.Sdk.targets')" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -1,35 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("GeoUK.OSTN.Tests")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("GeoUK.OSTN.Tests")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("7daf4f03-b372-43b2-a22c-64c2790bcf68")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.CodeCoverage" version="16.2.0" targetFramework="net472" />
|
||||
<package id="Microsoft.NET.Test.Sdk" version="16.2.0" targetFramework="net472" />
|
||||
<package id="xunit" version="2.4.1" targetFramework="net472" />
|
||||
<package id="xunit.abstractions" version="2.0.3" targetFramework="net472" />
|
||||
<package id="xunit.analyzers" version="0.10.0" targetFramework="net472" />
|
||||
<package id="xunit.assert" version="2.4.1" targetFramework="net472" />
|
||||
<package id="xunit.core" version="2.4.1" targetFramework="net472" />
|
||||
<package id="xunit.extensibility.core" version="2.4.1" targetFramework="net472" />
|
||||
<package id="xunit.extensibility.execution" version="2.4.1" targetFramework="net472" />
|
||||
<package id="xunit.runner.visualstudio" version="2.4.1" targetFramework="net472" developmentDependency="true" />
|
||||
</packages>
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace GeoUK.OSTN.Tests
|
||||
namespace GeoUK.OSTN.XUnit
|
||||
{
|
||||
// Source: https://scottlilly.com/c-tip-how-to-check-if-two-double-values-are-equal/
|
||||
public static class ExtensionMethods
|
||||
64
GeoUK.OSTN.XUnit/GeoUK.OSTN.XUnit.csproj
Normal file
64
GeoUK.OSTN.XUnit/GeoUK.OSTN.XUnit.csproj
Normal file
@@ -0,0 +1,64 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="TestDataFiles_OSGM15_OSTN15\OSGM15_NI_TestInput_ETRS89toIG.txt" />
|
||||
<None Remove="TestDataFiles_OSGM15_OSTN15\OSGM15_NI_TestInput_IGtoETRS89.txt" />
|
||||
<None Remove="TestDataFiles_OSGM15_OSTN15\OSGM15_NI_TestOutput_ETRS89toIG.txt" />
|
||||
<None Remove="TestDataFiles_OSGM15_OSTN15\OSGM15_NI_TestOutput_IGtoETRS89.txt" />
|
||||
<None Remove="TestDataFiles_OSGM15_OSTN15\OSTN15_OSGM15_TestFiles_README.txt" />
|
||||
<None Remove="TestDataFiles_OSGM15_OSTN15\OSTN15_OSGM15_TestInput_ETRStoOSGB.txt" />
|
||||
<None Remove="TestDataFiles_OSGM15_OSTN15\OSTN15_OSGM15_TestInput_OSGBtoETRS.txt" />
|
||||
<None Remove="TestDataFiles_OSGM15_OSTN15\OSTN15_OSGM15_TestOutput_ETRStoOSGB.txt" />
|
||||
<None Remove="TestDataFiles_OSGM15_OSTN15\OSTN15_OSGM15_TestOutput_OSGBtoETRS.txt" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="TestDataFiles_OSGM15_OSTN15\OSGM15_NI_TestInput_ETRS89toIG.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="TestDataFiles_OSGM15_OSTN15\OSGM15_NI_TestInput_IGtoETRS89.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="TestDataFiles_OSGM15_OSTN15\OSGM15_NI_TestOutput_ETRS89toIG.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="TestDataFiles_OSGM15_OSTN15\OSGM15_NI_TestOutput_IGtoETRS89.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="TestDataFiles_OSGM15_OSTN15\OSTN15_OSGM15_TestFiles_README.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="TestDataFiles_OSGM15_OSTN15\OSTN15_OSGM15_TestInput_ETRStoOSGB.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="TestDataFiles_OSGM15_OSTN15\OSTN15_OSGM15_TestInput_OSGBtoETRS.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="TestDataFiles_OSGM15_OSTN15\OSTN15_OSGM15_TestOutput_ETRStoOSGB.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="TestDataFiles_OSGM15_OSTN15\OSTN15_OSGM15_TestOutput_OSGBtoETRS.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\GeoUK.OSTN\GeoUK.OSTN.csproj" />
|
||||
<ProjectReference Include="..\GeoUK\GeoUK.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace GeoUK.OSTN.Tests.Models
|
||||
namespace GeoUK.OSTN.XUnit.Models
|
||||
{
|
||||
public class DataPoint
|
||||
{
|
||||
@@ -1,11 +1,11 @@
|
||||
using GeoUK.Coordinates;
|
||||
using GeoUK.OSTN.Tests.Models;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using GeoUK.Coordinates;
|
||||
using GeoUK.OSTN.XUnit.Models;
|
||||
using Xunit;
|
||||
|
||||
namespace GeoUK.OSTN.Tests
|
||||
namespace GeoUK.OSTN.XUnit
|
||||
{
|
||||
public class TransformTests
|
||||
{
|
||||
@@ -7,11 +7,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeoUK.OSTN", "GeoUK.OSTN\Ge
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeoUK", "GeoUK\GeoUK.csproj", "{5C458FBF-4E2A-4F9D-ACC2-9CE5BED34236}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeoUK.OSTN.Tests", "GeoUK.OSTN.Tests\GeoUK.OSTN.Tests.csproj", "{7DAF4F03-B372-43B2-A22C-64C2790BCF68}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Demo", "Demo", "{848710E1-EBD1-44BA-9F97-C24D760806E9}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoProject", "Demo\DemoProject\DemoProject.csproj", "{1BB0810A-37FF-4F68-8C7E-E687A5369E0C}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DemoProject", "Demo\DemoProject\DemoProject.csproj", "{1BB0810A-37FF-4F68-8C7E-E687A5369E0C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeoUK.OSTN.XUnit", "GeoUK.OSTN.XUnit\GeoUK.OSTN.XUnit.csproj", "{FA7CD528-E649-49A7-8C3A-0BAB8B2C0E34}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -27,14 +27,14 @@ Global
|
||||
{5C458FBF-4E2A-4F9D-ACC2-9CE5BED34236}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5C458FBF-4E2A-4F9D-ACC2-9CE5BED34236}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5C458FBF-4E2A-4F9D-ACC2-9CE5BED34236}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7DAF4F03-B372-43B2-A22C-64C2790BCF68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7DAF4F03-B372-43B2-A22C-64C2790BCF68}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7DAF4F03-B372-43B2-A22C-64C2790BCF68}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7DAF4F03-B372-43B2-A22C-64C2790BCF68}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1BB0810A-37FF-4F68-8C7E-E687A5369E0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1BB0810A-37FF-4F68-8C7E-E687A5369E0C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1BB0810A-37FF-4F68-8C7E-E687A5369E0C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1BB0810A-37FF-4F68-8C7E-E687A5369E0C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FA7CD528-E649-49A7-8C3A-0BAB8B2C0E34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FA7CD528-E649-49A7-8C3A-0BAB8B2C0E34}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FA7CD528-E649-49A7-8C3A-0BAB8B2C0E34}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FA7CD528-E649-49A7-8C3A-0BAB8B2C0E34}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace GeoUK
|
||||
lat += ((N - N0 - M) / (a * F0));
|
||||
|
||||
loopCount++;
|
||||
} while (!IsNearlyZero(N - N0 - M, 1e-16) & loopCount < 10);
|
||||
} while (!IsNearlyZero(N - N0 - M, 1e-16) && loopCount < 10);
|
||||
|
||||
double v = a * F0 * Math.Pow((1 - e2 * Math.Pow(Math.Sin(lat), 2)), -0.5);
|
||||
double p = a * F0 * (1 - e2) * Math.Pow((1 - e2 * Math.Pow(Math.Sin(lat), 2)), -1.5);
|
||||
@@ -164,9 +164,6 @@ namespace GeoUK
|
||||
double E0 = projection.TrueOriginEasting;
|
||||
double N0 = projection.TrueOriginNorthing;
|
||||
|
||||
//B2
|
||||
//double n = (a - b) / (a + b);
|
||||
|
||||
//B3
|
||||
double v = a * F0 * Math.Pow((1 - e2 * Math.Pow(Math.Sin(lat), 2)), -0.5);
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ namespace GeoUK.Coordinates
|
||||
/// </remarks>
|
||||
public class Osgb36 : EastingNorthing
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Coordinates.Osgb36Cordinates"/> class.
|
||||
/// </summary>
|
||||
@@ -110,7 +109,7 @@ namespace GeoUK.Coordinates
|
||||
string result = string.Empty;
|
||||
|
||||
//test for our upper and lower limits
|
||||
if (!(easting >= 0) || !(easting < 700000) || !(northing >= 0) || !(northing < 1300000)) return result;
|
||||
if (easting < 0 || easting > 700000 || northing < 0 || northing > 1300000) return result;
|
||||
|
||||
char[] firstChar = { 'S', 'N', 'H', 'T', 'O', 'J' };
|
||||
char[] secondChar = { 'V', 'Q', 'L', 'F', 'A', 'W', 'R', 'M', 'G', 'B', 'X', 'S', 'N', 'H', 'C', 'Y', 'T', 'O', 'J', 'D', 'Z', 'U', 'P', 'K', 'E' };
|
||||
|
||||
Reference in New Issue
Block a user