Why use variable-rate application?
Walk a field after a scan and you might find weeds along one headland while the rest of the crop is clean. A fertilizer plan might call for one rate on part of the field and a different rate across the rest. A fixed rate can apply too much in some zones and too little in others. Variable-rate application (VRA) lets the operator assign a rate to each zone in a prescription map. The drone changes the amount it applies as it moves between zones. A spot-treatment prescription can also leave areas untreated.
Use imagery such as NDVI to see where the crop differs, then check those differences on the ground and use the approved agronomic plan to set the rates. That’s how the scan becomes a prescription the drone can follow. XAG’s variable-rate application overview
XAG drones for variable-rate spraying and spreading
The XAG P150 Max, P100 Pro, and P120 Pro support variable-rate application with the appropriate spraying or spreading system. Prepare the map for the system installed on the drone.
| XAG drone | Liquid spraying | Granular spreading |
|---|---|---|
| P150 Max | RevoSpray 5 | RevoCast 5 |
| P100 Pro | RevoSpray 3 | RevoCast 3 |
| P120 Pro | RevoSpray 6 | RevoCast 6 |
For spraying, prepare the approved liquid application rates, typically in L/ha. For spreading, prepare the approved granular application rates, typically in kg/ha, and calibrate the spreader for the material you’ll use. Confirm that prescription mode is available for your aircraft, installed system, firmware and XAG One account before preparing a live job. The XAG One spray screenshot later in this guide shows the liquid workflow. XAG’s prescription map announcement
Choose how to prepare your prescription
Start with the route that matches where your map was made. Draw or import the field boundary, build the treatment zones, and enter the approved rates for your spraying or spreading job. XAG One reads a native XAG prescription JSON. PIX4Dfields exports a companion KML for importing the field separately. A native JSON built from the XAG protocol can also carry the field outline inside the file.
| Where you’re starting | Route |
|---|---|
| An index, reflectance map, or field zones from a mapping provider | Route 1. QGIS |
| Original multispectral photos or an existing PIX4Dfields project | Route 2. PIX4Dfields |
| A matching XAG-compatible KML and JSON pair | Upload and verify in XAG One |
Route 1. Prepare mapping data in QGIS
Use this route for a map from a surveyor, agronomist, GIS, or another reconstruction package. Export the field boundary and numeric layers from that platform, then choose the instructions that match the files you received.
| Starting file | What to do |
|---|---|
| Numeric NDVI or another index GeoTIFF | Export a georeferenced orthomosaic for a base map and the numeric index TIFF. Open both in QGIS, then draw or check the boundary, clip and classify the index, and export the boundary and zones. Use thresholds appropriate for the actual index. |
| Separate red and near-infrared reflectance GeoTIFFs | Open both in QGIS and check that their CRS, pixel size, extent and grid alignment match. Use Align rasters if needed. In Raster → Raster Calculator, calculate ("NIR@1" - "Red@1") / ("NIR@1" + "Red@1") with your actual layer names. Exclude NoData and cells with a zero denominator. Save the numeric output as ndvi.tif, then follow the numeric-index route above. |
| Zone polygons with approved rates and units | Open the zones in QGIS as a GeoJSON or shapefile. Confirm one outer field polygon, inspect the attribute table, and compare the zones with the imagery. Resolve overlaps, clip to the treatment boundary, and use the name field to identify the rate zones. Export the field and zone layers separately in WGS 84, and carry the original rate table and units into the PIX4Dfields import. |
| A rate or class GeoTIFF | Check the numeric band, units, rate legend, and the meaning of NoData and zero. In QGIS, clip the raster and use Reclassify by table to turn the approved rates or classes into integer zone IDs before polygonizing and exporting. Keep the ID-to-rate table. For spot treatment, keep confirmed no-application cells out of the treated zones. |
| RGB orthomosaic, PDF or coloured preview | A georeferenced RGB map can serve as the base map for drawing approved zones manually. For numeric NDVI, request the original index or the calibrated red and near-infrared bands. Ask for a georeferenced source if all you have is a screenshot or PDF. |

Open the GeoTIFFs in QGIS and draw the boundary
- Drag both TIFFs into QGIS, or use Layer → Add Layer → Add Raster Layer → Add. In Layers, keep the RGB map below the NDVI layer. Turn either layer off to compare them.
- Double-click the NDVI layer and open Information. Check the CRS, extent and band count. Select the layer and click Identify Features (the blue information icon), then click within the mapped crop. Observe the decimal index value. In Transparency, check the source’s NoData setting before classifying the raster. Treat zero as a valid index value unless your source explicitly marks zero as NoData.
- To colour the index, use Properties → Symbology → Singleband pseudocolor. Apply a colour ramp. The ramp changes what you see while the band values stay the same.


4. Switch on the RGB map for tracing. Choose Layer → Create Layer → New GeoPackage Layer. Save it as Field boundary, choose Polygon, and use the map’s known CRS. Select the new layer and click Toggle Editing → Add Polygon Feature. Click the perimeter vertices, right-click to finish the shape, then click Save Layer Edits. Use one closed polygon per XAG operation. Follow the actual treatment edge and plan exclusions and obstacles separately.

Clip the NDVI and create three zones
- Open Processing → Toolbox and search for Warp (reproject). Select the NDVI TIFF, pick the local projected CRS in metres, use Nearest neighbour, and set the target resolution to 5 and output NoData to −9999. Save ndvi-5m.tif. The example uses UTM zone 17N (EPSG:32617). Choose the correct zone for your field.
- Search for Clip raster by mask layer. Set Input layer to ndvi-5m.tif and Mask layer to Field boundary. Enable Crop to cutline and Keep resolution of input raster. Keep NoData at −9999. Save ndvi-field.tif.

3. Search for Reclassify by table. Choose ndvi-field.tif, Band 1. Open the reclassification table using the ellipsis beside it. Enter the three example rows below and choose min ≤ value < max. Enable Use NoData when no range matches value, set output NoData to 0, and choose Byte. Save ndvi-zones.tif. In Symbology, use Paletted/Unique values → Classify to show the classes.
| Minimum | Maximum | New value |
|---|---|---|
| −1.00 | 0.55 | 1 |
| 0.55 | 0.80 | 2 |
| 0.80 | 1.01 | 3 |
The thresholds illustrate the tool. Choose thresholds after checking the mapped crop and scouting the field. NDVI describes canopy reflectance and can vary with growth stage, stress, bare ground, or other conditions. Assign a rate only when the crop, field observations, and agronomic plan support it. Keep unmapped areas unassigned and review thin strips against the final 5 m grid. QGIS raster processing tools

Export the QGIS boundary and zones
This section starts with the classified ndvi-zones.tif and the separate Field boundary polygon. You’ll save two files. field-boundary.geojson holds the outer perimeter. ndvi-zones.geojson holds the named polygons inside it.
Turn the classified pixels into polygons
1. Polygonize the zone raster. In Processing → Toolbox, search for Polygonize (raster to vector). Choose ndvi-zones.tif as the Input layer and Band 1 as the band. Type zone_id into Name of the field to create. Under Vectorized, click the ellipsis, choose Save to File… and save zone-polygons.gpkg. Click Run. Each group of connected cells with the same value becomes a polygon carrying that value in the new zone_id column.

2. Check the new column. Right-click zone-polygons in Layers and choose Open Attribute Table. Look for the zone_id column. Multiple rows can share a zone ID because separate patches become separate polygons at this stage.

Keep, group and clip the treatment zones
3. Keep the three classes. Search for Extract by expression in the Processing Toolbox. Set Input layer to zone-polygons. Paste this into Expression, leave Non-matching set to Skip output, and click Run. Use the Matching features output in the next step.
"zone_id" IN (1, 2, 3)
Read it as “keep a polygon if its zone ID is 1, 2 or 3.” The double quotes identify the column. IN checks whether each row’s value appears in the list. A polygon with zone ID 2 is kept. A polygon with 0, a missing ID or a different number is omitted. The numbers refer to the classes made during reclassification.

4. Group polygons by zone ID. Open Dissolve, select the Matching features layer, and click the ellipsis beside Dissolve field(s). Tick zone_id and confirm. Keep Keep disjoint features separate off if you want one record per zone ID. Click Run. Separate patches can stay separate on the map while sharing a single row for their zone.

5. Trim the vector edges. In the toolbox, search for Clip under Vector overlay. Choose Dissolved as the Input layer and Field boundary as the Overlay layer. Click Run. This trims zone shapes that stick out past the field boundary along the edges of raster cells.

Give the zones names
6. Create a text field. In Processing → Toolbox, open Field calculator. Use the Clipped layer as the Input layer. Set Field name to name and Result field type to Text (string). Enter this in Formula, then click Run.
'NDVI zone ' || to_string("zone_id")
The single quotes enclose the text you want to see, including the space after zone. The two vertical bars || join strings. to_string turns the numeric zone_id into text so QGIS can join it to the label. For a row with zone ID 2, the result is NDVI zone 2. PIX4Dfields can read a polygon’s name field when it imports annotations. QGIS expressions · PIX4Dfields annotation import

7. Verify the labels. Open the calculator output’s attribute table. Compare zone_id with name. In this example, expect one row for each of NDVI zone 1, NDVI zone 2 and NDVI zone 3. The row order can vary. The labels identify the zones in PIX4Dfields. Use the approved rate table when you assign rates.

Save each layer as WGS 84 GeoJSON
8. Set the CRS for the saved file. Right-click the Field boundary layer in the Layers panel and choose Export → Save Features As…. Find CRS in the save dialog. Select EPSG:4326 – WGS 84 from the dropdown. If it’s absent, click the globe beside the dropdown, search for 4326, select WGS 84 and confirm. This converts the coordinates in the exported copy to the common latitude and longitude reference. You can still work in a projected CRS such as UTM in the QGIS project. QGIS vector layer export

9. Save the outer boundary. In the same dialog, choose GeoJSON in Format. GeoJSON is a file format that carries polygon geometry and attributes. The Format control chooses how QGIS writes the file. The CRS control chooses how it expresses the coordinates inside the file. Click the ellipsis beside File name, choose your working folder, and save as field-boundary.geojson. Leave Save only selected features unchecked for a full-layer export. Click OK.

10. Save the named zone polygons. Right-click the Field calculator output in Layers. Choose Export → Save Features As… again. Choose GeoJSON and EPSG:4326 – WGS 84. Save a different file named ndvi-zones.geojson and click OK. Open the two exports together in QGIS and check that the perimeter is a single field polygon and the named zones fit inside it. Keep the TIFF for comparison. Use the two GeoJSON files in the PIX4Dfields handoff.

Use those exports to assign rates and export in PIX4Dfields, or use them as inputs to build a native XAG JSON.
With a boundary and approved zones on the computer, import them into PIX4Dfields. If drawing from an RGB orthomosaic, import it as the base map, choose Operation → Do not pre-fill grid cells, and use the brush to paint only the independently approved zones. Then assign the rates and save the XAG files. If your provider already supplies an XAG-compatible KML and JSON pair, go directly to XAG One upload.
Check that the boundary and imagery line up before using the layer values. A class ID can refer to a rate in a separate table. The provider’s legend should explain which fields are rates, what units they use, and how excluded areas are marked. QGIS raster alignment · QGIS Raster Calculator · PIX4Dfields Targeted Operation
Some platforms export the XAG package directly. For example, Agremo documents creating a field, generating a VRA map in Ag Tools with 5 m tiles and up to three zones, then exporting an XAG folder containing the KML and JSON. Use the two files from the same operation and continue to XAG One upload. Agremo XAG export
Route 2. Process and zone entirely in PIX4Dfields
Build the NDVI layer
- Click New Project → Folder, select the folder with the original multispectral flight images and click Open. If the camera captured both multispectral and RGB imagery, choose the multispectral TIFFs for NDVI. Click Start processing. If you already have a PIX4Dfields orthomosaic with calibrated red and near-infrared bands, open that project and select the orthomosaic.

2. Open Boundaries → Draw boundary → Boundary and trace the field. If the boundary already exists, choose Import shape → Boundary and load the field geometry. Add any obstacles separately. To trim the source map, select the boundary and choose Use to trim, then select the orthomosaic.
3. Click Index above Layers. In Index Generator, select the multispectral orthomosaic or its trimmed copy as the source, check NDVI and click Generate. Inspect the generated layer against the source imagery. PIX4Dfields multispectral processing · Index Generator

Turn NDVI into a Targeted Operation
- Click Operation → Zonation (pre-fill grid with an index layer). Choose the NDVI layer as the zonation base. Select one treatment boundary and the relevant obstacles. Set the operation name, units and grid. The exported XAG map uses 5 m cells, so check any fine features at that scale.
- In Zonation settings, set Number of zones to three or fewer for XAG. Choose Manual intervals to enter approved NDVI breaks. Check the visible histogram range and grid exclusions so suitable areas don’t disappear from the result. Click Preview and review the map and coverage of each zone. When it matches the plan, click Create operation layer.
- In the Operation panel, confirm the units and enter each approved rate. Edit the zones and mark exclusions if needed. Continue to assign rates and export the XAG files, then upload and verify in XAG One. PIX4Dfields zonation settings

Build and export the XAG package
Import QGIS boundaries and zones into PIX4Dfields
- In PIX4Dfields, open a project and choose Import → Import GeoTIFF. Import the matching RGB orthomosaic as the base map. Open Boundaries → Import shape → Boundary and choose field-boundary.geojson.
- Select the base layer and open Annotations → Import geometry or images → Geometry files. Choose ndvi-zones.geojson. Confirm the three named annotations and check that they align with the field boundary and the RGB map.

3. Open Operation → Use existing annotations to pre-fill the grid. Select the RGB base layer, field boundary and zone annotations.
Assign rates and export the XAG files
- Under Operation, use the settings gear to select the units and enter the approved numeric rate for each zone. For a water-only planning demo, the three entries might read 20, 30 and 40 L/ha. These values illustrate the fields to fill in. For an actual job, enter the approved rates and confirm that rate colours line up with the intended zones. Leave unmapped or excluded cells without a rate and check that obstacles are marked.

2. Click Export → Operations. Select the operation, then choose Operation for XAG → XAG VRA mission → Continue. Review how holes are handled and click Export. Choose a folder on your computer and confirm it contains a KML and JSON for the same operation. The KML carries the boundary. The JSON carries the prescription that XAG One reads.

PIX4D documents one boundary per VRA export, a 33 ha maximum and up to three rate tiers, with a 5 m × 5 m output grid. The QGIS GeoJSON files are the inputs to the PIX4Dfields operation. Upload the PIX4Dfields KML and XAG JSON in the next steps. PIX4Dfields layer import · Targeted Operation setup · XAG VRA export
Convert QGIS zones using the XAG protocol
If you are writing your own exporter, start with the boundary and zone GeoJSON from QGIS and follow section III of the XAG Prescription Map Protocol v1.0.2. The protocol describes a grid with application rates. Each GeoJSON polygon supplies the geometry you rasterize into the grid.
- Build the grid. Use a metre-based projected coordinate system to rasterize the zone IDs at 5 m × 5 m. Use an unrotated grid and calculate its southwest and northeast corners in WGS 84. Write those values to
originLng,originLat,originEndLngandoriginEndLatin longitude, latitude order. Write the grid dimensions torowsandcolumns, withrotationset to0andcellSizeset to5. - Encode the application rates. Use
dataType: 3for a level-based prescription. List each zone ID as a numericlevelindataTypeLeveland pair it with its numericdosage. The protocol usesworkType: 1for spraying andworkType: 2for spreading. To encode spray rates in mL/m², divide L/ha by 10. To encode spreading rates in g/m², divide kg/ha by 10. The water-only example uses 20, 30 and 40 L/ha, encoded as 2, 3 and 4 mL/m². Use the approved rate table for a production job. - Write the cells and field outline. Write exactly
rows × columnsinteger entries toweightData. In the verified spray example, rows were written north to south, with cells ordered west to east in each row and0marking unassigned cells. Setversionto1, generate a unique UUID forguid, and supply thesourceandnamestrings. Include the actual field outline as a closed WGS 84 polygon inborderWKT, using longitude then latitude. The protocol uses the grid’s bounding rectangle whenborderWKTis omitted. - Review the result. Save the native prescription as a
.jsonfile and open it in the XAG One preview. Compare the location of low- and high-rate patches, the field outline, the unassigned cells and each displayed rate against the QGIS zones and rate table. The verified test used a 43-row by 9-column grid for a single field. XAG displayed 4.4, 6.6 and 8.8 Imperial gal/ha for the three test rates under that account’s unit settings.

Upload and verify in XAG One
Upload the KML boundary
Use these steps when the exporter provides a companion KML and the field needs to be imported separately.
- Sign in to the XAG One Management Platform using the same regional account as the XAG One app. Choose the individual or organization workspace that owns the field.
- Open Import → Import field. Click Upload and choose Field if the submenu appears. Select the KML.
- When the file shows To be imported, open View if available and check the geometry. Click the row’s Import action. In an organization workspace, select the operator’s team if prompted and confirm.


To be imported means the file is staged in the web portal. Open View to confirm the field count, outline and area, then click Import App.
If the dialog says No team, the boundary has reached the assignment step. For a field that belongs in your personal account, open the profile icon at the bottom left, then choose Switch Organization → Individual User. Go back to Import field. Upload the KML again if it only appears in the organization list, then choose View → Import App → Import. For a shared field, stay in the organization that owns it and select a team you can access. XAG One field importer

Wait for the field preview to show Imported successfully. Return to the list and check the destination. The test KML showed XAG One App — Imported successfully. (Personal). Open the signed-in XAG One app to verify the field appears on the device you’ll use.

Upload the prescription JSON and send it to the app
- Open Import → Import prescription map and click Upload. Choose the native JSON from the XAG VRA export or the XAG protocol conversion above.
- Click View next to the uploaded file. Check the outline, zone pattern, rate legend and units against the original prescription. Give each revision a distinct name so the operator can identify it in the app.
- In the preview, click Import App. To send the map to your personal account, choose Individual and click OK. For a shared job, select the receiving team when prompted. If a field picker appears, select the matching field. The verified Individual import with an embedded outline prompted for the destination only.
- Look for Imported into the app successfully. Click Exit and confirm the row’s status is Imported successfully. Then allow 3–10 minutes for the map to sync to the mobile app and remote controller before checking it on each device.

Resolve a file that fails to parse


A file can appear as To be imported while its Action column says Failed to parse. Read the Action column first. The example file was a valid WGS 84 GeoJSON with three zone geometries and no application rates. A second upload used the exact same file contents with a .json extension. Both entries failed to parse. The extension passed through to the upload list, but changing it left the contents as GeoJSON.

The same QGIS zones imported successfully after conversion to the native XAG grid and rate format. To generate a compatible file, use the XAG VRA mission export in PIX4Dfields or follow the XAG protocol conversion. If a native file fails, check the field outline, coordinate system, supported area, rates and grid dimensions before re-exporting. Click Operation Video in the importer for XAG’s assignment walkthrough. XAG One prescription importer · PIX4Dfields XAG export instructions
Verify the prescription in the XAG One app
The prescription may take 3–10 minutes to appear on your phone and remote controller after the web portal reports a successful import. Keep both devices online and signed in to the same XAG One account and workspace you used to import the map. If the map is still missing after 10 minutes, reopen the field, refresh the field list if the option is available, and confirm the portal’s import destination matches the account or team on the device.
On your phone
- In XAG One, select the field from the map or field list. In the field panel, tap Prescription Map. Tap the imported prescription by name to open the coloured grid and its rate legend.

2. From the preview, tap Edit Prescription Map → Settings to inspect the Application Type and rate units. The phone recording shows the water test under Spray with three Spray Volume values in gal/ha.

On the XAG remote controller
- Open XAG One on the controller. From the upper-left menu, open the Field list and select the same field. Tap the field’s Prescription Map tab, then open the synced map by name.

2. Compare the outline, coloured cells and legend with the source prescription. To inspect the rates in detail, tap Edit → Settings. The controller showed the same water-test map in gal/acre, while the phone was set to gal/ha. Check the unit labels before comparing the numbers.

Before starting a job, confirm the chosen prescription, application type, rates and units, excluded areas and planned route. For RevoSpray, select the imported map in Spraying Settings → Default → Prescription Map where that menu is available. For RevoCast, confirm prescription mode is available with the installed spreader and calibrate it for the material you’ll use. Menu labels can vary with the app version and equipment. The recordings verify sync and preview on both devices for the spray test. XAG One for iOS in Canada · PIX4Dfields XAG app steps
Can a software provider use the XAG API?
XAG’s Open Platform documents prescription-create under Agricultural Drone → Issue prescription image task. The developer route requires authorized device access and encoded protobuf data, a WebP image and field geometry. Use the XAG One portal for operator imports. Confirm Canadian API availability and device support with XAG before planning an integration. XAG Open Platform documentation




