> For the complete documentation index, see [llms.txt](https://docs.geopard.tech/geopard-tutorials/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.geopard.tech/geopard-tutorials/nl/snelle-gis-tips/qgis-change-string-to-number-values-in-the-shapefile.md).

# QGIS: een tekstveld in een shapefile omzetten naar een getal

Gebruik to\_real() of to\_int() in de veldcalculator van QGIS om tekstwaarden om te zetten naar getallen, decimalen te behouden en doserings- of opbrengstkolommen te herstellen die niet kunnen worden geïmporteerd.

Open de attributentabel, start de veldcalculator, maak een nieuw decimaalveld en voer in `to_real("your_field")`. Gebruik `to_int()` voor gehele getallen. Als decimalen na het opslaan verdwijnen, stel dan de veldlengte van het uitvoerveld in op 0 of kies een precisie groter dan nul. Getallen die als tekst zijn opgeslagen, zijn meestal de reden dat een opbrengst- of doseringskolom niet als kaart wordt ingekleurd of niet als dosering wordt geïmporteerd.

{% hint style="success" %}
Upload het herstelde bestand en bekijk het als kaart: [Gratis starten](https://app.geopard.tech/auth/sign-up?utm_source=docs\&utm_medium=cta\&utm_campaign=qgis-change-string-to-number-values-in-the-shapefile)
{% endhint %}

In QGIS kunt u een tekenreeks omzetten naar een getal met de tool 'Veldcalculator'. Open eerst de attributentabel van de laag die u wilt wijzigen. Klik vervolgens op de knop 'Veldcalculator openen'. Typ in het vak 'Expressie' to\_real(, gevolgd door de naam van het veld met de tekenreeks die u wilt omzetten, en sluit af met een haakje. Als u bijvoorbeeld een tekenreeksveld met de naam string\_field wilt omzetten naar een numeriek veld, voert u to\_real("string\_field") in het vak 'Expressie' in. U kunt ook de naam en het gegevenstype van het uitvoerveld aanpassen door de juiste opties te selecteren. Klik ten slotte op 'OK' om de omzetting uit te voeren. Het oorspronkelijke tekenreeksveld blijft in de attributentabel staan; het nieuwe numerieke veld wordt aan de tabel toegevoegd.

<figure><img src="https://3615228694-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYICBELdyAXXebKAzfLOR%2Fuploads%2Fi3rxrGu9XbcEMSGWGGEX%2FScreenshot%202023-04-03%20at%2017.22.03.png?alt=media&amp;token=1425fbc0-f7fa-4d0d-b794-b50c8db37b8d" alt=""><figcaption></figcaption></figure>

1. Open 'Eigenschappen'
2. Ga naar 'Veldcalculator'
3. Vink 'Bestaand veld bijwerken' aan
4. to\_real("attributeName")
5. Sla de bewerkingen op
6. Herhaal dit voor elk attribuut

   <figure><img src="https://3615228694-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYICBELdyAXXebKAzfLOR%2Fuploads%2Fc6LPt5wG8QlPkfn1B00s%2FScreenshot%202023-04-03%20at%2017.29.49.png?alt=media&amp;token=86437f74-6d54-4cae-8e04-ff319e4769a6" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Upload het herstelde bestand en bekijk het als kaart: [Gratis starten](https://app.geopard.tech/auth/sign-up?utm_source=docs\&utm_medium=cta\&utm_campaign=qgis-change-string-to-number-values-in-the-shapefile)
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.geopard.tech/geopard-tutorials/nl/snelle-gis-tips/qgis-change-string-to-number-values-in-the-shapefile.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
