Visualizing Agricultural Field Boundary Dataset - Fields of The World
Fields of The World (FTW) is a comprehensive benchmark dataset designed to enhance the development of machine learning models for instance segmentation of agricultural field boundaries. It aggregates and harmonizes a number of open datasets into 1.6 million parcel boundaries and over 70,000 samples covering diverse agricultural landscapes across 4 continents and 24 countries.
For more information about Fields of The World, please visit: https://fieldsofthe.world
Uncomment the following line to install leafmap if needed.
In [1]:
Copied!
# %pip install "leafmap[maplibre]"
# %pip install "leafmap[maplibre]"
In [2]:
Copied!
import leafmap.maplibregl as leafmap
import leafmap.maplibregl as leafmap
In [3]:
Copied!
url = "https://data.source.coop/kerner-lab/fields-of-the-world/ftw-sources.pmtiles"
metadata = leafmap.pmtiles_metadata(url)
print(f"layer names: {metadata['layer_names']}")
print(f"bounds: {metadata['bounds']}")
url = "https://data.source.coop/kerner-lab/fields-of-the-world/ftw-sources.pmtiles"
metadata = leafmap.pmtiles_metadata(url)
print(f"layer names: {metadata['layer_names']}")
print(f"bounds: {metadata['bounds']}")
layer names: ['ftw-sources'] bounds: [-46.3979962, -34.3992236, 109.0434154, 62.8408051]
In [4]:
Copied!
m = leafmap.Map()
url = "https://data.source.coop/kerner-lab/fields-of-the-world/ftw-sources.pmtiles"
style = {
"layers": [
{
"id": "Field Polygon",
"source": "example_source",
"source-layer": "ftw-sources",
"type": "fill",
"paint": {
"fill-color": "#ffff00",
"fill-opacity": 0.2,
},
},
{
"id": "Field Outline",
"source": "example_source",
"source-layer": "ftw-sources",
"type": "line",
"paint": {"line-color": "#ff0000", "line-width": 1, "line-opacity": 1},
},
],
}
m.add_basemap("Satellite")
m.add_pmtiles(url, style=style, name="FTW", zoom_to_layer=False)
m.add_layer_control()
m
m = leafmap.Map()
url = "https://data.source.coop/kerner-lab/fields-of-the-world/ftw-sources.pmtiles"
style = {
"layers": [
{
"id": "Field Polygon",
"source": "example_source",
"source-layer": "ftw-sources",
"type": "fill",
"paint": {
"fill-color": "#ffff00",
"fill-opacity": 0.2,
},
},
{
"id": "Field Outline",
"source": "example_source",
"source-layer": "ftw-sources",
"type": "line",
"paint": {"line-color": "#ff0000", "line-width": 1, "line-opacity": 1},
},
],
}
m.add_basemap("Satellite")
m.add_pmtiles(url, style=style, name="FTW", zoom_to_layer=False)
m.add_layer_control()
m
In [5]:
Copied!
m.layer_interact()
m.layer_interact()