Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many changes (fix bugs, support Labeled Places) #4

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

endolith
Copy link

@endolith endolith commented Oct 23, 2022

I've updated this to get it working with all of my Takeout files, both Saved Places and Labeled Places. You can pull whichever changes you want.

UnicodeDecodeError: 'charmap' codec can't decode byte ...
character maps to <undefined>
UnsupportedOperation: detach

Shouldn't be necessary in modern interpreters?
An address of the form `Avenue U &, E 33rd St` was causing
ExpatError: not well-formed (invalid token)

Because XML requires it to be encoded as &amp;
Each new file was continuing the sequence from the last one

(The Document ID is not affected, though.  Still need to completely
restart interpreter to make that repeatable from one KML to the next?)
Saved Places format:

```json
{'geometry': {'coordinates': [...], 'type': 'Point'},
 'properties': {'Google Maps URL': '...',
  'Location': {'Address': '...',
   'Business Name': '...',
   'Country Code': 'US',
   'Geo Coordinates': {'Latitude': '...', 'Longitude': '...'}},
  'Published': '2018-05-02T01:46:02Z',
  'Title': '...',
  'Updated': '2018-05-02T01:46:02Z'},
 'type': 'Feature'}
```

Labeled Places format:

```json
{'geometry': {'coordinates': [...], 'type': 'Point'},
 'properties': {'address': '...',
  'name': 'Home'},
 'type': 'Feature'}
```
So you can it from the command line
@endolith endolith changed the title Many changes Many changes (fix bugs, support Labeled Places) Oct 23, 2022
Actually neither is true of original .json file.  This must be a Python
simplekml issue?  Names are already encoded but addresses are not?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant