Open main menu

Property talk:P3096

Documentation

KML file
item with sitelinks to wikimedia page containing text of a relevant KML file
RepresentsWikimedia KML file (Q26267864)
Data typeItem
Domain
According to this template:

Geographic features, including:

According to statements in the property:
geographic location (Q2221906), geographical object (Q618123), thoroughfare (Q83620), railway (Q22667), itinerary (Q1322323), transport line (Q1067164), Wikimedia list article (Q13406463) and Wikimedia disambiguation page (Q4167410)
When possible, data should only be stored as statements
Allowed valuesinstance of (P31): Wikimedia KML file (Q26267864) (note: this should be moved to the property statements)
ExampleGreat Eastern Highway (Q1544264)Template:Attached KML/Great Eastern Highway (Q26267859)
SourceTransclusions of Template:Attached KML (Q6690822) (around 9600 transclusions on English Wikipedia) (note: this information should be moved to a property statement; use property source website for the property (P1896))
See alsocoordinate location (P625), OSM relation ID (P402), geoshape (P3896)
Lists
Proposal discussionProposal discussion
Current uses11,121
Search for values
Explanations [Edit]

BackgroundEdit

Currently, Keyhole Markup Language (Q79587) files cannot be uploaded to Wikimedia Commons (Q565), or any other wiki (see Phab:T28059). As a work-around, the contents of KML file are stored as wikitext on a subpage of template Template:Attached KML (Q6690822). That template is used to generate links in an article to download the file, or view on a web-based mapping provider, using the raw version of the subpage containing the KML.

Use-casesEdit

Through this property, Template:Attached KML (Q6690822), and Module:Attached KML (Q26689774), any wiki can access the article's KML file, regardless of which wiki it is on, through the following sequence:

  • Article item → KML file (P3096) → KML file item → sitelink to KML file (can get the URL to the raw KML file from the sitelink)
Example: Great Eastern Highway (Q1544264) KML file (P3096) Template:Attached KML/Great Eastern Highway (Q26267859)→sitelink: enwikiTemplate:Attached KML/Great Eastern Highway, thus the raw kml file is at https://en.wikipedia.org/w/index.php?title=Template:Attached_KML/Great_Eastern_Highway&action=raw
Value type “Wikimedia KML file (Q26267864): This property should use items as value that contain property “instance of (P31)”. On these, the value for instance of (P31) should be an item that uses subclass of (P279) with value Wikimedia KML file (Q26267864) (or a subclass thereof). (Help)
List of this constraint violations: Database reports/Constraint violations/P3096#Value type Q26267864, hourly updated report, SPARQL, SPARQL (new)
Single value: this property generally contains a single value. (Help)
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/P3096#Single value, SPARQL, SPARQL (new)
Conflicts with “instance of (P31): human (Q5), Wikimedia category (Q4167836): this property must not be used with the listed properties and values. (Help)
List of this constraint violations: Database reports/Constraint violations/P3096#Conflicts with P31, hourly updated report, SPARQL, SPARQL (new)
Scope is as main value (Q54828448): the property must be used by specified way only (Help)
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/P3096#scope, SPARQL, SPARQL (new)
Distinct values: this property likely contains a value that is different from all other items. (Help)
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/P3096#Unique value, SPARQL (every item), SPARQL (by value), SPARQL (new)

ConstraintsEdit

Pictogram voting comment.svg Item likely to be linked from this property
FIXME: add P3096 to the relevant item and link the item listed or define exceptions (Help)
Violations query: SELECT ?item { ?item wdt:P31 wd:Q26267864 MINUS { [] wdt:P3096 ?item } FILTER ( ?item not in ( wd:Q4115189,wd:Q13406268,wd:Q15397819 ) ) }
List of this constraint violations: Database reports/Complex constraint violations/P3096#Item likely to be linked from this property
This property is being used by:

Please notify projects that use this property before big changes (renaming, deletion, merge with another property, etc.)

ResourcesEdit

Example query: Find articles on French Wikipedia with a KML file available; use English labelsEdit

The following query uses these:

  • Properties: KML file (P3096) View with Reasonator View with SQID
    1 SELECT ?item ?itemLabel ?article
    2 WHERE
    3 {
    4 	?article schema:about ?item 
    5 	;	schema:isPartOf	<https://fr.wikipedia.org/> .
    6 	?item wdt:P3096 ?kml .
    7 	SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
    8 }
    


Then, use PetScan with this query ("Other sources" tab) to find articles which also don't already have a Template:Attached KML (Q6690822) template ("Templates&links" tab): Try it!

Check if all KML files for enwiki use this propertyEdit

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, KML file (P3096) View with Reasonator View with SQID
     1 #check if all KML files on enwiki are linked from an item with P3096
     2 SELECT ?kml ?kmlLabel ?article
     3 WHERE
     4 {
     5   	?kml wdt:P31 wd:Q26267864 .
     6 	?article schema:about ?kml 
     7 	;	schema:isPartOf	<https://en.wikipedia.org/> .
     8 	MINUS { [] wdt:P3096 ?kml } 
     9 	MINUS { ?kml ^wdt:P3096 [] } 
    10 	SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en" }
    11 }
    

Map of all KML filesEdit

The following query uses these:

Features: Map (Q24515275) View with Reasonator View with SQID

 1 # Coordinates of items with KML files ;)
 2 # by Jura1, 2016-08-27
 3 #defaultView:Map
 4 SELECT 
 5 	?item ?itemLabel ?itemDescription 
 6 	(SAMPLE (?coor) as ?coor1)
 7 	(SAMPLE (?layerLabel) as ?layerLabel1)
 8 	(SAMPLE (?layer) as ?layer)
 9 	(SAMPLE (?img) as ?image)
10 WHERE
11 {
12 	?item wdt:P3096 [] .
13 	?item wdt:P625 ?coor .
14 	# uncomment the next line to limit to enwiki
15 	# [] schema:about ?item ;	schema:isPartOf	<https://en.wikipedia.org/> .
16 	OPTIONAL { ?item wdt:P31 ?layer } .
17 	OPTIONAL { ?item wdt:P18 ?img } .
18 	SERVICE wikibase:label {  bd:serviceParam wikibase:language "en,en" }
19 } 
20 GROUP BY ?item ?itemLabel ?itemDescription
21 ORDER BY DESC(?item)

ChartsEdit

DiscussionEdit

Help:P3096Edit

@Jura1, Rschen7754:, or any other translation administrator: could you fix/set-up/mark the translation wiki-magic for Help:P3096 (transcluded above)? Thanks, Evad37 [talk] 01:49, 25 August 2016 (UTC)

  Done --Rschen7754 01:53, 25 August 2016 (UTC)
Maybe the ressources section could go there too (including the chart section, once it exists).
--- Jura 13:14, 27 August 2016 (UTC)
Perhaps, but then they would be above the constraints, and I thought the constraints were more important - Evad37 [talk] 15:42, 27 August 2016 (UTC)
Sure, np. The Help page thingy is still kind of new and seems to struggle with formatting issues. I'm not sure what to think of it.
--- Jura 16:47, 27 August 2016 (UTC)

Progress by wikiEdit

This is a list of wikis with KML files as of the creation of this property. The KML files need items to be created (or to be linked to an existing item) with instance of (P31)Wikimedia KML file (Q26267864); and the related articles' items need KML file (P3096) added.

 Y indicates all, or almost all, has been completed, as of the date that follows.

wiki (Q171) Wikidata item
(Wikimedia KML file (Q26267864))
Claim
(KML file (P3096))
enwiki English Wikipedia (Q328)  Y 2016-08-24  Y 2016-08-24
bnwiki Bengali Wikipedia (Q427715)  Y 2016-08-26  Y 2016-08-26
cswiki Czech Wikipedia (Q191168)  Y 2016-08-27  Y 2016-08-27
fawiki Persian Wikipedia (Q48952)  Y (none) 2016-08-27  Y (already done) 2016-08-27
frwiki French Wikipedia (Q8447)  Y 2016-08-24 (10)  Y 2016-08-24
jawiki Japanese Wikipedia (Q177837)  Y (none) 2016-08-28  Y (already done) 2016-08-28
mlwiki Malayalam Wikipedia (Q874555)  Y 2016-08-28  Y (already done) 2016-08-28
svwiki Swedish Wikipedia (Q169514)  Y 2016-08-29  Y 2016-08-29
zhwiki Chinese Wikipedia (Q30239)  Y 2016-08-28  Y 2016-08-28
  • fawiki's template, which only has two transclusions, appears to be broken - Evad37 [talk] 08:31, 27 August 2016 (UTC)

Why no shapes?Edit

Wohoo! Thanks for the initiative with storing this property and the work-arounds for KML files. One question - why is it limited to linear features? Why not shapes? I obviously don't have enough background, I feel like this is an obvious limitation of one of the technologies, but I don't know enough. So, this is not a criticism but just a question. --Denny (talk) 20:20, 29 August 2016 (UTC)

I don't see why it wouldn't handle polygons, see [1]. --Rschen7754 00:34, 30 August 2016 (UTC)
It can handle polygons, for example Template:Attached KML/Central Park (Q25033552) (the wording in the documentation was based on enwiki's Template:Attached KML (Q6690822) where the vast majority of uses are for linear features, most of which are roads – see #Charts above) - Evad37 [talk] 02:06, 30 August 2016 (UTC)
Thanks! That is rather awesome! Let's have shapes for all countries, and counties, and islands, and... --Denny (talk) 22:40, 31 August 2016 (UTC)
  • Interestingly, cswiki uses it mainly for disambiguation pages.
    --- Jura 17:46, 30 August 2016 (UTC)

295 new KML:s for municipalities in Finland on svwikiEdit

Those 295 articles in Svwiki have now KML-files and KML-templates. Is there a good way to ad them to WD, or can I request bot help for it in some way. Taxelson (talk) 19:57, 31 May 2017 (UTC)

Return to "P3096" page.