updated poten&nbs, both work properly again

This commit is contained in:
Riepma
2021-04-12 17:01:17 +02:00
parent c7ab62c911
commit 89d2af5944
17 changed files with 220 additions and 544 deletions

View File

@@ -1,57 +0,0 @@
[
{
"File": "BBL-lutum.tif",
"OutputFileName": "BBL-poten_30_10_Shadow-True_TifInput",
"FieldName": "lutum",
"PlantingYear": 2020,
"MeanDensity": "30",
"Variation": "20",
"UseShadow": true,
"CountPerArea": false,
"geometryJson": {
"type": "Polygon",
"coordinates": [
[
[ 4.61098862747705418, 52.22974843124053734 ],
[ 4.61338362824790682, 52.22993593073885421 ],
[ 4.61949010053501397, 52.22667042162688489 ],
[ 4.61954106663577324, 52.22670579437124871 ],
[ 4.61953075937382085, 52.22671128094363269 ],
[ 4.61954202811175296, 52.22670563321562298 ],
[ 4.61901745087585081, 52.22634382962637289 ],
[ 4.61812211075603685, 52.22571430401869463 ],
[ 4.61736058962494678, 52.22611942369080396 ],
[ 4.61464150409827134, 52.2275669988328346 ],
[ 4.61407137489250019, 52.22787370291415243 ],
[ 4.61242270952427802, 52.2287649864655279 ],
[ 4.61261020576063618, 52.22887063061121182 ],
[ 4.61256645484349015, 52.22889713517798072 ],
[ 4.61229657126373027, 52.22904994233584119 ],
[ 4.61207777596369262, 52.2291602791168188 ],
[ 4.61174554282434013, 52.22933965721241378 ],
[ 4.61169310584479941, 52.22934596082312453 ],
[ 4.61143525446537428, 52.22949107699816551 ],
[ 4.61100843013417183, 52.22973689585098356 ],
[ 4.61098862747705418, 52.22974843124053734 ]
]
]
},
"GenerateTaskmap": true,
"CellWidth": "3",
"CellHeight": "10",
"Centered": "false",
"StartPoint": {
"type": "Point",
"coordinates": [ 4.61812211075603685, 52.22571430401869463 ] // BBL
},
"EndPoint": {
"type": "Point",
"coordinates": [ 4.61242270952427802, 52.2287649864655279 ] // BBL
} // if no angle
//"Angle": "317.0" // if no endpoint
}
]

View File

@@ -78,11 +78,7 @@ namespace FarmmapsVRApoten
$"VRA Poten cropfield {input.OutputFileName}", input.PlantingYear,
input.GeometryJson.ToString(Formatting.None));
//Item cropfieldItem;
// _logger.LogInformation("Cropfield already exists, trying to get it");
//cropfieldItem = await _farmmapsApiService.GetItemAsync("2927b80f63b946afb36821470b9c5c23");
//Calculating shadow map
//Downloading shadowMap for own interpretation
if (useShadow) {
_logger.LogInformation("Calculate shadow map for field");
var shadowItem = await _generalService.RunShadowTask(cropfieldItem);
@@ -96,7 +92,6 @@ namespace FarmmapsVRApoten
Path.Combine(DownloadFolder, $"{input.OutputFileName}.shadow.zip"));
}
_logger.LogInformation("Looking for local data to use");
var localDataAvailable = input.File;
var geotiffItem = (Item)null;
@@ -185,7 +180,13 @@ namespace FarmmapsVRApoten
var taskmap = (Item)null;
if (input.OutputType == "isoxml")
{
if (input.DdiCode == null)
{
_logger.LogInformation("DDi not given. Using expected identifiers");
if (countPerArea == true) {input.DdiCode = input.DdiCode = "0011";}
else { input.DdiCode = "0016"; };
}
taskmap = await _generalService.CreateTaskmap(cropfieldItem: cropfieldItem, tiffItem: applianceMapItem, outputType: input.OutputType, cellWidth: input.CellWidth,
cellHeight: input.CellHeight, startPoint: input.StartPoint.ToString(Formatting.None), ddiCode: input.DdiCode, centered: input.Centered,
endPoint: input.EndPoint.ToString(Formatting.None), angle: input.Angle, precision: input.Precision,

View File

@@ -1,54 +1,13 @@
[
//{
// "File": "ClaassenVRA_Kruising_LutEmptyPointsErased_largerExtent.zip",
// "OutputFileName": "2021.03.31.ClaassenVRA_Kruising_Lut_EmptyPointsErased_largeExtent",
// "FieldName": "Lutum",
// "PlantingYear": 2021,
// "MeanDensity": "15",
// "Variation": "20",
// "UseShadow": true,
// "CountPerArea": false,
// "geometryJson": {
// "type": "Polygon",
// "coordinates": [
// [
// [ 6.3070655, 53.3623397 ],
// [ 6.3070875, 53.3623898 ],
// [ 6.3069749, 53.3623074 ],
// [ 6.3070314, 53.3623125 ],
// [ 6.3070655, 53.3623397 ]
// ]
// ]
// },
// "GenerateTaskmap": true,
// "OutputType": "isoxml", // "shape" or "isoxml" if isoxml also add ddiCode
// "DdiCode": "0001",
// "CellWidth": "3",
// "CellHeight": "10",
// "Centered": "false",
// "StartPoint": {
// "type": "Point",
// "coordinates": [ 6.306901145501940, 53.362318269638386 ]
// },
// "EndPoint": {
// "type": "Point",
// "coordinates": [ 6.298561552458957, 53.363541544243297 ]
// } // if no angle
// // "Angle": "317.0" // if no endpoint
//}
{
"File": "PlantingSampleDataLutum.zip",
"OutputFileName": "2021.04.09_vraPoten_SampleData4",
"OutputFileName": "2021.04.12_vraPoten_SampleData",
"FieldName": "lutum",
"PlantingYear": 2021,
"MeanDensity": "30",
"Variation": "20",
"UseShadow": false,
"CountPerArea": false,
"UseShadow": true,
"CountPerArea": false, // don't forget to change ddi if isoxml is created
"geometryJson": {
"type": "Polygon",
"coordinates": [
@@ -72,17 +31,17 @@
"Centered": "true",
"StartPoint": {
"type": "Point",
//"coordinates": [ 5.669032078413372, 52.527906465105254 ] // 1
//"coordinates": [ 5.668860417036520, 52.529299990602986 ] // 2
//"coordinates": [ 5.671623092321491, 52.529463163999097 ] // 3
"coordinates": [ 5.671623092321491, 52.529463163999097 ] // 4
//"coordinates": [ 5.66886041703652044, 52.52929999060298627 ] // 1
//"coordinates": [ 5.6716230923214912, 52.52946316399909676 ] // 2
//"coordinates": [ 5.67185376229668581, 52.5280565894154563 ] // 3
"coordinates": [ 5.66903207841337231, 52.52790646510525363 ] // 4
},
"EndPoint": {
"type": "Point",
"coordinates": [ 5.668860417036520, 52.529299990602986 ] // 1
//"coordinates": [ 5.668860417036520, 52.529299990602986 ] // 2
//"coordinates": [ 5.671623092321491, 52.529463163999097 ] // 3
//"coordinates": [ 5.671853762296686, 52.528056589415456 ] // 4
"coordinates": [ 5.66886041703652044, 52.52929999060298627 ] // 1
//"coordinates": [ 5.6716230923214912, 52.52946316399909676 ] // 2
//"coordinates": [ 5.67185376229668581, 52.5280565894154563 ] // 3
//"coordinates": [ 5.66903207841337231, 52.52790646510525363 ] // 4
} // if no angle
//"Angle": "317.0" // if no endpoint