{"id":20489900,"url":"https://github.com/fuzailpalnak/py-gis-utility","last_synced_at":"2026-06-09T14:31:53.443Z","repository":{"id":46979658,"uuid":"349682186","full_name":"fuzailpalnak/py-gis-utility","owner":"fuzailpalnak","description":"A GIS utility library which contains some regularly required math and image operations.","archived":false,"fork":false,"pushed_at":"2023-07-26T12:52:12.000Z","size":72,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-23T17:26:05.012Z","etag":null,"topics":["geographical-information-system","geopandas","georeferenced-data","gis","gis-data","gis-utils","shapefile"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fuzailpalnak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":"fuzailpalnak","patreon":null,"open_collective":null,"ko_fi":"fuzailpalnak","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-03-20T09:34:46.000Z","updated_at":"2024-08-12T20:11:22.000Z","dependencies_parsed_at":"2024-01-16T00:43:11.949Z","dependency_job_id":null,"html_url":"https://github.com/fuzailpalnak/py-gis-utility","commit_stats":{"total_commits":59,"total_committers":1,"mean_commits":59.0,"dds":0.0,"last_synced_commit":"f1dbee2eab14db7a13666d5910b6c5f02fa3b188"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/fuzailpalnak/py-gis-utility","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuzailpalnak%2Fpy-gis-utility","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuzailpalnak%2Fpy-gis-utility/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuzailpalnak%2Fpy-gis-utility/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuzailpalnak%2Fpy-gis-utility/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fuzailpalnak","download_url":"https://codeload.github.com/fuzailpalnak/py-gis-utility/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuzailpalnak%2Fpy-gis-utility/sbom","scorecard":{"id":414975,"data":{"date":"2025-08-11","repo":{"name":"github.com/fuzailpalnak/py-gis-utility","commit":"f1dbee2eab14db7a13666d5910b6c5f02fa3b188"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/python-publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/17 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/fuzailpalnak/py-gis-utility/python-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/fuzailpalnak/py-gis-utility/python-publish.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:27","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:28","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-qr4w-53vh-m672","Warn: Project is vulnerable to: PYSEC-2023-183","Warn: Project is vulnerable to: PYSEC-2023-102","Warn: Project is vulnerable to: PYSEC-2023-114"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T23:35:49.692Z","repository_id":46979658,"created_at":"2025-08-18T23:35:49.693Z","updated_at":"2025-08-18T23:35:49.693Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34112225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["geographical-information-system","geopandas","georeferenced-data","gis","gis-data","gis-utils","shapefile"],"created_at":"2024-11-15T17:14:44.389Z","updated_at":"2026-06-09T14:31:53.405Z","avatar_url":"https://github.com/fuzailpalnak.png","language":"Python","funding_links":["https://github.com/sponsors/fuzailpalnak","https://ko-fi.com/fuzailpalnak","https://ko-fi.com/fuzailpalnak'"],"categories":[],"sub_categories":[],"readme":"# py-gis-utility\n\nA GIS utility library which contains some regularly required math and image operations.\n\n[![Downloads](https://pepy.tech/badge/py-gis-utility)](https://pepy.tech/project/py-gis-utility)\n\n## Installation\n    \n    pip install py-gis-utility\n    \n    \n## Requirements\n\n- *_Geopandas - [installation](https://anaconda.org/conda-forge/geopandas)_*\n- *_Rasterio - [installation](https://anaconda.org/conda-forge/rasterio)_*\n- *_GDAL - [installation](https://anaconda.org/conda-forge/gdal)_*\n- *_Fiona -  [installation](https://anaconda.org/conda-forge/fiona)_*\n- *_Shapely -  [installation](https://anaconda.org/conda-forge/shapely)_*\n\n## Math Operations\n \n1. Get perpendicular point with reference to start and end point of the segment \n2. Get perpendicular distance from point to line_segment\n3. Given a Point find a new point at an given 'angle' with given 'distance'\n4. Calculate a new point on the line segment given the distance from the start\n5. Euclidean computation\n\n## Image Operations\n### Save Multi Band Imagery\n```python\nimport numpy as np\nfrom affine import Affine\nfrom py_gis_utility.image_func import save_16bit_multi_band, save_8bit_multi_band\n\nimage = np.zeros((512, 512, 6))\ntransform = Affine(1.0, 0.0, 3422098.682455578,\n       0.0, -1.0, 5289611.291479621)\n\n# Save 8bit\nsave_8bit_multi_band(image, transform, 26910, r\"8bit.tiff\")\n\n# Save 16bit\nsave_16bit_multi_band(image, transform, 26910, r\"16bit.tiff\")\n\n```\n\n### Generate bitmap from shape file\n\n![Animation](https://user-images.githubusercontent.com/24665570/132937989-0a77de62-2c55-4369-a155-35326b21c82d.gif)\n\n```python\nfrom py_gis_utility.helper import (\n    read_data_frame,\n    save_image_with_geo_transform,\n)\nfrom py_gis_utility.image_func import shape_geometry_to_bitmap_from_data_frame_generator\n\ndata_frame = read_data_frame(r\"path_to_geometry_file\")\nbitmap_gen = shape_geometry_to_bitmap_from_data_frame_generator(data_frame, (50, 50), (1, 1),\n allow_output_to_overlap=True)\n\nfor i, bitmap in enumerate(bitmap_gen):\n    save_image_with_geo_transform(f\"{i}.tiff\", bitmap.array, bitmap.transform)\n```\n\n### Generate shape geometry from geo reference bitmap\n\n```python\n\nfrom py_gis_utility.helper import (read_image_with_geo_transform,\n)\nfrom py_gis_utility.image_func import image_obj_to_coordinates_generator, image_obj_to_shape_generator\n\n\nimg_obj = read_image_with_geo_transform(r\"path_to_geo_referenced_file\")\n\n# output in format {'geometry': \u003cshapely.geometry.polygon.Polygon object at 0x0000022009E5EC08\u003e, 'properties': {'id': 255.0, 'crs': CRS.from_epsg(4326)}}\nshape_gen = image_obj_to_shape_generator(img_obj)\nfor g in shape_gen:\n    print(g)\n\n# output in format {'geometry': {'type': 'Polygon', 'coordinates': [[(621000.0, 3349500.0), .... ,(621000.0, 3349489.5)]]}, 'properties': {'id': 255.0, 'crs': CRS.from_epsg(4326)}}\nco_ord_gen = image_obj_to_coordinates_generator(img_obj)\nfor g in co_ord_gen:\n    print(g)\n```\n\n## Support Me\n\n\u003ca href='https://ko-fi.com/fuzailpalnak' target='_blank'\u003e\u003cimg height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi1.png?v=0' border='0' alt='Buy Me a Coffee at ko-fi.com' /\u003e\u003c/a\u003e\n\n\n\n        \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuzailpalnak%2Fpy-gis-utility","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuzailpalnak%2Fpy-gis-utility","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuzailpalnak%2Fpy-gis-utility/lists"}