gi-nx / createProject
ts
const createProject: (feature: Feature<
| Point
| Polygon
| MultiPolygon>, overrides?: {
blocks?: {
description?: string;
features: (
| PreStackedPoint
| PreStackedLineString
| PreStackedPolygon<Record<string, any>>)[];
id: string;
keyWords?: string[];
name: string;
properties?: Record<string, any>;
}[];
flows?: {
defaults?: Record<string, any>;
dependencies: GiraffeNodeGraphFeatureDependancy[];
description?: string;
edges: GiraffeEdge[];
id: string;
inputs: Record<string, GiraffeNodeInputHandle>;
name: string;
nodes: GiraffeNode[];
outputs: Record<string, GiraffeNodeInputHandle>;
supportedShapes?: string[];
tags?: string[];
}[];
layerTree?: LayerTree;
layouts?: UserLayout[];
projectApps?: ProjectAppOverride[];
projectLayers?: ProjectLayer[];
scenarios?: Scenario[];
sections?: (
| RawPoint
| RawMultiPoint
| RawLineString
| RawMultiLineString
| RawPolygon
| RawMultiPolygon)[];
}, showDialog: any, templateId?: ProjectId) => Promise<number>;Create a project from a boundary feature.
Parameters
| Parameter | Type | Description |
|---|---|---|
feature | Feature< | Point | Polygon | MultiPolygon> | The new project's boundary. |
overrides.blocks? | { description?: string; features: ( | PreStackedPoint | PreStackedLineString | PreStackedPolygon<Record<string, any>>)[]; id: string; keyWords?: string[]; name: string; properties?: Record<string, any>; }[] | - |
overrides.flows? | { defaults?: Record<string, any>; dependencies: GiraffeNodeGraphFeatureDependancy[]; description?: string; edges: GiraffeEdge[]; id: string; inputs: Record<string, GiraffeNodeInputHandle>; name: string; nodes: GiraffeNode[]; outputs: Record<string, GiraffeNodeInputHandle>; supportedShapes?: string[]; tags?: string[]; }[] | - |
overrides.layerTree? | LayerTree | - |
overrides.layouts? | UserLayout[] | - |
overrides.projectApps? | ProjectAppOverride[] | - |
overrides.projectLayers? | ProjectLayer[] | - |
overrides.scenarios? | Scenario[] | - |
overrides.sections? | ( | RawPoint | RawMultiPoint | RawLineString | RawMultiLineString | RawPolygon | RawMultiPolygon)[] | - |
showDialog? | any | Open the create-project drawer instead of saving directly. |
templateId? | ProjectId | Project to inherit layers, apps, flows, blocks and the layer tree from. |
Returns
Promise<number>