{"id":17972763,"url":"https://github.com/reyemtm/vtile","last_synced_at":"2025-03-25T12:33:12.457Z","repository":{"id":42241232,"uuid":"116710332","full_name":"reyemtm/vtile","owner":"reyemtm","description":"A tool to create vector tiles from the command line. It is essentially automation of geojson2mvt using TurfJS.","archived":false,"fork":false,"pushed_at":"2023-01-07T23:12:14.000Z","size":2277,"stargazers_count":5,"open_issues_count":3,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-15T16:19:10.333Z","etag":null,"topics":["geojson","open-data","turfjs","vector-tiles"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/reyemtm.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}},"created_at":"2018-01-08T18:03:05.000Z","updated_at":"2024-04-30T06:15:13.000Z","dependencies_parsed_at":"2023-02-08T03:16:16.178Z","dependency_job_id":null,"html_url":"https://github.com/reyemtm/vtile","commit_stats":null,"previous_names":["zerospatial/vtile"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reyemtm%2Fvtile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reyemtm%2Fvtile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reyemtm%2Fvtile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reyemtm%2Fvtile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reyemtm","download_url":"https://codeload.github.com/reyemtm/vtile/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245463023,"owners_count":20619598,"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":["geojson","open-data","turfjs","vector-tiles"],"created_at":"2024-10-29T16:25:42.122Z","updated_at":"2025-03-25T12:33:11.305Z","avatar_url":"https://github.com/reyemtm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vtile\n\nA simple Node and command line tool to create vector tiles (directory or mbtiles) in JavaScript from one or more geojson files using geojson2mvt, geojson-vt, and TurfJS.\n\n    npm install vtile -g\n\nThen to create vector tiles for a single file:\n\n    vtile -i \"./data/ohio.geojson\" -f directory\n\n\u003e For large input files increase the available Node memory ``--max-old-space-size=8192``.\n\nFor a directory of files simple call `vtile` in the directory of geojson files or point it to a directory:\n\n    vtile -d \"./data/\"\n\n## Benchmarks for Formats\n\n**Writing to mbtiles is 10x-70x faster!**\n\n### Directory\n\n``-Z 15 -i ohio.geojson -f directory``\n\n``` \nDone! I made 168030 tiles!\ntiles done at 158.639 seconds\n```\n\n### MBTiles\n\n``-Z 15 -i ohio.geojson -f mbtiles``\n\n```\nDone! I made 168030 tiles!\ntiles done at 3.933 seconds\n```\n\n---\n\n![](vtile.gif)\n\n**v 1.0.0**\n - **Breaking Changes** `-f is now -i` and `-f` translates to the output format, either `-f mbtiles` or `-f directory`.\n - Added writing vector tiles to mbtiles format using `better-sqlite3`.\n - The `mbtiles` output can be viewed with [mbview](https://github.com/mapbox/mbview) or any mbtiles server.\n\n---\n\n**v 0.2.0** \n - `vtile` now writes tiles by default, just use the -f option `vtile -f data/ohio.geojson` and tiles will be created in a 'tiles' folder in the working directory.\n - Preview map zooms to the layer extent.\n - Features are given a numeric, ascending feature id to use with the Mapbox GL JS [feature state](https://www.mapbox.com/mapbox-gl-js/example/hover-styles/).\n - geojson-vt has been updated to the latest version.\n\n**v 0.1.7** vtile adds a field called *vtlid* to each feature called vtlid which is a unique identifier for each feature - if this conflicts with a field you already have you will need to edit the vtile.js file\n\n**v 0.1.4** vtile will delete one or more fields from your geojson, and optionally output that geojson file\n\n**v 0.1.3** vtile will tile all geojson files in a folder, with the layer names in the tiles being the file names. If you just want to convert one file, simply add that file ``-f \"./data/ohio.geojson\"``.\n\nTiles are created in a '/tiles/your file name/' folder in the current working directory, both of which can be configured. A tilejson is created in the '/tiles/your file name/' folder, and if ``-p`` is added, an index page is created in the '/tiles/' folder and opened to preview the tiles. If tiling all files in a folder, the preview only will add the first file.\n\nFor options use ``vtile -h``.\n\n```\nUsage: command [options]\n    --format, -f          output format, choices are mbtiles or directory (default: directory)\n    --input, -i           your geojson file if not using directory option\n    --tiles-dir, -t       directory to store the vector tiles (default: \"tiles/\")\n    --geojson-dir, -d     directory of GeoJSON files you want to convert (default './')\n    --minzoom, -z         min zoom level to build tiles (default: 0)\n    --maxzoom, -Z         max zoom to build tiles (tiles will overzoom in mapbox gl, leaflet and ol3) (default: 5)\n    --extract, -x         remove these properties from the geojson file(s), one for each field, i.e -x \"COUNTY\" -x \"Shape_Length\"\n    --output, -o          output the geojson file(s), useful if using the extract option\n    --write, -w           vtile will not write any tiles with -w false (default: true)\n    --preview, -p         writes an index.html page in the tiles dir to preview your tiles (default: false)\n    --resume, -r          vtile will delete all the files and folders in the tiles directory unless this is true (default: false)\n    --help, -h            show help\n```\n\nThis project uses [TurfJS](https://github.com/Turfjs/turf/) to automate vector tile creation in JavaScript using [geojson2mvt](https://github.com/NYCPlanning/geojson2mvt), which uses [geojson-vt](https://github.com/mapbox/geojson-vt) internally.\n\nSample GeoJSON file from here - http://eric.clst.org/tech/usgeojson/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freyemtm%2Fvtile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freyemtm%2Fvtile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freyemtm%2Fvtile/lists"}