How to verify geolocation information related to EUDR Due Diligence Statement- 1/5
Task 1: Check the Alignment of AOIs with Administrative Boundaries
In Step 4: Registering Basic Information About the Forest Source of my guidance for timber suppliers, I emphasize the importance of collecting comprehensive data for EUDR compliance, including geolocation information recorded by forest managers on the ground. In "Smallholders Using Google Earth to Draw Their Operation Area Map," I briefly introduced how such data collection can be conducted. Now, in this detailed article series, I will outline my approach to verifying geolocation data from five key perspectives:
This guidance involves Google Earth Engine (GEE) and QGIS, requiring some level of coding and GIS analysis. However, as data verification is typically conducted by more resourceful entities further down the supply chain, my approach ensures that no high-end computing power or advanced coding skills are needed. The methods outlined here are accessible and practical, and I will walk you through the steps with screenshots and detailed explanations, ensuring that anyone can follow along. This approach is particularly useful for companies managing bulk procurement or sourcing from multiple forest units, allowing them to efficiently verify geolocation data for numerous logging sites.
Task 1: Check the Alignment of AOIs with Administrative Boundaries
For this task, we use publicly available datasets and free tools such as QGIS and GEE to obtain administrative boundary information for an Area of Interest (AOI). We then compare this data with official documents provided by the forest unit, such as logging licenses or land tenure records, to ensure that the geolocation information corresponds accurately to legal documentation. The results can also help categorize AOIs based on their locations for further analysis in other tasks.
A similar approach can be applied to determine whether an AOI is located within or near critical areas, such as conservation zones, high conservation value areas (HCVs), or indigenous cultural landscapes, by referencing relevant boundary datasets.
Step 1. Get familiar with GEE and its user interface
Google Earth Engine (GEE) is a cloud-based platform that allows users to analyze geospatial data efficiently. To begin, visit the GEE Code Editor: https://code.earthengine.google.com/
If you don’t have an account yet, follow the on-screen instructions to register and create a project with a name of your choice. Once registered, you’ll see the GEE user interface, which consists of the following key elements:
Uploading Your Own Data as Assets
To analyze your own geolocation data, follow these steps to upload it to GEE:
Running a Script in GEE
After successfully uploading the dataset, you can now paste and edit a script in the Script Editor. Once ready, click "Run" to execute the script and analyze the data.
Debugging & Viewing Results
If there are any errors in the script, they will appear in the Console window below the editor. Use this area to troubleshoot issues and refine the script. Once the script runs successfully, you will see the results displayed on the map or in the Console, depending on your script’s output.
Step 2. Prepare your AOI data
To ensure accurate analysis, you need to properly format and upload your Area of Interest (AOI) data. You can either combine multiple AOIs into a single asset locally before uploading to Google Earth Engine (GEE) or upload each AOI separately and merge them in the script.
Option 1: Combine Multiple AOIs into a Single Asset locally
This method is ideal if you have multiple AOI files (e.g., Shapefiles, GeoJSON, KML) and want to merge them into a single dataset before uploading to GEE.
Load Multiple AOI Files
Merge AOI Layers
Convert Multipart to Singlepart
Export as a Shapefile
2. Upload to Google Earth Engine
3. Reference the Combined AOI in Your Script
Once the AOI file is uploaded to GEE, reference it in your script:
var AOIs = ee.FeatureCollection(“users/your_username/combined_AOI_asset”); // Replace with your AOI asset ID
Option 2: Add Multiple AOIs as Separate Assets on GEE
If you prefer to keep AOIs as separate assets, follow this approach.
1. Upload Each AOI Individually
?2. Merge AOIs in Your GEE Script
After uploading multiple AOIs separately, you can combine them programmatically using merge() or union().
Example Script to Merge Multiple AOIs
// Load individual AOIs from GEE assets
var AOI1 = ee.FeatureCollection("users/your_username/AOI_1");
var AOI2 = ee.FeatureCollection("users/your_username/AOI_2");
var AOI3 = ee.FeatureCollection("users/your_username/AOI_3");
// Merge all AOIs into a single FeatureCollection
var AOIs = AOI1.merge(AOI2).merge(AOI3);
Map.addLayer(AOIs, {color: 'blue'}, "Merged AOIs");
For large datasets, Option 1 (QGIS Merge) is recommended as it simplifies the number of files to manage in GEE. If flexibility is needed (e.g., adding AOIs frequently), Option 2 (GEE Merge) is a better choice.
Step 3: Prepare the Administrative Boundary Data
To align AOIs with administrative boundaries, we need reliable boundary datasets. Different sources provide varying levels of granularity, allowing us to select the most appropriate dataset for verification.
Available Data Sources
2. OpenStreetMap (OSM) – Downloadable for Finer Details.
Download Administrative Boundaries from OpenStreetMap (OSM)
1. Register and Choose an Access Plan
2. Download the Target Country’s Administrative Boundaries
3. Convert the GeoJSON Data to Shapefile (SHP) Using QGIS
Since GEE requires Shapefiles (SHP) for vector data, follow these steps to convert GeoJSON to SHP:
Step 4. Alignment
In this step, we verify whether the Areas of Interest (AOIs) intersect with the corresponding administrative boundaries. This helps ensure that geolocation information aligns with official legal documents such as logging licenses or land tenure records.
We use the .intersection() or .contains() functions in Google Earth Engine (GEE) to check alignment. The results can be printed for review, and non-aligned AOIs can be highlighted for further investigation.
Two Methods for AOI Alignment
Below are two script options for this alignment task:
You can choose the one that best fits your dataset and project needs.
// Script 1: Using Custom Assets
// Define AOI and boundary data paths
var AOIs = ee.FeatureCollection("projects/ee-malichao/assets/zzxt3"); // Replace with your AOI asset ID
var boundaryData = ee.FeatureCollection("projects/ee-malichao/assets/level7"); // Replace with your boundary asset ID
?
// Function to buffer points (50m) and handle polygons as is
var bufferAOI = function(aoi) {
? return (aoi.geometry().type() === 'Point') ? aoi.buffer(50) : aoi;
};
?
// Apply buffer if necessary
var processedAOIs = AOIs.map(bufferAOI);
?
// Add AOIs and boundaries to the map
Map.addLayer(processedAOIs, {color: 'blue'}, "Processed AOIs");
Map.addLayer(boundaryData, {color: 'green'}, "Custom Boundaries");
?
// Function to check intersection with boundaries
var checkAlignment = function(aoi) {
? // Filter boundaries that intersect the AOI
? var intersectsBoundaries = boundaryData.filterBounds(aoi.geometry());
? return aoi.set({
??? intersects: intersectsBoundaries.size().gt(0), // True if intersects
??? boundaryNames: intersectsBoundaries.aggregate_array("name").distinct() // Get unique boundary names
? });
};
?
// Map the function over all AOIs
var alignedAOIs = processedAOIs.map(checkAlignment);
?
// Print aligned AOIs to the console
print("Aligned AOIs:", alignedAOIs);
?
// Export results to Google Drive
Export.table.toDrive({
? collection: alignedAOIs,
? description: "Custom_Boundary_Alignment",
? fileFormat: "CSV"
});
?
// Highlight non-aligned AOIs on the map
var nonAlignedAOIs = alignedAOIs.filter(ee.Filter.eq('intersects', false));
Map.addLayer(nonAlignedAOIs, {color: 'red'}, "Non-Aligned AOIs");
?
// Center the map on the AOIs
Map.centerObject(processedAOIs, 6);
// Script 2: Using FAO Data
// Define AOI and FAO level
var AOIs = ee.FeatureCollection("projects/ee-malichao/assets/zzxt3"); // Replace with your AOI asset
var useFAOLevel = 2; // Set FAO level: 0 for countries, 1 for regions, 2 for districts, etc.
?
// Load FAO datasets dynamically
var FAODataset0 = ee.FeatureCollection("FAO/GAUL/2015/level0");
var FAODataset1 = ee.FeatureCollection("FAO/GAUL/2015/level1");
var FAODataset2 = ee.FeatureCollection("FAO/GAUL/2015/level2");
var FAODataset3 = ee.FeatureCollection("FAO/GAUL/2015/level3");
?
// Select the dataset for the desired level
var selectedFAODataset = useFAOLevel === 0 ? FAODataset0 :
???????????????????????? useFAOLevel === 1 ? FAODataset1 :
???????????????????????? useFAOLevel === 2 ? FAODataset2 : FAODataset3;
?
// Filter FAO dataset to the AOI extent to reduce processing
var filteredFAODataset = selectedFAODataset.filterBounds(AOIs.geometry());
print("Filtered FAO Dataset:", filteredFAODataset);
?
// Function to buffer points (50m) and handle polygons as is
var bufferAOI = function(aoi) {
? return (aoi.geometry().type() === 'Point') ? aoi.buffer(50) : aoi;
};
?
// Apply buffer if necessary
var processedAOIs = AOIs.map(bufferAOI);
?
// Add AOIs and filtered FAO boundaries to the map
Map.addLayer(processedAOIs, {color: 'blue'}, "Processed AOIs");
Map.addLayer(filteredFAODataset, {color: 'green'}, "Filtered FAO Boundaries");
?
// Function to check intersection with FAO boundaries and include higher-level names
var checkAlignment = function(aoi) {
? var intersectsLevel0 = FAODataset0.filterBounds(aoi.geometry());
? var intersectsLevel1 = FAODataset1.filterBounds(aoi.geometry());
? var intersectsLevel2 = FAODataset2.filterBounds(aoi.geometry());
? var intersectsLevel3 = FAODataset3.filterBounds(aoi.geometry());
?
? var level0Names = intersectsLevel0.aggregate_array("ADM0_NAME").distinct();
? var level1Names = intersectsLevel1.aggregate_array("ADM1_NAME").distinct();
? var level2Names = intersectsLevel2.aggregate_array("ADM2_NAME").distinct();
? var level3Names = intersectsLevel3.aggregate_array("ADM3_NAME").distinct();
?
? var allNames = ee.List([]);
? if (useFAOLevel >= 0) allNames = allNames.cat(level0Names);
? if (useFAOLevel >= 1) allNames = allNames.cat(level1Names);
? if (useFAOLevel >= 2) allNames = allNames.cat(level2Names);
? if (useFAOLevel >= 3) allNames = allNames.cat(level3Names);
?
? return aoi.set({
??? intersects: allNames.size().gt(0), // True if any intersection
??? FAONames: allNames.distinct() // Combine all names without duplication
? });
};
?
// Map the function over all AOIs
var alignedAOIs = processedAOIs.map(checkAlignment);
?
// Print aligned AOIs to the console
print("Aligned AOIs:", alignedAOIs);
?
// Export results to Google Drive
Export.table.toDrive({
? collection: alignedAOIs,
? description: "FAO_Boundary_Alignment_Hierarchical",
? fileFormat: "CSV"
});
?
// Highlight non-aligned AOIs
var nonAlignedAOIs = alignedAOIs.filter(ee.Filter.eq('intersects', false));
Map.addLayer(nonAlignedAOIs, {color: 'red'}, "Non-Aligned AOIs");
?
// Center the map on the AOIs
Map.centerObject(processedAOIs, 6);
Step 5 Accessing and Interpreting the Results
Once the alignment analysis is completed, it’s essential to review, interpret, and use the results effectively. This step will guide you through:
1. Submitting the Task in GEE
After running the script, GEE does not automatically generate a downloadable file. You must manually trigger the export by following these steps:
Steps to Submit the Task
?2. Downloading the Results from Google Drive
Once the export task is completed:
3. Understanding the Results
The CSV file contains key information about AOI alignment with administrative boundaries. For script 1, the alignment results are included under the item "boundaryName", which in Chinese say"China, Mainland China, Henan Province, Nanyang Municipality, Tongbai County".
Similarly the result from script 2 is under the item "FAONames", which in English and Chinese Phonics say “China, Henan Province and Nanyang”
4. Identifying & Troubleshooting Issues
If an AOI does not align properly, consider these troubleshooting steps:
? Check if the AOI coordinates were correctly formatted
? Verify that the correct administrative boundary dataset was used (FAO GAUL vs OSM)
? Confirm that the AOI does not fall outside mapped administrative areas
If misalignments persist, consider: