Skip to content

gi-nx


gi-nx / syncToProjects

ts
function syncToProjects(fc: ProjectFeatureCollection, idGetter: (f: Project) => string): Promise<number[]>;

Useful to bulk sync a list of projects/geometries from outside of Giraffe and make corresponding projects in Giraffe.

Use With Caution! This can create many duplicate projects if used incorrectly.

Parameters

ParameterTypeDescription
fcProjectFeatureCollectionFeatureCollection containing a polygon for each project (existing or to be created)
idGetter(f: Project) => stringA function to extract the unique identifier for each feature, typically the project id. This will also extract the unique identifier from existing projects to determine if the project already exists.

Returns

Promise<number[]>