88. Mutation: Export ZonesMap as Zipped Shapefile
Generate a zip archive with the selected "ZonesMap" as shapefile.
1. Preparation
The attribute
vectorAnalysisMapscontains an array of ZonesMaps (VectorAnalysisMaps) objects to be exported. Each such object includes a pair offieldUuid(linkage to the selected Field) anduuid(linkage to the selected ZonesMap).The boolean attribute
asMultiGeometrydetermines whether zones are exported asPolygonsorMultiPolygons(when set totrue).The boolean attribute
onlyProductColumnsspecifies if only columns with products (RX) should be included in the shapefile (whentrue). Otherwise, all statistical attributes and zone IDs will be included as columns.The attribute
archiveNameholds the name of the generated zip archive.The attribute
filePostfixallows for custom postfixes to be added to the exported files and archive.
mutation exportData {
exportData(
input: {
filePostfix:"_GP"
vectorAnalysisMaps:[
{
uuid:"<placeholder_zones_map_uuid>"
fieldUuid:"<placeholder_field_uuid>"
},
{
uuid:"<placeholder_zones_map_uuid>"
fieldUuid:"<placeholder_field_uuid>"
}
]
asMultiGeometry:true
onlyProductColumns:true
archiveName:"ArchivedZonesMaps"
}
) {
archiveUrl
zippedVectorAnalysisMaps {
uuid
fieldUuid
status
}
ignoredVectorAnalysisMaps {
uuid
fieldUuid
status
}
}
}2. Download the generated archive
After execution of the GraphQL query, it is possible to download it using curl or a similar approach.
curl '<archiveUrl>' --compressed >> '<archiveUrl>'Last updated
Was this helpful?