<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[KilllerQueen的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/KilllerQueen</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; KilllerQueen]]></copyright><item><title><![CDATA[python 3维矩阵转为2维]]></title><link>https://blog.youkuaiyun.com/KilllerQueen/article/details/132580724</link><guid>https://blog.youkuaiyun.com/KilllerQueen/article/details/132580724</guid><author>KilllerQueen</author><pubDate>Wed, 30 Aug 2023 14:14:18 +0800</pubDate><description><![CDATA[3维图像降维到2维，要求按z轴方向把图像的每个像素值逐个取出，组成新的2维数组，忽略长宽维度。]]></description><category></category></item><item><title><![CDATA[遥感影像叠加，任意波段数tif影像组合]]></title><link>https://blog.youkuaiyun.com/KilllerQueen/article/details/132447268</link><guid>https://blog.youkuaiyun.com/KilllerQueen/article/details/132447268</guid><author>KilllerQueen</author><pubDate>Wed, 23 Aug 2023 11:21:29 +0800</pubDate><description><![CDATA[遥感影像叠加， LayerStacking]]></description><category></category></item><item><title><![CDATA[python 科学计数法的小数转换]]></title><link>https://blog.youkuaiyun.com/KilllerQueen/article/details/130943980</link><guid>https://blog.youkuaiyun.com/KilllerQueen/article/details/130943980</guid><author>KilllerQueen</author><pubDate>Tue, 30 May 2023 11:22:26 +0800</pubDate><description><![CDATA[python 科学计数法的小数转换 : 本文要解决的问题是将一个str格式的带有科学计数法数值的二维数组转换为小数形式。]]></description><category></category></item><item><title><![CDATA[python中datetime不同时区转换]]></title><link>https://blog.youkuaiyun.com/KilllerQueen/article/details/129707533</link><guid>https://blog.youkuaiyun.com/KilllerQueen/article/details/129707533</guid><author>KilllerQueen</author><pubDate>Wed, 22 Mar 2023 15:10:25 +0800</pubDate><description><![CDATA[GMT时间：Greenwich Mean Time， 格林尼治平均时间UTC时间：Universal Time Coordinated 世界协调时，可以认为是更精准的GMT时间，但两者误差极小，在1s以内，一般可视为等同LMT：Local Mean Time, 当地标准时间。]]></description><category></category></item><item><title><![CDATA[设置python脚本开机自启--anaconda虚拟环境、windows系统]]></title><link>https://blog.youkuaiyun.com/KilllerQueen/article/details/127546941</link><guid>https://blog.youkuaiyun.com/KilllerQueen/article/details/127546941</guid><author>KilllerQueen</author><pubDate>Thu, 27 Oct 2022 10:50:10 +0800</pubDate><description><![CDATA[基于Anaconda虚拟环境写的python脚本，需要在windows10系统开机自启。]]></description><category></category></item><item><title><![CDATA[Python调用webapi，使用Token认证]]></title><link>https://blog.youkuaiyun.com/KilllerQueen/article/details/126932482</link><guid>https://blog.youkuaiyun.com/KilllerQueen/article/details/126932482</guid><author>KilllerQueen</author><pubDate>Mon, 19 Sep 2022 14:39:11 +0800</pubDate><description><![CDATA[使用python在程序中调用webapi接口，将产生的数据通过接口录入数据库，通过token进行接口认证。]]></description><category></category></item><item><title><![CDATA[Sqlsugar中AndIF()条件查询C#]]></title><link>https://blog.youkuaiyun.com/KilllerQueen/article/details/126103189</link><guid>https://blog.youkuaiyun.com/KilllerQueen/article/details/126103189</guid><author>KilllerQueen</author><pubDate>Mon, 01 Aug 2022 16:48:41 +0800</pubDate><description><![CDATA[Sqlsugar中AndIF()条件查询C#]]></description><category></category></item><item><title><![CDATA[实现不同尺寸和不同波段数的图像叠加(layerstaking)——按地理位置对准GDAL,Numpy]]></title><link>https://blog.youkuaiyun.com/KilllerQueen/article/details/125045237</link><guid>https://blog.youkuaiyun.com/KilllerQueen/article/details/125045237</guid><author>KilllerQueen</author><pubDate>Mon, 30 May 2022 14:23:54 +0800</pubDate><description><![CDATA[遥感影像叠加，栅格图像叠加，不同尺寸和不同波段数
背景
高分四号卫星搭载两个不同的传感器，获取的PMS数据包含5个波段，IRS只有1个中红外波段，他们的尺寸和波段数量是不同的，IRS数据包含在PMS数据内部。叠加效果如下图：

思路
考虑到它们的左上角并不是对齐的，所以想要实现波段叠加，不能直接将它们的数据矩阵叠加，否则必然错位。而是要找到IRS左上角在PMS中对应的位置（x，y），然后再写到同PMS一样大的array中。

代码实现
def layerstaking(PMS,IRS,merge):
   ]]></description><category></category></item><item><title><![CDATA[python+GDAL给图像设置地理参考（GeoTransform和Projection的设置）]]></title><link>https://blog.youkuaiyun.com/KilllerQueen/article/details/124843937</link><guid>https://blog.youkuaiyun.com/KilllerQueen/article/details/124843937</guid><author>KilllerQueen</author><pubDate>Wed, 18 May 2022 15:58:14 +0800</pubDate><description><![CDATA[使用GDAL给遥感影像设置地理参考和投影，分别设置两个参数：GeoTransform和Projection。对于没有附带地理信息的影像，需要从其它途径获取参数，如xml等元数据。
GDAL 中，GeoTransform是一个六个元素的元组。六个参数分别为：
（左上角x坐标， 水平分辨率，旋转参数， 左上角y坐标，旋转参数，-垂直分辨率）

应该注意，最后一个参数是负值，旋转参数一般是0。而对于没有投影的图像（如WGS 84只有地理坐标系），它的分辨率不是以米位单位，而是经纬度，所以不能简单地指定分辨率这两个]]></description><category></category></item><item><title><![CDATA[解决GDAL写投影问题——proj.db报错]]></title><link>https://blog.youkuaiyun.com/KilllerQueen/article/details/124843142</link><guid>https://blog.youkuaiyun.com/KilllerQueen/article/details/124843142</guid><author>KilllerQueen</author><pubDate>Wed, 18 May 2022 15:38:24 +0800</pubDate><description><![CDATA[处理高分影像时，因为原数据没有存储投影信息，所以需要自己定义。使用GDAL（osr）对遥感影像定义投影。使用以下代码
from osgeo import gdal, osr
’‘’
其他读取影像数据的程序
‘’‘
# 获取地理坐标系统信息，用于选取需要的地理坐标系统
srs = osr.SpatialReference()
srs.ImportFromEPSG(4326)  # 定义输出的坐标系为"WGS 84"
out_IRS.SetProjection(srs.ExportToWkt())  # 给新建]]></description><category></category></item><item><title><![CDATA[使用imgaug进行语义分割数据集增强]]></title><link>https://blog.youkuaiyun.com/KilllerQueen/article/details/124058363</link><guid>https://blog.youkuaiyun.com/KilllerQueen/article/details/124058363</guid><author>KilllerQueen</author><pubDate>Sat, 09 Apr 2022 12:04:24 +0800</pubDate><description><![CDATA[使用imgaug批量进行图像增强，实现图片和标签mask同步转换，基于三波段png格式遥感影像数据集]]></description><category></category></item><item><title><![CDATA[远程服务器搭建MySQL数据库]]></title><link>https://blog.youkuaiyun.com/KilllerQueen/article/details/123791219</link><guid>https://blog.youkuaiyun.com/KilllerQueen/article/details/123791219</guid><author>KilllerQueen</author><pubDate>Mon, 28 Mar 2022 11:59:02 +0800</pubDate><description><![CDATA[背景
在客户提供的虚拟机搭建数据库，完成建表和数据入库。

系统：目标机CentOS 7，本地机Win10
软件：Xshell 7、navicat

操作过程
由于是第一次远程在客户机器上建库，且目标机没有安装图形化界面，也不能连接互联网，所以首先需要客户开通维护端口22和数据库端口3306。经过沟通开通了可以连接客户内网的VPN，可以通过VPN访问22端口；3306端口外网可以访问到，使用navicat可以实现可视化建表和数据入库。

通过Xshell远程连接
首先连接VPN访问内网，然后使用Xshell]]></description><category></category></item><item><title><![CDATA[json上传数据库的一些mysql命令]]></title><link>https://blog.youkuaiyun.com/KilllerQueen/article/details/123637520</link><guid>https://blog.youkuaiyun.com/KilllerQueen/article/details/123637520</guid><author>KilllerQueen</author><pubDate>Mon, 21 Mar 2022 16:19:00 +0800</pubDate><description><![CDATA[背景：
Win10系统，通过Xshell连接远程数据库，上传数据。建表和简单数据录入直接通过navicat完成。
问题：
使用Navicat粘贴比较大的json数据到表字段中时，出现长度受限的情况，无法将完整的json数据放入数据库表字段。
查了mysql给的指南，JSON的长度应该是和LONGTEXT一样的，所以理论上能存下完整的数据，但navicat无法完整的粘贴进来，也不能完整显示已经存好的数据。所以只能通过mysql命令行来插入和查看了。

JSON Storage Requirements
In ]]></description><category></category></item><item><title><![CDATA[配置多GPU训练的笔记-xview2挑战项目复现1]]></title><link>https://blog.youkuaiyun.com/KilllerQueen/article/details/123269544</link><guid>https://blog.youkuaiyun.com/KilllerQueen/article/details/123269544</guid><author>KilllerQueen</author><pubDate>Fri, 04 Mar 2022 11:22:27 +0800</pubDate><description><![CDATA[最近尝试复现一个xview2挑战（xiew2）的冠军项目，这个挑战的目标是基于遥感影像对自然灾害前后建筑物的损坏程度进行定位和评分，官方提供了非常庞大的数据集，原项目代码在Github能找到（xview2_1st_place_solution）。
遇到的坑主要有以下几个：
1.APEX安装
项目用到了NVIDIA的APEX库，需要先从Github把这个项目克隆下来（https://github.com/NVIDIA/apex），再进到apex项目里安装。官方给的Linux系统安装方式是：
git clone]]></description><category></category></item><item><title><![CDATA[解决在Word安装Mendeley失败，提示“错误429：activex部件不能创建对象“问题]]></title><link>https://blog.youkuaiyun.com/KilllerQueen/article/details/121803662</link><guid>https://blog.youkuaiyun.com/KilllerQueen/article/details/121803662</guid><author>KilllerQueen</author><pubDate>Wed, 08 Dec 2021 23:25:42 +0800</pubDate><description><![CDATA[找到Mendeley的安装路径，注册MendeleyWordPlugin.exe.如图所示操作即可。

]]></description><category></category></item><item><title><![CDATA[转载：遥感图像空间索引和提取像元值]]></title><link>https://blog.youkuaiyun.com/KilllerQueen/article/details/121515461</link><guid>https://blog.youkuaiyun.com/KilllerQueen/article/details/121515461</guid><author>KilllerQueen</author><pubDate>Wed, 24 Nov 2021 14:51:28 +0800</pubDate><description><![CDATA[遥感影像有两组坐标系。一组是图片的行列坐标，另一组是空间坐标。遥感影像中的每一个像元都对应地球上的一个地点。使用rasterio可以方便的对两组坐标系进行操作。假设我们需要获取某一地理坐标的NDVI数值，如经纬度(-119.770163586, 36.741997032)，但是我们数据是UTM坐标系的，所以我们首先要将经纬度坐标投影为UTM，我们可以使用pyproj完成投影。
作者：雪涵
链接：https://zhuanlan.zhihu.com/p/412865295
来源：知乎
著作权归作者所有。商业转]]></description><category></category></item><item><title><![CDATA[上传本地文件到远程仓库-Gitlab]]></title><link>https://blog.youkuaiyun.com/KilllerQueen/article/details/121247565</link><guid>https://blog.youkuaiyun.com/KilllerQueen/article/details/121247565</guid><author>KilllerQueen</author><pubDate>Wed, 10 Nov 2021 14:31:56 +0800</pubDate><description><![CDATA[首次上传本地文件到远程仓库，由于远程仓库不是自己建的，而将本地内容push上去必须让本地与远程版本匹配，在此基础上进行修改。而我是自己git init新建的本地仓库，所以肯定是不行的。
所以对于非自己建立的远程仓库，首先要把它克隆到本地。
git clone 远程仓库的SSH

然后整个远程仓库的文件被克隆到本地了，再把自己的文件放到这个本地仓库中想要的位置，然后更新远程仓库的版本即可。
git add . 

这里“.”表示上传所有文件，会检测所有的更改。也可以把“.”换成文件名。
然后将add的文件co]]></description><category></category></item><item><title><![CDATA[pandas表合并——按指定列合并两个表里同样名称的行]]></title><link>https://blog.youkuaiyun.com/KilllerQueen/article/details/121119252</link><guid>https://blog.youkuaiyun.com/KilllerQueen/article/details/121119252</guid><author>KilllerQueen</author><pubDate>Wed, 03 Nov 2021 14:31:19 +0800</pubDate><description><![CDATA[在处理观测站气象数据时，遇到了需要将两个表的数据整理到一起的问题，两个表的数据结构如下：


现在需要将两个表按第一列‘Sta_ID’拼接，将第二个表中‘Sta_ID’值与第一个表相同的行拼接到同一行，效果如下：

需要的库基本有pandas，xlrd，xlwt这几个，首先使用pandas.read_excel(）将数据分别读入pandas。
A = pd.read_excel('E:\\MODIS\\MCD19A2\\AOD_Max.xls', sheet_name='AOD_Max') # 读取 exc]]></description><category></category></item><item><title><![CDATA[python 导入gdal失败：DLL load failed 找不到指定的模块。]]></title><link>https://blog.youkuaiyun.com/KilllerQueen/article/details/120650643</link><guid>https://blog.youkuaiyun.com/KilllerQueen/article/details/120650643</guid><author>KilllerQueen</author><pubDate>Fri, 08 Oct 2021 14:19:40 +0800</pubDate><description><![CDATA[最近在conda环境中安装了pyqt和labelme等一些库之后，打算运行一个geotif转jpg的程序，但一开始运行就报错，显示imp.py中import importlib.machinery这句出了问题，最后一行
return _load(spec) ImportError: DLL load failed: 找不到指定的模块。虽然import不提示语法错误，但运行就报错，推测是gdal库导入出了问题， 由于之前安装的gdal是可用的，现在不能用了，捣鼓了半天，最后直接重装解决问题，与版本没关系。
c]]></description><category></category></item><item><title><![CDATA[使用Python读写netCDF4（.nc）格式的VIIRS数据]]></title><link>https://blog.youkuaiyun.com/KilllerQueen/article/details/118188450</link><guid>https://blog.youkuaiyun.com/KilllerQueen/article/details/118188450</guid><author>KilllerQueen</author><pubDate>Thu, 24 Jun 2021 15:43:12 +0800</pubDate><description><![CDATA[**
使用Python读写netCDF4（.nc）格式的VIIRS数据
**
使用的主要工具：
python 3.7
gdal 3.2.1
netcdf4 1.5.5.1

首先介绍netCDF4格式的数据存储方式，它是一种多维数据格式，类似数组组织形式的数据集合。在python中可以直接用
data = netCDF4.Dataset(data_path)
读取数据集，然后用data.dimensions查看数据集的维度和详细信息。本次用的地表反射率数据，文件名为SurfRefl_v1r1_j01_s20]]></description><category></category></item></channel></rss>