Topic on Help talk:Extension:Kartographer

Commons Geoshapes with SPARQL queries

9
Yair rand (talkcontribs)

(I hope this is an acceptable place to ask questions regarding how to use this extension?)


Is there any way to use specific geoshapes from Commons (using Wikidata's geoshape property) on maps pulled using Wikidata SPARQL queries?

2A02:8109:9B40:78:452:F808:5C06:3550 (talkcontribs)
Yair rand (talkcontribs)

No, those geoshapes are not pulled from Commons via Wikidata. They are pulled from another source (I'm not completely sure which), that has a very limited set of geoshapes available, and does not, for example, include all countries.

Dipsacus fullonum (talkcontribs)

That other source is Open Street Map (OSM) which indeed do have geoshapes for very many things, but you need to put a Wikidata tag to the OSM relations before they can be used by Kartographer. You can log in OSM with your Wikimedia login and edit the map data. They is a brief explanation of how to that at Help:Extension:Kartographer/OSM. But not all relations (geoshapes) at OSM can be used. It depends on their their type. See phab:T156433.

The answer to the original question is no as far as I know.

Yair rand (talkcontribs)

Adding Wikidata tags to OSM relations doesn't seem to work.

See for example, w:User:Yair rand/mapsandbox2. This is a very simple, one-line query showing all UN member states. However, despite the Wikidata item for Russia linking to the correct OSM relation, which links back to the Wikidata item, the boundaries for Russia still don't work (along with the boundaries for China, Brazil, Argentina, and many others).

Dipsacus fullonum (talkcontribs)

The boundaries for these countries works when I look at your mapsandbox2.

Yair rand (talkcontribs)

That's really confusing. I just tried it on multiple browsers on multiple computers, and couldn't get those countries to show up highlighted in the dark grey. Other countries show up highlighted, but certain ones aren't.

Very bizarre.

Dipsacus fullonum (talkcontribs)

Yes, I have also several times experienced some strange behavior from using Kartographer with external OSM data. I just made a new case about it on Phabricator at phab:T224846.

Yair rand (talkcontribs)

That task is marked as fixed, but certain countries still don't show up. May or may not be related to phab:T218097, I'm not sure...

Reply to "Commons Geoshapes with SPARQL queries"