
Python
盐水鱼
这个作者很懒,什么都没留下…
展开
-
Python读取Tifff方法汇总
1、gdalfrom osgeo import gdalpath = r""ds = gdal.Open(path)2、tifffileimport tifffilepath = r""tif = tifffile.imread(path)原创 2021-05-12 20:47:40 · 1501 阅读 · 0 评论 -
GDAL安装
一、Windows 环境1、使用condaconda install gdal2、使用whl下载对应版本的gdalhttps://www.lfd.uci.edu/~gohlke/pythonlibs/#gdalpip install GDAL‑3.2.3‑pp37‑pypy37_pp73‑win_amd64.whl注意whl的路径3、使用pip(不推荐)该方法经常出错pip install gdal二、Linux(Ubuntu)1、使用condaconda install -原创 2021-05-12 17:19:53 · 2055 阅读 · 0 评论 -
Pypi更换镜像源
仅做记录,方便找阿里云 http://mirrors.aliyun.com/pypi/simple/豆瓣 http://pypi.douban.com/simple/清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/中科大 http://pypi.mirrors.ustc.edu.cn/simple/临时换源pip install -i XXX https://pypi.tuna.tsinghua.edu.cn/simple/持久换源(Ubunt原创 2021-03-27 19:09:28 · 270 阅读 · 0 评论 -
GDAL遥感影像像素坐标与地理(投影)坐标相互转换
想直接用的代码,找不着了。。。只能翻出以前写的代码,记录一下# 像素坐标转地理(投影)坐标def pixel2geo(geotrans, px, py): ulX = geotrans[0] ulY = geotrans[3] pixelWidth = geotrans[1] pixelHeight = geotrans[5] rotate1 = geotrans[2] rotate2 = geotrans[4] Xgeo = ulX + px原创 2021-01-26 17:40:57 · 1999 阅读 · 0 评论 -
Python学习笔记(一)
命名规则1、函数、变量及属性应该用小写字母来拼写,单词之间用下划线相连。如student_score2、受保护的实例属性,应该以单个下划线开头,表示protected。如_student_class3、私有实例属性,应该以两个下划线开头,表示private。如__student_id4、类与异常,应该以每个单词首字母大写的形式来命名。如Student5、模块级别的常量,应该全部采用大写字母来拼写,单词之间以下划线相连。6、类中的实例方法,应该把首个参数命名为self。7、类方法的首个参数,应该原创 2020-12-20 14:01:37 · 152 阅读 · 0 评论