Property talk:P3096
Documentation
item with sitelinks to wikimedia page containing text of a relevant KML file
Background[edit]
See also Meta:KML files.
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-cases[edit]
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)
enwiki
→Template: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=rawList of violations of this constraint: Database reports/Constraint violations/P3096#Single value, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P3096#Type Q2221906, Q618123, Q83620, Q22667, Q1322323, Q1067164, Q13406463, Q4167410, Q18325841, Q21484471, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P3096#Scope, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P3096#Unique value, SPARQL (every item), SPARQL (by value)
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
fix label or adjust regex for language at Property:P3096#P1552: complex constraint value label (Q100884525) (Help)
Violations query:
SELECT ?item ?lang ?l ?value ?v ?t WHERE { hint:Query hint:optimizer "None". wd:P3096 p:P1552 [ ps:P1552 wd:Q100884525 ; pq:P8770 ?t ] BIND( lang(?t) as ?lang) ?item wdt:P3096 ?value. OPTIONAL { ?item rdfs:label ?l . FILTER(lang(?l) = ?lang) } ?value rdfs:label ?v . FILTER(lang(?v) = ?lang) FILTER ( !REGEX(str(?v), str(?t) ) ) } # ORDER BY ?lang ?v
List of this constraint violations: Database reports/Complex constraint violations/P3096#value label (1: should match regex)
determine a regex and add it at Property:P3096#P1552: complex constraint value label (Q100884525) (Help)
Violations query:
SELECT ?item ?lang (COUNT(*) as ?count) (SAMPLE(?l) as ?sample_l) (SAMPLE(?s) as ?sample_s) (SAMPLE(?value) as ?sample_value) WHERE { hint:Query hint:optimizer "None". ?s wdt:P3096 ?value . ?value rdfs:label ?l . BIND(lang(?l) as ?lang) OPTIONAL { wd:P3096 p:P1552 [ ps:P1552 wd:Q100884525 ; pq:P8770 ?t ] FILTER( lang(?t) = ?lang) } FILTER( !BOUND(?t) ) ?item wdt:P424 ?lang ; wdt:P305 [] . } GROUP BY ?item ?lang HAVING ( ?count > 9) ORDER BY DESC ( ?count)
List of this constraint violations: Database reports/Complex constraint violations/P3096#value label (1: languages lacking a regex)
This property is being used by:
Please notify projects that use this property before big changes (renaming, deletion, merge with another property, etc.) |
Resources[edit]
Example query: Find articles on French Wikipedia with a KML file available; use English labels[edit]
The following query uses these:
- Properties: KML file (P3096)
SELECT ?item ?itemLabel ?article WHERE { ?article schema:about ?item ; schema:isPartOf <https://fr.wikipedia.org/> . ?item wdt:P3096 ?kml . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } }
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 property[edit]
The following query uses these:
- Properties: instance of (P31) , KML file (P3096)
#check if all KML files on enwiki are linked from an item with P3096 SELECT ?kml ?kmlLabel ?article WHERE { ?kml wdt:P31 wd:Q26267864 . ?article schema:about ?kml ; schema:isPartOf <https://en.wikipedia.org/> . MINUS { [] wdt:P3096 ?kml } MINUS { ?kml ^wdt:P3096 [] } SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en" } }
Map of all KML files[edit]
The following query uses these:
- Properties: KML file (P3096) , coordinate location (P625) , instance of (P31) , image (P18)
Features: map (Q24515275)
# Coordinates of items with KML files ;)
# by Jura1, 2016-08-27
#defaultView:Map
SELECT
?item ?itemLabel ?itemDescription
(SAMPLE (?coor) as ?coor1)
(SAMPLE (?layerLabel) as ?layerLabel1)
(SAMPLE (?layer) as ?layer)
(SAMPLE (?img) as ?image)
WHERE
{
?item wdt:P3096 [] .
?item wdt:P625 ?coor .
# uncomment the next line to limit to enwiki
# [] schema:about ?item ; schema:isPartOf <https://en.wikipedia.org/> .
OPTIONAL { ?item wdt:P31 ?layer } .
OPTIONAL { ?item wdt:P18 ?img } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en" }
}
GROUP BY ?item ?itemLabel ?itemDescription
ORDER BY DESC(?item)
Charts[edit]
Instance of[edit]
Graphs are temporarily unavailable due to technical issues. |
Country[edit]
Graphs are temporarily unavailable due to technical issues. |
Consistency of value labels with value label regex[edit]
This list is periodically updated by a bot. Manual changes to the list will be removed on the next update! WDQS | PetScan | TABernacle | Find images | Recent changes
|
Discussion[edit]
Help:P3096[edit]
@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)
- 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)
- 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.
- 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)
- Maybe the ressources section could go there too (including the chart section, once it exists).
Progress by wiki[edit]
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.
indicates all, or almost all, has been completed, as of the date that follows.
wiki (Q171) | Wikidata item (Wikimedia KML file (Q26267864)) |
Wikidata claim (KML file (P3096)) | |
---|---|---|---|
enwiki | English Wikipedia (Q328) | 2016-08-24 | 2016-08-24 |
bnwiki | Bangla Wikipedia (Q427715) | 2016-08-26 | 2016-08-26 |
cswiki | Czech Wikipedia (Q191168) | 2016-08-27 | 2016-08-27 |
fawiki | Persian Wikipedia (Q48952) | (none) 2016-08-27 | (already done) 2016-08-27 |
frwiki | French Wikipedia (Q8447) | 2016-08-24 (10) | 2016-08-24 |
jawiki | Japanese Wikipedia (Q177837) | (none) 2016-08-28 | (already done) 2016-08-28 |
mlwiki | Malayalam Wikipedia (Q874555) | 2016-08-28 | (already done) 2016-08-28 |
svwiki | Swedish Wikipedia (Q169514) | 2016-08-29 | 2016-08-29 |
zhwiki | Chinese Wikipedia (Q30239) | 2016-08-28 | 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 svwiki[edit]
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)
Fault traces as KML file[edit]
I am active in WikiProject_Geology and am considering if and how this property could be used on items with instance of (P31) = fault (Q47089). I've made a go at it with Maynard Lake Fault (Q97732371). I welcome feedback. Trilotat (talk) 01:04, 30 July 2020 (UTC)
- All Properties
- Properties with wikibase-item-datatype
- Properties used on 10000+ items
- Properties with constraints on type
- Properties with single value constraints
- Properties with conflicts with constraints
- Properties with scope constraints
- Properties with unique value constraints
- Properties with complex constraints