Metadata-Version: 2.4
Name: terrapyconvert
Version: 1.0.0
Summary: Convert Lat, Lon to Minecraft coordinates and vice verca in BTE worlds
Author: agentORW
License-Expression: MIT
Project-URL: Homepage, https://github.com/agentORW/terrapyconvert
Project-URL: Repository, https://github.com/agentORW/terrapyconvert
Project-URL: Issues, https://github.com/agentORW/terrapyconvert/issues
Project-URL: Documentation, https://github.com/agentORW/terrapyconvert#readme
Keywords: buildtheearth,bte,convert,coordinates,minecraft,projection,geography
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Games/Entertainment
Classifier: Topic :: Scientific/Engineering :: GIS
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.20.0
Provides-Extra: test
Requires-Dist: pytest>=6.0.0; extra == "test"
Provides-Extra: dev
Requires-Dist: pytest>=6.0.0; extra == "dev"
Requires-Dist: black>=22.0.0; extra == "dev"
Requires-Dist: flake8>=4.0.0; extra == "dev"
Requires-Dist: mypy>=0.910; extra == "dev"
Requires-Dist: build>=0.8.0; extra == "dev"
Requires-Dist: twine>=4.0.0; extra == "dev"
Dynamic: license-file
Dynamic: requires-python

# TerrapyConvert

A Python package for converting geographic coordinates to Minecraft coordinates and vice versa for the BuildTheEarth (BTE) project.

This is a Python port of the TypeScript [terraconvert](https://github.com/Nachwahl/terraconvert/tree/9285b5f3d50b3cf0718b7a0e8e29b8eab1eb9163) package, designed to provide clean, pythonic APIs for coordinate conversion.

## Installation

```bash
pip install terrapyconvert
```

## Usage

```python
from terrapyconvert import from_geo, to_geo

# Convert latitude/longitude to Minecraft coordinates
x, z = from_geo(48.856667, 2.350987)  # Paris coordinates
print(f"Minecraft coordinates: x={x}, z={z}")

# Convert Minecraft coordinates back to latitude/longitude
lat, lon = to_geo(x, z)
print(f"Geographic coordinates: lat={lat}, lon={lon}")
```

## API

### Functions

- `from_geo(lat: float, lon: float) -> Tuple[float, float]`: Convert geographic coordinates to Minecraft coordinates
- `to_geo(x: float, z: float) -> Tuple[float, float]`: Convert Minecraft coordinates to geographic coordinates
- `from_geo_object(lat: float, lon: float) -> Dict[str, float]`: Convert geographic coordinates to Minecraft coordinates (returns dict)  
- `to_geo_object(x: float, z: float) -> Dict[str, float]`: Convert Minecraft coordinates to geographic coordinates (returns dict)

## License

MIT License
