Importing Data

There are several mutations in Sentera's GraphQL API that can be used to import data into FieldAgent:

Each of these mutations requires you to provide one or more file IDs, which represent files that were previously uploaded to Sentera's FieldAgent platform using either the create_file_upload or create_file_uploads mutations. Please refer to the Uploading Files section of this documentation for details on how to upload files to FieldAgent.

import_feature_set

Use this mutation to import a feature set into FieldAgent. A feature set is GIS vector-based data represented in GeoJSON. This mutation accepts a file_key argument which you use to associate a previously-uploaded GeoJSON file with your import request. Your import request should also provide a name for the feature set, a type and the resource (field or survey) to which the feature set should be attached. This resource is referred to as the "owner" of the feature set.

There are several types of feature sets that FieldAgent supports:

The first four types of feature sets listed above require a specific schema in the associated GeoJSON. Please contact Sentera Technical Support for more information on the schema requirements of any of these feature set types.

Once you have submitted your request to import a feature set, FieldAgent will process the request and notify you via email once the import has either completed successfully or failed for some reason.

Please refer to this example for how to use the import_feature_set mutation to import a feature set and attach it to a survey.

import_files

Use this mutation to import files into FieldAgent and attach them to an owner resource such as a feature set. This mutation accepts a file_keys argument which you use to associate previously-uploaded files with your import request. Your import request should also provide the resource (feature set) to which the file should be attached. This resource is referred to as the "owner" of the file.

Please refer to this example for how to use the import_files mutation to import files and attach them to a feature set.

import_images

Use this mutation to import images into FieldAgent and attach them to a survey. This mutation accepts an array of ImageImport objects which define the images to be imported. ImageImport contains a key input which should be the ID of an image you previously uploaded to FieldAgent. Your import request must also provide the ID of the survey to which these images should be attached.

Please refer to this example for how to use the import_images mutation to import images and attach them to the survey.

import_mosaic

Use this mutation to import mosaics into FieldAgent and attach them to a survey. A mosaic is raster-based data represented as a GeoTIFF, and can be either a fully ortho-rectified mosaic produced by stitching tools like Pix4D and ODM, or a QuickTile produced by the FieldAGent platform.

This mutation accepts a file_keys argument which you use to associate previously-uploaded files (.tiff, .prj, .tfw) with your import request. Your import request should also provide either the ID of an existing survey, or the ID of a field. If you provide the ID of a field, this mutation will create a new survey in this field and import the mosaic into that survey. Your import request should also provide a name for the mosaic, a type and a quality.

FieldAgent accepts the following GeoTIFF (.tif) formats

Once you have submitted your request to import a mosaic, FieldAgent will process the request and notify you via email once the import has either completed successfully or failed for some reason.

Please refer to this example for how to use the import_mosaic mutation to import a mosaic and attach it to a survey.