Metadata-Version: 2.5
Name: gipy-gis
Version: 0.0.9
Summary: a Python package for GIS and spatial data processing.
Author-email: "Saeed Behzadi , Ghazal Heydararabi" <behzadi.saeed@gmail.com>, Ghazal Heydararabi <harabighazal85@gmail.com>
License: MIT
License-File: license
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: GIS
Requires-Python: >=3.9
Description-Content-Type: text/markdown

<div align="center">

<img src="https://i.imgur.com/6BeUsbA.jpeg" alt="gipy logo" width="320"/>

# 🌍 gipy

### ✨ A Modern Python Toolbox for GIS and Spatial Data Processing ✨

[![PyPI version](https://img.shields.io/pypi/v/gipy-gis?color=blue&label=pypi&logo=pypi&logoColor=white&style=for-the-badge)](https://pypi.org/project/gipy-gis/)
[![Python versions](https://img.shields.io/pypi/pyversions/gipy-gis?color=green&logo=python&logoColor=white&style=for-the-badge)](https://pypi.org/project/gipy-gis/)
[![License](https://img.shields.io/pypi/l/gipy-gis?color=orange&style=for-the-badge)](https://pypi.org/project/gipy-gis/)
[![Downloads](https://img.shields.io/pypi/dm/gipy-gis?color=purple&label=downloads&style=for-the-badge)](https://pypi.org/project/gipy-gis/)
[![Status](https://img.shields.io/badge/status-active-success?style=for-the-badge)](https://pypi.org/project/gipy-gis/)
[![Platform](https://img.shields.io/badge/platform-Windows-blue?style=for-the-badge)](https://pypi.org/project/gipy-gis/)

---

**gipy** is a powerful, easy-to-use Python library for geospatial analysis, data conversion, and spatial data management.

Built on top of **SpatiaLite**, it brings the full power of GIS into your Python scripts — with a simple, clean, and Pythonic API.

---

[![Website](https://img.shields.io/badge/Website-giants.ir-00A98F?style=for-the-badge&logo=googlechrome&logoColor=white)](https://giants.ir)
[![LinkedIn](https://img.shields.io/badge/LinkedIn-GIANTS-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/company/giantsir/)

</div>

---

## 🎬 See It In Action

<div align="center">

### 🔥 From raw data to a beautiful map — in just a few lines!

</div>

```
import gipy

# 🌱 Create a new GIS project
A = gipy("my_city_analysis")

# 📥 Load your spatial data
A.AddData("stations.shp")     # 🚉 Metro stations
A.AddData("roads.shp")         # 🛣️ Road network
A.AddData("districts.shp")     # 🏙️ City districts

# 🎨 Draw a 100m buffer around each station
A.Buffer("stations", "stations_buffer", 100)

# 🗺️ Open the interactive map and add all layers
A.ShowData("districts")
A.ShowData("roads")
A.ShowData("stations_buffer")

# 🌈 Style each layer with its own color
A.Color("districts", "lightblue")
A.Color("roads", "darkorange")
A.Color("stations_buffer", "lightgreen")

# 📍 Label the districts with their names
A.Label("districts", "name", "navy", 10)

# 🎯 Highlight the busiest stations in red
A.Categorize("stations", "daily_riders",
             [(0, 1000), (1000, 5000), (5000, 100000)],
             ["green", "yellow", "red"])

# 💾 Export the result to a shapefile
A.FeatureClassToFeatureClass("stations_buffer", "buffer_output.shp")

print("🎉 Analysis complete!")
```

<div align="center">

**And that's it — a complete GIS workflow in less than 25 lines of Python!**

</div>

---

## ✨ Key Features

<div align="center">

| 🌐 **Data I/O** | 🎨 **Visualization** | 📐 **Geometry** |
|:---:|:---:|:---:|
| 📂 Shapefile (.shp) | 🗺️ Interactive map | ⭕ Buffer |
| 📂 KML / KMZ | 🎨 Layer coloring | ✂️ Clip |
| 📂 Excel (.xlsx) | 🌈 Categorize | 🔀 Intersect |
| 📂 GeoJSON | 🏷️ Label features | 🧹 Erase |
| 📂 Text files | 🔍 Zoom & pan | 💧 Dissolve |
| | 📚 Layer ordering | 🔗 Union |

| 🔄 **Transformation** | 🔍 **Spatial Queries** | 📊 **Analysis** |
|:---:|:---:|:---:|
| 🌐 Reprojection (PROJ) | 📍 Contains | 🔢 GetCount |
| 🌐 Batch project | 📍 Within | 📈 Frequency |
| 🌐 3D conversion | 📍 Crosses | 📏 Distance |
| 🌐 Coordinate systems | 📍 Touches | 📍 Near |
| 🌐 Define projection | 📍 Overlaps | ⚖️ Centroid |
| | 📍 Equals | 📊 MeanCenter |

</div>

---

## 📦 Installation

<div align="center">

```
pip install gipy-gis
```

</div>

> **✅ Requirements:** Python 3.9+ on Windows (x64)
> **📦 Dependencies:** SpatiaLite DLLs are bundled with the package — no extra setup needed!

---

## 🛠️ Built With

<div align="center">

![Python](https://img.shields.io/badge/Python-3.9+-3776AB?style=for-the-badge&logo=python&logoColor=white)
![SpatiaLite](https://img.shields.io/badge/SpatiaLite-5.x-003B57?style=for-the-badge)
![SQLite](https://img.shields.io/badge/SQLite-3-003B57?style=for-the-badge&logo=sqlite&logoColor=white)
![GEOS](https://img.shields.io/badge/GEOS-3.x-2E7D32?style=for-the-badge)
![PROJ](https://img.shields.io/badge/PROJ-9.x-1565C0?style=for-the-badge)
![Tkinter](https://img.shields.io/badge/Tkinter-GUI-FF6F00?style=for-the-badge)

</div>

---

## 📊 Supported Data Formats

<div align="center">

| Format | Read | Write | Description |
|:---:|:---:|:---:|:---|
| **SHP** | ✅ | ✅ | ESRI Shapefile |
| **KML** | ✅ | ✅ | Keyhole Markup Language |
| **KMZ** | ✅ | ✅ | Compressed KML |
| **XLSX** | ✅ | ✅ | Microsoft Excel |
| **GeoJSON** | ✅ | ✅ | JSON-based geospatial format |
| **TXT** | ✅ | ✅ | Delimited text files |

</div>

---

## 🧩 What Can You Do?

### 🗺️ Manage Spatial Data

```
A.Copy("original", "backup")
A.Rename("old_name", "new_name")
A.Delete("unwanted_table")
A.TruncateTable("empty_me")
A.ListTables("*")
A.ListFields("my_table")
```

### 📐 Perform Geometric Operations

```
A.Buffer("points", "buffered", 50)
A.Clip("input", "clip_boundary", "output")
A.Intersect(["layer1", "layer2"], "intersection")
A.Dissolve("regions", "dissolved", "province")
A.Erase("layer1", "layer2", "erased")
A.SymmetricalDifference("a", "b", "symdiff")
```

### 🔄 Reproject Coordinates

```
A.Project("wgs84_data", "utm_data", 32639)
A.DefineProjection("dataset", 4326)
A.ListSpatialReferences("*", "PCS")
```

### 🔍 Query Spatial Relationships

```
result = A.Contains("polygons", "points")
result = A.Within("cities", "countries")
result = A.Crosses("roads", "rivers")
result = A.Touches("parcels", "roads")
result = A.Overlaps("layer1", "layer2")
```

### 📊 Analyze Features

```
A.GetCount("my_table")
A.Frequency("cities", "freq_table", "province")
A.Distance("points1", "points2")
A.Near("points1", "points2")
A.Centroid("polygons")
A.MeanCenter("points", "mean_center")
```

### 📁 Import & Export

```
# 📥 Import
A.AddData("file.shp")
A.AddData("file.xlsx")
A.AddData("file.kml")

# 📤 Export
A.FeatureClassToFeatureClass("my_table", "output.shp")
A.FeatureToGeojson("my_table", "output.geojson")
A.LayerToKML("my_table", "output.kml")
A.TableToExcel("my_table", "output.xlsx")
A.TableToText("my_table", "output.txt")
```

---

## 🎯 Why Choose gipy?

<div align="center">

| 🚀 **Simple** | 🎨 **Visual** | 🔧 **Complete** |
|:---:|:---:|:---:|
| Clean Pythonic API | Built-in map viewer | Full GIS workflow |
| No complex setup | Colorful layers | From import to export |
| One-line operations | Interactive zoom | Spatial + attribute |

</div>

---

## 🌟 Highlights

<div align="center">

| | Feature |
|:---:|:---|
| 🎨 | **Beautiful interactive map** — powered by Tkinter |
| 🚀 | **Fast spatial operations** — built on SpatiaLite |
| 🌍 | **Full projection support** — thanks to PROJ |
| 📦 | **Zero setup** — DLLs bundled inside the package |
| 🐍 | **Pure Python API** — clean and readable |
| 🔧 | **Complete toolkit** — from import to export |

</div>

---

## 👥 Authors

<div align="center">

### Developed by

### 🌟 Saeed Behzadi
📧 [behzadi.saeed@gmail.com](mailto:behzadi.saeed@gmail.com)

### 🌟 Ghazal Heydararabi
📧 [harabighazal85@gmail.com](mailto:harabighazal85@gmail.com)

</div>

---

## 🔗 Connect With Us

<div align="center">

[![Website](https://img.shields.io/badge/🌐_Website-giants.ir-00A98F?style=for-the-badge)](https://giants.ir)
[![LinkedIn](https://img.shields.io/badge/💼_LinkedIn-GIANTS-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/company/giantsir/)

**Follow us for updates, tutorials, and more GIS content!**

</div>

---

## 📄 License

This project is licensed under the **MIT License** — see the `LICENSE` file for details.

---

## ⭐ Show Your Support

<div align="center">

If you find **gipy** useful, please consider:

🌟 Sharing it with others
📝 Writing about your experience
💬 Spreading the word in the GIS community

**Every bit of support means a lot!**

</div>

---

<div align="center">

**Made with 🐍 Python and 🌍 GIS love**

### Happy Mapping! 🗺️✨

</div>