models.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:imagery 作者: cenima-ibama 项目源码 文件源码
def create_scene(self):
        """Get or Create a new Scene object for this path and row."""
        scene_date = calendar_date(
            self.next_scene_name()[9:13],
            self.next_scene_name()[13:16]
            )

        try:
            geom = Polygon(get_bounds(self.next_scene_name()))
        except IndexError:
            geom = None

        try:
            cloud_rate = get_cloud_rate(self.next_scene_name())
        except FileNotFoundError:
            cloud_rate = None

        return Scene.objects.get_or_create(
            path=self.path,
            row=self.row,
            sat='L8',
            name=self.next_scene_name(),
            date=scene_date,
            status='downloading',
            geom=geom,
            cloud_rate=cloud_rate
            )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号