A tool built to verify geospatial data by identifying common errors like topology inconsistencies, coordinate system discrepancies, and missing information. It can automate validation processes, generate detailed reports, and assist GIS professionals in maintaining accurate and reliable datasets.
-
Topology Checks
- Detect overlapping polygons, gaps, or slivers.
- Check for self-intersecting geometries.
-
Coordinate System Validation
- Verify that datasets use consistent coordinate reference systems (CRS).
- Offer automatic re-projection options.
-
Data Completeness
- Identify missing attributes or incomplete records.
- Validate attribute data types and value ranges.
-
Error Reporting
- Generate detailed reports with visualizations of detected issues.
- Provide recommendations for fixing errors.
-
Input/Output Formats
- Support for common geospatial formats including Shapefiles, GeoJSON, and others.
To install the tool, clone this repository and install the required dependencies using pip:
git clone https://github.com/daameya/Geospatial-Data-Validator.git
cd Geospatial-Data-Validator
conda env create -f environment.yml
conda activate geovalidator
To load a GeoJSON file and perform validations, use the following script:
import geopandas as gpd
from geovalidator.validators.topology import detect_overlaps, detect_gaps, detect_slivers, check_self_intersection
# Load the GeoJSON file
file_path = 'path/to/your/file.geojson'
gdf = gpd.read_file(file_path)
# Apply validation functions
overlapping_polygons = detect_overlaps(gdf)
gaps = detect_gaps(gdf)
slivers = detect_slivers(gdf, area_threshold=0.01) # Adjust area_threshold as needed
self_intersections = check_self_intersection(gdf)
# Print results
print("Overlapping Polygons:")
print(overlapping_polygons)
print("\nGaps:")
print(gaps)
print("\nSlivers:")
print(slivers)
print("\nSelf-Intersecting Geometries:")
print(self_intersections)
Geospatial-Data-Validator is distributed by daameya under the terms of the MIT License. See LICENSE in this directory for more information.