https://github.com/maps-as-data/tilelayer_finder
https://github.com/maps-as-data/tilelayer_finder
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/maps-as-data/tilelayer_finder
- Owner: maps-as-data
- Created: 2023-10-09T07:30:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-13T16:55:40.000Z (over 1 year ago)
- Last Synced: 2025-01-13T17:51:52.518Z (over 1 year ago)
- Language: Python
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tilelayer Finder
`tilelayer_finder` is a small package for finding tilelayers/group layers available via the NLS tileserver and creating `metadata.json` files for them (for use in MapReader).
## Installation
> **NOTE 02/05/2024**: I've just removed the need to use poetry to run this, if you had previously installed with poetry you might need to re-install!
### Pip install (use conda or other virtual env if you prefer)
``` bash
git clone https://github.com/rwood-97/tilelayer_finder.git
cd tilelayer_finder
conda create -n tilelayer_finder python=3.11
conda activate tilelayer_finder
pip install .
```
## Usage
### CLI
``` python
usage: tlf_run [-h] [-c] [-ot TILES_OUTPUT] [-og GROUPS_OUTPUT] [-n [NAME ...]]
options:
-h, --help show this help message and exit
-c, --clean Whether to clean data
-ot TILES_OUTPUT, --tiles-output TILES_OUTPUT
Name to use when saving output tilelayer file
-og GROUPS_OUTPUT, --groups-output GROUPS_OUTPUT
Name to use when saving output group layer file
-n [NAME ...], --name [NAME ...]
Name(s) of tilelayer(s)/group layer(s) to create metadata for
```
### Interactive (notebooks)
See `example.ipynb` for usage example.
``` python
from tilelayer_finder import finder
tlf = finder.TileLayerFinder()
tlf.get_data(clean=True)
```
``` python
tlf.list_tilelayers()
tlf.list_group_layers()
```
``` python
tlf.save_data()
```
``` python
tlf.create_metadata_json("oneinch2nd")
```