{"id":23483695,"url":"https://github.com/geovation/vector-tile-generator","last_synced_at":"2025-04-14T00:16:36.722Z","repository":{"id":269564636,"uuid":"905823468","full_name":"Geovation/vector-tile-generator","owner":"Geovation","description":"A repository to demo and performance test a few methods of generating vector tiles","archived":false,"fork":false,"pushed_at":"2025-01-22T13:12:43.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T00:16:29.691Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Geovation.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}},"created_at":"2024-12-19T15:38:20.000Z","updated_at":"2025-01-22T13:12:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"3402b77f-5cd9-4884-9070-a4738ae49839","html_url":"https://github.com/Geovation/vector-tile-generator","commit_stats":null,"previous_names":["geovation/vector-tile-generator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Geovation%2Fvector-tile-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Geovation%2Fvector-tile-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Geovation%2Fvector-tile-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Geovation%2Fvector-tile-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Geovation","download_url":"https://codeload.github.com/Geovation/vector-tile-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248799951,"owners_count":21163404,"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":[],"created_at":"2024-12-24T21:14:07.980Z","updated_at":"2025-04-14T00:16:36.693Z","avatar_url":"https://github.com/Geovation.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vector tile generator\n\nA repository to demo and test a few methods of generating vector tiles\n\n## Installation\n\n### Local database\n\nThe testing was done using a local database server installed on MacOS using homebrew.\n\n```bash\nbrew install postgresql postgis\n```\n\nAfter these are installed you may need to run some steps to ensure the pg commands are available in your shell. See guidance online for install such as [How to install PostgreSQL on a Mac with Homebrew](https://www.moncefbelyamani.com/how-to-install-postgresql-on-a-mac-with-homebrew-and-lunchy/)In some cases there can be conflicts with the default MacOS database files location, but you can initialise the data directory in a different location.\n\n```bash\npg_ctl -D postgres start\n```\n\n### Setup packages\n\nThe node packages are installed using npm. The package.json file contains the dependencies.\n\n```bash\nnpm install\n```\n\n#### Tippecanoe\n\nThe tippecanoe method is using node but is a wrapper around a local install of tippecanoe. Tippecanoe is a command line utility for converting GeoJSON to vector tiles. It can also be installed using homebrew (or various other methods).\n\n```bash\nbrew install tippecanoe\n```\n\n#### GDAL\n\nIn part of the process we generate a GeoJSON file from a CSV exported from the database. This is done using the ogr2ogr command line utility from the GDAL package. This can also be installed using homebrew.\n\n```bash\nbrew install gdal\n```\n\n## Instructions\n\nThe three different methods of generating tiles are `tippecanoeBulk`, `vtPbfSequential` and `databaseSequential`.\n\nFirst take a copy of the sample environment file, rename to `.env` and update the values to match your local database and the layer you wish to convert to vector tiles. For example:\n\n```bash\nDB_TABLE=flood_risk_rivers_and_sea\nDB_COLUMNS=prob_4band,suitabilit,pub_date,st_area_sh,st_perimet\nMIN_ZOOM_LEVEL=4\nMAX_ZOOM_LEVEL=14\n```\n\nWhen you are ready to try it out ensure you have a database running and the table you want to convert is available. Then run the following command:\n\n```bash\nnode --max-old-space-size=24576 ./index.js tippecanoeBulk\n```\n\nReplace `tippecanoeBulk` with `vtPbfSequential` or `databaseSequential` to try the other methods.\n\n## Performance\n\nSome basic timings were taken for the different methods.\n\n| Features | Method     | Time   |\n| -------- | ---------- | ------ |\n| 16       | Tippecanoe | 0.7s   |\n| 16       | vtPbf      | 1.7s   |\n| 16       | PostGIS    | 29.1s  |\n| 1525731  | Tippecanoe | 449.6s |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeovation%2Fvector-tile-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeovation%2Fvector-tile-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeovation%2Fvector-tile-generator/lists"}