{"id":21558093,"url":"https://github.com/koopjs/koop-output-geojson","last_synced_at":"2025-06-18T10:41:46.014Z","repository":{"id":40293026,"uuid":"191805045","full_name":"koopjs/koop-output-geojson","owner":"koopjs","description":"A simple Koop output plugin that filters data from providers and returns in GeoJSON or TopoJSON format","archived":false,"fork":false,"pushed_at":"2023-02-28T22:44:10.000Z","size":1003,"stargazers_count":2,"open_issues_count":11,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-20T07:19:44.178Z","etag":null,"topics":["geojson","koop","output","plugin","topojson"],"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/koopjs.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":"2019-06-13T17:22:21.000Z","updated_at":"2021-12-28T15:08:57.000Z","dependencies_parsed_at":"2025-01-24T10:43:01.444Z","dependency_job_id":"48a17378-9fc6-4f75-a70c-e90a86999348","html_url":"https://github.com/koopjs/koop-output-geojson","commit_stats":null,"previous_names":["haoliangyu/koop-output-geojson"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koopjs%2Fkoop-output-geojson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koopjs%2Fkoop-output-geojson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koopjs%2Fkoop-output-geojson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koopjs%2Fkoop-output-geojson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koopjs","download_url":"https://codeload.github.com/koopjs/koop-output-geojson/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244149177,"owners_count":20406324,"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","koop","output","plugin","topojson"],"created_at":"2024-11-24T08:13:58.261Z","updated_at":"2025-03-18T03:28:04.603Z","avatar_url":"https://github.com/koopjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# koop-output-geojson\n\n[![npm](https://img.shields.io/npm/v/koop-output-geojson.svg)](https://www.npmjs.com/package/koop-output-geojson)\n\nA simple [Koop output plugin](https://koopjs.github.io/docs/usage/output) that filters data from [providers](https://koopjs.github.io/docs/available-plugins/providers) and returns in [GeoJSON](https://en.wikipedia.org/wiki/GeoJSON) or [TopoJSON](https://github.com/topojson/topojson) format.\n\n## Installation\n\n```\n$ npm install koop-output-geojson\n```\n\n## Usage\n\nRegister the output plugin before any provider:\n\n```javascript\nconst Koop = require(\"koop\");\n\n// an example data provider\nconst provider = require(\"@koopjs/provider-file-geojson\");\nconst output = require(\"koop-output-geojson\");\n\nconst koop = new Koop();\n\nkoop.register(output);\nkoop.register(provider);\n\nkoop.server.listen(3000, () =\u003e {\n  console.log(`Server listening at http://localhost:3000`);\n});\n```\n\nThis output provides two routes:\n\n```\n\"GeoJSON\" output routes for the \"dev-provider\" provider  Methods\n-------------------------------------------------------  ---------\n/dev-provider/geojson                                    GET, POST\n/dev-provider/topojson                                   GET, POST\n```\n\nBoth routes support on-the-fly filtering with [winnow](https://github.com/koopjs/winnow) using SQL query in the `where` query parameter. For example,\n\n```\nGET /dev-provider/geojson?where='count'\u003e0\n```\n\nor add the query in the body of the `POST` request.\n\n## Development\n\n### Dev Server\n\nRun the dev server using the command\n\n```\n$ npm start\n```\n\nThe server will be running at `http://localhost:8080` and serving the test data file `test/data.geojson` by default (see [Koop CLI docs](https://github.com/koopjs/koop-cli#serve) for more details).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoopjs%2Fkoop-output-geojson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoopjs%2Fkoop-output-geojson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoopjs%2Fkoop-output-geojson/lists"}