-
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
2,852 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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[]>>>(); | ||
|
||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; } | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
DEM.Net.Core/Services/CourbesNiveau/BeanParametresCalculCourbesNiveau.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
19
DEM.Net.Core/Services/CourbesNiveau/BeanPointDecoup_internal.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; } | ||
|
||
} | ||
} |
Oops, something went wrong.