# 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.
Install with pip: https://pypi.org/project/terrapyconvert/
## 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
Raw data
{
"_id": null,
"home_page": null,
"name": "terrapyconvert",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "buildtheearth, bte, convert, coordinates, minecraft, projection, geography",
"author": "agentORW",
"author_email": null,
"download_url": null,
"platform": null,
"description": "# TerrapyConvert\r\n\r\nA Python package for converting geographic coordinates to Minecraft coordinates and vice versa for the BuildTheEarth (BTE) project.\r\n\r\nThis 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.\r\n\r\nInstall with pip: https://pypi.org/project/terrapyconvert/\r\n\r\n## Installation\r\n\r\n```bash\r\npip install terrapyconvert\r\n```\r\n\r\n## Usage\r\n\r\n```python\r\nfrom terrapyconvert import from_geo, to_geo\r\n\r\n# Convert latitude/longitude to Minecraft coordinates\r\nx, z = from_geo(48.856667, 2.350987) # Paris coordinates\r\nprint(f\"Minecraft coordinates: x={x}, z={z}\")\r\n\r\n# Convert Minecraft coordinates back to latitude/longitude\r\nlat, lon = to_geo(x, z)\r\nprint(f\"Geographic coordinates: lat={lat}, lon={lon}\")\r\n```\r\n\r\n## API\r\n\r\n### Functions\r\n\r\n- `from_geo(lat: float, lon: float) -> Tuple[float, float]`: Convert geographic coordinates to Minecraft coordinates\r\n- `to_geo(x: float, z: float) -> Tuple[float, float]`: Convert Minecraft coordinates to geographic coordinates\r\n- `from_geo_object(lat: float, lon: float) -> Dict[str, float]`: Convert geographic coordinates to Minecraft coordinates (returns dict) \r\n- `to_geo_object(x: float, z: float) -> Dict[str, float]`: Convert Minecraft coordinates to geographic coordinates (returns dict)\r\n\r\n## License\r\n\r\nMIT License\r\n",
"bugtrack_url": null,
"license": null,
"summary": "Convert Lat, Lon to Minecraft coordinates and vice verca in BTE worlds",
"version": "1.0.1",
"project_urls": {
"Documentation": "https://github.com/agentORW/terrapyconvert#readme",
"Homepage": "https://github.com/agentORW/terrapyconvert",
"Issues": "https://github.com/agentORW/terrapyconvert/issues",
"Repository": "https://github.com/agentORW/terrapyconvert"
},
"split_keywords": [
"buildtheearth",
" bte",
" convert",
" coordinates",
" minecraft",
" projection",
" geography"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "334f41b823f6e8150a094cbbee3edd47db2a980fcd483ae5e2d630d9177298ef",
"md5": "0494e0f6fb1edd3bb9a8952751882f4e",
"sha256": "1efdd2155182bd153ed7d3dd464bd4eb97945a7a172c767996a85598b65fd109"
},
"downloads": -1,
"filename": "terrapyconvert-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0494e0f6fb1edd3bb9a8952751882f4e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 330175,
"upload_time": "2025-07-21T20:51:41",
"upload_time_iso_8601": "2025-07-21T20:51:41.061058Z",
"url": "https://files.pythonhosted.org/packages/33/4f/41b823f6e8150a094cbbee3edd47db2a980fcd483ae5e2d630d9177298ef/terrapyconvert-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-21 20:51:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "agentORW",
"github_project": "terrapyconvert#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "numpy",
"specs": [
[
">=",
"1.20.0"
]
]
}
],
"lcname": "terrapyconvert"
}