Metadata-Version: 2.1
Name: geohash-generator
Version: 0.1.0
Summary: Geohash Generator is a python module that provides function for converting geojson and shapefile to geohash.
Home-page: https://github.com/Helfi-Pangestu-Labs/geohash-generator/
Download-URL: https://github.com/Helfi-Pangestu-Labs/geohash-generator/archive/main.tar.gz
Author: Helfi Pangestu
Author-email: hellfipangestu@gmail.com
License: MIT
Keywords: geohash,geojson,convert,geohash-generator,shapefile converter,geojson converter
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Description-Content-Type: text/markdown
License-File: LICENSE

# Geohash Generator
Geohash Generator is a python module that provides function for converting geojson and shapefile to geohash. 

## Feature
- [x] Convert from Geojson to Geohash
- [x] Convert from Shapefile to Geohash
- [x] Convert from Geohash to Geojson
- [ ] Do you have any idea for other feature?

## Reqruiements
- Python: 2.x, 3.x

## Installation
```
pip install geohash-generator
```

## Usage
### Convert from Geojson to Geohash
```
from geohash_generator.geohash_generator import generate
import os

# Init Variable
this_script_dir = os.path.dirname(os.path.realpath(__file__))
source_path = os.path.join(
    this_script_dir,
    'example.geojson'
)
min_level_precision=2
max_level_precision=7
file_type="geojson"

# Convert Geojson to Geohash
convert_geojson_to_geohash = generate(
    source_path=source_path,
    min_level_precision=min_level_precision,
    max_level_precision=max_level_precision,
    file_type=file_type,
)

# Print result
print(f"convert_geojson_to_geohash: {convert_geojson_to_geohash}")
```

### Convert from Shapefile to Geohash
```
from geohash_generator.geohash_generator import generate
import os

# Init Variable
this_script_dir = os.path.dirname(os.path.realpath(__file__))
source_path = os.path.join(
    this_script_dir,
    'example.shp'
)
min_level_precision=2
max_level_precision=7
file_type="shapefile"

# Convert Shapefile to Geohash
convert_shapefile_to_geohash = generate(
    source_path=source_path,
    min_level_precision=min_level_precision,
    max_level_precision=max_level_precision,
    file_type=file_type,
)

# Print result
print(f"convert_shapefile_to_geohash: {convert_shapefile_to_geohash}")
```

### Convert from Geohash to Geojson
```
from geohash_generator.geohash_generator import geohash_to_geojson
import os

# Init Variable
this_script_dir = os.path.dirname(os.path.realpath(__file__))
source_path = os.path.join(
    this_script_dir,
    'geohash_example.txt'
)

# Convert Geohash to Geojson
convert_geohash_to_geojson = geohash_to_geojson(source_path=source_path)

# Print Result
print(f"convert_geohash_to_geojson: {convert_geohash_to_geojson}")
```
