GeoShape#
- class wikibaseintegrator.datatypes.geoshape.GeoShape(value=None, **kwargs)[source]#
Bases:
BaseDataTypeImplements the Wikibase data type ‘geo-shape’
Constructor, calls the superclass BaseDataType
- Parameters:
- Keyword Arguments:
prop_nr (
str) – The item ID for this claimsnaktype (
str) – The snak type, either ‘value’, ‘somevalue’ or ‘novalue’references (
Referencesor list ofClaim) – List with reference objectsqualifiers (
Qualifiers) – List with qualifier objectsrank (
WikibaseRank) – The snak type, either ‘value’, ‘somevalue’ or ‘novalue’
- from_sparql_value(sparql_value)[source]#
Parse data returned by a SPARQL endpoint and set the value to the object
The RDF representation is the full Wikimedia Commons URL of the map (e.g. http://commons.wikimedia.org/data/main/Data:Paris.map), only the page title is kept.
- get_sparql_value(**kwargs)[source]#
The IRI of the value in the RDF export: the URL of the page on Wikimedia Commons, with the page title encoded like MediaWiki’s wfUrlencode() (a space is a ‘+’, ‘:’ and ‘/’ are kept), e.g. <http://commons.wikimedia.org/data/main/Data:Paris.map>
- DTYPE = 'geo-shape'#
- PTYPE = 'http://wikiba.se/ontology#GeoShape'#
- SPARQL_IRI_PREFIX = 'http://commons.wikimedia.org/data/main/'#