Skip to main content
Glama

merge_gpd

Combine attribute data from two shapefiles using database-style joins based on common columns, preserving geometry from the left file.

Instructions

Merges two shapefiles based on common attribute columns, This function performs a database-style join, not a spatial join. Args: left_shapefile_path: Path to the left shapefile. The geometry from this file is preserved. right_shapefile_path: Path to the right shapefile to merge. output_path: Path to save the merged output shapefile. how: Type of merge. One of 'left', 'right', 'outer', 'inner'. Defaults to 'inner'. on: Column name to join on. Must be found in both shapefiles. left_on: Column name to join on in the left shapefile. right_on: Column name to join on in the right shapefile. suffixes: Suffix to apply to overlapping column names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
shapefile1_pathYes
shapefile2_pathYes
output_pathYes

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mahdin75/gis-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server