{"id":23149421,"url":"https://github.com/simonpoole/mapsplit","last_synced_at":"2025-06-16T13:02:56.285Z","repository":{"id":2067446,"uuid":"3006166","full_name":"simonpoole/mapsplit","owner":"simonpoole","description":"A fast way to split OSM data in to a portable tiled format","archived":false,"fork":false,"pushed_at":"2024-11-08T09:16:47.000Z","size":3249,"stargazers_count":66,"open_issues_count":10,"forks_count":12,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-02T06:08:15.800Z","etag":null,"topics":["java","mobile","offline","openstreetmap","osm-map","tiles","vector-tiles","vespucci"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonpoole.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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}},"created_at":"2011-12-18T14:06:34.000Z","updated_at":"2024-11-08T09:16:50.000Z","dependencies_parsed_at":"2024-09-09T13:36:45.584Z","dependency_job_id":"051d32ca-952b-4e1c-8aa7-a8aa77f8bb5e","html_url":"https://github.com/simonpoole/mapsplit","commit_stats":{"total_commits":159,"total_committers":6,"mean_commits":26.5,"dds":0.5094339622641509,"last_synced_commit":"7a23efe11f6afdf55790005d4e5f20b9d9c8e261"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonpoole%2Fmapsplit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonpoole%2Fmapsplit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonpoole%2Fmapsplit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonpoole%2Fmapsplit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonpoole","download_url":"https://codeload.github.com/simonpoole/mapsplit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247999864,"owners_count":21031046,"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":["java","mobile","offline","openstreetmap","osm-map","tiles","vector-tiles","vespucci"],"created_at":"2024-12-17T17:54:45.922Z","updated_at":"2025-04-09T08:12:19.934Z","avatar_url":"https://github.com/simonpoole.png","language":"Java","readme":"[![build status](https://github.com/simonpoole/mapsplit/actions/workflows/javalib.yml/badge.svg)](https://github.com/simonpoole/mapsplit/actions) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=mapsplit\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=mapsplit) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=mapsplit\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=mapsplit) [![sonarcloud bugs](https://sonarcloud.io/api/project_badges/measure?project=mapsplit\u0026metric=bugs)](https://sonarcloud.io/component_measures?id=mapsplit\u0026metric=bugs) [![sonarcould maintainability](https://sonarcloud.io/api/project_badges/measure?project=mapsplit\u0026metric=sqale_rating)](https://sonarcloud.io/component_measures?id=mapsplit\u0026metric=Maintainability) [![sonarcloud security](https://sonarcloud.io/api/project_badges/measure?project=mapsplit\u0026metric=security_rating)](https://sonarcloud.io/component_measures?id=mapsplit\u0026metric=Security) [![sonarcloud reliability](https://sonarcloud.io/api/project_badges/measure?project=mapsplit\u0026metric=reliability_rating)](https://sonarcloud.io/component_measures?id=mapsplit\u0026metric=Reliability)\r\n\r\n### General\r\n\r\nMapSplit is a small application to split a larger OpenStreetMap data file into tiles. \r\n\r\nIt arose by the need of a fast way to split a OSM map file for rendering 3D tiles with OSM2World (www.osm2world.org) and was originally \r\ncreated by Peter Barth in 2011.\r\n\r\nWhile conceptually similar to \"vector tiles\" the tiles generated by MapSplit contain unprocessed, unmodified and complete, OSM data. \r\nThe generated tiles are referentially complete with respect to way nodes if the input file was so too. If the _metadata_ option\r\nis set, the tiles can be used as a read only OSM source for editors that support this format (for example [Vespucci](https://vespucci.io)).\r\n\r\n### MBTiles output\r\n\r\nTiling larger regions at higher zoom levels will result in a large number (as in 100s of thousands) of files, this is\r\nnot only unwieldy, it is slow too. The preferred output format is [MBTiles](https://github.com/mapbox/mbtiles-spec) for such use\r\ncases. \r\n\r\nTo make the contents easily identifiable and usable by applications we set the following meta data fields:\r\n\r\n* _format_ __application/vnd.openstreetmap.data+pbf__ (note this is not a registered mime type)\r\n* _minzoom_ and _maxzoom_\r\n* *latest_date* the timestamp of the youngest OSM element added, as the number of seconds since the UNIX epoch\r\n\r\nYou should __NOT__ confuse this format with Mapbox vector tiles that use PBF encoded tiles for rendering data generated from, among\r\nother sources, OpenStreetMap.\r\n\r\n### Limitations\r\n\r\nThe current implementation keeps the data structures required for assigning OSM objects to tiles in main memory. With 4GB of main memory \r\nyou can parse maps with up to 100 million nodes.\r\n\r\nThe maximum zoom levels tiles can be produced at is 16, as x and y tile numbers are packed in a 32 bit integer during processing. \r\nTiling large areas at zoom level 16 will create large numbers of tiles and should only be used with the optimization pass enabled. \r\n\r\nIf you need to process more than ~2'147'483'647 elements (nodes, ways and relations separately), use \r\nthe --max-ids options (set the values to the largest current element ids). While processing is then only limited by available memory, \r\nthe maximum number of objects that can have an extended tile list (that is the object needs to be copied to more than tiles in the immediate vicinity) \r\nis limited to a bit more than 16 million. This restriction will likely be removed in \r\nan upcoming release.\r\n\r\nNote: the incremental update feature likely doesn't really work and should be replaced. For smaller regions re-tiling from an updated \r\nsource file is probably faster in any case.\r\n\r\n### Legal\r\n\r\nSee COPYING for licence information.\r\n\r\nOpenStreetMap and the magnifying glass logo are trademarks of the OpenStreetMap Foundation. The MapSplit application is not endorsed by or affiliated with the OpenStreetMap Foundation. \r\n\r\n### Usage\r\n\r\n    -b,--border \u003carg\u003e     enlarge tiles by val ([0-1]) of the tile's size to\r\n                          get a border around the tile.\r\n    -c,--complete         store complete data for relations (including multi-polygons)\r\n    -C,--complete-areas   store complete data for multi-polygons\r\n    -d,--date \u003carg\u003e       file containing the date since when tiles are being\r\n                          considered to have changed after the split the\r\n                          latest change in infile is going to be stored in file\r\n    -O,--optimize \u003carg\u003e   try to merge tiles with less that \u003carg\u003e nodes to larger\r\n                          tiles (2'000 might be a good value for this) \r\n    -f,--maxfiles \u003carg\u003e   maximum number of open files at a time\r\n    -h,--help             this help\r\n    -i,--input \u003carg\u003e      a file in OSM pbf format\r\n    -m,--metadata         store metadata in the tiles (version, timestamp), \r\n                          if the input file is missing the metadata abort\r\n    -o,--output \u003carg\u003e     if creating a MBTiles file this is the name of the\r\n                          file, otherwise this is the base name of all tiles\r\n                          that will be written. The filename may contain '%x'\r\n                          and '%y' which will be replaced with the tile numbers, \r\n                          and '%z' that will be replaced with the tile zoom level.\r\n    -p,--polygon \u003carg\u003e    only save tiles that intersect or lie within the\r\n                          given polygon file.\r\n    -s,--size \u003carg\u003e       n,w,r the initial size for the node-, way- and relation\r\n                          maps to use (should be at least twice the number of\r\n                          IDs). If not supplied, defaults will be used.\r\n    -t,--timing           output timing information\r\n    -v,--verbose          verbose information during processing\r\n    -M,--mbtiles          store in a MBTiles format sqlite database\r\n    -x,--max-ids \u003carg\u003e    n,w,r the maximum id to allow in the node, way and\r\n                          relation arrays. Using this option will cause\r\n                          Mapsplit to use a different data structure that is\r\n                          capable of scaling to the entire planet, but will \r\n                          use an amount of memory proportional to the values specified here.\r\n    -z,--zoom \u003carg\u003e       zoom level to create the tiles at must be between 0 (silly)\r\n                          and 16 (inclusive), default is 13\r\n\r\n### Examples\r\n\r\nNote: from version 3.0 on the pre-built version from this repository requires a Java 11 runtime to work.\r\n\r\n* Generate a 211MB large MBTile format MapSplit file with all the data, including metadata for the Iraq in a couple of minutes:\r\n\r\n        java -Xmx6G -jar mapsplit-all-0.3.0.jar -tvMm -i iraq-latest.osm.pbf -o iraq.msf -f 2000 -z 16 -O 2000\r\n\r\n* Generate a MBTile format MapSplit file with all the data and metadata for the city of Zurich that is suitable for use with [Vespucci](https://vespucci.io/):\r\n\r\n        java -Xmx6G -jar mapsplit-all-0.3.0.jar -tvMm -i switzerland-padded.osm.pbf -o zurich.msf -f 2000 -z 15 -O 2000 -s 200000000,20000000,2000000 -p Zurich_AL8-AL8.poly\r\n\r\n  The `.poly` file with the boundaries can for example be retrieved from the [OSM Admin Boundaries](https://wambachers-osm.website/boundaries/) service.\r\n  \r\n### Generated mapsplit files for selected regions\r\n\r\nDaily updated mapsplit files can be found here [https://mapsplit.poole.ch/](https://mapsplit.poole.ch/).\r\n\r\n### Building\r\n\r\nWe use gradle for building, no other system is currently supported.\r\n\r\n* Build standalone jar file: `./gradlew fatJar` - the jar file can afterwards be found in `build/libs`.\r\n\r\n### Testing\r\n\r\nThe current tests are rather superficial and need to be improved, the high coverage numbers are misleading.\r\n\r\n\r\n ","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonpoole%2Fmapsplit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonpoole%2Fmapsplit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonpoole%2Fmapsplit/lists"}