Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ obj/
*.suo
.idea
.vs

*.user
*.class
37 changes: 37 additions & 0 deletions dotnetcore/FlexiblePolylineEncoder.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29911.84
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FlexiblePolylineEncoder", "src\FlexiblePolylineEncoder.csproj", "{43B7F4E7-7D7D-4FE9-A6AB-ACF6F4760975}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FlexiblePolylineEncoder.Tests", "test\FlexiblePolylineEncoder.Tests\FlexiblePolylineEncoder.Tests.csproj", "{58A3B4E0-A356-493F-AAD1-0BB7C8FE4D5C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PolyLineDecoder", "PolyLineDecoder\PolyLineDecoder.csproj", "{3A3C8FB3-E7FB-4E36-B2BA-9A439EC57999}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{43B7F4E7-7D7D-4FE9-A6AB-ACF6F4760975}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{43B7F4E7-7D7D-4FE9-A6AB-ACF6F4760975}.Debug|Any CPU.Build.0 = Debug|Any CPU
{43B7F4E7-7D7D-4FE9-A6AB-ACF6F4760975}.Release|Any CPU.ActiveCfg = Release|Any CPU
{43B7F4E7-7D7D-4FE9-A6AB-ACF6F4760975}.Release|Any CPU.Build.0 = Release|Any CPU
{58A3B4E0-A356-493F-AAD1-0BB7C8FE4D5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{58A3B4E0-A356-493F-AAD1-0BB7C8FE4D5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{58A3B4E0-A356-493F-AAD1-0BB7C8FE4D5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{58A3B4E0-A356-493F-AAD1-0BB7C8FE4D5C}.Release|Any CPU.Build.0 = Release|Any CPU
{3A3C8FB3-E7FB-4E36-B2BA-9A439EC57999}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3A3C8FB3-E7FB-4E36-B2BA-9A439EC57999}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3A3C8FB3-E7FB-4E36-B2BA-9A439EC57999}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3A3C8FB3-E7FB-4E36-B2BA-9A439EC57999}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CBF7FB00-A4E8-4249-A71C-41043293767D}
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions dotnetcore/PolyLineDecoder/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
49 changes: 49 additions & 0 deletions dotnetcore/PolyLineDecoder/LatLngZ.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using System;

namespace FlexiblePolylineEncoder
{
/// <summary>
/// Coordinate triple
/// </summary>
public class LatLngZ
{
public double Lat { get; }
public double Lng { get; }
public double Z { get; }

public LatLngZ(double latitude, double longitude, double thirdDimension = 0)
{
Lat = latitude;
Lng = longitude;
Z = thirdDimension;
}

public override string ToString()
{
return "LatLngZ [lat=" + Lat + ", lng=" + Lng + ", z=" + Z + "]";
}

public override bool Equals(object obj)
{
if (this == obj)
{
return true;
}

if (obj is LatLngZ latLngZ)
{
if (latLngZ.Lat == Lat && latLngZ.Lng == Lng && latLngZ.Z == Z)
{
return true;
}
}

return false;
}

//public override int GetHashCode()
//{
// return HashCode.Combine(Lat, Lng, Z);
//}
}
}
59 changes: 59 additions & 0 deletions dotnetcore/PolyLineDecoder/PolyLineDecoder.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<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>{3A3C8FB3-E7FB-4E36-B2BA-9A439EC57999}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>PolyLineDecoder</RootNamespace>
<AssemblyName>PolyLineDecoder</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<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" />
</ItemGroup>
<ItemGroup>
<Compile Include="LatLngZ.cs" />
<Compile Include="PolylineEncoderDecoder.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ThirdDimension.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Loading