poly-validator


Namepoly-validator JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/billyz313/Geospatial-Data-Validation-Tool
SummaryGA tool for validating geospatial data with topology checks, coordinate system validation, and more.
upload_time2024-08-08 15:03:34
maintainerNone
docs_urlNone
authorBillyZ
requires_python>=3.11
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Geospatial-Data-Validation-Tool

[![Python: 3.11](https://img.shields.io/badge/Python-3.11-blue?style=for-the-badge)](https://www.python.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)


## Overview

The Geospatial Data Validation Tool is designed to facilitate the validation and verification of geospatial datasets. This tool helps ensure the quality and consistency of geospatial data through various checks and validations. It supports common geospatial formats such as Shapefiles and GeoJSON.

## Features

1. **Topology Checks**
   - Detect overlapping polygons, gaps, or slivers.
   - Check for self-intersecting geometries.

2. **Coordinate System Validation**
   - Verify that datasets use consistent coordinate reference systems (CRS).
   - Offer automatic re-projection options.

3. **Data Completeness**
   - Identify missing attributes or incomplete records.
   - Validate attribute data types and value ranges.

4. **Error Reporting**
   - Generate detailed reports with visualizations of detected issues.
   - Provide recommendations for fixing errors.

5. **Input/Output Formats**
   - Support for common geospatial formats including Shapefiles, GeoJSON, and others.

## Installation

To install the tool, clone this repository and install the required dependencies using pip:

```bash
git clone https://github.com/yourusername/Geospatial-Data-Validation-Tool.git
cd Geospatial-Data-Validation-Tool

conda env create -f environment.yml
conda activate geovalidator

```

## Usage

### Load and Validate Geospatial Data

To load a GeoJSON file and perform validations, use the following script:

```python
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)

```

## Contact

### Software Developer

- [Billy Ashmall](https://github.com/billyz313)



## License and Distribution

Geospatial-Data-Validation-Tool is distributed by BillyZ under the terms of the {type of license you choose} License. See
[LICENSE](LICENSE) in this directory for more information.

## Privacy & Terms of Use

Geospatial-Data-Validation-Tool abides to all of BillyZ's privacy and terms of use as described
at [https://ashmall.com/Privacy-Terms-of-Use.html](https://ashmall.com/Privacy-Terms-of-Use.html).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/billyz313/Geospatial-Data-Validation-Tool",
    "name": "poly-validator",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": null,
    "author": "BillyZ",
    "author_email": "billyz313@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/79/6c/e1d0b9c8a057dad142c6f3c71d5b23263b56f2d2e3920fab95bcf9fc37b6/poly_validator-0.1.0.tar.gz",
    "platform": null,
    "description": "# Geospatial-Data-Validation-Tool\r\n\r\n[![Python: 3.11](https://img.shields.io/badge/Python-3.11-blue?style=for-the-badge)](https://www.python.org/)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)\r\n\r\n\r\n## Overview\r\n\r\nThe Geospatial Data Validation Tool is designed to facilitate the validation and verification of geospatial datasets. This tool helps ensure the quality and consistency of geospatial data through various checks and validations. It supports common geospatial formats such as Shapefiles and GeoJSON.\r\n\r\n## Features\r\n\r\n1. **Topology Checks**\r\n   - Detect overlapping polygons, gaps, or slivers.\r\n   - Check for self-intersecting geometries.\r\n\r\n2. **Coordinate System Validation**\r\n   - Verify that datasets use consistent coordinate reference systems (CRS).\r\n   - Offer automatic re-projection options.\r\n\r\n3. **Data Completeness**\r\n   - Identify missing attributes or incomplete records.\r\n   - Validate attribute data types and value ranges.\r\n\r\n4. **Error Reporting**\r\n   - Generate detailed reports with visualizations of detected issues.\r\n   - Provide recommendations for fixing errors.\r\n\r\n5. **Input/Output Formats**\r\n   - Support for common geospatial formats including Shapefiles, GeoJSON, and others.\r\n\r\n## Installation\r\n\r\nTo install the tool, clone this repository and install the required dependencies using pip:\r\n\r\n```bash\r\ngit clone https://github.com/yourusername/Geospatial-Data-Validation-Tool.git\r\ncd Geospatial-Data-Validation-Tool\r\n\r\nconda env create -f environment.yml\r\nconda activate geovalidator\r\n\r\n```\r\n\r\n## Usage\r\n\r\n### Load and Validate Geospatial Data\r\n\r\nTo load a GeoJSON file and perform validations, use the following script:\r\n\r\n```python\r\nimport geopandas as gpd\r\nfrom geovalidator.validators.topology import detect_overlaps, detect_gaps, detect_slivers, check_self_intersection\r\n\r\n# Load the GeoJSON file\r\nfile_path = 'path/to/your/file.geojson'\r\ngdf = gpd.read_file(file_path)\r\n\r\n# Apply validation functions\r\noverlapping_polygons = detect_overlaps(gdf)\r\ngaps = detect_gaps(gdf)\r\nslivers = detect_slivers(gdf, area_threshold=0.01)  # Adjust area_threshold as needed\r\nself_intersections = check_self_intersection(gdf)\r\n\r\n# Print results\r\nprint(\"Overlapping Polygons:\")\r\nprint(overlapping_polygons)\r\n\r\nprint(\"\\nGaps:\")\r\nprint(gaps)\r\n\r\nprint(\"\\nSlivers:\")\r\nprint(slivers)\r\n\r\nprint(\"\\nSelf-Intersecting Geometries:\")\r\nprint(self_intersections)\r\n\r\n```\r\n\r\n## Contact\r\n\r\n### Software Developer\r\n\r\n- [Billy Ashmall](https://github.com/billyz313)\r\n\r\n\r\n\r\n## License and Distribution\r\n\r\nGeospatial-Data-Validation-Tool is distributed by BillyZ under the terms of the {type of license you choose} License. See\r\n[LICENSE](LICENSE) in this directory for more information.\r\n\r\n## Privacy & Terms of Use\r\n\r\nGeospatial-Data-Validation-Tool abides to all of BillyZ's privacy and terms of use as described\r\nat [https://ashmall.com/Privacy-Terms-of-Use.html](https://ashmall.com/Privacy-Terms-of-Use.html).\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "GA tool for validating geospatial data with topology checks, coordinate system validation, and more.",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/billyz313/Geospatial-Data-Validation-Tool"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "abf38b097e73186d389811c47fa215b2da70bece57dcba327e9220a56bdf2074",
                "md5": "f8b24f64a7d4c509d454e8cec3702705",
                "sha256": "a3aa9c734ac5acdcc9bb51245ab02dc1ee38776f26847e84c7363b263c0bba7b"
            },
            "downloads": -1,
            "filename": "poly_validator-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f8b24f64a7d4c509d454e8cec3702705",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 8103,
            "upload_time": "2024-08-08T15:03:33",
            "upload_time_iso_8601": "2024-08-08T15:03:33.629633Z",
            "url": "https://files.pythonhosted.org/packages/ab/f3/8b097e73186d389811c47fa215b2da70bece57dcba327e9220a56bdf2074/poly_validator-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "796ce1d0b9c8a057dad142c6f3c71d5b23263b56f2d2e3920fab95bcf9fc37b6",
                "md5": "48836fdc321f9604c52b129f2f85e2cf",
                "sha256": "8d154c60af85865a7d95b95e5e5505c7b3f3967b05c0de6b36f0eaf324b12a8d"
            },
            "downloads": -1,
            "filename": "poly_validator-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "48836fdc321f9604c52b129f2f85e2cf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 6083,
            "upload_time": "2024-08-08T15:03:34",
            "upload_time_iso_8601": "2024-08-08T15:03:34.702931Z",
            "url": "https://files.pythonhosted.org/packages/79/6c/e1d0b9c8a057dad142c6f3c71d5b23263b56f2d2e3920fab95bcf9fc37b6/poly_validator-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-08 15:03:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "billyz313",
    "github_project": "Geospatial-Data-Validation-Tool",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "poly-validator"
}
        
Elapsed time: 0.32335s