本文整理汇总了Python中django.contrib.gis.gdal.SpatialReference.clone方法的典型用法代码示例。如果您正苦于以下问题:Python SpatialReference.clone方法的具体用法?Python SpatialReference.clone怎么用?Python SpatialReference.clone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类django.contrib.gis.gdal.SpatialReference
的用法示例。
在下文中一共展示了SpatialReference.clone方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_unicode
# 需要导入模块: from django.contrib.gis.gdal import SpatialReference [as 别名]
# 或者: from django.contrib.gis.gdal.SpatialReference import clone [as 别名]
def test_unicode(self):
wkt = (
'PROJCS["DHDN / Soldner 39 Langschoß",'
'GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",'
'SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6314"]],'
'PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],'
'UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],'
'AUTHORITY["EPSG","4314"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],'
'PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",50.66738711],'
'PARAMETER["central_meridian",6.28935703],PARAMETER["false_easting",0],'
'PARAMETER["false_northing",0],AUTHORITY["mj10777.de","187939"],AXIS["x",NORTH],AXIS["y",EAST]]'
)
srs = SpatialReference(wkt)
srs_list = [srs, srs.clone()]
srs.import_wkt(wkt)
for srs in srs_list:
self.assertEqual(srs.name, 'DHDN / Soldner 39 Langschoß')
self.assertEqual(srs.wkt, wkt)
self.assertIn('Langschoß', srs.pretty_wkt)
self.assertIn('Langschoß', srs.xml)