{"id":21558089,"url":"https://github.com/koopjs/koop-opendata","last_synced_at":"2025-04-10T10:41:18.625Z","repository":{"id":33789958,"uuid":"37475604","full_name":"koopjs/koop-opendata","owner":"koopjs","description":"ArcGIS Open Data provider for Koop (experimental).","archived":false,"fork":false,"pushed_at":"2022-12-09T20:59:20.000Z","size":36,"stargazers_count":4,"open_issues_count":9,"forks_count":2,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-02T02:35:35.433Z","etag":null,"topics":["koop-provider"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/koopjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-15T16:01:30.000Z","updated_at":"2019-07-08T23:04:45.000Z","dependencies_parsed_at":"2023-01-15T02:34:35.894Z","dependency_job_id":null,"html_url":"https://github.com/koopjs/koop-opendata","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koopjs%2Fkoop-opendata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koopjs%2Fkoop-opendata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koopjs%2Fkoop-opendata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koopjs%2Fkoop-opendata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koopjs","download_url":"https://codeload.github.com/koopjs/koop-opendata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248199306,"owners_count":21063654,"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":["koop-provider"],"created_at":"2024-11-24T08:13:58.232Z","updated_at":"2025-04-10T10:41:18.601Z","avatar_url":"https://github.com/koopjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# koop-opendata\n\n\u003e An ArcGIS Open Data Provider for Koop\n\n[![npm version][npm-img]][npm-url]\n\n[npm-img]: https://img.shields.io/npm/v/koop-opendata.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/koop-opendata\n\n`koop-opendata` allows you to take any search on ArcGIS Open Data and turn it into a Feature Service, GeoJSON, Shapefile or CSV.\n\n## Install\n\nTo install or use this provider you will first need a working installation of Koop. We recommend the [`koop-sample-app`](https://github.com/koopjs/koop-sample-app) application template as an easy way to get started.\n\nAdd `koop-opendata` as a dependency to the `package.json` of your Node.js project.\n\n```\nnpm install koop-opendata --save\n```\n\n## Usage\n\n`koop-opendata` needs to be registered as a provider in your Koop app in order to work.\n\n```js\nvar openData = require('koop-opendata')\nkoop.register(opendata)\n```\n\nAfter that you need to create an `openData:services` table in your spatial database.\n\n```sql\nCREATE TABLE \"openData:services\"\n(\n  id character varying(100),\n  host character varying(100)\n)\nWITH (\n  OIDS=FALSE\n);\nALTER TABLE \"openData:services\"\n  OWNER TO username;\n```\n\nOnce that's done you can restart your server and the Open Data routes will be available.\n\nIf you're using the `koop-sample-app` template, you can start the server like this:\n\n```\nnode server.js\n```\n\n### Register a site that you want to search against\n\n- Example opendata.dc.gov\n``` bash\ncurl -XPOST 'http://koop.com/openData' -d 'host=http://opendata.dc.gov\u0026id=dc'\n```\n- Example opendata.arcgis.com\n``` bash\ncurl -XPOST 'http://koop.com/openData' -d 'host=http://opendata.arcgis.com\u0026id=umbrella'\n```\n\n### Start searching\n\n- Example: Zoning datasets on opendata.dc.gov\n```bash\ncurl -XGET 'http://koop.dc.esri.com/openData/dc/q/zoning'\n```\n\n- Example: Zoning datasets in the United States on opendata.arcgis.com\n```bash\ncurl -XGET 'http://koop.dc.esri.com/openData/umbrella/q/zoning/place/united+states'\n```\n\n- Example: Land use datasets that have the keyword: zoning\n```bash\ncurl -XGET 'http://koop.dc.esri.com/openData/umbrella/q/land+use/keyword/zoning'\n```\n\n- Example: Land use datasets, with the keyword zoning, sorted by date updated, in a bounding box\n```bash\ncurl -XGET 'http://koop.dc.esri.com/openData/umbrella/keyword/zoning/sort_by/updated_at/bbox/135%2C1.014%2C-135%2C72.277'\n```\n\n* Note: the Koop URL is only for example purposes\n* Not used to seeing curl commands? For the -XGET requests simply take the URL and paste it into your browser\n\n### Search parameters\n\nYou can use all the search parameters together or choose to use none at all. Just place the parameter name before the one you want to use.\n\nExamples:\n- `/q/water`\n- `/keyword/zoning`\n\nExample of chained parameters:\n- `/q/water/keyword/zoning`\n\n```json\n{\n\t\"q\": \"a simple query string to search against\",\n\t\"keyword\": \"a keyword tag that must appear in any result\",\n\t\"bbox\": \"a bounding box to restrict results\",\n\t\"sort_by\": \"which way the results should be sorted [relevance, name, updated_at, created_at]\",\n\t\"place\": \"a place to restrict the results to. this place will be geocoded and used as a bounding box\"\n}\n```\n\n### Available formats\n\nkoop-opendata supports all the same formats as [Koop](http://github.com/esri/koop)\n\n- KML -\u003e simply append `.kml` to the request\n- CSV -\u003e append `.csv`\n- Shapefile -\u003e append `.zip`\n- Feature Server -\u003e append `/FeatureServer/0`\n- GeoJSON -\u003e append `.geojson`\n\n## License\n\nCopyright 2015 Esri\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n\u003e http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nA copy of the license is available in the repository's [license.txt](license.txt) file.\n\n[](Esri Tags: ArcGIS Web Mapping GeoJson FeatureServices)\n[](Esri Language: JavaScript)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoopjs%2Fkoop-opendata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoopjs%2Fkoop-opendata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoopjs%2Fkoop-opendata/lists"}