A tool for downloading and nicely splitting NSW Spatial Services topographic maps across smaller pages
Project description
nsw-topo-split
nsw-topo-split is a simple Python package that provides a command-line
interface for downloading and evenly splitting NSW Spatial Services topographic
maps across smaller pages. This is useful if you can't get an official hard copy
(e.g., for a new edition), or if you don't have access to a large-format printer
to print the digital maps provided on the NSW Spatial Collaboration
Portal.
Quick example
nsw-topo-split cover katoomba 2022
nsw-topo-split map katoomba 2022
Maps shown above are © State of New South Wales (Spatial Services, a business unit of the Department of Customer Service NSW), reproduced under the terms of the Creative Commons Attribution 4.0 license.
Installation
Option 1: pipx (preferred)
This is the easiest option because it automatically installs nsw-topo-split
into a standalone virtual environment and allows you to run nsw-topo-split
anywhere.
Install pipx, then run
pipx install nsw-topo-split
Option 2: pip
Create and activate a clean virtual environment, then run
pip install nsw-topo-split
Development installation
Clone the repository and navigate to its root directory. Then, in a clean virtual environment, run
pip install -r requirements-dev.txt # for reproducibility
pre-commit install
pip install -e .
Usage
usage: nsw-topo-split [-h] [-o OUT] [-f] [-d [DPI]] [-q] [-s SIZE] [-p]
[-n NX NY] [-l LX LY] [-w]
{map,cover} name year
split a NSW topographic map across smaller pages
positional arguments:
{map,cover} 'map' to make the map pages, 'cover' to make the cover
pages
name map name (case-insensitive), e.g., katoomba; remember
to quote names with spaces
year year of publication
options:
-h, --help show this help message and exit
-o OUT, --out OUT output directory (default: working directory); files
are output in a subdirectory corresponding to the
publication year and map name, e.g.,
2022/8930-1S+KATOOMBA
-f, --force-download download the original map, even if it already exists
in the output directory
-d [DPI], --dpi [DPI]
rasterize the output to the specified resolution
(default: 300 DPI); if this option is not given, then
the output will not be rasterized. WARNING: this may
make gridlines hard to see on some map editions. It
will also increase processing time, and file size for
mode=map.
-q, --quiet suppress log messages
page format options:
-s SIZE, --size SIZE page size (case-insensitive; default A3); options are
'A0' through 'A10', 'B0' through 'B10', 'C0' through
'C10', 'Card-4x6', 'Card-5x7', 'Commercial',
'Executive', 'Invoice', 'Ledger', 'Legal', 'Legal-13',
'Letter', 'Monarch' and 'Tabloid-Extra'
-p, --portrait use portrait layout rather than landscape
-n NX NY, --n-pages NX NY
horizontal and vertical number of pages (determined
automatically by default)
-l LX LY, --overlap LX LY
horizontal and vertical overlap between pages in mm
(default: [20.0, 20.0])
-w, --allow-whitespace
do not expand overlaps to eliminate white space
For example, the quick example above will produce three PDFs
in ./2022/8930-1S+KATOOMBA:
8930-1S+KATOOMBA.pdf: The original map downloaded from Spatial Services8930-1S+KATOOMBA_cover_a3.pdf: A landscape A3 page with the map cover page and legend side-by-side8930-1S+KATOOMBA_split_a3.pdf: The map, split across six landscape A3 pages with 20mm overlaps.
When printing double-sided, make sure to choose "flip on long edge".
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 nsw_topo_split-0.1.0b3.tar.gz.
File metadata
- Download URL: nsw_topo_split-0.1.0b3.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
979bf6766c987a662f9148f6b5071bf47b834c8a309b074235c8ec5d869d9a19
|
|
| MD5 |
838f089f472821d6f35046b32b5ce56d
|
|
| BLAKE2b-256 |
39162f0946e533a0bb5ce13e8fa4f34bd30bfdb98e5d5439d9ab07929c26782a
|
Provenance
The following attestation bundles were made for nsw_topo_split-0.1.0b3.tar.gz:
Publisher:
cd.yaml on tschanzer/nsw-topo-split
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nsw_topo_split-0.1.0b3.tar.gz -
Subject digest:
979bf6766c987a662f9148f6b5071bf47b834c8a309b074235c8ec5d869d9a19 - Sigstore transparency entry: 173476083
- Sigstore integration time:
-
Permalink:
tschanzer/nsw-topo-split@94eb843ed92e62341617d52487a75bfb3cee41bb -
Branch / Tag:
refs/tags/v0.1.0b3 - Owner: https://github.com/tschanzer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yaml@94eb843ed92e62341617d52487a75bfb3cee41bb -
Trigger Event:
release
-
Statement type:
File details
Details for the file nsw_topo_split-0.1.0b3-py3-none-any.whl.
File metadata
- Download URL: nsw_topo_split-0.1.0b3-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c637271e7585cc38973c2f9f5a6e98ea6546447d424e5011a659ecee65750dfe
|
|
| MD5 |
4cf80bc05f9b8dab0c9b63c95e4708d2
|
|
| BLAKE2b-256 |
16637d7a10a05b3790d1ba3d0149e76e7fc4a49606d6a4eb3875b472d2d37670
|
Provenance
The following attestation bundles were made for nsw_topo_split-0.1.0b3-py3-none-any.whl:
Publisher:
cd.yaml on tschanzer/nsw-topo-split
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nsw_topo_split-0.1.0b3-py3-none-any.whl -
Subject digest:
c637271e7585cc38973c2f9f5a6e98ea6546447d424e5011a659ecee65750dfe - Sigstore transparency entry: 173476087
- Sigstore integration time:
-
Permalink:
tschanzer/nsw-topo-split@94eb843ed92e62341617d52487a75bfb3cee41bb -
Branch / Tag:
refs/tags/v0.1.0b3 - Owner: https://github.com/tschanzer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yaml@94eb843ed92e62341617d52487a75bfb3cee41bb -
Trigger Event:
release
-
Statement type: