A Python package for segmenting geospatial data with the Segment Anything Model (SAM)
Expert Video Review by SEOGANT · March 2026
segment-geospatial is a Python package that brings Meta's Segment Anything Model (SAM) to geospatial data analysis, enabling automatic segmentation of satellite imagery, aerial photography, LiDAR data, and other geographic datasets without requiring manual boundary annotation.
The package adapts SAM's zero-shot segmentation capabilities to the specific challenges of geospatial data large image tiles, geographic coordinate systems, multi-band imagery providing utilities that handle the translation between geographic and pixel coordinates while preserving spatial reference information in outputs.
The tool supports multiple SAM variants including the original SAM, SAM2, and LangSAM (which adds text-prompt-based segmentation for identifying specific geographic features by name), and integrates with the geospatial Python ecosystem including rasterio, geopandas, leafmap, and GDAL.
Output segmentation masks are exportable as shapefiles, GeoJSON, and GeoTIFF formats compatible with GIS platforms including QGIS, ArcGIS, and cloud-based geospatial analysis services.
segment-geospatial is open-source under the MIT license and maintained by Qiusheng Wu, a professor specializing in geospatial machine learning at the University of Tennessee.
It is used in remote sensing research, land cover mapping, infrastructure monitoring, agricultural analysis, and environmental change detection applications where manually digitizing geographic features across large image extents is prohibitively time-consuming and automated segmentation provides a practical path to scalable analysis.
Get implementation playbooks for tools like segment geospatial in guided Academy lessons. Start free, then unlock the full library with Learner.
Open Academy →Pricing details on provider page.
Comments (0)
Sign in to join the discussion.