{ "info": { "author": "Roel Derickx", "author_email": "hikingmap.pypi@derickx.be", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "License :: OSI Approved :: GNU General Public License (GPL)", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering :: GIS" ], "description": "# Rendering paper maps from tiles using Landez and Mapnik\n\nThis program renders an area with given boundaries using tiles from either a [mapbox MBTiles file](https://wiki.openstreetmap.org/wiki/MBTiles), a [tile server](https://wiki.openstreetmap.org/wiki/Tile_servers) or locally rendered using [mapnik](http://mapnik.org/). It is designed to work with hikingmap but it can be used standalone as well if desired.\n\n## Installation\nClone this repository and run the following command in the created directory.\n```bash\npython setup.py install\n```\n\n## Usage\n\n`hm-render-landez [OPTION]... [gpxfiles]... bbox|center ...`\n\nOptions:\n\n| Parameter | Description\n| --------- | -----------\n| `--pagewidth` | Page width in cm\n| `--pageheight` | Page height in cm\n| `-b, --basename` | Base filename without extension\n| `-t` | Temp track file to render. This is used by hikingmap to draw the page boundaries of the overview map, the tracks will be saved as a temporary GPX file.\n| `-y` | Temp waypoints file to render. This is used by hikingmap to render the distance each kilometer or mile, the waypoints will be saved as a temporary GPX file.\n| `-v, --verbose` | Display extra information while processing.\n| `-h, --help` | Display help\n| `-d, --dpi` | Amount of detail to render in dots per inch, default 300\n| `-S, --scale-factor` | Scale factor, default 1.0\n| `--hikingmapstyle` | Hikingmap stylesheet file, contains the CartoCSS for the tracks and the waypoints. The default is hikingmapstyle.xml, see the repository for an example.\n| `-f, --format` | Output format. Consult the mapnik documentation for possible values, default png\n| `--mbtiles` | Input raster mbtiles file\n| `--mapnik-style` | Mapnik stylesheet file\n| `--wmts-url` | Remote URL to download tiles\n| `--wmts-subdomains` | URL subdomains\n| `--cachedir` | Local folder containing cached tiles, will be placed in the system temp directory if not specified\n| `--tilesize` | Tile size, default 256\n| `--tileformat` | Tile image format, default image/png\n| `--tilescheme` | Tile scheme, default wmts\n| `gpxfiles` | The GPX track(s) to render.\n\nYou should at least specify one tile source, read the section about [tile source precedence](#tile-source-precedence) for detailed information.\nAfter these parameters you are required to make a choice between bbox and center. In bbox mode the rendered area will be a defined bounding box and in center mode you can specify a center coordinate and a scale.\n\nOptions for bbox mode:\n\n| Parameter | Description\n| --------- | -----------\n| `-o, --minlon` | Minimum longitude of the page\n| `-O, --maxlon` | Maximum longitude of the page\n| `-a, --minlat` | Minimum latitude of the page\n| `-A, --maxlat` | Maximum latitude of the page\n\nNote that mapnik will maintain the aspect ratio, the rendered area may not correspond exactly to the given boundary.\n\nOptions for center mode:\n\n| Parameter | Description\n| --------- | -----------\n| `--lon` | Longitude of the center of the page\n| `--lat` | Latitude of the center of the page\n| `--scale` | Scale denominator, default 50000\n\n## Configuration file\n\nBecause most of the time you will want to use the same parameters, you can optionally override the defaults in a configuration file. hm-render-landez will search for a file hm-render-landez.config.xml in the current directory, if not found it will resort to ~/.hm-render-landez.config.xml\n\n```\n\n\n \n mbsource.mbtiles\n mapnik_style.xml\n https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\n abc\n tilecache\n 256\n image/png\n wmts\n \n hikingmap_style.xml\n png\n 300\n 1.0\n \n /usr/share/fonts/noto\n /usr/share/fonts/noto-cjk\n /usr/share/fonts/TTF\n \n\n```\n\nOptions:\n\n| Tag | Description\n| --- | -----------\n| mbtiles_file | Optional. An MBTiles file providing raster tiles.\n| mapnik_stylefile | Optional. Mapnik stylesheet file.\n| wmts_url | Optional. Remote URL to download tiles.\n| wmts_subdomains | Optional. URL subdomains.\n| cache_dir | Local folder containing cached tiles.\n| tile_size | Tile size.\n| tile_format | Tile image format.\n| tile_scheme | Tile scheme, value can be tms or wmts.\n| hikingmapstyle | Hikingmap stylesheet file, contains the CartoCSS for the tracks and the waypoints, see the repository for an example.\n| outputformat | Output format. Consult the [mapnik documentation](http://mapnik.org/docs/v2.2.0/api/python/mapnik._mapnik-module.html#render_to_file) for possible values.\n| dpi | Amount of detail to render in dots per inch. This value is unrelated to the setting on your printer, a higher value will simply result in smaller icons, thinner roads and unreadable text.\n| scalefactor | The scale factor to compensate for a higher dpi value.\n| fontdirs | Optional. Can contain one or more fontdir subtags with additional font directories to be used by mapnik.\n\n## Prerequisites\n\nTo run this script you should have a working installation of [python 3](https://www.python.org/), [Landez](https://github.com/makinacorpus/landez) and [mapnik](http://mapnik.org/). Make sure you also have [python-mapnik](https://github.com/mapnik/python-mapnik/) installed.\n\n## Tile sources\n\nThe tiles are cached in a local folder using the tile manager of Landez. Landez will add tiles to the cache when necessary, supporting a number of possible sources.\n\n### MBTiles\n\nThis is a file format from mapbox, they can be created using tools such as (but not limited to) [mapbox mbutil](https://github.com/mapbox/mbutil) or [Maperitive](http://maperitive.net/). Please note that only raster MBTiles files are supported, vector MBTiles files require rendering before use.\n\n### Tile server\n\nThis is the easiest to set up, Landez will simply download tiles from a web source. Make sure you don't violate [usage policies](https://operations.osmfoundation.org/policies/tiles/) if you render too many maps at once or set the dpi value too high.\n\n### Local rendering with mapnik\n\nSince mapnik is installed as a prerequisite of this project, it is included as a possible tile source. However the setup is rather difficult. Consult the documentation of [hm-render-mapnik](https://github.com/roelderickx/hm-render-mapnik/) to get an idea.\n\n### WMS server\n\nAlthough Landez supports WMS sources, it is not configurable here. WMS servers are generally replaced by WMTS servers, which use fewer resources on the server side.\n\n## Tile source precedence\n\nPlease note you should at least specify one tile source. Although it is possible to pass all tile sources together, Landez will use only one of them. The precedence is:\n1. MBTiles, pass the parameter `--mbtiles` if you want to use this.\n2. Mapnik, pass the parameter `--mapnik-style` if you want to use this, but don't pass `--mbtiles`.\n3. Tile server, pass the parameters `--wmts-url` and `--wmts-subdomains`, but don't pass `--mbtiles` and `--mapnik-style`.\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/roelderickx/hm-render-landez", "keywords": "", "license": "GNU General Public License (GNU GPL v3 or above)", "maintainer": "", "maintainer_email": "", "name": "hm-render-landez", "package_url": "https://pypi.org/project/hm-render-landez/", "platform": "", "project_url": "https://pypi.org/project/hm-render-landez/", "project_urls": { "Homepage": "https://github.com/roelderickx/hm-render-landez" }, "release_url": "https://pypi.org/project/hm-render-landez/0.0.3/", "requires_dist": null, "requires_python": ">=3.7", "summary": "Render a map for a given area to paper using landez and mapnik", "version": "0.0.3", "yanked": false, "yanked_reason": null }, "last_serial": 12909014, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "6a5c65c59bc9e6655e405343868ebaad", "sha256": "85dcafaabb3eef1a603873b442efdde82f40a5038f4cb6b5b830985ea6bb66dc" }, "downloads": -1, "filename": "hm_render_landez-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "6a5c65c59bc9e6655e405343868ebaad", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 21391, "upload_time": "2019-10-26T09:51:23", "upload_time_iso_8601": "2019-10-26T09:51:23.255753Z", "url": "https://files.pythonhosted.org/packages/32/39/9753a21f211b937a1a7b4b9502a7e348a46957cfbc26661a2fbbdc779ff3/hm_render_landez-0.0.2-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "4ee2de4477d0465f197e87a38ac023f7", "sha256": "75fe8d6abf7d0aadd05a195c6a143f03a77a2f67cae8a57ec7497e2e2ff30748" }, "downloads": -1, "filename": "hm-render-landez-0.0.2.tar.gz", "has_sig": false, "md5_digest": "4ee2de4477d0465f197e87a38ac023f7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 9390, "upload_time": "2019-10-26T09:51:25", "upload_time_iso_8601": "2019-10-26T09:51:25.888234Z", "url": "https://files.pythonhosted.org/packages/25/68/29f0aee084b578ab95792e7cb4c7ecf076ff4f96dc46b78117ade3d43969/hm-render-landez-0.0.2.tar.gz", "yanked": false, "yanked_reason": null } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "f0405158f7172a325ac79e596f84f4c6", "sha256": "0142f74213d52f1c9ff031f12140887e02d0acdde01470d0259b6ca6f8745ae5" }, "downloads": -1, "filename": "hm-render-landez-0.0.3.tar.gz", "has_sig": false, "md5_digest": "f0405158f7172a325ac79e596f84f4c6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 22930, "upload_time": "2022-02-16T13:43:43", "upload_time_iso_8601": "2022-02-16T13:43:43.954284Z", "url": "https://files.pythonhosted.org/packages/ca/39/545014e2e7c53cf19bb7c31fdd9f679492c217ea4cadf5d01d1b39b7756d/hm-render-landez-0.0.3.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f0405158f7172a325ac79e596f84f4c6", "sha256": "0142f74213d52f1c9ff031f12140887e02d0acdde01470d0259b6ca6f8745ae5" }, "downloads": -1, "filename": "hm-render-landez-0.0.3.tar.gz", "has_sig": false, "md5_digest": "f0405158f7172a325ac79e596f84f4c6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 22930, "upload_time": "2022-02-16T13:43:43", "upload_time_iso_8601": "2022-02-16T13:43:43.954284Z", "url": "https://files.pythonhosted.org/packages/ca/39/545014e2e7c53cf19bb7c31fdd9f679492c217ea4cadf5d01d1b39b7756d/hm-render-landez-0.0.3.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }