download codelist CL405, soil types

This commit is contained in:
Pepijn van Oort 2023-10-24 13:47:58 +02:00
parent 6d903c3e9b
commit 847ff75845
4 changed files with 37 additions and 17 deletions

View File

@ -1,4 +1,4 @@
{
"codeLists": [ "CL022", "CL127", "CL263", "CL042" ]
"codeLists": [ "CL022", "CL127", "CL263", "CL405", "CL042" ]
//"DownloadFolder": "Downloads", //"C:\\hugoschrererdir\\kpidir\\", // "Downloads", -> if you just put "Downloads" the program will download to somewhere in ..\FarmMapsApiClient_WURtest\FarmmapsDataDownload\bin\Debug\netcoreapp3.1\Downloads\
}

View File

@ -16,6 +16,7 @@ namespace FarmmapsDownloadCL.Models
this.dictCl.Add("CL022", new List<string> { "vnd.farmmaps.itemtype.codelist.cl022", "CL022item" });
this.dictCl.Add("CL127", new List<string> { "vnd.farmmaps.itemtype.codelist.cl127", "CL127item" });
this.dictCl.Add("CL263", new List<string> { "vnd.farmmaps.itemtype.codelist.cl263", "CL263item" });
this.dictCl.Add("CL405", new List<string> { "vnd.farmmaps.itemtype.codelist.cl405", "CL405item" });
}
public string itemcode;
//Define here the codelist names, their item type and the class defining the contents of the data type (and defined in the Models.CodelistsClasses)
@ -26,7 +27,7 @@ namespace FarmmapsDownloadCL.Models
{
public CL022item()
{
this.headers = new string[] { "codelist","code", "description", "type","k", "n","p","composition" };
this.headers = new string[] { "codelist", "code", "description", "type", "n", "p", "k", "composition" };
this.codelist = "CL022";
this.about = new string[] { "EDI-Crop, coderingslijst meststoffen", "type MOR = organische meststof; MAN = anorganische meststof" };
}
@ -84,4 +85,23 @@ namespace FarmmapsDownloadCL.Models
public string composition { get; set; }
}
public class CL405item
{
public CL405item()
{
this.headers = new string[] { "codelist", "code", "description", "description_fr", "description_nl", "hoofdgroep" };
this.codelist = "CL405";
this.about = new string[] { };
}
public string[] headers { get; }
public string codelist { get; }
public string[] about { get; }
public string code { get; set; }
public string hoofdgroep { get; set; }
public string description { get; set; }
public string description_fr { get; set; }
public string description_nl { get; set; }
}
}

View File

@ -15,9 +15,9 @@ a. Why? Because
ii. so that you can look up crops and fertilizer types and fill in KPIinput.json correctly
b. Download full list of items from vnd.farmmaps.itemtype.codelist.cl263 DONE
c. Write them to a csv file DONE
d. In any case following lists: 127 operations DONE; 022 meststoffen (fertilizer products) DONE; 263 gewassen DONE; 405 soilcode NOT YET
in which list the productionPurposeCode?
d. In any case following lists: 127 operations DONE; 022 meststoffen (fertilizer products) DONE; 263 gewassen DONE; 405 soilcode DONE
in which list the productionPurposeCode NOT YET?
Testing: in json input data, can certain fields be left out? Which are minimum fields needed?
Testing: effect of location (e.g. different targetValue, different N deposition? Different crop N contents depending on soil?)
Testing: productionPurposeCode: different result depending on starch or consumption potato (different N contents in tubers; different targetValues?
Testing: in json input data, can certain fields be left out? Which are minimum fields needed? NOT YET
Testing: effect of location (e.g. different targetValue, different N deposition? Different crop N contents depending on soil?) NOT YET
Testing: productionPurposeCode: different result depending on starch or consumption potato (different N contents in tubers; different targetValues? NOT YET

View File

@ -2,11 +2,11 @@
//There are three farmmaps environments, uncomment the environemnt you want to use with this sample client
//test environment
"Authority": "https://accounts.test.farmmaps.eu/",
"Endpoint": "https://test.farmmaps.eu/",
"BasePath": "api/v1",
"DiscoveryEndpointUrl": "https://accounts.test.farmmaps.eu/.well-known/openid-configuration",
"GrantClientId": "farmmapstesteu",
//"Authority": "https://accounts.test.farmmaps.eu/",
//"Endpoint": "https://test.farmmaps.eu/",
//"BasePath": "api/v1",
//"DiscoveryEndpointUrl": "https://accounts.test.farmmaps.eu/.well-known/openid-configuration",
//"GrantClientId": "farmmapstesteu",
////acceptance environment
//"Authority": "https://accounts.acc.farmmaps.eu/",
@ -16,11 +16,11 @@
//"GrantClientId": "farmmapsacceu",
////production environment
//"authority": "https://accounts.farmmaps.eu/",
//"endpoint": "https://farmmaps.eu/",
//"basepath": "api/v1",
//"discoveryendpointurl": "https://accounts.farmmaps.eu/.well-known/openid-configuration",
//"GrantClientId": "farmmaps",
"authority": "https://accounts.farmmaps.eu/",
"endpoint": "https://farmmaps.eu/",
"basepath": "api/v1",
"discoveryendpointurl": "https://accounts.farmmaps.eu/.well-known/openid-configuration",
"GrantClientId": "farmmaps",
//overige info
"RedirectUri": "http://example.nl/api",