{"id":16942529,"url":"https://github.com/dbabbs/query-geojson-polygons","last_synced_at":"2025-06-14T03:06:19.995Z","repository":{"id":122539979,"uuid":"165572979","full_name":"dbabbs/query-geojson-polygons","owner":"dbabbs","description":"🌍📍RESTful API for querying HERE polygon boundary data in GeoJSON format.","archived":false,"fork":false,"pushed_at":"2019-01-23T19:59:41.000Z","size":3213,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-21T07:13:56.187Z","etag":null,"topics":["boundaries","geojson","heremaps","maps"],"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/dbabbs.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-01-14T01:01:01.000Z","updated_at":"2019-01-23T19:59:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"66f2a7e2-f263-439e-9ba9-73e837fc981c","html_url":"https://github.com/dbabbs/query-geojson-polygons","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dbabbs/query-geojson-polygons","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbabbs%2Fquery-geojson-polygons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbabbs%2Fquery-geojson-polygons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbabbs%2Fquery-geojson-polygons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbabbs%2Fquery-geojson-polygons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbabbs","download_url":"https://codeload.github.com/dbabbs/query-geojson-polygons/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbabbs%2Fquery-geojson-polygons/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259752080,"owners_count":22905972,"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":["boundaries","geojson","heremaps","maps"],"created_at":"2024-10-13T21:12:10.983Z","updated_at":"2025-06-14T03:06:19.979Z","avatar_url":"https://github.com/dbabbs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Query Polygon Boundaries\n\nThis RESTful API enables one to query HERE map content, specifically admin level polygon data in GeoJSON format. This API wraps responses from the [HERE Geocoder API](https://developer.here.com/documentation/geocoder/topics/quick-start-geocode.html) and converts the polygon shape data from [WKT](https://en.wikipedia.org/wiki/Well-known_text) format to [GeoJSON](https://en.wikipedia.org/wiki/GeoJSON) format.\n\nThis service is great for obtaining data to use with your favorite web map renderers like HERE XYZ, Tangram, Leaflet, deck.gl, Google Maps, and Mapbox.\n\n## Prerequisites\nA valid App Id and App Code from the [HERE Developer Portal](https://developer.here.com/) is required. The free tier allows for up to 250K transactions/month.\n\n## Installation\n\n    git clone https://github.com/dbabbs/query-geojson-polygons.git\n    cd query-geojson-polygons\n    npm install\n\n## Running\n\n    npm start\n\n## Parameters\n\n| Parameter | Required | Accepted Values | Description |\n|---|---|---|---|\n| `here_id` | Yes | A valid HERE Developer App Id | |\n| `here_code` | Yes | A valid HERE Developer App Code | |\n| `admin_level` | No | `country`, `state`, `county`, `city`, `district`, `postalCode` | The desired admin level of the polygon data. For example, if you would like city polygon data for _Seattle, WA_, use `city`. If `admin_level` is not passed, the API will return the admin level data for the top result in the geocoder. |\n| `location` | Yes | A location string | The desired region / query. Examples: *98122*, *Seattle, WA*, *Hong Kong*, *Brazil*, *Virginia*. |\n| `response_type` | No | `feature`, `geometry`, `feature_collection` | The desired GeoJSON object type. If the value is not provided, the API will return a `feature`. |\n\n## Examples\n\n#### Querying State of Washington feature\n```\n{LOCAL-SERVER}/query\n?here_id={HERE-ID}\n\u0026here_code={HERE-CODE}\n\u0026location=Washington State\n\u0026response_type=feature\n```\n#### Querying City of San Francisco geometry\n```\n{LOCAL-SERVER}/query\n?here_id={HERE-ID}\n\u0026here_code={HERE-CODE}\n\u0026location=San Francisco,CA\n\u0026response_type=geometry\n```\n\n### Querying State of Louisiana with the city name of New Orleans\n\nSince New Orleans is a city in the state of Louisiana, the API will return the polygon data for the state of New Orleans using using `admin_level=state`.\n```\n{LOCAL-SERVER}/query\n?here_id={HERE-ID}\n\u0026here_code={HERE-CODE}\n\u0026location= New Orleans\n\u0026admin_level=state\n```\n\n## Demo\n\nThis repository includes a demo of the API to be used with Leaflet. Instructions for running the demo:\n\nNavigate to the demo directory\n```\ncd demo\n```\nStart a local server for the front end code.\n```\npython -m SimpleHTTPServer 8888\n```\nNavigate to `localhost:8888` or to the port you configured.\n\nInside of `index.js`, be sure to insert your HERE Developer credentials into the `hereCredentials` object. These credentials authenticate the Map Tile API for Leaflet and the Polygon Query API.\n```\nconst hereCredentials: {\n   id: '',\n   code: ''\n}\n```\n\n\n## Data Usage\n\nWhen using data from this API, please comply with all terms listed on the [HERE Developer Portal FAQ](https://developer.here.com/faqs#licensing-terms).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbabbs%2Fquery-geojson-polygons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbabbs%2Fquery-geojson-polygons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbabbs%2Fquery-geojson-polygons/lists"}