mapbox / mapbox/togeojson

Not all areas of KML file get converted

Open
#142 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.3k
Forks
322
PR merge metrics
No merged PRs in 30d

Description

To the people behind ToGeoJson:

First of all, because it is not done enough, I just want to express how much I greatly appreciate your work and how much it helps other people out there including myself when they have to deal with KML files.

The problem that I have now is that - for the first time - I have a KML file that is not correctly converted to GeoJson when I run it through your script. One particular polygon, or at least the majority of it is missing.

Validating the KML and also mapping it, show that there are no apparent issues with the whole KML-file and also that this particular missing polygon seems to be just fine.

However, once it is converted the GeoJSON, the mapped GEOJSON has a hole and the specific area is only shown in parts.

Here are the screenshots of the KMLs mapped with https://mygeodata.cloud/:

kml_all kml_area

And here are the GEOJSONs mapped with http://geojson.io

geojson_all geojson_area

Link to the KML for the missing area
https://drive.google.com/file/d/1YLGo77l_u0xQkt5Qg8xko64aXOMhWJD7/view?usp=sharing

Link to the KML for the entire file
https://drive.google.com/file/d/1byEvMsUad6XUtHN7E-gSRmHQhZT-4qRd/view?usp=sharing

I would be very thankful, if you can have a look into the issue and explain to me what went wrong.

Best,

Haluka

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by downloading the linked KML for the missing area and the entire file, then reproduce their conversion and compare the resulting GeoJSON with the source polygon. No files, tests, or entry points are named; done means identifying why the area is omitted and confirming that the converted GeoJSON contains the full polygon without the reported hole.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.