{"id":18739733,"url":"https://github.com/roblabs/jsontogeojson","last_synced_at":"2025-07-10T08:37:50.322Z","repository":{"id":136165079,"uuid":"64969448","full_name":"roblabs/jsontogeojson","owner":"roblabs","description":null,"archived":false,"fork":false,"pushed_at":"2016-08-22T00:28:33.000Z","size":367,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T06:14:58.987Z","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/roblabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2016-08-04T21:47:34.000Z","updated_at":"2016-08-04T21:47:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"cb737ebb-c6d0-4ee2-859d-e33b004443c7","html_url":"https://github.com/roblabs/jsontogeojson","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roblabs%2Fjsontogeojson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roblabs%2Fjsontogeojson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roblabs%2Fjsontogeojson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roblabs%2Fjsontogeojson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roblabs","download_url":"https://codeload.github.com/roblabs/jsontogeojson/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239619570,"owners_count":19669447,"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-11-07T15:37:11.238Z","updated_at":"2025-02-19T07:47:42.946Z","avatar_url":"https://github.com/roblabs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# JSON to GeoJson.\n\nThis converts a certain forms of JSON\nto\n[GeoJSON](http://www.geojson.org/), with [nodejs](http://nodejs.org/).\n\n* the original data structure is preserved as the properties in GeoJson.\n\n\n## Using it as a console utility\n\n* Install [Node.js](https://nodejs.org/en/download/)\n* Node.js makes use of `npm`, which should be part of the install\n* download dependencies with `npm install -g`.\n\n\n\n* Run this to test\n```js\n\u003e ./cli.js test/results.json \u003e test/results.geojson\n```\n\n-----\n\n![GIF demo](cli.gif)\n\n-----\n\n### If your JSON is metadata.json\n* generated from [Maptiler](http://www.maptiler.com) or [gdal2tiles](https://github.com/roblabs/gdal2tilesp)\n\nThis JSON is converted to this example [Geojson](./test/metadata.geojson)\n\n```js\n{\n\t\"name\": \"324511630_Descanso\",\n\t\"description\": \"Descanso Ranger Station, 7.5 minute quadrangle of 32 45', -116 30'\",\n\t\"version\": \"1.0.0\",\n\t\"attribution\": \"\",\n\t\"type\": \"overlay\",\n\t\"format\": \"png\",\n\t\"minzoom\": \"11\",\n\t\"maxzoom\": \"15\",\n\t\"bounds\": \"-116.625,32.7499998291,-116.500000129,32.8749999991\",\n\t\"scale\": \"1\",\n\t\"profile\": \"mercator\"\n}\n\n```\n\n\n-----\n### If your JSON is a results array of this from\n\n```js\n{ \"results\": [\n        {\n        \"data\": 17,\n        \"data1\": \"2006-04-23T19:32:42.469Z\",\n        \"data2\": 2.253802555866411,\n        \"latitude\": 1.2,\n        \"longitude\": 2.3,\n        \"data3\": 16.2,\n        \"data4\": \"some-data\",\n        \"data5\": \"2004-04-23T19:32:42.469Z\",\n        \"data6\": 20\n    }\n  ]\n}\n\n```\n\nWhich generates the following GeoJSON\n```js\n{\n  \"type\": \"FeatureCollection\",\n  \"features\": [\n    {\n      \"type\": \"Feature\",\n      \"properties\": {\n        \"data\": 17,\n        \"data1\": \"2006-04-23T19:32:42.469Z\",\n        \"data2\": 2.253802555866411,\n        \"latitude\": 1.2,\n        \"longitude\": 2.3,\n        \"data3\": 16.2,\n        \"data4\": \"some-data\",\n        \"data5\": \"2004-04-23T19:32:42.469Z\",\n        \"data6\": 20\n      },\n      \"geometry\": {\n        \"type\": \"Point\",\n        \"coordinates\": [\n          2.3,\n          1.2\n        ]\n      }\n    }\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froblabs%2Fjsontogeojson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froblabs%2Fjsontogeojson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froblabs%2Fjsontogeojson/lists"}