Name | gemf-map JSON |
Version |
0.4.0
JSON |
| download |
home_page | None |
Summary | GEMF, an efficient tile-based map format. |
upload_time | 2025-08-14 07:47:43 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | None |
keywords |
gemf
tiles
map
mobile map
locus
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# GEMF
Python package for the GEMF map format. From the format [specification](https://www.cgtk.co.uk/gemf):
> This tile store format is intended to provide a static (i.e. cannot be updated without regenerating from scratch) file containing a large number of tiles, stored
> in a manner that makes efficient use of SD cards and with which it is easy to access individual tiles very quickly. It is intended to overcome the existing issues
> with the way tiles are stored in most existing Android map applications as these are not very scalable.
`.gemf` files may be used in mobile mapping applications like [Locus](https://www.locusmap.app/)
# Installation
```cmd
pip install gemf-map
```
# Features
**Core features** are...
- reading `.gemf` map files via the `GEMF.from_file()` classmethod
- creating a GEMF object from PNG or JPG tiles via the `GEMF.from_tiles()` classmethod
- writing a newly created GEMF object to file via the `write()` method
**Further features** are...
- spatially subset (crop) a .gemf file
- extracting tiles (PNG or JPG) from binary `.gemf` files via the `save_tiles()` method
- adding tiles to an existing `.gemf` file (TODO)
**Visualization features**:
- show the tiles of a .gemf file on a `folium` map
- show tile boundaries on a map
<!-- TODO: explain lazy laoding -->
# Usage
## Core
```python
from gemf import GEMF
# load an existing .gemf file
my_gemf = GEMF.from_file("MY_GEMF.gemf")
# extract the tiles
my_gemf.save_tiles("PATH/TO/TILEDIR")
# create a GEMF object from tiles on disk
new_gemf = GEMF.from_tiles("PATH/TO/TILEDIR")
# write GEMF object to .gemf file
new_gemf.write("PATH/TO/GEMF_FILE.gemf")
```
## Manipulation
```python
# crop to bounding box (all zoom levels will be cropped accordingly)
gemf_crop = my_gemf.crop(7, 60, 62, 36, 38)
```
## Visualization
<!-- TODO: limitations for large gemf files -->
```python
from gemf.plot import GEMFPlot
# visualize tiles and tile boundaries
gemf_map = GEMFPlot(my_gemf)
# visualize tiles without boundaries
tile_map = GEMFPlot(my_gemf, show_tile_boundaries=False)
# visualize only boundaries (to avoid loading tile contents from disk)
boundary_map = GEMFPlot(my_gemf, show_tiles=False)
```
## Other
```python
# save the embedded tiles to image files
gemf_map.save_tiles("path/to/output/dir")
```
Raw data
{
"_id": null,
"home_page": null,
"name": "gemf-map",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "gemf, tiles, map, mobile map, locus",
"author": null,
"author_email": "Colin Moldenhauer <colin.moldenhauer@tum.de>",
"download_url": "https://files.pythonhosted.org/packages/72/95/ea00a7f37f9dbe2fe7fd1e0286797ed5a0c1569203d761ea72358e33d7d9/gemf_map-0.4.0.tar.gz",
"platform": null,
"description": "# GEMF\r\n\r\nPython package for the GEMF map format. From the format [specification](https://www.cgtk.co.uk/gemf):\r\n\r\n> This tile store format is intended to provide a static (i.e. cannot be updated without regenerating from scratch) file containing a large number of tiles, stored\r\n> in a manner that makes efficient use of SD cards and with which it is easy to access individual tiles very quickly. It is intended to overcome the existing issues\r\n> with the way tiles are stored in most existing Android map applications as these are not very scalable.\r\n\r\n`.gemf` files may be used in mobile mapping applications like [Locus](https://www.locusmap.app/)\r\n\r\n# Installation\r\n```cmd\r\npip install gemf-map\r\n```\r\n\r\n\r\n# Features\r\n**Core features** are...\r\n- reading `.gemf` map files via the `GEMF.from_file()` classmethod\r\n- creating a GEMF object from PNG or JPG tiles via the `GEMF.from_tiles()` classmethod\r\n- writing a newly created GEMF object to file via the `write()` method\r\n\r\n**Further features** are...\r\n- spatially subset (crop) a .gemf file\r\n- extracting tiles (PNG or JPG) from binary `.gemf` files via the `save_tiles()` method\r\n- adding tiles to an existing `.gemf` file (TODO)\r\n\r\n**Visualization features**:\r\n- show the tiles of a .gemf file on a `folium` map\r\n- show tile boundaries on a map\r\n\r\n<!-- TODO: explain lazy laoding -->\r\n\r\n# Usage\r\n\r\n## Core\r\n```python\r\nfrom gemf import GEMF\r\n\r\n# load an existing .gemf file\r\nmy_gemf = GEMF.from_file(\"MY_GEMF.gemf\")\r\n\r\n# extract the tiles\r\nmy_gemf.save_tiles(\"PATH/TO/TILEDIR\")\r\n\r\n# create a GEMF object from tiles on disk\r\nnew_gemf = GEMF.from_tiles(\"PATH/TO/TILEDIR\")\r\n\r\n# write GEMF object to .gemf file\r\nnew_gemf.write(\"PATH/TO/GEMF_FILE.gemf\")\r\n```\r\n\r\n## Manipulation\r\n```python\r\n# crop to bounding box (all zoom levels will be cropped accordingly)\r\ngemf_crop = my_gemf.crop(7, 60, 62, 36, 38)\r\n```\r\n\r\n\r\n## Visualization\r\n<!-- TODO: limitations for large gemf files -->\r\n```python\r\nfrom gemf.plot import GEMFPlot\r\n\r\n# visualize tiles and tile boundaries\r\ngemf_map = GEMFPlot(my_gemf)\r\n\r\n# visualize tiles without boundaries\r\ntile_map = GEMFPlot(my_gemf, show_tile_boundaries=False)\r\n\r\n# visualize only boundaries (to avoid loading tile contents from disk)\r\nboundary_map = GEMFPlot(my_gemf, show_tiles=False)\r\n```\r\n\r\n## Other\r\n```python\r\n# save the embedded tiles to image files\r\ngemf_map.save_tiles(\"path/to/output/dir\")\r\n```\r\n",
"bugtrack_url": null,
"license": null,
"summary": "GEMF, an efficient tile-based map format.",
"version": "0.4.0",
"project_urls": {
"Homepage": "https://github.com/ColinMoldenhauer/GEMF",
"Issues": "https://github.com/ColinMoldenhauer/GEMF/issues"
},
"split_keywords": [
"gemf",
" tiles",
" map",
" mobile map",
" locus"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "0dc969db2a6ded83e53cc942ebfa1a76b98a00d958d8e53eed7a078570ecc092",
"md5": "394fda6ad2baa238f7e1394862ad3f00",
"sha256": "c9ec45af4e9ca71ddf2d0efb5d399bd2bece4b0d2bd834925abff125265682ec"
},
"downloads": -1,
"filename": "gemf_map-0.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "394fda6ad2baa238f7e1394862ad3f00",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 48927,
"upload_time": "2025-08-14T07:47:42",
"upload_time_iso_8601": "2025-08-14T07:47:42.558877Z",
"url": "https://files.pythonhosted.org/packages/0d/c9/69db2a6ded83e53cc942ebfa1a76b98a00d958d8e53eed7a078570ecc092/gemf_map-0.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "7295ea00a7f37f9dbe2fe7fd1e0286797ed5a0c1569203d761ea72358e33d7d9",
"md5": "8edc231456062efd7ac40b09f5589881",
"sha256": "d86d5d022decd6fe187decda653f1b76808bd1891146713a6b3a45ee3f86c9e4"
},
"downloads": -1,
"filename": "gemf_map-0.4.0.tar.gz",
"has_sig": false,
"md5_digest": "8edc231456062efd7ac40b09f5589881",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 48289,
"upload_time": "2025-08-14T07:47:43",
"upload_time_iso_8601": "2025-08-14T07:47:43.461073Z",
"url": "https://files.pythonhosted.org/packages/72/95/ea00a7f37f9dbe2fe7fd1e0286797ed5a0c1569203d761ea72358e33d7d9/gemf_map-0.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-14 07:47:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ColinMoldenhauer",
"github_project": "GEMF",
"github_not_found": true,
"lcname": "gemf-map"
}