notepad++

MODIS系列之NDVI(MOD13Q1)四:MRT单次及批次处理数据

╄→尐↘猪︶ㄣ 提交于 2020-04-18 09:05:24
前言: 本篇文章的出发点是因为之前接触过相关研究,困囧于该系列资料匮乏,想做一个系列。个人道行太浅,不足之处还请见谅。愿与诸君共勉。 数据准备: MODIS数据产品MOD13Q1—以2010年河南省3、4、5三个月为例: 一、MRT单次数据操作 (1).进入GUI界面操作 1.将所需处理的一个.hdf原始数据加载进来 2.通过左右选项选择所需波段(MOD13Q1已将NDVI提供,只需保留选择就行) (若用的数据比如MOD12Q1计算NDVI,则Modis算法如公式:NDVI=(Band2-Band1)/(Band2+Band1)。那么就需要将Band2和Band1波段提取出来) 3.Spatial Subset(空间子集):选择Input Lat/Long (输入纬度/经度) input line/sample (输入行/样本) output projection (X/Y输出投影X / Y) 4和5在一起 4.选择文件保存路径: 5.输出数据类型: 如我保存的路径( 必须同原始数据也就是.hdf在同一文件夹下 )就是F:\MODIS\.tif (注意,直接在MODIS文件夹后加 \.tif 就行。生成的.tif文件名直接等同于在同一个文件夹下.hdf文件同名(建议相同操作,通常数据多,命名易辨且重要)) 6.输出文件类型:GEOTIFF(我们要的就是.tif数据文件) 7

REGEX to trim a string after 180 characters and before |

元气小坏坏 提交于 2020-04-11 16:22:59
问题 In a pipe separated text file I need to trim the first column to no more than 180 characters. If there is less than 180 characters I'll keep whatever is there. Now the ugly part... I'm trying to do this in Notepad++ which means I can use find/replace with regex but not actual code. Not sure how to do a regex "If you hit a pipe before 180 you don't need to trim anything." 回答1: You can use this regex: ^([^|]{0,180})[^|]+(.*)$ and this as the replace: \1\2 Here's a screen shot of the Find

三分钟教会你Python数据分析—数据导入,小白基础入门必看内容

ⅰ亾dé卋堺 提交于 2020-04-09 19:00:01
前言 文的文字及图片来源于网络,仅供学习、交流使用,不具有任何商业用途,版权归原作者所有,如有问题请及时联系我们以作处理。 作者:小白 PS:如有需要Python学习资料的小伙伴可以加点击下方链接自行获取http://t.cn/A6Zvjdun 今天我们来学习数据导入,需要使用到Pandas模块。 模块相当于是一个文件夹,它能够用于存放同个主题相关的Python代码段,包括定义函数、类和变量。 例如将数据处理相关的函数都存放在一个模块里,将数据分析相关的函数都存放在一个模块里,将数据可视化相关的函数都存放在一个模块里。这样就可以在其他有需要的地方进行调用,在编写程序的时候,经常需要引用其它模块。 你可以将Excel菜单中的每个选项卡 看成是一个模块,例如数据选项卡下就包含了数据获取和转换、连接、排序和筛选、数据工具等功能。只是它以图形界面的方式供我们选择使用。 而Python中的模块一般看不见摸不着,需要在使用的时候进行导入使用,所以对初学者来说不算太友好,这也是大家认为Python难学的原因之一。 另外Python中模块的概念,在 Java 中称之为包(package),而在 C\C++中则称之为库(library),Java和C\C++都是程序员常用的编程语言,所以有些程序员就会把Python 中的模块混淆称之为包和库,你只要明白它们说的是一回事即可。 原来是这么回事

Find end of the line in regular expression using notepad++

不打扰是莪最后的温柔 提交于 2020-04-08 05:42:06
问题 I am working with Notepad++ and I would like to find the new line (after the hyphen, optional space and some characters in the end line). I have came up with something like this : -[ ]?.*\n I have also tried : -[ ]?.*(\n) -[ ]?.*(\r\n) -[ ]?.*[\r\n] -[ ]?.*[\n] None of these worked. I am working on Windows if it matters. 回答1: Do you actually need to match the line break? If not, you can simply use $ which is the anchor for end of a line. 回答2: \R (capital R) will grab any end of line

Remove multiple commas at the end of lines using Notepad++ regex replace

南楼画角 提交于 2020-04-07 05:37:54
问题 I have a text below with data in a CSV file 2,3 4,5 6,7 When I save an open this in notepad++, it has extra commas like 2,3,,,, 4,5,, 6,7,,,,, like you see, there are variable number of leading commas, I tried a regex match using: /,{2,}/ I have selected the regular expressions combo-box from the search mode in ctrl + H Replace box. For some reason this is not working. What do I need to do to match multiple comma and not get rid of single comma? Is there a better way to get this done in

Remove multiple commas at the end of lines using Notepad++ regex replace

Deadly 提交于 2020-04-07 05:35:09
问题 I have a text below with data in a CSV file 2,3 4,5 6,7 When I save an open this in notepad++, it has extra commas like 2,3,,,, 4,5,, 6,7,,,,, like you see, there are variable number of leading commas, I tried a regex match using: /,{2,}/ I have selected the regular expressions combo-box from the search mode in ctrl + H Replace box. For some reason this is not working. What do I need to do to match multiple comma and not get rid of single comma? Is there a better way to get this done in

将markdown文章包括公式图片完美导入知乎

喜欢而已 提交于 2020-04-06 10:33:27
打开 notepad++ 编辑器, ctrl+f ,切记打开 正则表达式 和 匹配新行 : 将文章公式中的$$替换: \$\$\n*((.|\n)*?)\n*\$\$ 替换成 \n<img src="https://www.zhihu.com/equation?tex=\1" alt="\1" class="ee_img tr_noresize" eeimg="1">\n 将文章公式中的$替换: \$\n*(.*?)\n*\$ 替换成 \n<img src="https://www.zhihu.com/equation?tex=\1" alt="\1" class="ee_img tr_noresize" eeimg="1">\n 最后使用知乎的导入markdown 功能即可,实例可看 【机器学习】算法原理详细推导与实现(一):线性回归 PS:知乎的 markdown 和CSDN的格式相同,用CSDN编辑好的markdown按照上述步骤导入知乎即可完成 来源: oschina 链接: https://my.oschina.net/u/4415385/blog/3220131

Notepad++运行python

扶醉桌前 提交于 2020-03-27 16:38:46
3 月,跳不动了?>>> 关于使用notepad运行python程序 首先要确保python解释器已经安装成功,查看方法,windows可以在命令提示符中查看,通过按下win+R键,调出运行窗口,在输入框中输入cmd回车,然后在命令行中输入python,若出现版本信息,例如 Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. 则安装成功,若出现 'python' 不是内部或外部命令,也不是可运行的程序 ,则需要配置环境变量,详情参考 如何配置python的环境变量 在在notepad++中,按F5,或者菜单栏点击 "运行->运行" (默认快捷键是 F5 ),在弹出的对话框中,输入 cmd /k python "$(FULL_CURRENT_PATH)"& PAUSE & EXIT 点击 "保存",就可以给这条命令设置一个快捷键并起一个名字,比如 "run_python"。以后运行直接按自定义的快捷键就妥了。 来源: oschina 链接: https://my.oschina.net/victorfengming

Regexp to search for phrase containing other phrase and don't mark anything other

随声附和 提交于 2020-03-26 04:09:00
问题 Similar topics appear here quite frequently but even analyzing them i still can't figure the proper regexp to do my task. I have an XML file with some sections. I need to remove text sections which contain given attributes and leave the everything else. The example text section: <Text FontFamily="Open Sans" FontSize="19" FontStyle="Normal" FontWeight="Normal" HorizontalAlign="Left" Left="803.0" Name="Back" Stroke="#CCCCCC" TextDecoration="None" Top="126.0" Visibility="Hidden"> ... More

Regexp to search for phrase containing other phrase and don't mark anything other

橙三吉。 提交于 2020-03-26 04:08:13
问题 Similar topics appear here quite frequently but even analyzing them i still can't figure the proper regexp to do my task. I have an XML file with some sections. I need to remove text sections which contain given attributes and leave the everything else. The example text section: <Text FontFamily="Open Sans" FontSize="19" FontStyle="Normal" FontWeight="Normal" HorizontalAlign="Left" Left="803.0" Name="Back" Stroke="#CCCCCC" TextDecoration="None" Top="126.0" Visibility="Hidden"> ... More