Python library for reading and writing GEMF map tile files.
Project description
GEMF
Python package for the GEMF map format. From the format specification:
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
Installation
pip install gemf-map
Features
Core features are...
- reading
.gemfmap files via theGEMF.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 image tiles from binary
.gemffiles via thesave_tiles()method - adding tiles to an existing
.gemffile (TODO)
Visualization features:
- show the tiles of a .gemf file on a
foliummap - show tile boundaries on a map
Usage
Core
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
# crop to bounding box (all zoom levels will be cropped accordingly)
gemf_crop = my_gemf.crop(7, 60, 62, 36, 38)
Visualization
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
# save the embedded tiles to image files
gemf_map.save_tiles("path/to/output/dir")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gemf_map-0.2.0.tar.gz.
File metadata
- Download URL: gemf_map-0.2.0.tar.gz
- Upload date:
- Size: 36.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e502887e01349041e68b473723aa623500e733f2de94c6be20cd4260934e4439
|
|
| MD5 |
e6cf16948c6d3c958d8541b7e241da45
|
|
| BLAKE2b-256 |
9597d6bd11a157915f3101aa7e4ffbeb364c9902e2559e42d5596338b1d6d967
|
Provenance
The following attestation bundles were made for gemf_map-0.2.0.tar.gz:
Publisher:
publish.yml on ColinMoldenhauer/GEMF
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gemf_map-0.2.0.tar.gz -
Subject digest:
e502887e01349041e68b473723aa623500e733f2de94c6be20cd4260934e4439 - Sigstore transparency entry: 1757685113
- Sigstore integration time:
-
Permalink:
ColinMoldenhauer/GEMF@3ebbf4e5ab2c84d2f8575a08bded5bab09fded9b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/ColinMoldenhauer
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3ebbf4e5ab2c84d2f8575a08bded5bab09fded9b -
Trigger Event:
push
-
Statement type:
File details
Details for the file gemf_map-0.2.0-py3-none-any.whl.
File metadata
- Download URL: gemf_map-0.2.0-py3-none-any.whl
- Upload date:
- Size: 37.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
788263dbfeb25750fb4d364c660fcfc300e1ede58b861fab5829d8361678707f
|
|
| MD5 |
cf0cde8b5225e60e036c52404fe1d7b9
|
|
| BLAKE2b-256 |
31e297b211564f53218e145039dcbf138e6de0a4ffea1852d58de138692aeac8
|
Provenance
The following attestation bundles were made for gemf_map-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on ColinMoldenhauer/GEMF
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gemf_map-0.2.0-py3-none-any.whl -
Subject digest:
788263dbfeb25750fb4d364c660fcfc300e1ede58b861fab5829d8361678707f - Sigstore transparency entry: 1757685400
- Sigstore integration time:
-
Permalink:
ColinMoldenhauer/GEMF@3ebbf4e5ab2c84d2f8575a08bded5bab09fded9b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/ColinMoldenhauer
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3ebbf4e5ab2c84d2f8575a08bded5bab09fded9b -
Trigger Event:
push
-
Statement type: