diff --git a/vdyp-fip/src/main/java/ca/bc/gov/nrs/vdyp/fip/model/FipLayer.java b/vdyp-fip/src/main/java/ca/bc/gov/nrs/vdyp/fip/model/FipLayer.java index d828616d5..9bc11769e 100644 --- a/vdyp-fip/src/main/java/ca/bc/gov/nrs/vdyp/fip/model/FipLayer.java +++ b/vdyp-fip/src/main/java/ca/bc/gov/nrs/vdyp/fip/model/FipLayer.java @@ -20,16 +20,23 @@ public class FipLayer { static final String INVENTORY_TYPE_GROUP = "INVENTORY_TYPE_GROUP"; // ITGFIP static final String BREAST_HEIGHT_AGE = "BREAST_HEIGHT_AGE"; // AGEBH - String polygonIdentifier; // POLYDESC - final Layer layer; - float ageTotal; - float height; - float siteIndex; - float crownClosure; - String siteGenus; - String siteSpecies; - float yearsToBreastHeight; + String polygonIdentifier; // FIP_P/POLYDESC + final Layer layer; // This is also represents the distinction between data stored in FIPL_1(A) and + // FIP_V(A). Where VDYP7 stores both and looks at certain values to determine if + // a layer is "present". VDYP8 stores them in a map keyed by this value + float ageTotal; // FIPL_1/AGETOT_L1 or FIPL_V/AGETOT_V1 + float height; // FIPL_1/HT_L1 or FIPL_V/HT_V1 + float siteIndex; // FIPL_1/SI_L1 or FIPL_V/SI_V1 + float crownClosure; // FIPL_1/CC_L1 or FIP:_V/CC_V1 + String siteGenus; // FIPL_1A/SITESP0_L1 or FIPL_VA/SITESP0_L1 + String siteSpecies; // FIPL_1A/SITESP64_L1 or FIPL_VA/SITESP64_L1 + float yearsToBreastHeight; // FIPL_1/YTBH_L1 or FIP:_V/YTBH_V1 + + // In VDYP7 These are read but not stored in common variables. + // Marked as Deprecated for now but I think we can just remove them. + @Deprecated Optional inventoryTypeGroup; + @Deprecated Optional breastHeightAge; Map species = Collections.emptyMap(); @@ -89,10 +96,12 @@ public float getYearsToBreastHeight() { return yearsToBreastHeight; } + @Deprecated public Optional getInventoryTypeGroup() { return inventoryTypeGroup; } + @Deprecated public Optional getBreastHeightAge() { return breastHeightAge; } @@ -129,10 +138,12 @@ public void setYearsToBreastHeight(float yearsToBreastHeight) { this.yearsToBreastHeight = yearsToBreastHeight; } + @Deprecated public void setInventoryTypeGroup(Optional inventoryTypeGroup) { this.inventoryTypeGroup = inventoryTypeGroup; } + @Deprecated public void setBreastHeightAge(Optional breastHeightAge) { this.breastHeightAge = breastHeightAge; } diff --git a/vdyp-fip/src/main/java/ca/bc/gov/nrs/vdyp/fip/model/FipLayerPrimary.java b/vdyp-fip/src/main/java/ca/bc/gov/nrs/vdyp/fip/model/FipLayerPrimary.java index 83ef0c936..82fc36479 100644 --- a/vdyp-fip/src/main/java/ca/bc/gov/nrs/vdyp/fip/model/FipLayerPrimary.java +++ b/vdyp-fip/src/main/java/ca/bc/gov/nrs/vdyp/fip/model/FipLayerPrimary.java @@ -9,9 +9,11 @@ public class FipLayerPrimary extends FipLayer { static final String SITE_CURVE_NUMBER = "SITE_CURVE_NUMBER"; // SCN static final String STOCKING_CLASS = "STOCKING_CLASS"; // STK - Optional siteCurveNumber; // TODO Confirm if these should be required instead of optional if we know it's - // a Primary layer. - Optional stockingClass; + // TODO Confirm if these should be required instead of optional if we know it's + // a Primary layer. + Optional siteCurveNumber; // FIPL_1/SCN_L1 + + Optional stockingClass; // FIPL_1ST/STK_L1 public FipLayerPrimary( String polygonIdentifier, float ageTotal, float height, float siteIndex, float crownClosure, diff --git a/vdyp-fip/src/main/java/ca/bc/gov/nrs/vdyp/fip/model/FipPolygon.java b/vdyp-fip/src/main/java/ca/bc/gov/nrs/vdyp/fip/model/FipPolygon.java index 98aba335e..c8a8efa08 100644 --- a/vdyp-fip/src/main/java/ca/bc/gov/nrs/vdyp/fip/model/FipPolygon.java +++ b/vdyp-fip/src/main/java/ca/bc/gov/nrs/vdyp/fip/model/FipPolygon.java @@ -8,13 +8,13 @@ public class FipPolygon { - String polygonIdentifier; // POLYDESC - String forestInventoryZone; // FIZ - String biogeoclimaticZone; // BEC - Optional percentAvailable; // PCTFLAND - Optional modeFip; // MODEfip - Optional nonproductiveDescription; // NPDESC - float yieldFactor; // YLDFACT + String polygonIdentifier; // FIP_P/POLYDESC + String forestInventoryZone; // FIP_P/FIZ + String biogeoclimaticZone; // FIP_P/BEC + Optional percentAvailable; // FIP_P2/PCTFLAND + Optional modeFip; // FIP_P2/MODE / MODEfip + Optional nonproductiveDescription; // FIP_P3/NPDESC + float yieldFactor; // FIP_P4/YLDFACT Map layers = Collections.emptyMap(); diff --git a/vdyp-fip/src/main/java/ca/bc/gov/nrs/vdyp/fip/model/FipSpecies.java b/vdyp-fip/src/main/java/ca/bc/gov/nrs/vdyp/fip/model/FipSpecies.java index 60a2b3871..a87d759ee 100644 --- a/vdyp-fip/src/main/java/ca/bc/gov/nrs/vdyp/fip/model/FipSpecies.java +++ b/vdyp-fip/src/main/java/ca/bc/gov/nrs/vdyp/fip/model/FipSpecies.java @@ -9,18 +9,21 @@ public class FipSpecies { static final String POLYGON_IDENTIFIER = "POLYGON_IDENTIFIER"; // POLYDESC static final String LAYER = "LAYER"; // LAYER - final String polygonIdentifier; // POLYDESC - final Layer layer; // LAYER - final String genus; // SP0 + final String polygonIdentifier; // FIP_P/POLYDESC + final Layer layer; // This is also represents the distinction between data stored in + // FIPL_1(A) and FIP_V(A). Where VDYP7 stores both and looks at certain values + // to determine if a layer is "present". VDYP8 stores them in a map keyed by + // this value - float percentGenus; + final String genus; // FIPSA/SP0V - // This is computed from percentGenus, but VDYP7 computes it (RFBASP0/FR) in a - // way that might lead to a slight difference so it's stored separately and can - // be modified. - float fractionGenus; + float percentGenus; // FIPS/PCTVOLV - Map speciesPercent; + // This is computed from percentGenus, but VDYP7 computes it in a way that might + // lead to a slight difference so it's stored separately and can be modified. + float fractionGenus; // RFBASP0/FR + + Map speciesPercent; // Map from public FipSpecies( String polygonIdentifier, Layer layer, String genus, float percentGenus, Map speciesPercent