Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
xfischer committed Jun 14, 2019
2 parents 7120ba5 + 5aa9644 commit d563674
Show file tree
Hide file tree
Showing 33 changed files with 2,852 additions and 167 deletions.
12 changes: 8 additions & 4 deletions DEM.Net.Core/DEM.Net.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<PackageId>DEM.Net.Core</PackageId>
<Version>0.1.0-beta0011</Version>
<Version>0.1.0-beta0012</Version>
<Authors>Xavier Fischer, Frédéric Aubin</Authors>
<Copyright>Xavier Fischer, Frédéric Aubin</Copyright>
<Owners>Xavier Fischer</Owners>
<PackageProjectUrl>https://github.com/dem-net/DEM.Net</PackageProjectUrl>
<PackageReleaseNotes>Dataset reports return a simpler list
TIN fixed when border points were local summits
GPX track can be drawn on 3D model's texture</PackageReleaseNotes>
<PackageReleaseNotes>Symbols package generated alongside
Check for VRT file corruption
Updated tests for gdal singleton service
GDALVRTFileService is now a singleton with its own cache
Point list extensions</PackageReleaseNotes>
<PackageTags>DEM, Terrain, Elevation</PackageTags>
<Title>DEM.Net</Title>
<Product>DEM.Net</Product>
Expand All @@ -24,6 +26,8 @@ GPX track can be drawn on 3D model's texture</PackageReleaseNotes>

<!-- Build package only in Release -->
<PropertyGroup Condition=" '$(Configuration)' == 'Release'">
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public static class IServiceCollectionExtension
public static IServiceCollection AddDemNetCore(this IServiceCollection services)
{
services
.AddSingleton<IGDALVRTFileService,GDALVRTFileService>()
.AddSingleton<IRasterService, RasterService>()
.AddTransient<IElevationService, ElevationService>()
.AddTransient<IMeshService, MeshService>()
Expand Down
33 changes: 33 additions & 0 deletions DEM.Net.Core/Helpers/PointsExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace DEM.Net.Core
{
public static class PointsExtensions
{
/// <summary>
/// Get usual stats from an elevated point list.
/// Min/Max altitudes, length, climb/descent
/// Assumes that the provided list is a "line string"
/// </summary>
/// <param name="points"></param>
/// <returns></returns>
public static ElevationMetrics ComputeMetrics(this IList<GeoPoint> points)
{
return GeometryService.ComputeMetrics(points);
}

/// <summary>
/// Reduces the point list using a Douglas Peucker Reduction
/// All details below toleranceMeters will usually be skipped
/// </summary>
/// <param name="points"></param>
/// <param name="toleranceMeters"></param>
/// <returns></returns>
public static List<GeoPoint> Simplify(this IReadOnlyList<GeoPoint> points, double toleranceMeters)
{
return DouglasPeucker.DouglasPeuckerReduction(points, toleranceMeters);
}
}
}
34 changes: 34 additions & 0 deletions DEM.Net.Core/Services/CourbesNiveau/BeanCourbes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using DEM.Net.Core.Services.Lab;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Spir.Commun.Service.Technical.Cartographie.Service.CourbesNiveau
{
public class BeanCourbes
{
public List<BeanPoint_internal> p00_pointsAlti { get; set; }
public BeanParametresCalculCourbesNiveau p01_parametresCalculDesCourbes { get; set; }
//
public Dictionary<int, string> p10_labelClassesParIndexClasse { get; set; }
public Dictionary<string, int> p11_indexClasseParLabelClasse { get; set; }
public Dictionary<string, Dictionary<string, BeanFractionCourbe>> p12_tousSegmentsCourbesParNiveau { get; set; }
public List<BeanArc_internal> p13_arcsPeripherieToClosePolygones { get; set; }

public Dictionary<string, Dictionary<int, List<double[]>>> p14_courbesAssembleesCoordParNiveau { get; set; }
public BeanCourbes()
{
p00_pointsAlti = new List<BeanPoint_internal>();
p10_labelClassesParIndexClasse = new Dictionary<int, string>();
p11_indexClasseParLabelClasse = new Dictionary<string, int>();
p12_tousSegmentsCourbesParNiveau = new Dictionary<string, Dictionary<string, BeanFractionCourbe>>();
p13_arcsPeripherieToClosePolygones = new List<BeanArc_internal>();
p14_courbesAssembleesCoordParNiveau = new Dictionary<string, Dictionary<int, List<double[]>>>();

}

}

}
19 changes: 19 additions & 0 deletions DEM.Net.Core/Services/CourbesNiveau/BeanFractionCourbe.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Spir.Commun.Service.Technical.Cartographie.Service.CourbesNiveau
{
public class BeanFractionCourbe
{
public string p00_codeFractionCourbe { get; set; }
public BeanPointDecoup_internal p01_point_1 { get; set; }
public BeanPointDecoup_internal p02_point_2 { get; set; }
//public SqlGeometry p10_geom { get; set; }
public string p20_valeurCourbe { get; set; }
public bool p11_estLigneSinonPoint_vf { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Spir.Commun.Service.Technical.Cartographie.Service.CourbesNiveau
{
public class BeanParametresCalculCourbesNiveau
{
public enumModeCalculCourbe p00_modeCalculCourbes { get; set; }
//
public enumModeDeduplicationPoints p11_modaliteDeDeduplicationGeomDesPoints { get; set; }

/// <summary>
/// Attention: le setteur doit modifier le nbre décimales d'arrondi DuCodeVertex
/// </summary>
public double p12_pasDeDepublicationDesPointsEnM { get; internal set; }

public enumModeAgregationDesPoints p13_modeAgregationDesPoints { get; set; }

/// <summary>
/// ATTENTION: il faut adapter cette valeur au pas de duplication: le niveau de précision doit être supérieur au pas de duplication
/// </summary>
public int p14_nbreDecimalesDArrondiPourCodeVertex { get; internal set; }
//
public double p21_ecartEntreCourbes { get; set; }
public double p22_valeurDeLaCourbe0 { get; set; }
}
}
19 changes: 19 additions & 0 deletions DEM.Net.Core/Services/CourbesNiveau/BeanPointDecoup_internal.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Spir.Commun.Service.Technical.Cartographie.Service.CourbesNiveau
{
public class BeanPointDecoup_internal
{
public string p00_hcodePoint { get; set; }

//
public double p01_coordX { get; set; }
public double p02_coordY { get; set; }
public int p03_Srid { get; set; }

}
}
Loading

0 comments on commit d563674

Please sign in to comment.