# GTKit - GIS Toolkit
[![Downloads](https://static.pepy.tech/badge/gtkit)](https://pepy.tech/project/gtkit)
GTKit (GIS Toolkit) is a library designed to streamline GIS
(Geographic Information System) releated tasks.
Whether it is geometry, GeoDataFrames, images, or mathematical operations,
GTKit provides a set of commonly used methods and operations to simplify your workflow.
This utility has been curated to include some of the regularly used methods and operations that I, frequently employ.
## Features
GTKit offers a range of functionalities to assist you in working with GIS data effectively:
- **Geometry Operations**: Perform various geometry-based operations such as splitting a LineString, line referencing,
interpolation, extrapolation
- **GeoDataFrame Manipulation**
- **Image Processing**: Convert images to geometries, Generate Geometries from binary geo referenced mask
- **Mesh Creation**: Create Mesh either using images or using LineString.
## Installation with pip
External dependencies
- *_Geopandas - [installation](https://anaconda.org/conda-forge/geopandas)_*
- *_Rasterio - [installation](https://anaconda.org/conda-forge/rasterio)_*
- *_GDAL - [installation](https://anaconda.org/conda-forge/gdal)_*
- *_Fiona - [installation](https://anaconda.org/conda-forge/fiona)_*
- *_Shapely - [installation](https://anaconda.org/conda-forge/shapely)_*
1. Create conda env
```bash
conda env create --name gtkit --file=env.yml
conda activate gtkit
```
2. Run:
```bash
pip install gtkit
```
## Usage
Import GTKit in your Python script or notebook:
```python
import gtkit
```
GTKit's modular structure allows you to import specific functionalities as needed for your project.
### Examples
<table>
<tr>
<th>A.</th>
<td>
<a href="tutorials/shpToBitmap.ipynb">Generate Bitmap From Shp</a>.</br>
<a href="tutorials/bitmapToShp.ipynb">Generate Shp From Bitmap</a>.
</td>
<td>
<img src="https://github.com/fuzailpalnak/gtkit/assets/24665570/880d07c9-3d77-448a-99a7-9fd1b6d873fb" alt="alt text" width="256" height="256">
</td>
</tr>
<tr>
<th>B.</th>
<td>
<a href="tutorials/shp2Mesh.ipynb">Generate mesh around a line string</a>.
</td>
<td>
<img src="https://github.com/fuzailpalnak/gtkit/assets/24665570/050e2df5-79c3-4d65-ad8a-d19d0ee9feb8" alt="alt text" width="256" height="256">
</td>
</tr>
<tr>
<th>C.</th>
<td>
<a href="tutorials/lineOps.ipynb">Some geometry Operations</a>.
</td>
<td>
<img src="https://github.com/fuzailpalnak/gtkit/assets/24665570/4b1ff8ae-6e62-4d92-b7fa-694591ea05f9" alt="alt text" width="256" height="256">
</td>
</tr>
</table>
### Stitch And Split Geo Reference Image
```python
import numpy as np
from gtkit.imgops import georead, geowrite
from gtkit.imgops import StitchNSplitGeo
sns = StitchNSplitGeo(split_size=(256, 256, 3), img_size=(1500, 1500, 3))
image = georead(r"22978945_15.tiff")
stitched_image = np.zeros((1500, 1500, 3))
for win_number, window in sns:
split_image, meta = sns.split(image, window)
# ....Processing on image
stitched_image = sns.stitch(split_image, stitched_image, window)
geowrite(
save_path=r"new.tiff",
image=stitched_image,
transform=image.transform,
crs=image.crs,
)
```
## Documentation
For detailed information on available methods, classes, and their usage, refer to the [GTKit Documentation](https://gtkit.readthedocs.io).
[comment]: <> (## Contributing)
[comment]: <> (We welcome contributions from the GIS community! If you'd like to contribute to GTKit, please refer to our [Contribution Guidelines](https://gtkit-docs.example.com/contributing) for more information.)
[comment]: <> (## License)
[comment]: <> (GTKit is released under the [MIT License](https://opensource.org/licenses/MIT).)
[comment]: <> (## Contact)
[comment]: <> (Have questions or suggestions? Feel free to contact us at `contact@example.com`.)
Raw data
{
"_id": null,
"home_page": "https://github.com/fuzailpalnak/gtkit",
"name": "gtkit",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "Gis utils,Gis Operations,Raster Operations,Geometry Operations",
"author": "Fuzail Palnak",
"author_email": "fuzailpalnak@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/8c/12/738561ecf85e486f24875cf0231130beeab1aa4a2c9a4f895ba8710289d8/gtkit-0.1.1.tar.gz",
"platform": null,
"description": "\n\n# GTKit - GIS Toolkit\n[![Downloads](https://static.pepy.tech/badge/gtkit)](https://pepy.tech/project/gtkit)\n\nGTKit (GIS Toolkit) is a library designed to streamline GIS \n(Geographic Information System) releated tasks. \nWhether it is geometry, GeoDataFrames, images, or mathematical operations,\nGTKit provides a set of commonly used methods and operations to simplify your workflow.\nThis utility has been curated to include some of the regularly used methods and operations that I, frequently employ.\n\n## Features\n\nGTKit offers a range of functionalities to assist you in working with GIS data effectively:\n\n- **Geometry Operations**: Perform various geometry-based operations such as splitting a LineString, line referencing,\ninterpolation, extrapolation\n\n- **GeoDataFrame Manipulation**\n- **Image Processing**: Convert images to geometries, Generate Geometries from binary geo referenced mask\n- **Mesh Creation**: Create Mesh either using images or using LineString.\n\n## Installation with pip\n\nExternal dependencies\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\n1. Create conda env\n\n```bash\nconda env create --name gtkit --file=env.yml\nconda activate gtkit\n```\n\n2. Run:\n\n```bash\npip install gtkit\n```\n\n\n## Usage\n\nImport GTKit in your Python script or notebook:\n\n```python\nimport gtkit\n```\n\nGTKit's modular structure allows you to import specific functionalities as needed for your project.\n\n### Examples\n\n<table>\n <tr>\n <th>A.</th>\n <td>\n <a href=\"tutorials/shpToBitmap.ipynb\">Generate Bitmap From Shp</a>.</br>\n <a href=\"tutorials/bitmapToShp.ipynb\">Generate Shp From Bitmap</a>.\n </td>\n <td>\n <img src=\"https://github.com/fuzailpalnak/gtkit/assets/24665570/880d07c9-3d77-448a-99a7-9fd1b6d873fb\" alt=\"alt text\" width=\"256\" height=\"256\">\n </td>\n </tr>\n <tr>\n <th>B.</th>\n <td>\n <a href=\"tutorials/shp2Mesh.ipynb\">Generate mesh around a line string</a>.\n </td>\n <td>\n <img src=\"https://github.com/fuzailpalnak/gtkit/assets/24665570/050e2df5-79c3-4d65-ad8a-d19d0ee9feb8\" alt=\"alt text\" width=\"256\" height=\"256\">\n </td>\n </tr>\n <tr>\n <th>C.</th>\n <td>\n <a href=\"tutorials/lineOps.ipynb\">Some geometry Operations</a>.\n </td>\n <td>\n <img src=\"https://github.com/fuzailpalnak/gtkit/assets/24665570/4b1ff8ae-6e62-4d92-b7fa-694591ea05f9\" alt=\"alt text\" width=\"256\" height=\"256\">\n </td>\n </tr>\n</table>\n\n### Stitch And Split Geo Reference Image\n```python\nimport numpy as np\n\nfrom gtkit.imgops import georead, geowrite\nfrom gtkit.imgops import StitchNSplitGeo\n\nsns = StitchNSplitGeo(split_size=(256, 256, 3), img_size=(1500, 1500, 3))\nimage = georead(r\"22978945_15.tiff\")\n\nstitched_image = np.zeros((1500, 1500, 3))\nfor win_number, window in sns:\n split_image, meta = sns.split(image, window)\n # ....Processing on image\n stitched_image = sns.stitch(split_image, stitched_image, window)\n\ngeowrite(\n save_path=r\"new.tiff\",\n image=stitched_image,\n transform=image.transform,\n crs=image.crs,\n)\n```\n## Documentation\n\nFor detailed information on available methods, classes, and their usage, refer to the [GTKit Documentation](https://gtkit.readthedocs.io).\n\n[comment]: <> (## Contributing)\n\n[comment]: <> (We welcome contributions from the GIS community! If you'd like to contribute to GTKit, please refer to our [Contribution Guidelines](https://gtkit-docs.example.com/contributing) for more information.)\n\n[comment]: <> (## License)\n\n[comment]: <> (GTKit is released under the [MIT License](https://opensource.org/licenses/MIT).)\n\n[comment]: <> (## Contact)\n\n[comment]: <> (Have questions or suggestions? Feel free to contact us at `contact@example.com`.)\n\n\n\n",
"bugtrack_url": null,
"license": "",
"summary": "A library designed to streamline GIS (Geographic Information System) related tasks. Whether it is geometry, GeoDataFrames, images, or mathematical operations, GTKit provides a set of commonly used methods and operations to simplify your workflow.",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/fuzailpalnak/gtkit"
},
"split_keywords": [
"gis utils",
"gis operations",
"raster operations",
"geometry operations"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "91d76083bbc5e871b99726d26fab51b67562480247348f4da6e084a940781ac2",
"md5": "587e1f3adf5ba4fb140615db4ff68d3b",
"sha256": "b81f0497130e3bac39dfc5be1fc971f577f56b08e9beb5681630e58dabdd39bc"
},
"downloads": -1,
"filename": "gtkit-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "587e1f3adf5ba4fb140615db4ff68d3b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 25856,
"upload_time": "2024-02-15T08:36:06",
"upload_time_iso_8601": "2024-02-15T08:36:06.714580Z",
"url": "https://files.pythonhosted.org/packages/91/d7/6083bbc5e871b99726d26fab51b67562480247348f4da6e084a940781ac2/gtkit-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8c12738561ecf85e486f24875cf0231130beeab1aa4a2c9a4f895ba8710289d8",
"md5": "98d5aabf101358632edb72aafb220a14",
"sha256": "c8b97db783b6096afb8f6ecb680563cdead4f2bc1563cb081f665aa150299ec6"
},
"downloads": -1,
"filename": "gtkit-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "98d5aabf101358632edb72aafb220a14",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 25604,
"upload_time": "2024-02-15T08:36:08",
"upload_time_iso_8601": "2024-02-15T08:36:08.187294Z",
"url": "https://files.pythonhosted.org/packages/8c/12/738561ecf85e486f24875cf0231130beeab1aa4a2c9a4f895ba8710289d8/gtkit-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-15 08:36:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "fuzailpalnak",
"github_project": "gtkit",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "gtkit"
}