gi-nx / createProject
ts
function 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?: {
dependencies: GiraffeNodeGraphFeatureDependancy[];
description?: string;
edges: GiraffeEdge[];
id: string;
inputs: Record<string, GiraffeNodeInputHandle>;
name: string;
nodes: GiraffeNode[];
outputs: Record<string, GiraffeNodeInputHandle>;
supportedShapes?: string[];
}[];
layerTree?: LayerTree;
projectApps?: ProjectAppOverride[];
projectLayers?: ProjectLayer[];
sections?: (
| RawPoint
| RawMultiPoint
| RawLineString
| RawMultiLineString
| RawPolygon
| RawMultiPolygon)[];
vistas?: {
created_at: string;
details: {
_pixelsToMeters?: number;
_viewBox?: {
geometry: {
coordinates: [number, number][][];
type: "Polygon";
};
properties: Record<string, any>;
type: "Feature";
};
activeLayer: string;
camera: Camera & {
latitude?: number;
longitude?: number;
};
description?: string;
dpi?: number;
layerTree: LayerTree;
name: string;
order?: number;
scenarios?: string[];
size?: {
height: number;
width: number;
};
snapShot: string;
solarDate: string;
topView: TopView;
};
id: number | "new";
name: string;
project: string | number;
sort_order?: number;
}[];
},
showDialog?: boolean): Promise<number>;Parameters
| Parameter | Type | Description |
|---|---|---|
feature | Feature< | Point | Polygon | MultiPolygon> | GeoJSON Feature with Polygon geometry defining the project boundary |
overrides.blocks? | { description?: string; features: ( | PreStackedPoint | PreStackedLineString | PreStackedPolygon<Record<string, any>>)[]; id: string; keyWords?: string[]; name: string; properties?: Record<string, any>; }[] | - |
overrides.flows? | { dependencies: GiraffeNodeGraphFeatureDependancy[]; description?: string; edges: GiraffeEdge[]; id: string; inputs: Record<string, GiraffeNodeInputHandle>; name: string; nodes: GiraffeNode[]; outputs: Record<string, GiraffeNodeInputHandle>; supportedShapes?: string[]; }[] | - |
overrides.layerTree? | LayerTree | - |
overrides.projectApps? | ProjectAppOverride[] | - |
overrides.projectLayers? | ProjectLayer[] | - |
overrides.sections? | ( | RawPoint | RawMultiPoint | RawLineString | RawMultiLineString | RawPolygon | RawMultiPolygon)[] | - |
overrides.vistas? | { created_at: string; details: { _pixelsToMeters?: number; _viewBox?: { geometry: { coordinates: [number, number][][]; type: "Polygon"; }; properties: Record<string, any>; type: "Feature"; }; activeLayer: string; camera: Camera & { latitude?: number; longitude?: number; }; description?: string; dpi?: number; layerTree: LayerTree; name: string; order?: number; scenarios?: string[]; size?: { height: number; width: number; }; snapShot: string; solarDate: string; topView: TopView; }; id: number | "new"; name: string; project: string | number; sort_order?: number; }[] | - |
showDialog? | boolean | If true, shows the project creation dialog (default: false) |
Returns
Promise<number>
Promise resolving to the created Project, or void if showDialog is true