fvasco / pinpoi

Import and manage point of interest
GNU General Public License v3.0
27 stars 5 forks source link

default kml from unesco, doesn't works #33

Open tassoman opened 2 years ago

tassoman commented 2 years ago

Hello, I was looking for testing #17 but I suddently had an error loading default starting kml:

Error importing placemarks

It happens by clicking 🔁 button. Looks like the file is empty

fvasco commented 2 years ago

Hi @tassoman, thank you for reporting.

That file refers to https://whc.unesco.org/en/list/kmz, that archive contains a broken XML content. I notified this issue to UNESCO some time ago without any reply, so I plan to remove this example in the future.

In the meantime, I am looking for a similar example.

tassoman commented 2 years ago

if you're ok with CSV, or json%20as%20%3Flink)%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20%0A%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22it%2Cen%22.%20%0A%20%20%7D%0A%7D%0AORDER%20BY%20DESC%20(%3Fid)%0ALIMIT%20100%0A), I've put toghether a Wikidata query to obtain a limited amount of Heritage Sites with their coordinates and link to original website.

As described into documentation, you need to customize Accept: <something> header during the request.

The choice is between:

I got inspired by Wikidata:WikiProject Cultural heritage/UNESCO/List

Maybe request's headers can be set during selection of source type (application/vnd.google-earth.kml+xml, application/gpx+xml , etc etc...)

fvasco commented 2 years ago

It looks interesting, unfortunately the SPARQL format is not planned.

tassoman commented 2 years ago

The meaning of the comment isn't to implement SparQL language but to download a json or csv file

fvasco commented 2 years ago

I suppose that PinPoi is already able to download Wikidata's files, and Wikidata is unable to produce any format available in PinPoi.

k3b commented 1 year ago

Today (2022-12-07) i downloaded https://whc.unesco.org/en/list/kmz and imported it into pinpoi without any issue.

using pinpoi version 1.9.0 from F-droid

fvasco commented 1 year ago

whc-en.kml is an invalid XML, yet.

whc-en.kml: line 98, char 185, byte 3716: Expecting bytes in the following ranges: 00..7F C2..F4.
k3b commented 1 year ago

whc-en.kml: line 98, char 185, byte 3716: Expecting bytes in the following ranges: 00..7F C2..F4.

Notepad++ decodes whc-en.kml: line 98, char 185 as [‘] which is equivalent to [& lsquo;] and should have been unicode [& #8216;]

called a unique [‘]living museum and showcase of evolution’.

from https://www.w3.org/wiki/Common_HTML_entities_used_for_typography footnote 9:

These [& lsquo; & rsquo; | & #8216; & #8217; ] are the members of the automated “Smart Quotes” set of characters incorporated into most popular word processing platforms. They are often encoded at vendor-specific code positions rather than Unicode or ISO Latin code positions, which can cause problems when they are copied into a Web document.

fvasco commented 1 year ago

Hi @k3b, please consider to use a proper binary editor, I use Okteta.

In that file, the byte 3716 is 0x91, invalid in UTF-8 encoding.

0000:0E80 | 71 75 65 20  [91] 6C 69 76  69 6E 67 20  6D 75 73 65 | que [.]living muse

Can you confirm?