isoxml
Version:
JavaScript library to parse and generate ISOXML (ISO11783-10) files
27 lines (26 loc) • 1.58 kB
TypeScript
import { ISOXMLManager } from '../ISOXMLManager';
import { Entity, ValueInformation, XMLElement } from '../types';
import { ProcessDataVariable, Task, TaskAttributes } from '../baseEntities';
import { FeatureCollection } from '@turf/helpers';
import { TAGS } from '../baseEntities/constants';
export declare class ExtendedTask extends Task {
tag: TAGS;
constructor(attributes: TaskAttributes, isoxmlManager: ISOXMLManager);
static fromXML(xml: XMLElement, isoxmlManager: ISOXMLManager, internalId: string): Promise<Entity>;
private findFreeTZNCode;
/** Adds Grid and corresponding TreatmentZones to the Task.
*
* Implementation notes:
* - this function doesn't remove any existing TreatmentZones from the task, it just adds new TZNs.
* - TZN codes are generated automatically.
* - if OutOfFieldTreatmentZone in the task is not defined,
* it will be created using outOfFieldValues (which are all 0 by default)
* - if defaultTreatmentValues or positionLostValues are defined, corresponding TZNs will be created and used
*/
addGridFromGeoJSON(geoJSON: FeatureCollection, processDataVariables: ProcessDataVariable[], geoJSONPropertyNames: string[], // one attribute name for each processDataVariable
defaultTreatmentValues?: number[], // one value for each processDataVariable
positionLostValues?: number[], // one value for each processDataVariable
outOfFieldValues?: number[]): void;
getGridAsGeoJSON(propertyNames: string[]): FeatureCollection;
getGridValuesDescription(): ValueInformation[];
}