{"id":18600151,"url":"https://github.com/watergis/elastic2mvt","last_synced_at":"2025-04-10T18:31:19.497Z","repository":{"id":109405828,"uuid":"314558095","full_name":"watergis/elastic2mvt","owner":"watergis","description":"This module generate Mapbox vector tiles from Elasticsearch","archived":false,"fork":false,"pushed_at":"2023-06-22T14:38:44.000Z","size":163,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-30T05:43:08.468Z","etag":null,"topics":["elasticsearch","vector-tiles"],"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/watergis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":["JinIgarashi"],"open_collective":"watergis","custom":["https://www.paypal.me/jinigarashi"]}},"created_at":"2020-11-20T13:12:37.000Z","updated_at":"2023-06-22T14:39:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"e0758c4a-c1e2-4e0d-8986-86e5610c6a56","html_url":"https://github.com/watergis/elastic2mvt","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":0.07692307692307687,"last_synced_commit":"d2bd435a462a5e7cef65cd006debdc29c11873b5"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watergis%2Felastic2mvt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watergis%2Felastic2mvt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watergis%2Felastic2mvt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watergis%2Felastic2mvt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/watergis","download_url":"https://codeload.github.com/watergis/elastic2mvt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247190251,"owners_count":20898711,"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":["elasticsearch","vector-tiles"],"created_at":"2024-11-07T02:03:12.177Z","updated_at":"2025-04-10T18:31:19.474Z","avatar_url":"https://github.com/watergis.png","language":"JavaScript","funding_links":["https://github.com/sponsors/JinIgarashi","https://opencollective.com/watergis","https://www.paypal.me/jinigarashi"],"categories":[],"sub_categories":[],"readme":"# elastic2mvt\n![Node.js Package](https://github.com/watergis/elastic2mvt/workflows/Node.js%20Package/badge.svg)\n![GitHub](https://img.shields.io/github/license/watergis/elastic2mvt)\n\nThis module generate Mapbox vector tiles from Elasticsearch.\n\nNote. This is still under experimental.\n\n## Install package\n\n```bash\nnpm install @watergis/elastic2mvt\n```\n\n## Usage\n\n```js\nconst elastic2mvt = require('@watergis/elastic2mvt');\n\nconst es2mvt = new elastic2mvt('localhost:9200');\nconst z = 14\nconst x = 9524\nconst y = 8269\nconst indices = [\n  {\n    // Please specify target Elasticsearch index name\n    name : 'water_connection',\n    // specify the size of searching result. Default is 10000.\n    size: 10000,\n    // if you don't specify, 'geom' will be used as default column name\n    geometry: 'geom',\n    //Please specify your query for Elasticsearch. \n    // if it is not defined, {\"match_all\": {}} will be used as default.\n    query: { \n      \"term\": {\n        \"connection_type\": \"Water Kiosk\"\n      }\n    }\n  },\n  {\n    name : 'pipeline',\n    geometry: 'geom'\n  },\n  {\n    name : 'wss',\n    geometry: 'geom'\n  }\n]\nconst buffer = await es2mvt.generate(z,x,y,indices)\nconsole.log(buffer)\n```\n\n## Preparation\nBefore using this module to convert from Elasticsearch to Mapbox binary vector tile, please insert your GIS data by using `ogr2ogr`. This module adopted `flat` structure of Elasticsearch documents. It maybe does not work for other mapping types of Elastic documents which were inserted by other tools except `ogr2ogr`.\n\nThe following command is an example to insert from PostGIS.\n\n```\nogr2ogr -f \"Elasticsearch\" -lco NOT_ANALYZED_FIELDS={ALL} -lco INDEX_NAME=water_connection -lco OVERWRITE=YES http://localhost:9200 \"PG:host='localhost' port=5432 user='postgres' dbname='rwss_assets' password='password'\" water_connection -skipfailures\n```\n\n## License\n\nThis module is under MIT license.\n\n---\n`Copyright (c) 2020 Jin IGARASHI`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwatergis%2Felastic2mvt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwatergis%2Felastic2mvt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwatergis%2Felastic2mvt/lists"}