We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d8e193 commit 45f8becCopy full SHA for 45f8bec
owslib/crs.py
@@ -1826,7 +1826,11 @@ def getcodeuri1(self):
1826
:returns: String code formated in "http://www.opengis.net/def/crs/EPSG/0/code"
1827
"""
1828
1829
- return 'http://www.opengis.net/def/crs/EPSG/0/%s' % self.code
+ return 'http://www.opengis.net/def/crs/{}/{}/{}'.format(
1830
+ self.authority or "EPSG",
1831
+ self.version or "0",
1832
+ self.code
1833
+ )
1834
1835
def getcodeuri2(self):
1836
"""Create for example "http://www.opengis.net/gml/srs/epsg.xml#4326"
tests/doctests/crs.txt
@@ -44,3 +44,5 @@
44
'1.3'
45
>>> c.getcodeurn()
46
'urn:ogc:def:crs:OGC:1.3:CRS84'
47
+ >>> c.getcodeuri1()
48
+ 'http://www.opengis.net/def/crs/OGC/1.3/CRS84'
0 commit comments