# 88. Mutace: Exportovat ZonesMap jako zazipovaný shapefile

Vygenerujte ZIP archiv se zvolenou "ZonesMap" jako shapefile.

{% hint style="info" %}
Archiv obsahuje soubory \*.shp, \*.shx, \*.prj, \*.dbf v EPSG:4326.
{% endhint %}

### 1. Příprava

* Atribut `vectorAnalysisMaps` obsahuje pole objektů ZonesMaps (VectorAnalysisMaps), které mají být exportovány. Každý takový objekt obsahuje dvojici `fieldUuid` (odkaz na vybrané pole) a `uuid` (odkaz na vybranou ZonesMap).
* Booleovský atribut `asMultiGeometry` určuje, zda budou zóny exportovány jako `Polygony` nebo `MultiPolygony` (když je nastaveno na `true` ).
* Booleovský atribut `onlyProductColumns` určuje, zda mají být do shapefile zahrnuty pouze sloupce s produkty (RX) (když `true`). Jinak budou jako sloupce zahrnuty všechny statistické atributy a ID zón.
* Atribut `archiveName` obsahuje název vygenerovaného ZIP archivu.
* Atribut `filePostfix` umožňuje přidat vlastní postfixy k exportovaným souborům a archivu.

{% code overflow="wrap" lineNumbers="true" %}

```graphql
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
    } 
  }
}
```

{% endcode %}

### 2. Stažení vygenerovaného archivu

Po provedení GraphQL dotazu je možné jej stáhnout pomocí `curl` nebo podobným způsobem.

{% code overflow="wrap" lineNumbers="true" %}

```bash
curl '<archiveUrl>' --compressed >> '<archiveUrl>'
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.geopard.tech/geopard-tutorials/cze/api-dokumentace/prehled-pozadavku-api-geopardu/88.-mutace-exportovat-zonesmap-jako-zazipovany-shapefile.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
