This repository contains two Python scripts designed for processing shapefiles:
- Polygon Splitter: This script splits polygons with a vertex count greater than or equal to 500 while retaining their properties in the output file.
- Polygon Simplifier: This script simplifies geometries in a shapefile by reducing the vertex count of polygons while preserving their shape using Ramer-Douglas-Peucker algorithm.
Both scripts leverage the powerful geopandas
library, along with shapely
for geometric operations and tqdm
for progress visualization.
To run these scripts, you need an Anaconda or Miniconda environment with the following dependencies:
- Python 3.9
- GDAL
- Shapely
- TQDM
- GeoPandas
-
Install Anaconda/Miniconda: If you haven't installed Anaconda or Miniconda, download and install it from the official website.
-
Create a New Conda Environment: Open a terminal or Anaconda Prompt and create a new conda environment:
conda create -n geospatial_tools python=3.9 gdal geopandas shapely tqdm
-
Activate the Conda Environment:
conda activate geospatial_tools
- You can customize this template further based on your project's specific details or additional instructions you might want to include.
Let me know if you need any further modifications or additional sections!