# 88. Mutation: Exportera ZonesMap som zippad Shapefil

Generera ett zip-arkiv med den valda "ZonesMap" som shapefile.

{% hint style="info" %}
Arkivet består av \*.shp, \*.shx, \*.prj, \*.dbf-filer i EPSG:4326.
{% endhint %}

### 1. Förberedelse

* Attributet `vectorAnalysisMaps` innehåller en array av ZonesMaps (VectorAnalysisMaps)-objekt som ska exporteras. Varje sådant objekt inkluderar ett par `fieldUuid` (länkning till det valda fältet) och `uuid` (länkning till den valda ZonesMap).
* Det booleska attributet `asMultiGeometry` avgör om zoner exporteras som `Polygons` eller `MultiPolygons` (när satt till `true` ).
* Det booleska attributet `onlyProductColumns` anger om endast kolumner med produkter (RX) ska inkluderas i shapefilen (när `true`). Annars kommer alla statistiska attribut och zone-ID:n att inkluderas som kolumner.
* Attributet `archiveName` innehåller namnet på det genererade zip-arkivet.
* Attributet `filePostfix` möjliggör att egna postfixer läggs till i de exporterade filerna och arkivet.

{% 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. Ladda ner det genererade arkivet

Efter att GraphQL-frågan körts är det möjligt att ladda ner det med `curl` eller en liknande metod.

{% 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/swe/api-dokumentation/oversikt-over-geopard-api-anrop/88.-mutation-exportera-zonesmap-som-zippad-shapefil.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.
