LoadClassification function
Prototype: |
function LoadClassification (const XmlFilename_,TaskName_ :string) :boolean; |
|
Description: |
||
Syntax: |
variable:= rcl.LoadClassification(xmlFileName, TaskName); |
|
Part |
Description |
|
variable |
A variable declared as a boolean |
|
rcl |
A reference to an instance of a TReclassificationWrapper |
|
xmlFilename, TaskName |
Variables declared as string that represent filename of the reclassification xml file and particular reclassification task. The file serves as a prescription for the reclassification. There can be more tasks in one reclassification xml file. |
|
Return value: |
boolean |
|
See also:
Create, Free, LoadClassification, RaiseExceptionOnMissingClass, ReclassifiedValue, ReclassifyTable
Example:
var
rcl:TReclassificationWrapper;
begin
rcl:=TReclassificationWrapper.create;
try
rcl.LoadClassification(ProjectDir+'Misc\SpeciesReclass.xml','');
rcl.ReclassifyTable(Trees_2013,'Species','SpeciesGroup');
finally
rcl.Free;
end;
end.
Example of reclasifiacion xml file:
<RECLASSIFICATION>
<TASK NAME="SpeciesClasses">
<CLASS ID="100"> <!-- conifers -->
<ITEM ID="10"/> <!-- spruce -->
<ITEM ID="20"/> <!-- fir -->
<ITEM ID="30"/> <!-- pine -->
</CLASS>
<CLASS ID="200"> <!-- broadleaves -->
<ITEM ID="40"/> <!-- oak -->
<ITEM ID="50"/> <!-- beech -->
<ITEM ID="60"/> <!-- hornbeam -->
<ITEM ID="70"/> <!-- maple -->
</CLASS>
</TASK>
</RECLASSIFICATION>
© 2024 IFER-Monitoring and Mapping Solutions