Skip to content

Commit

Permalink
Merge pull request #1710 from kvjrhall/master
Browse files Browse the repository at this point in the history
Introduce WGS84 DefinedNamespace
  • Loading branch information
nicholascar committed Feb 21, 2022
2 parents b89e7ab + 435534c commit 90e804f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
25 changes: 25 additions & 0 deletions rdflib/namespace/_WGS.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class WGS(DefinedNamespace):
"""
Basic Geo (WGS84 lat/long) Vocabulary
The HTML Specification for the vocabulary can be found
`here <https://www.w3.org/2003/01/geo/>`.
"""

_NS = Namespace("https://www.w3.org/2003/01/geo/wgs84_pos#")

# http://www.w3.org/2000/01/rdf-schema#Class
SpatialThing: URIRef
Point: URIRef

# http://www.w3.org/2002/07/owl#DatatypeProperty
alt: URIRef

lat: URIRef # http://www.w3.org/2003/01/geo/wgs84_pos#lat
lat_long: URIRef
location: URIRef
long: URIRef
3 changes: 3 additions & 0 deletions rdflib/namespace/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
* TIME
* VANN
* VOID
* WGS
* XSD
.. code-block:: pycon
Expand Down Expand Up @@ -373,6 +374,7 @@ def __init__(self, graph: "Graph"):
self.bind("time", TIME)
self.bind("vann", VANN)
self.bind("void", VOID)
self.bind("wgs", WGS)
self.bind("xsd", XSD)

# Namespace bindings.
Expand Down Expand Up @@ -777,4 +779,5 @@ def get_longest_namespace(trie: Dict[str, Any], value: str) -> Optional[str]:
from rdflib.namespace._TIME import TIME
from rdflib.namespace._VANN import VANN
from rdflib.namespace._VOID import VOID
from rdflib.namespace._WGS import WGS
from rdflib.namespace._XSD import XSD

0 comments on commit 90e804f

Please sign in to comment.