{"id":20955132,"url":"https://github.com/bryik/geojson-to-kml","last_synced_at":"2025-05-14T04:33:02.067Z","repository":{"id":40314080,"uuid":"235707799","full_name":"bryik/geojson-to-kml","owner":"bryik","description":"A fork of tokml.","archived":false,"fork":false,"pushed_at":"2023-01-07T05:00:06.000Z","size":646,"stargazers_count":4,"open_issues_count":6,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T14:09:13.862Z","etag":null,"topics":["geojson","kml"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bryik.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}},"created_at":"2020-01-23T02:14:00.000Z","updated_at":"2024-02-01T08:07:10.000Z","dependencies_parsed_at":"2023-02-06T12:31:42.256Z","dependency_job_id":null,"html_url":"https://github.com/bryik/geojson-to-kml","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/bryik%2Fgeojson-to-kml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryik%2Fgeojson-to-kml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryik%2Fgeojson-to-kml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryik%2Fgeojson-to-kml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bryik","download_url":"https://codeload.github.com/bryik/geojson-to-kml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254071357,"owners_count":22009778,"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","kml"],"created_at":"2024-11-19T01:18:10.847Z","updated_at":"2025-05-14T04:33:01.586Z","avatar_url":"https://github.com/bryik.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"_This is a fork of [mapbox/tokml](https://github.com/mapbox/tokml)._\n\n# geojson-to-kml\n\nConvert [GeoJSON](http://geojson.org/) to [KML](https://developers.google.com/kml/documentation/).\n\n## Usage\n\nwith node\n\n    npm install --save geojson-to-kml\n\n## Example\n\n```js\nimport tokml from \"geojson-to-kml\";\n\n// kml is a string of KML data, geojsonObject is a JavaScript object of\n// GeoJSON data\nconst kml = tokml(geojsonObject);\n\n// grab name and description properties from each object and write them in\n// KML\nconst kmlNameDescription = tokml(geojsonObject, {\n  name: \"name\",\n  description: \"description\",\n});\n\n// name and describe the KML document as a whole\nconst kmlDocumentName = tokml(geojsonObject, {\n  documentName: \"My List Of Markers\",\n  documentDescription: \"One of the many places you are not I am\",\n});\n```\n\n## API\n\n### `tokml(geojsonObject, [options])`\n\nGiven [GeoJSON](http://geojson.org/) data as an object, return KML data as a\nstring of XML.\n\n`options` is an optional object that takes the following options:\n\n**The property to name/description mapping:** while GeoJSON supports freeform\n`properties` on each feature, KML has an expectation of `name` and `description`\nproperties that are often styled and displayed automatically. These options let\nyou define a mapping from the GeoJSON style to KML's.\n\n- `name`: the name of the property in each GeoJSON Feature that contains\n  the feature's name\n- `description`: the name of the property in each GeoJSON Feature that contains\n  the feature's description\n\n**Timestamp:** KML can associate features with a moment in time via the `TimeStamp` tag. GeoJSON doesn't\nhave a comparable field, but a custom property can be mapped\n\n- `timestamp`: the name of the property in each GeoJSON Feature that contains\n  a timestamp in XML Schema Time (yyyy-mm-ddThh:mm:sszzzzzz)\n\n**Document name and description**: KML supports `name` and `description` properties\nfor the full document.\n\n- `documentName`: the name of the full document\n- `documentDescription`: the description of the full document\n\n**[simplestyle-spec](https://github.com/mapbox/simplestyle-spec)** support:\n\n- `simplestyle`: set to `true` to convert simplestyle-spec styles into KML styles\n\n## Development\n\nRequires [node.js](http://nodejs.org/).\n\n### install\n\n```bash\nnpm install\n```\n\n### test\n\n```bash\nnpm test\n```\n\n### build\n\n```bash\nnpm run build\n```\n\n## Rationale\n\nWhy use `geojson-to-kml` instead of `toKml`? Well, `toKml` hasn't been updated in a while and installing it causes `npm` to complain about vulnerabilites.\n\n[@maphubs/tokml](https://github.com/maphubs/tokml) is another fork of `toKml` that I was not aware of when I made `geojson-to-kml`; check it out, it might be a better option!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryik%2Fgeojson-to-kml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbryik%2Fgeojson-to-kml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryik%2Fgeojson-to-kml/lists"}