Land Cover Classification
Classify land cover types in satellite imagery
Quick Start
import { geoai } from "@geobase-js/geoai";
// Initialize pipeline
const pipeline = await geoai.pipeline(
[{ task: "land-cover-classification" }],
providerParams
);
// Run classification
const result = await pipeline.inference({
inputs: { polygon: myPolygon },
postProcessingParams: { minArea: 20 },
});
console.log(
`Classified ${result.classifications.features.length} land cover areas`
);
🌍
Classifies regions into 8 land cover types: forest, agriculture, urban, water, roads, rangeland, bareland, and buildings
Parameters
Post-Processing
postProcessingParams: {
minArea: 20; // Minimum area threshold for classification polygons
}
Map Source
mapSourceParams: {
zoomLevel: 15; // 14-16 recommended for land cover analysis
}
Land Cover Classes
Class |
---|
tree |
agriculture land |
developed space |
water |
road |
rangeland |
bareland |
buildings |
Output
Returns a list of GeoJSON FeatureCollections (one for each land cover class):
{
geoRawImage : GeoRawImage, // Inference image
outPutImage : GeoRawImage, // combined masks
binaryMasks : RawImage // binary mask for each class
detections: [ // list of FeatureCollection
{
type: "FeatureCollection",
features: [
{
geometry: { /* tree polygon */ },
properties: {
class: "tree"
}
}
]
},
{
type: "FeatureCollection",
features: [
{
geometry: { /* agriculture polygon */ },
properties: {
class: "agriculture land"
}
}
]
}
// ... one FeatureCollection for each detected land cover class
]
}