{"id":21651395,"url":"https://github.com/sgtpep/ebookmap","last_synced_at":"2025-06-26T12:32:35.966Z","repository":{"id":144845723,"uuid":"138710269","full_name":"sgtpep/ebookmap","owner":"sgtpep","description":"Create maps optimized for eBook readers using the data from OpenStreetMap.","archived":false,"fork":false,"pushed_at":"2018-08-08T11:37:19.000Z","size":72,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T21:05:21.266Z","etag":null,"topics":["ebook-reader","map","openstreetmap","pdf"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sgtpep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-06-26T08:45:31.000Z","updated_at":"2024-10-18T16:24:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"faca4477-81c9-4ad6-b079-080e21178bd8","html_url":"https://github.com/sgtpep/ebookmap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sgtpep/ebookmap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgtpep%2Febookmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgtpep%2Febookmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgtpep%2Febookmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgtpep%2Febookmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sgtpep","download_url":"https://codeload.github.com/sgtpep/ebookmap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgtpep%2Febookmap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262068283,"owners_count":23253782,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ebook-reader","map","openstreetmap","pdf"],"created_at":"2024-11-25T07:47:47.445Z","updated_at":"2025-06-26T12:32:35.961Z","avatar_url":"https://github.com/sgtpep.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ebookmap\n\nCreate maps optimized for [eBook readers](https://en.wikipedia.org/wiki/E-reader) using the data from [OpenStreetMap](https://www.openstreetmap.org/).\n\n## Screenshots\n\nA map of [Upper West Side, New York](https://www.openstreetmap.org/relation/8398085):\n\n\u003cimg alt=\"Sceenshot 1\" src=\"https://user-images.githubusercontent.com/142021/42083860-c4a1257a-7b94-11e8-8ef6-e122985722dc.png\" width=\"200\"\u003e \u003cimg alt=\"Sceenshot 2\" src=\"https://user-images.githubusercontent.com/142021/42083861-c4d2ad84-7b94-11e8-94ef-71865989db1f.png\" width=\"200\"\u003e \u003cimg alt=\"Sceenshot 3\" src=\"https://user-images.githubusercontent.com/142021/42083863-c504c4a4-7b94-11e8-96d4-984dcb5afd46.png\" width=\"200\"\u003e \u003cimg alt=\"Sceenshot 4\" src=\"https://user-images.githubusercontent.com/142021/42083864-c53760da-7b94-11e8-8ef2-e7f698656196.png\" width=\"200\"\u003e\n\nThe original PDF file (paper size A5): https://www.scribd.com/document/382852184/upper-west-side-new-york.\n\n## Features\n\n- All dependencies are encapsulated in a container which can be easily bootstrapped and used on almost any Linux system.\n- Resolution-independent scalable vector images.\n- The clickable overview page to quickly navigate to an area of interest.\n- Clickable page edges to navigate to adjacent pages.\n- The clickable Index page with a list of streets and objects.\n- Table of contents.\n\n## Requirements\n\n- A [systemd](https://en.wikipedia.org/wiki/Systemd)-based Linux system ([Debian](https://www.debian.org/)/[Ubuntu](https://www.ubuntu.com/) and derivatives, [Arch Linux](https://www.archlinux.org/), etc.)\n- Minimum free 2GB of disk space.\n- Presense of the following commands on your system: `debootstrap` (provided by the `debootstrap` on Debian, Ubuntu and Arch Linux) and `systemd-nspawn` (provided by the `systemd-container` package on Debian and Ubuntu; present on the base Arch Linux installation).\n\n## Usage\n\n- Clone or download this repository and `cd` into the directory:\n\n```shell\ngit clone https://github.com/sgtpep/ebookmap.git\ncd ./ebookmap\n```\n\n- Setup a container with all dependencies (it will be stored at `/var/lib/machines/ocitysmap`):\n\n```shell\n./setup-container\n```\n\n- The next step can be omitted if you want to use ocitysmap and the default Mapnik stylesheet as is. Otherwise, for better results on eBook readers apply customizations (you can read comments, lines started with `#`, in `./customize-ocitysmap` to learn about them):\n\n```shell\n./customize-ocitysmap\n```\n\n- Import some data from OpenStreetMap to the container's database providing a URL to it (the `.osm.pbf` format is recommended; see [this section](#openstreetmap-data-extracts) for a list of known data sources). For huge datasets you can also pass additional arguments for `osm2pgsql` (for example, `-s|--slim` activates the slim mode which is slower, but uses less memory, `-C|--cache 10000` enables to use up to 10000MB of RAM for the cache; read [Usage of `osm2pgsql`](http://www.volkerschatz.com/net/osm/osm2pgsql-usage.html) and [OpenStreetMap Wiki](https://wiki.openstreetmap.org/wiki/Osm2pgsql) to learn about them): `./import-data [url] -s -C 10000`.\n\n```shell\n./import-data https://download.bbbike.org/osm/bbbike/NewYork/NewYork.osm.pbf\n```\n\n- Default object names in the OpenStreetMap data are provided in local languages. Run this command if you want to convert names to English (note: not all objects on OpenStreetMap may have been translated to English, it depends on efforts of OpenStreetMap contributors):\n\n```shell\n./translate-data\n```\n\n- You need to know either an exact OSM name or ID of a place you are interested in. You can query them from the container's database with some case-insensitive substring:\n\n```shell\n./query-name 'west side'\n```\n\n```\n  osm_id   |               name\n-----------+-----------------------------------\n 412090769 | West Side High School\n 310223934 | West Side Avenue Park and Ride\n 265258258 | West Side Jewish Center\n 433102608 | West Side Yard\n 265329555 | West Side Home Center\n 241826154 | Apple Store, Upper West Side\n 269297172 | West Side Institutional Synagogue\n 413886376 | West Side Tennis Club\n 274668743 | West Side Bar \u0026 Grill\n  39648150 | West Side Park\n  -7218315 | Upper West Side\n 313994014 | West Side Community Garden\n```\n\n- Now you can actually render a map of any place using this command passing an exact name as an argument:\n\n```shell\n./render-map 'Upper West Side'\n```\n\nYou can also pass `osm_id` instead of a name: `./render-map -t 'Upper West Side' --osmid=-7218315`. You can also pass any additinal arguments (that `./render.py` of ocitysmap supports). To see them all run: `./render-map -h`:\n\n```\nUsage: render.py [options] [-b \u003clat1,long1 lat2,long2\u003e|--osmid \u003cosmid\u003e]\n\nOptions:\n  --version             show program's version number and exit\n  -h, --help            show this help message and exit\n  -C FILE, --config=FILE\n                        specify the location of the config file.\n  -p PREFIX, --prefix=PREFIX\n                        set a prefix to the generated file names. Defaults to\n                        \"citymap\".\n  -f FMT, --format=FMT  specify the output formats. Supported file formats:\n                        svg, svgz, pdf, ps, ps.gz, png, and csv. Defaults to\n                        PDF. May be specified multiple times.\n  -t TITLE, --title=TITLE\n                        specify the title displayed in the output files.\n  --osmid=OSMID         OSM ID representing the polygon of the city to render.\n  -b LAT1,LON1 LAT2,LON2, --bounding-box=LAT1,LON1 LAT2,LON2\n                        bounding box (EPSG: 4326).\n  -L LANGUAGE_CODE, --language=LANGUAGE_CODE\n                        language to use when generating the index\n                        (default=en_US.UTF-8). The map language is driven by\n                        the system' locale setting.\n  -s NAME, --stylesheet=NAME\n                        specify which stylesheet to use. Defaults to the first\n                        specified in the configuration file.\n  --overlay=NAME        comma separated list of overlay stylesheets to use.\n                        Defaults to none\n  -l NAME, --layout=NAME\n                        specify which layout to use. Available layouts are:\n                        plain (Full-page layout without index.),\n                        single_page_index_bottom (Full-page layout with the\n                        index at the bottom.), single_page_index_side (Full-\n                        page layout with the index on the side.), multi_page\n                        (A multi-page layout.). Defaults to plain.\n  --paper-format=FMT    set the output paper format. Either \"default\", or one\n                        of Best fit, Din A5, Din A4, US letter, Din A3, Din\n                        A2, Din A1, Din A0, 2x A0.\n  --orientation=ORIENTATION\n                        set the output paper orientation. Either \"portrait\" or\n                        \"landscape\". Defaults to portrait.\n  --poi-file=FILE       provide a file containing POI information to create an\n                        index instead of auto-generating it.\n  --gpx-file=FILE       a GPX track to be put on top of the rendered mapr.\n```\n\nTo remove the installed container simply run: `sudo rm -r /var/lib/machines/ocitysmap`\n\n## OpenStreetMap data extracts\n\n- https://download.bbbike.org/osm/bbbike/\n- https://download.geofabrik.de/\n- http://download.openstreetmap.fr/extracts/\n\n## Resources\n\n- MapOSMatic, a web service that allows you to generate maps of cities using the OpenStreetMap data: https://maposmatic.osm-baustelle.de/\n- The source code of ocitysmap (Open City Street Map), a command-line tool behind the MapOSMatic web service: http://git.savannah.gnu.org/cgit/maposmatic/ocitysmap.git, https://github.com/hholzgra/ocitysmap\n- MapOSMatic on OpenStreetMap Wiki: https://wiki.openstreetmap.org/wiki/MapOSMatic\n- Other tools to generate printable maps from OpenStreetMap: https://wiki.openstreetmap.org/wiki/OSM_on_Paper\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgtpep%2Febookmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsgtpep%2Febookmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgtpep%2Febookmap/lists"}