Skip to content

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.

License

Notifications You must be signed in to change notification settings

fuzailpalnak/gtkit

Repository files navigation

GTKit - GIS Toolkit

Downloads

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

  1. Create conda env
conda env create --name gtkit --file=env.yml
conda activate gtkit
  1. Run:
pip install gtkit

Usage

Import GTKit in your Python script or notebook:

import gtkit

GTKit's modular structure allows you to import specific functionalities as needed for your project.

Examples

A. Generate Bitmap From Shp.
Generate Shp From Bitmap.
alt text
B. Generate mesh around a line string. alt text
C. Some geometry Operations. alt text

Stitch And Split Geo Reference Image

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.

About

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.

Topics

Resources

License

Stars

Watchers

Forks