摘要:
1.使用conda install -c conda-forge qgis安装qgis,发现在pycharm里面总是显示no module named 'qgis',windows和Linux系统都这样 2.最后还是使用qgis自带的.bat文件的环境搭建的qgis环境,没有使用conda
阅读全文
posted @ 2021-04-13 17:16
zmbreathing
阅读(537)
推荐(0)
摘要:
1.按照官网的流程输入命令https://qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu 出现 1 (base) server123@ubuntu:~$ sudo apt-get install qgis 2 Reading pac
阅读全文
posted @ 2021-04-09 11:09
zmbreathing
阅读(1082)
推荐(0)
摘要:
这里image_path_list是一个glob.iglob的generator,在遍历完后再定义一个glob.iglob(mask_path_list)后就无数据,可以看到lst(mask_path_list)为空列表,发现这两个generator的地址相差也很近
阅读全文
posted @ 2021-04-07 11:39
zmbreathing
阅读(135)
推荐(0)
摘要:
1.模型生成的二值预测图如图所示(已将原始数据的坐标系通过gdal转到预测图中) 2.采用如下代码将其转化为面矢量 1 def polygonize(inImgPath, outImgPath): 2 inImg = CXImage() 3 inImg.Open(inImgPath) 4 srcba
阅读全文
posted @ 2021-02-25 21:54
zmbreathing
阅读(768)
推荐(0)
摘要:
1.反转字符串https://leetcode-cn.com/problems/reverse-string/ 一开始没想到,看了解答才恍然大悟原来这么简单 双指针法 1 class Solution: 2 def reverseString(self, s: List[str]) -> None:
阅读全文
posted @ 2021-01-27 21:34
zmbreathing
阅读(97)
推荐(0)
摘要:
1.删除链表中的节点https://leetcode-cn.com/problems/delete-node-in-a-linked-list/ 一开始没看清题目中传入的参数为“要被删除的节点”,找了半天链表在哪 1 class ListNode: 2 def __init__(self, x):
阅读全文
posted @ 2021-01-27 21:24
zmbreathing
阅读(72)
推荐(0)
摘要:
1.2的幂https://leetcode-cn.com/problems/power-of-two/ 我的想法是不停地除以2,直到不能整除,最终为1则返回True,否则返回False 时间复杂度48% 1 class Solution: 2 def isPowerOfTwo(self, n: in
阅读全文
posted @ 2021-01-27 16:01
zmbreathing
阅读(95)
推荐(0)
摘要:
1.数组中的第k个最大元素https://leetcode-cn.com/problems/kth-largest-element-in-an-array/ 看到这题只想到排序之后取第k个元素,那就是一个最基本的排序问题了 看了解答之后理解了“快速选择”思想,即在快排的过程中只递归目标方向。 1 i
阅读全文
posted @ 2021-01-26 19:27
zmbreathing
阅读(140)
推荐(0)
摘要:
1.相交链表https://leetcode-cn.com/problems/intersection-of-two-linked-lists/ 看到这个题目没有理解示例1到底是什么意思,为什么都有1但相交的起始节点不是1那个点 后来知道了是要节点本身相等(不仅包括值还包括地址)。 看到官方的双指针
阅读全文
posted @ 2021-01-25 20:26
zmbreathing
阅读(86)
推荐(0)
摘要:
1.LRU缓存机制https://leetcode-cn.com/problems/lru-cache/ 拿到题目先想的是用字典,删除元素就想找是否有可以顺序删除字典元素的方法,但是好像没有 看了官方答案感觉有点高深,哈希表+双向链表 1 class DLinkedNode: 2 def __ini
阅读全文
posted @ 2021-01-23 10:03
zmbreathing
阅读(101)
推荐(0)