id ignored
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 193
- Forks
- 91
- PR merge metrics
- No merged PRs in 30d
Description
I'd expect tokml to take the id property from a GeoJSON Feature and use for the id attribute of the <Placemark>(https://developers.google.com/kml/documentation/kmlreference#placemark).
Repro
const tokml = require('tokml')
const geojson = { type: 'Feature', id: 'abc', properties: {}, geometry: {type: 'Point', coordinates: [1,2]}};
tokml(geojson)
Actual
<?xml version="1.0" encoding="UTF-8"?>
<kml
xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Placemark>
<ExtendedData></ExtendedData>
<Point>
<coordinates>1,2</coordinates>
</Point>
</Placemark>
</Document>
</kml>
Expected
<?xml version="1.0" encoding="UTF-8"?>
<kml
xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Placemark id="abc">
<ExtendedData></ExtendedData>
<Point>
<coordinates>1,2</coordinates>
</Point>
</Placemark>
</Document>
</kml>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the tokml entry point and reproduce the supplied GeoJSON example, comparing the generated Placemark with the expected KML. Trace how a Feature becomes a Placemark and verify completion by producing id="abc" while preserving the shown coordinates and structure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100