aw7152: namespace change
All checks were successful
FarmMaps.Develop/CarbonLib/pipeline/head This commit looks good

This commit is contained in:
2025-12-09 13:41:19 +01:00
parent 0ff0a44fdb
commit 0e8be57d43
26 changed files with 53 additions and 44 deletions

View File

@@ -1,8 +1,7 @@
using CarbonService.Models; using CarbonService.Models;
using FarmMapsAPI.Carbon; using CarbonLib.Carbon;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace CarbonConsoleApp namespace CarbonConsoleApp
{ {
class Program class Program
@@ -10,7 +9,7 @@ namespace CarbonConsoleApp
static void Main(string[] args) static void Main(string[] args)
{ {
var configPath = "config25"; var configPath = "config25";
ICarbonCalculation carbonCalc = new FarmMapsAPI.Carbon.CarbonCalculation25(configPath); ICarbonCalculation carbonCalc = new CarbonLib.Carbon.CarbonCalculation25(configPath);
var request = new CarbonRequest(); var request = new CarbonRequest();
using (var reader = new StreamReader("input.txt")) using (var reader = new StreamReader("input.txt"))
{ {

View File

@@ -1,11 +1,7 @@
using CarbonService.Models; using CarbonLib.Carbon;
using FarmMapsAPI.Carbon; using CarbonService.Models;
using FarmMapsAPI.Carbon.Models; using CarbonLib.Carbon.Models;
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarbonLib namespace CarbonLib
{ {

View File

@@ -1,18 +1,12 @@
//using Base.Core.Common; using CarbonService.Models;
//using Base.Core.Common.Geometry; using CarbonLib.Carbon.Models;
using CarbonLib;
using CarbonService.Models;
using FarmMapsAPI.Carbon.Models;
using NetTopologySuite.Geometries;
using OSGeo.OGR;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Threading.Tasks;
namespace FarmMapsAPI.Carbon namespace CarbonLib.Carbon
{ {
public class CarbonCalculation24 : ICarbonCalculation public class CarbonCalculation24 : ICarbonCalculation
{ {

View File

@@ -1,7 +1,8 @@
//using Base.Core.Common.Geometry; //using Base.Core.Common.Geometry;
using CarbonLib; using CarbonLib;
using CarbonLib.Carbon;
using CarbonService.Models; using CarbonService.Models;
using FarmMapsAPI.Carbon.Models; using CarbonLib.Carbon.Models;
using NetTopologySuite.Geometries; using NetTopologySuite.Geometries;
using OSGeo.OGR; using OSGeo.OGR;
using System; using System;
@@ -12,7 +13,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace FarmMapsAPI.Carbon namespace CarbonLib.Carbon
{ {
public class CarbonCalculation25 : ICarbonCalculation public class CarbonCalculation25 : ICarbonCalculation
{ {

View File

@@ -5,7 +5,7 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace FarmMapsAPI.Carbon namespace CarbonLib.Carbon
{ {
public class GamsSets public class GamsSets
{ {

View File

@@ -1,12 +1,12 @@
using CarbonService.Models; using CarbonService.Models;
using FarmMapsAPI.Carbon.Models; using CarbonLib.Carbon.Models;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace FarmMapsAPI.Carbon namespace CarbonLib.Carbon
{ {
public interface ICarbonCalculation public interface ICarbonCalculation
{ {

View File

@@ -3,7 +3,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace FarmMapsAPI.Carbon.Models namespace CarbonLib.Carbon.Models
{ {
public class CarbonSummary public class CarbonSummary
{ {

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace FarmMapsAPI.Carbon.Models namespace CarbonLib.Carbon.Models
{ {
public class ClimateVariable public class ClimateVariable
{ {

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace FarmMapsAPI.Carbon.Models namespace CarbonLib.Carbon.Models
{ {
public class ColumnValue public class ColumnValue
{ {

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace FarmMapsAPI.Carbon.Models namespace CarbonLib.Carbon.Models
{ {
public class CropCoverMonthsModel public class CropCoverMonthsModel
{ {

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace FarmMapsAPI.Carbon.Models namespace CarbonLib.Carbon.Models
{ {
public class CropPropertyModel public class CropPropertyModel
{ {

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace FarmMapsAPI.Carbon.Models namespace CarbonLib.Carbon.Models
{ {
public class StrawCrp public class StrawCrp
{ {

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace FarmMapsAPI.Carbon.Models namespace CarbonLib.Carbon.Models
{ {
public class YearData public class YearData
{ {

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace FarmMapsAPI.Carbon.Models namespace CarbonLib.Carbon.Models
{ {
public class ManureSourcesLiv public class ManureSourcesLiv
{ {

View File

@@ -9,7 +9,7 @@ using System.Runtime.Serialization;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace FarmMapsAPI.Carbon.Models namespace CarbonLib.Carbon.Models
{ {
public class FarmMapsCarbonRequest public class FarmMapsCarbonRequest
{ {

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace FarmMapsAPI.Carbon.Models namespace CarbonLib.Carbon.Models
{ {
public class GIS_Soils_Sets public class GIS_Soils_Sets
{ {

View File

@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace FarmMapsAPI.Carbon.Models namespace CarbonLib.Carbon.Models
{ {
public class GamsThreeKeyParameter public class GamsThreeKeyParameter
{ {

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace FarmMapsAPI.Carbon.Models namespace CarbonLib.Carbon.Models
{ {
public class ManCcontModel public class ManCcontModel
{ {

View File

@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace FarmMapsAPI.Carbon.Models namespace CarbonLib.Carbon.Models
{ {
public class MappingCropFarmmapsMiterraRothC public class MappingCropFarmmapsMiterraRothC
{ {

View File

@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace FarmMapsAPI.Carbon.Models namespace CarbonLib.Carbon.Models
{ {
public class MappingGreenManureFarmmapsMiterraRothC public class MappingGreenManureFarmmapsMiterraRothC
{ {

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace FarmMapsAPI.Carbon.Models namespace CarbonLib.Carbon.Models
{ {
public class ParameterSet public class ParameterSet
{ {

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace FarmMapsAPI.Carbon.Models namespace CarbonLib.Carbon.Models
{ {
public class KNMIZoneReg public class KNMIZoneReg
{ {

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace FarmMapsAPI.Carbon.Models namespace CarbonLib.Carbon.Models
{ {
public class SoilBulkDensityType public class SoilBulkDensityType
{ {

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace FarmMapsAPI.Carbon.Models namespace CarbonLib.Carbon.Models
{ {
public class SoilPropertyType public class SoilPropertyType
{ {

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace FarmMapsAPI.Carbon.Models namespace CarbonLib.Carbon.Models
{ {
public class YieldGreenManureModel public class YieldGreenManureModel
{ {

View File

@@ -1,3 +1,22 @@
# CarbonLib # CarbonLib
#
#
Library with model based on the scientifically acknowledged carbon model RothC.
This code in .NET Core c# is adapted from a a project written in GEMS.
An test console app is included with an example input request. The output in written a a file.
## Building a sample
Build the sample using the .NET Core CLI, which is installed with [the .NET Core SDK](https://www.microsoft.com/net/download). Then run
these commands from the CLI in the directory of the CarbonConsoleApp:
```console
dotnet build
dotnet run
```
These will install any needed dependencies, build the project, and run
the project respectively.