|
SORTIE Java Interface
1
|
This class encapsulates the data for a single planting event - being for one species, for one timestep. More...
Classes | |
| class | PlantingAbundance |
| This encapsulates a species with its planting abundance. | |
Public Member Functions | |
| PlantingData (float fXCellLength, float fYCellLength) | |
| Constructor. | |
| float | getXCellLength () |
| Gets the length of the cells in the X direction that define the area of this event. | |
| float | getYCellLength () |
| Gets the length of the cells in the Y direction that define the area of this event. | |
| void | setXCellLength (float fXCellLength) |
| Sets the length of the cells in the X direction that define the area of this event. | |
| void | setYCellLength (float fYCellLength) |
| Sets the length of the cells in the Y direction that define the area of this event. | |
| int | getPlantSpacing () |
| Gets the plant spacing. | |
| void | setPlantSpacing (int iSpacing) throws ModelException |
| Sets the plant spacing. | |
| int | getTimestep () |
| Gets the timestep for this planting event. | |
| void | removeSpecies (int iSpecies) |
| Removes a species from the list to which to apply this harvest. | |
| void | clearSpecies () |
| Clears the list of species. | |
| void | setTimestep (int iTimestep) throws ModelException |
| Sets the timestep for this planting event. | |
| int | getNumberOfSpecies () |
| Gets the number of species to which this planting has been applied. | |
| int | getSpecies (int iIndex) throws ModelException |
| Gets a species at a certain index within the species list. | |
| void | addSpecies (int iSpecies) |
| Adds a new species to apply this planting to. | |
| int | getNumberOfCells () |
| Gets the number of cells in the planting's area. | |
| void | addCell (int iX, int iY, Plot oPlot) throws ModelException |
| Adds a cell to the planting area. | |
| void | addCell (Cell oNewCell) |
| Adds a cell to the planting area. | |
| void | removeCell (int iIndex) |
| Removes a cell from the planting area. | |
| void | removeAllCells () |
| Deletes all cells. | |
| Cell | getCell (int iIndex) throws ModelException |
| Gets a cell in the planting's area. | |
| float | getSpacingDistance () |
| Get the distance between trees for a gridded planting. | |
| float | getDensity () |
| Gets the total density of trees for a random planting. | |
| void | setSpacingDistance (float fSpace) throws ModelException |
| Sets the distance between trees for a gridded planting. | |
| void | setDensity (float fSpace) throws ModelException |
| Sets the total tree density for a random planting. | |
| void | addAbundance (int iSpecies, float fAbundance) throws ModelException |
| Adds an abundance value for a given species. | |
| float | getAbundance (int iSpecies) throws ModelException |
| Gets an abundance value for a particular species. | |
| void | validatePlant (TreePopulation oPop, Plot oPlot) throws ModelException |
| Validates the current set of data in this planting. | |
| void | updateCellsNewGridResolution (float fNewXCellLength, float fNewYCellLength, Plot oPlot) throws ModelException |
| Adjusts any existing cell lists in response to grid cell changes. | |
| Object | clone () |
Private Attributes | |
| Vector< Integer > | mp_iSpecies = new Vector<Integer>(0) |
| Species codes to which to apply this planting. | |
| Vector< Cell > | mp_oCells = new Vector<Cell>(0) |
| The list of cells to which to apply this plant (vector of Cell objects) | |
| Vector< PlantingAbundance > | mp_oAbundance = new Vector<PlantingAbundance>(0) |
| The amount of each species to plant. | |
| float | m_fDistanceOrDensity |
| If planting is GRIDDED - distance between trees in m. | |
| float | m_fXCellLength |
| Length of cells in the X direction. | |
| float | m_fYCellLength |
| Length of cells in the Y direction. | |
| int | m_iTimestep |
| Timestep to which to apply this planting. | |
This class encapsulates the data for a single planting event - being for one species, for one timestep.
Copyright: Copyright (c) Charles D. Canham 2003
Company: Cary Institute of Ecosystem Studies
Edit history:
---------------—
April 28, 2004: Submitted in beta version (LEM)
November 19, 2005: Added species removal capacity (LEM)
February 4, 2008: Updated to conform to Java 6 compliance (LEM)
October 29, 2010: Changed from floats to floats
| sortie.data.funcgroups.planting.PlantingData.PlantingData | ( | float | fXCellLength, |
| float | fYCellLength | ||
| ) |
Constructor.
| fXCellLength | Length of cells in the X direction. |
| fYCellLength | Length of cells in the Y direction. |
| void sortie.data.funcgroups.planting.PlantingData.addAbundance | ( | int | iSpecies, |
| float | fAbundance | ||
| ) | throws ModelException |
Adds an abundance value for a given species.
If a value for that species already exists, then the value is replaced with the new value.
| iSpecies | The species number. |
| fAbundance | The abundance value, as a percentage (between 0 and 100) |
| ModelException | if the abundance value is negative or not a percentage. |
| void sortie.data.funcgroups.planting.PlantingData.addCell | ( | int | iX, |
| int | iY, | ||
| Plot | oPlot | ||
| ) | throws ModelException |
Adds a cell to the planting area.
Duplicates will not be added.
| iX | X cell number. |
| iY | Y cell number. |
| oPlot | a Plot object. |
| ModelException | if the cell coordinates are invalid. |
| void sortie.data.funcgroups.planting.PlantingData.addCell | ( | Cell | oNewCell | ) |
Adds a cell to the planting area.
Duplicates will not be added.
| oNewCell | Cell object to add. |
| void sortie.data.funcgroups.planting.PlantingData.addSpecies | ( | int | iSpecies | ) |
Adds a new species to apply this planting to.
If this species is already on the list, it is not added again.
| iSpecies | Species index. |
| void sortie.data.funcgroups.planting.PlantingData.clearSpecies | ( | ) |
Clears the list of species.
| Object sortie.data.funcgroups.planting.PlantingData.clone | ( | ) |
| float sortie.data.funcgroups.planting.PlantingData.getAbundance | ( | int | iSpecies | ) | throws ModelException |
Gets an abundance value for a particular species.
| iSpecies | The species number. |
| ModelException | if the species doesn't exist. |
| Cell sortie.data.funcgroups.planting.PlantingData.getCell | ( | int | iIndex | ) | throws ModelException |
Gets a cell in the planting's area.
| iIndex | The index of the object. |
| ModelException | If the index is not valid. |
| float sortie.data.funcgroups.planting.PlantingData.getDensity | ( | ) |
Gets the total density of trees for a random planting.
| int sortie.data.funcgroups.planting.PlantingData.getNumberOfCells | ( | ) |
Gets the number of cells in the planting's area.
| int sortie.data.funcgroups.planting.PlantingData.getNumberOfSpecies | ( | ) |
Gets the number of species to which this planting has been applied.
| int sortie.data.funcgroups.planting.PlantingData.getPlantSpacing | ( | ) |
Gets the plant spacing.
Possible values come from PlantingBehaviors and are GRIDDED, RANDOM, or -1 if the value has not yet been set.
| float sortie.data.funcgroups.planting.PlantingData.getSpacingDistance | ( | ) |
Get the distance between trees for a gridded planting.
| int sortie.data.funcgroups.planting.PlantingData.getSpecies | ( | int | iIndex | ) | throws ModelException |
Gets a species at a certain index within the species list.
| iIndex | The species index. |
| ModelException | If the index is not valid. |
| int sortie.data.funcgroups.planting.PlantingData.getTimestep | ( | ) |
Gets the timestep for this planting event.
| float sortie.data.funcgroups.planting.PlantingData.getXCellLength | ( | ) |
Gets the length of the cells in the X direction that define the area of this event.
| float sortie.data.funcgroups.planting.PlantingData.getYCellLength | ( | ) |
Gets the length of the cells in the Y direction that define the area of this event.
| void sortie.data.funcgroups.planting.PlantingData.removeAllCells | ( | ) |
Deletes all cells.
| void sortie.data.funcgroups.planting.PlantingData.removeCell | ( | int | iIndex | ) |
Removes a cell from the planting area.
| iIndex | int Cell index. Invalid values are ignored. |
| void sortie.data.funcgroups.planting.PlantingData.removeSpecies | ( | int | iSpecies | ) |
Removes a species from the list to which to apply this harvest.
If this species is not on the list, the function quietly exits.
| iSpecies | Species number (number identifying the species, NOT the index number in the vector). |
| void sortie.data.funcgroups.planting.PlantingData.setDensity | ( | float | fSpace | ) | throws ModelException |
Sets the total tree density for a random planting.
| fSpace | The total stems/ha for all species. |
| ModelException | if the value is negative. |
| void sortie.data.funcgroups.planting.PlantingData.setPlantSpacing | ( | int | iSpacing | ) | throws ModelException |
Sets the plant spacing.
| iSpacing | the plant spacing. Possible values come from PlantingBehaviors and are GRIDDED and RANDOM. |
| ModelException | if the spacing is unrecognized. |
| void sortie.data.funcgroups.planting.PlantingData.setSpacingDistance | ( | float | fSpace | ) | throws ModelException |
Sets the distance between trees for a gridded planting.
| fSpace | The spacing distance. |
| ModelException | if the value is negative. |
| void sortie.data.funcgroups.planting.PlantingData.setTimestep | ( | int | iTimestep | ) | throws ModelException |
Sets the timestep for this planting event.
| iTimestep | The timestep to set. |
| ModelException | if the timestep is less than 0. |
| void sortie.data.funcgroups.planting.PlantingData.setXCellLength | ( | float | fXCellLength | ) |
Sets the length of the cells in the X direction that define the area of this event.
| fXCellLength | Length of the cells. |
| void sortie.data.funcgroups.planting.PlantingData.setYCellLength | ( | float | fYCellLength | ) |
Sets the length of the cells in the Y direction that define the area of this event.
| fYCellLength | Length of the cells. |
| void sortie.data.funcgroups.planting.PlantingData.updateCellsNewGridResolution | ( | float | fNewXCellLength, |
| float | fNewYCellLength, | ||
| Plot | oPlot | ||
| ) | throws ModelException |
Adjusts any existing cell lists in response to grid cell changes.
| fNewXCellLength | New X cell length. |
| fNewYCellLength | New Y cell length. |
| oPlot | Plot object. |
| ModelException | shouldn't. |
| void sortie.data.funcgroups.planting.PlantingData.validatePlant | ( | TreePopulation | oPop, |
| Plot | oPlot | ||
| ) | throws ModelException |
Validates the current set of data in this planting.
This makes sure the following are all true:
| oPop | TreePopulation object, to help verify data |
| oPlot | Plot object |
| ModelException | if any of the above conditions is not true |
|
private |
If planting is GRIDDED - distance between trees in m.
If RANDOM, total number of trees/ha for all species
|
private |
Length of cells in the X direction.
|
private |
Length of cells in the Y direction.
|
private |
Timestep to which to apply this planting.
|
private |
Species codes to which to apply this planting.
|
private |
The amount of each species to plant.
The list of cells to which to apply this plant (vector of Cell objects)
1.8.2