本文整理汇总了Python中nansat.domain.Domain.get_border_postgis方法的典型用法代码示例。如果您正苦于以下问题:Python Domain.get_border_postgis方法的具体用法?Python Domain.get_border_postgis怎么用?Python Domain.get_border_postgis使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nansat.domain.Domain
的用法示例。
在下文中一共展示了Domain.get_border_postgis方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_border_postgis
# 需要导入模块: from nansat.domain import Domain [as 别名]
# 或者: from nansat.domain.Domain import get_border_postgis [as 别名]
def test_get_border_postgis(self):
d = Domain(4326, "-te 25 70 35 72 -ts 500 500")
result = d.get_border_postgis()
self.assertIsInstance(result, str)
self.assertEquals(result, "PolygonFromText('POLYGON((25.0 72.0,26.0 72.0,27.0 72.0,28.0 "
"72.0,29.0 72.0,30.0 72.0,31.0 72.0,32.0 72.0,33.0 72.0,34.0 "
"72.0,35.0 72.0,35.0 72.0,35.0 71.8,35.0 71.6,35.0 71.4,35.0 "
"71.2,35.0 71.0,35.0 70.8,35.0 70.6,35.0 70.4,35.0 70.2,35.0 "
"70.0,35.0 70.0,34.0 70.0,33.0 70.0,32.0 70.0,31.0 70.0,30.0 "
"70.0,29.0 70.0,28.0 70.0,27.0 70.0,26.0 70.0,25.0 70.0,25.0 "
"70.0,25.0 70.2,25.0 70.4,25.0 70.6,25.0 70.8,25.0 71.0,25.0 "
"71.2,25.0 71.4,25.0 71.6,25.0 71.8,25.0 72.0))')")