# Soil Data (shp, with coordinates)

## Overview

Soil chemical analysis is one of the most important data layers in crop farming. Typically, the soil information comes from agrochemical laboratories analyzing field soil samples collected based on a grid or zonal approach. The number of soil characteristics in a concrete file can vary from 5-10 macronutrients such as Nitrogen(N), Phosphorus (P), Potassium (K), cation exchange capacity (CEC), soil organic matter (OM) content to 40-50 with all micronutrient properties.

You can upload soil sampling files into GeoPard Agriculture and get an easily accessible heatmap visualization of each attribute in the soil sampling file. In addition, you can delineate management zones based on any attribute, compare them with other layers like historical crop productivity and build variable rate fertilizer prescription files.

## Upload Soil Data

To upload soil data files choose the **Import Data** menu and the **Upload Files** item.\
Then select **Soil Data**.

Keep in mind that there are some restrictions:

* Only WGS84 (EPSG:4326) shape files are supported with points or polygons-based data.
* The attributes must be a Numeric type (Integer or Real, not String).
* 100MB is the maximum file size.
* Try to eliminate the usage of special symbols like %+@ in the attribute titles.
* The max amount of attributes is 20.
* Each archive is treated as a single dataset (\*.shp and \*.dbf files are mandatory).

<figure><img src="/files/tRjhvuE2ElszkvEhKQm8" alt=""><figcaption><p>Upload Soil Data as Shapefile</p></figcaption></figure>

1. You can either drag and drop single or multiple Soil Datasets to the panel or click the **Browse** button and select a dataset from your computer.
2. Click the **Upload** button. Then GeoPard will verify that the file meets the requirements and save the data.

Wait for the confirmation dialog to see that the dataset was uploaded successfully:

<figure><img src="https://lh6.googleusercontent.com/GUuMs3oG97HGoZZQ2YI3c5Yxzu1b_FmnlCB-7sA7rpcqwn_qam1Bh1chsF0SVKzTHotYU1AT-wg1cfB8OLJbpwXuKn9Y_opGwBGhiuWGHBrHHyPVfxUnpf6B8-h9GFmvfFTghzJ8" alt=""><figcaption><p>Upload Confirmation</p></figcaption></figure>

The Soil Dataset will be available in the tree in the Soil Data section for further interactions including ZonesMaps creation.

<figure><img src="/files/zTVlp4Eg9bKYzWd27b3b" alt=""><figcaption><p>Uploaded Soil Sampling Dataset</p></figcaption></figure>

## Friendly Attributes and Units

GeoPard supports <mark style="background-color:yellow;">friendly names and units for Soil Dataset attributes</mark>. To enable this feature, the uploaded archive must include an additional <mark style="background-color:yellow;">JSON</mark> file containing metadata, named `<shapefile_name>-Metadata.json`. This file provides details on how to interpret the columns in the shapefile.

<figure><img src="/files/m4BEItX5vzZEtyysE4UL" alt="" width="312"><figcaption><p>Archive Structure: Shapefile and Metadata JSON</p></figcaption></figure>

### Example of JSON File

```json
{
  "Version": "1.0",
  "FarmName": "Farm Name",
  "FieldName": "Field Name",
  "Operation": "SoilSampling",
  "CropSeason": 2022,
  "FieldOperationDate": "2022-08-15T12:58:32.76Z",
  "DataAttributes": [
    {
      "Name": "Id",
      "Description": "Sample Number"
    },
    {
      "Name": "N",
      "Unit": "mg1kg-1",
      "Description": "Mineral Nitrogen"
    },
    {
      "Name": "K2O",
      "Unit": "mg1kg-1",
      "Description": "Exchangeable Potassium"
    },
    {
      "Name": "P2O5",
      "Unit": "mg1kg-1",
      "Description": "Mobile Phosphorus"
    },
    {
      "Name": "pH",
      "Description": "Soil Acidity"
    }
  ]
}
```

Metadata JSON structure explanation:

* `DataAttributes` contains metadata about each shapefile column.
  * `Name`is a shapefile column name.
  * `Description` is the friendly name of the attribute.
  * `Unit` is the unit of measurement for the attribute (see the table of supported units below).
* `FieldOperationDate` is the date of the soil dataset collection.
* `CropSeason` is the year of the crop season.
* `Operation` is the name of the operation, such as `SoilSampling` or `SoilScanning`.

### Supported Units

| Unit        | Unit Description           |
| ----------- | -------------------------- |
| prcnt       | Percentage                 |
| prcnt-1     | Per Percentage             |
| ppm         | Parts per million          |
| points      | Points                     |
| in          | Inches                     |
| ft          | Feet                       |
| mm          | Millimeters                |
| cm          | Centimeters                |
| m           | Meters                     |
| yd          | Yards                      |
| mi          | Miles                      |
| km          | Kilometers                 |
| m2          | Square meters              |
| ac          | Acres                      |
| ha          | Hectares                   |
| ft2         | Square feet                |
| ac-1        | Per Acre                   |
| ha-1        | Per Hectare                |
| kg          | Kilograms                  |
| lb          | Pounds                     |
| ton         | Tons                       |
| t           | Metric Tons                |
| cwt         | Hundredweight              |
| dg          | Decigrams                  |
| g           | Grams                      |
| ozm         | Ounces mass                |
| kg-1        | Per Kilogram               |
| lb-1        | Per Pound                  |
| ton-1       | Per Ton                    |
| t-1         | Per Metric Ton             |
| cwt-1       | Per Hundredweight          |
| dg-1        | Per Decigram               |
| g-1         | Per Gram                   |
| ozm-1       | Per Ounce mass             |
| gal         | Gallons                    |
| igal        | Imperial Gallons           |
| thsndgal    | Thousand Gallons           |
| floz        | Fluid Ounces               |
| pt          | Pints                      |
| qt          | Quarts                     |
| l           | Liters                     |
| kl          | Kiloliters                 |
| hl          | Hectoliters                |
| ml          | Milliliters                |
| ul          | Microliters                |
| yd3         | Cubic yards                |
| m3          | Cubic meters               |
| gal-1       | Per Gallon                 |
| igal-1      | Per Imperial Gallon        |
| thsndgal-1  | Per Thousand Gallons       |
| floz-1      | Per Fluid Ounce            |
| pt-1        | Per Pint                   |
| qt-1        | Per Quart                  |
| l-1         | Per Liter                  |
| kl-1        | Per Kiloliter              |
| hl-1        | Per Hectoliter             |
| ml-1        | Per Milliliter             |
| ul-1        | Per Microliter             |
| sec         | Seconds                    |
| ms          | Milliseconds               |
| min         | Minutes                    |
| hr          | Hours                      |
| day         | Days                       |
| hr-1        | Per Hour                   |
| arcdeg      | Degrees of arc (Heading)   |
| bu          | Bushels                    |
| bag         | Bags (seed load quantity)  |
| sack        | Sacks (seed load quantity) |
| container   | Containers                 |
| container-1 | Per Container              |
| bu-1        | Per Bushel                 |
| bag-1       | Per Bag                    |
| sack-1      | Per Sack                   |
| hz          | Hertz                      |
| ratio       | Ratio                      |
| K           | Kelvin (Temperature)       |
| F           | Fahrenheit (Temperature)   |
| C           | Celsius (Temperature)      |

### Soil Dataset Example

Below are GeoPard screenshots demonstrating how the previously shared Metadata.json file for the shapefile with soil dataset is applied.

<figure><img src="/files/t5VOgW6HizSKy5Blj2Jy" alt=""><figcaption><p>Soil Dataset with Friendly Attributes Names and Units</p></figcaption></figure>

<figure><img src="/files/InqSB3t0w5flQsKVEjnh" alt=""><figcaption><p>Soil Dataset with Friendly Attributes Names and Units</p></figcaption></figure>

## Additional References

See [Chapter Zones Maps](/geopard-tutorials/product-tour-web-app/zones-maps-and-analytics.md) to find more details on how to create a ZonesMap using Soil Data.

GeoPard also assists with the proper planning of zonal soil sampling. You can plan your Soil Sampling Points and route based on GeoPard Multi-Year Zones that reflect historical crop development patterns.


---

# 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/product-tour-web-app/import-precision-agriculture-data/soil-data-shp-with-coordinates.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.
