本文整理汇总了Python中realtime.shake_event.ShakeEvent.cities_to_shapefile方法的典型用法代码示例。如果您正苦于以下问题:Python ShakeEvent.cities_to_shapefile方法的具体用法?Python ShakeEvent.cities_to_shapefile怎么用?Python ShakeEvent.cities_to_shapefile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类realtime.shake_event.ShakeEvent
的用法示例。
在下文中一共展示了ShakeEvent.cities_to_shapefile方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_cities_to_shape
# 需要导入模块: from realtime.shake_event import ShakeEvent [as 别名]
# 或者: from realtime.shake_event.ShakeEvent import cities_to_shapefile [as 别名]
def test_cities_to_shape(self):
"""Test that we can retrieve the cities local to the event."""
working_dir = shakemap_extract_dir()
shake_event = ShakeEvent(
working_dir=working_dir,
event_id=SHAKE_ID,
data_is_local_flag=True)
file_path = shake_event.cities_to_shapefile()
self.assertTrue(os.path.exists(file_path))
示例2: test_cities_to_shape
# 需要导入模块: from realtime.shake_event import ShakeEvent [as 别名]
# 或者: from realtime.shake_event.ShakeEvent import cities_to_shapefile [as 别名]
def test_cities_to_shape(self):
"""Test that we can retrieve the cities local to the event."""
shake_event = ShakeEvent(SHAKE_ID, data_is_local_flag=True)
file_path = shake_event.cities_to_shapefile()
self.assertTrue(os.path.exists(file_path))
示例3: test_cities_to_shape
# 需要导入模块: from realtime.shake_event import ShakeEvent [as 别名]
# 或者: from realtime.shake_event.ShakeEvent import cities_to_shapefile [as 别名]
def test_cities_to_shape(self):
"""Test that we can retrieve the cities local to the event."""
shake_id = '20120726022003'
shake_event = ShakeEvent(shake_id)
file_path = shake_event.cities_to_shapefile()
assert os.path.exists(file_path)