科学网

 找回密码
  注册

tag 标签: 格式转换

相关帖子

版块 作者 回复/查看 最后发表

没有相关内容

相关日志

GAMIT中的RINEX压缩格式转换命令
PurpleSky 2016-4-5 22:05
说到由RINEX格式和Compact RINEX格式之间的转换,我们首先想到的可能是rnx2crx和crx2rnx两个程序。那么在Linux/UNIX系统中如何进行数据格式的转换呢? 其实,GAMIT软件中自带了将RINEX文件和压缩的RINEX格式文件(CRINEX)文件格式以及压缩文件(GZ)之间互相转换的命令。 这两个命令分别是sh_rnx2crx和sh_crx2rnx。 两个命令参数一致: -d y/n 是否在转换结束后删除原始数据(默认为yes) -c y/n 是否在转换前/后对其进行解压/压缩(默认为yes) -f files files 为要处理的文件名 例子: sh_rnx2crx -c y -d y -f bjfs0010.15o # 由bjfs0010.15o得到bjfs0010.15d.gz,原有的bjfs0010.15o被删除 sh_rnx2crx -c n -d y -f bjfs0010.15o # 由bjfs0010.15o得到bjfs0010.15d,原有的bjfs0010.15o被删除 sh_crx2rnx -c y -d n -f bjfs0010.15d.gz # 由bjfs0010.15d.gz得到bjfs0010.15o,原有的bjfs0010.15d.gz被保留 sh_crx2rnx -f bjfs0010.15d # 由bjfs0010.15d得到bjfs0010.15o,原有的bjfs0010.15d被删除 最后,吐槽一下,sh_rnx2crx命令转换数据时,容错性貌似一般般, 比如我使用时经常出现这种情况 :
个人分类: GAMIT/GLOBK|5009 次阅读|0 个评论
[Matlab]把2014-2-1 0:30时间格式转成模型需要的2014-2-1T00:30
zhanglele10 2015-4-23 20:03
s=datenum('2014-2-1 0:30'); e=datenum('2014-3-27 13:30'); d=1/2/24; T=datestr((s:d:e)','yyyy-mm-ddTHH:MM');
个人分类: Matlab学习心得|1993 次阅读|0 个评论
VASP 与 Siesta 晶体结构格式互换
bfax 2014-6-28 00:58
如果手动进行 VASP 与 Siesta 之间的坐标转换,面临两个较麻烦的手续: (1)VASP 的 POSCAR 中,每个原子坐标后面一般没有元素的标识(1,2 ...) (2)Siesta 的 fdf 文件中,各个原子未必是按照元素次序排列的。并且还需要统计各个元素分别有多少个原子。 为了提高效率,我就写两个 Python 小程序以便在 Linux 下进行转换。 pos2fdf.py #!/usr/bin/env python # www.kanhaoxue.com f = open('POSCAR', 'r') for i in range(5): f.readline() line = f.readline().strip() if line.split() .isdigit(): elementDetails = line.split() else: line = f.readline().strip() elementDetails = line.split() f.readline() i = 1 print '%block AtomicCoordinatesAndAtomicSpecies' for element in elementDetails: for j in range(int(element)): line = f.readline().strip() coorDetails = line.split() print '{0: 20}'.format(coorDetails ), '{0: 20}'.format(coorDetails ), '{0: 20}'.format(coorDetails ), i, j+1 i += 1 f.close() print '%endblock AtomicCoordinatesAndAtomicSpecies' 这个程序可以读取当前目录下的 POSCAR,输出相应 Siesta 需要的 fdf 文件的原子坐标部分。由于 Siesta 的输入 fdf 文件还包括很多其他内容,我们并不能产生完整的 fdf 文件。既然 VASP 是按照元素次序排列原子的,我们这里生成的 Siesta 原子坐标也是按照元素次序的,并且还标注了每个原子是该元素的第几个原子。 程序考虑到了老版 VASP 的 POSCAR, 有些时候并不写元素名。例如 Na Cl 4 4 在有些 4.x 版本的 VASP 里只是写成 4 4 对于这种情况也能正确读取。 fdf2pos.py #!/usr/bin/env python # www.kanhaoxue.com atomCount = speciesCount = latticeConstant = 1 numberOfAtoms = coordinateStr = sysName = 'Siesta' f = open('in.fdf', 'r') for line in f: if 'SYSTEMNAME' in line.upper(): sysName = line.split() .strip() if 'NUMBEROFATOMS' in line.upper(): atomCount = int(line.split() .strip()) if 'NUMBEROFSPECIES' in line.upper(): speciesCount = int(line.split() .strip()) if 'LATTICECONSTANT' in line.upper(): latticeConstant = line.split() .strip() print sysName print latticeConstant f.seek(0,0) line = f.readline() while not 'LATTICEVECTORS' in line.upper(): line = f.readline() for i in range(3): line = f.readline().strip() latticeDetails = line.split() print '{0: 20}'.format(latticeDetails ), '{0: 20}'.format(latticeDetails ), '{0: 20}'.format(latticeDetails ) f.seek(0,0) line = f.readline() while not 'CHEMICAL_SPECIES_LABEL' in line.upper(): line = f.readline() for i in range(speciesCount): line = f.readline().strip() print line.split() .strip(), print f.seek(0,0) line = f.readline() while not 'ATOMICCOORDINATESANDATOMICSPECIES' in line.upper(): line = f.readline() for i in range(atomCount): line = f.readline().strip() coorDetails = line.split() speciesIndex = int(coorDetails )-1 coordinateStr += '{0: 20}'.format(coorDetails ) coordinateStr += ' ' coordinateStr += '{0: 20}'.format(coorDetails ) coordinateStr += ' ' coordinateStr += '{0: 20}'.format(coorDetails ) coordinateStr += ' ' coordinateStr += '{0: 5}'.format(coorDetails ) coordinateStr += '\n' numberOfAtoms += 1 for i in range(speciesCount): print numberOfAtoms , print print 'Direct' for i in range(speciesCount): print coordinateStr , f.close() 把 Siesta 的 fdf 输入文件(这里假定文件名叫 in.fdf)转换为 VASP 的 POSCAR 要麻烦一些。这里我们假定 Siesta 的原子坐标必须是按照 Fractional 的格式来的,但各个原子的坐标不必要按照元素次序排列。 程序输出到屏幕终端。如果想存为 POSCAR 只需要敲 fdf2pos.py POSCAR 如果想存为 CONTCAR 则需要敲 fdf2pos.py CONTCAR * 注:这两个 py 文件保存之后,还需要给予执行的权限: chmod 555 pos2fdf.py chmod 555 fdf2pos.py 然后再移动到 PATH 所包含的可执行文件目录下
个人分类: 计算机|5381 次阅读|0 个评论
[转载]SRA文件格式转换 转载自http://www.plob.org/
youyuxing188 2014-1-16 09:36
最近NCBI的数据格式由于空间缘故都转换成了*.sra格式,不再支持*.fastq.gz,因此需要一个特别的转化工具来转换下载的*.sra数据文件。 下载地址: http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?cmd=showf=softwarem=softwares=software 这里面包含了不同系统平台下的程序以及源代码。 转换命令 $ fastq-dump -A SRR_accession -D Path_to_SRR_Directory -O Output_Path 基本的命令参数 Command Description ‘-A’ or ‘--accession’ Enables modification of the output name used for the fastq files. For example: fastq-dump -A foo SRR000001 Will produce files named ‘foo.fastq’, ‘foo_1.fastq’, and ‘foo_2.fastq’ ‘-D’ or ‘--table-path’ Makes the archive path more explicitly specified, thus preventing confusion when more than option is specified. These two commands produce the same files: fastq-dump ~/SRR000001 fastq-dump -D ~/SRR000001 However, the first command below will fail while the second will succeed: fastq-dump -C ~/SRR000001 fastq-dump -C -D ~/SRR000001 (‘-C’ option is explained further below) ‘-N’ or ‘--minSpotId’ Minimum spot number at which to start the dump process ‘-X’ or ‘--maxSpotId’ Maximum spot number at which to stop the dump process For example: fastq-dump -N 5 -X 10 SRR000001 This command will dump six spots starting from spot ‘SRR000001.5’ and ending in spot ‘SRR000001.10’. Filtered spots can result in less than (maxSpotId - minSpotId + 1) total spots output. ‘-G’ or ‘--spot-group’ Boolean option that results in fastq files divided into spot groups as defined in the Experiment (or eventually Run) xml. This command: fastq-dump -G SRR051894 Produces these five fragment files: SRR051894.fastq SRR051894_GDSX2KN04_PSORIASISMDA-POOL-738_CB028-01WG.fastq SRR051894_GDSX2KN04_PSORIASISMDA-POOL-738_CB036-01WG.fastq SRR051894_GDSX2KN04_PSORIASISMDA-POOL-738_CD021-01WG.fastq SRR051894_GDSX2KN04_PSORIASISMDA-POOL-738_CD036-01WG.fastq ‘-T’ or ‘--group-in-dirs’ Boolean option directing the utility to produce fastq files in sub-directories rather than producing files within the same directory ‘-O’ or ‘--outdir’ Indicates the directory where the fastq result should be placed For example: fastq-dump -O /tmp -T SRR000001 will create a directory, SRR000001, in /tmp with this tree structure: tree /tmp/SRR000001 /tmp/SRR000001 |-- 1 | `-- fastq |-- 2 | `-- fastq `-- fastq ‘-K’ or ‘--keep-empty-files’ Has no effect - at one time this option would represent all three possible files even if one or two were empty ‘-M’ or ‘--minReadLen’ Allows specification of the desired minimum read length to output (default is 25). The command ‘fastq-dump -M 0 SRR000001’ prevents any filtering based on read length. ‘-W’ or ‘--noclip’ Prevents clipping of a spot sequence based on the right clip information. Toggling ‘show-clipped’ in the ‘customize’ area for reads in the SRA Run Brower enables observing the effect of this option (e.g. see SRR000001 ). ‘-F’ or ‘--origfmt’ Results in fastq containing only the original identifier on the defline (i.e. no length or SRR identifier are present) ‘-C’ or ‘--dumpcs’ Forces color space sequence to be dumped instead of base space. If the optional ‘cskey’ if provided (i.e. A, C, T, or G), then all fastq files produced will use that key at the start of each color space sequence. ‘-B’ or ’--dumpbase’ Forces base space sequence to be dumped instead of color space. ‘-Q’ or ‘--offset’ Allows using a different offset value to represent a different offset character in the fastq output. For example, using an offset of 64 represents using ‘@’ as the offset character. ‘-I’ or ‘--readids’ Appends a read index to the run identifier starting with ‘1’ as the first index. Note that this differs from the spot descriptor in the Experiment xml where the read indices start with ‘0’. In the case of SRR000001, the first spot in each file would have the identifiers ‘SRR000001.5.4’, ‘SRR000001.1.2’, and ‘SRR000001.1.4’. Note that the first spot sequence in SRR000001.fastq, the fragment file, comes from the second biological/application read which has an index of ‘4’. ‘-E’ or ‘--no_qual_filter’ This option turns off quality filtering based on leading/trailing low quality values. As reads have become longer this option has become a more viable alternative. ‘-SF’ or ‘--complete’ Outputs the separated reads into a single file. For example, the command: fastq-dump -SF SRR029338 Results in the first eight lines of the file, SRR029338.fastq, containing: @SRR029338.1 080115_EAS112_0034:8:1:615:780 length=36 GGTTGAGTAAAGTGTCTAAAGGCA TAGCCTGATTAT +SRR029338.1 080115_EAS112_0034:8:1:615:780 length=36 IIIIIIIIIIIIIIIIIIIAIIAI8I+7I9+II2I @SRR029338.1 080115_EAS112_0034:8:1:615:780 length=36 AAAGTCAAATTTGAATTGTTGTCA GCTTGTCAAAAT +SRR029338.1 080115_EAS112_0034:8:1:615:780 length=36 IIIIIIIIDIIIIIIIIIIIII.1F2II=8*2+//I In the case of 454 pair submissions, the second technical read (i.e. linker) is included in this single output file. ‘-DB’ or ‘--defline-seq’ Allows specification of the sequence defline format. For example: -DB @$ac.$si $sn length=$rl This specification produces the same output as the default output. See Appendix D for a more in-depth explanation. Note that submission of a ‘fastq-dump’ command to a compute farm (e.g. Sun Grid Engine) can require preceding a number of the characters with backslash characters when using this option. The above example might require this version: -DB @\\\$ac.\\\$si \\\$sn length=\\\$rl ‘-DQ’ or ‘--defline-qual’ Allows specification of the quality defline format. For example: -DQ +$ac.$si $sn length=$rl ‘-alt ’ Provides alternative output formats without have to indicate the individual options. Alternate ‘1’, the only option, results in this format for SRR029338_1.fastq: @SRR029338.1 080115_EAS112_0034:8:1:615:780/1 GGTTGAGTAAAGTGTCTAAAGGCA TAGCCTGATTAT + IIIIIIIIIIIIIIIIIIIAIIAI8I+7I9+II2I And this format for SRR029338_2.fastq: @SRR029338.1 080115_EAS112_0034:8:1:615:780/2 AAAGTCAAATTTGAATTGTTGTCA GCTTGTCAAAAT + IIIIIIIIDIIIIIIIIIIIII.1F2II=8*2+//I 转换*.sra 文件格式到SFF格式 $ sff -dump -A SRR_accession -D Path_to_SRR_Directory -O Output_Path Options: Command Description -O Allows user to specify an output directory. If not used, output will default to the current directory. -N Minimum spot ID to output. The first spot in the output will be the number given for this option. -X Maximum spot ID to output. The last spot in the output will be the number given. Min and Max spot options can be combined to output subsections of an SRR. -G spotgroup-file Split into files by SPOT_GROUP -T spotgroup-dir Split into subdirectories (of -O ) by SPOT_GROUP -L Log level: 0-13 or fatal|sys|int|err|warn|info|debug . (default: info) Set to ‘4’ to mimic the unix standard of no messages for a successful operation. -H Prints this help message and version information. 转换*.sra 文件格式到 Illumina native文件格式 $illumina-dump -path directory_containing_the_accession acces Command Description -D, --table-path Path to accession data. -O, --outdir Output directory. Default: '.' -N, --minSpotId Minimum spot id to output. -X, --maxSpotId Maximum spot id to output. -G, --spot-group Split into files by SPOT_GROUP (member). -T, --group-in-dirs Split into subdirectories instead of files. -K, --keep-empty-files Do not delete empty files. -L, --log-level Logging level: 0-13 or fatal|sys|int|err|warn|info|debug . Default: info -H, --help Prints this message Format options: Command Description -r, --read Output READ: seq. Default: on -q, --qual1 Output QUALITY, into single (1) or multiple (2) files: qcal. Default: 1 -p, --qual4 Output full QUALITY: prb. Default: off -i, --intensity Output INTENSITY, if present: int. Default: off -n, --noise Output NOISE, if present: nse. Default: off -s, --signal Output SIGNAL, if present: sig2. Default: off -qseq Output QSEQ format: qseq. Default: off\
3189 次阅读|0 个评论
LaTex图片格式转换
热度 1 tyfbyfby 2014-1-2 20:00
使用LaTex写论文的过程中,我们经常会遇到图片格式转换的问题,下面我列出我使用的图片格式转换方法,个人认为非常方便和好用,希望对大家有所帮助。 pdf--eps 使用Adobe Acrobat Pro,选择“另存为”即可,不能使用GSview,GSview不能生成图片的bounding box参数。 png/bmp--eps 使用ImageMagick软件。 批量处理文件时,可以在需要转换图片的文件夹下新建一个.bat文件,文件中的批处理命令为: for %%I in (*.png) do convert %%I %%~nI.eps 执行这个.bat文件,该文件夹中的png格式的图片就都转换为eps格式了。 jpg/bmp-png 使用ImageMagick软件。 批处理命令为: for %%I in (*.bmp) do convert %%I %%~nI.png 在tex文件中显示一个eps图片的代码为: \begin{figure} \centering \includegraphics {SerialNumberinRMB_gray} \caption{Serial numbers in scanned RMB image} \label{fig: serialnum} \end{figure} 图片名称后不需要加.eps
个人分类: LaTex技巧|7542 次阅读|2 个评论
vina中的构象保存为pdb格式
autodataming 2013-10-9 22:00
背景: 之前有讲过可以通过pymol统计氢键的信息, 由于pymol对pdbqt的支持不好 ADT中的脚本pdbqt_to_pdb.py 只能实现pdbqts_to_pdb的功能 所以我写了个shell脚本,实现pdbqts_to_pdbs功能,用这个脚本前必须配置一些环境变量。 ======================================pdbqts_to_pdbs.sh #!/bin/sh #Function : convert the pdbqt format of ligand database to pdb format #author: Chen Zhaoqiang #email: 744891290@qq.com #date:2013.10.09 #required:vina_split in vina and pdbqt_to_pdb.py in adt #usage: pdbqts_to_pdbs.sh --input xxx.pdbqt if ;then echo usage: pdbqts_to_pdbs.sh --input xxx.pdbqt\n; fi if ;then cd ./temppp rm ./* -f else mkdir temppp cd ./temppp fi cp ../$2 ./ vina_split --input $2 rm ./$2 for file in $( ls ); do echo $file pdbqt_to_pdb.py -f $file -o $file'.pdb' echo $file rm $file done #modify the name to short rename .pdbqt.out_ligand ./* rename .pdbqt ./* let count=1 for file in $( ls ); do echo -e MODEL $count\n $2 cat $file $2 echo -e ENDMDL\n $2 rm $file let count+=1 done let count-=1 echo $count rename .pdbqt.out.pdbqt _out_$count.pdb ./$2 cp ./* ../ cd .. rm -f temppp -r =========================================================== 把这个脚本放到path中,实现和pdbqt_to_pdb.py同样的地位 #### pdb的库中必须要有MODEL ENDMDL的标签, chimera这个软件不识别pdb文件中*,*不能代替一般字母 如果这个脚本不能用,先测试vina_split这个命令能不能使用。
个人分类: DrugDesign|5922 次阅读|0 个评论
[转载]【格式转换】vasp poscar结构转lammps结构文件
miga0321 2013-9-26 20:51
在计算材料学中,结构数据文件格式转换是很常见的事情,这里给大家推荐一个脚本可以轻松实现VASP POSCAR/CONTCAR到lammps的data file文件的转换。 内容目录 功能简介 使用方法 下载 一点说明 功能简介 实现VASP POSCAR/CONTCAR到lammps的data file文件的转换 支持VASP4.6和5.2(包括原子类型)的格式 支持分数坐标(Direct)和绝对坐标(Cartesian ) 支持非正交原胞 使用方法 把脚本VASP-poscar2lammps.txt下载下来,拷贝到你的当前目录(或者添加到系统路径中),修改权限为可执行(chmod +x) 使用如下命令完成转换 01 VASP-poscar2lammps.txt f-POSCAR f.lammps 其中,VASP-poscar2lammps.txt为转换脚本名称,f-POSCAR为具有VASP POSCAR结构的文件的文件名,f.lammps为转换的LAMMPS结构文件的文件名。 下载 地址: VASP-poscar2lammps.txt (138) (右键另存为) 一点说明 该脚本是使用awk,所以awk必须先在目录/bin下,如果在其他目录下,需要修改脚本的第一行。 另外,该脚本版权归原作者。如果侵权,请给我爱搜集网留言( http://www.52souji.net )删除。 参考来源:https://sites.google.com/site/pmitev/academic/vasp-poscar2lammps-awk
0 个评论
几个格式转换工具
liujd 2013-9-6 16:21
个人分类: 生物信息|0 个评论
格式转换工具之Bibtoxls——将Bib转换为Excel文件
热度 1 PSLibrarian 2013-7-30 17:24
工具用途: 1. 可用于图书文献(pdf)收集整理工作,首先使用mendeley提取题录信息并保存为bib文件格式,然后使用该软件将bib文件转换为Excel文件,文献题录数据将被从bib的一列转换为多列的Excel形式,便于 文献 题录信息的 批量 整理 。 2. 也适用于将其他数据库的bib文件转换为Excel文件。 本工具的制作需求来源于中科院高能所文献信息部进行的批量pdf文献收集整理工作。本工具的制作 致谢国科图青年人才领域前沿项目, 欢迎点击下载使用: bibtoxls.rar
个人分类: 数据分析工具|10559 次阅读|1 个评论
文献数据分析工具之WOS(Web of Science/SCI)数据库数据格式转换
热度 10 PSLibrarian 2013-3-5 17:28
使用说明: 1.将从WOS中按纯文本格式导出的系列txt文件与本程序置于同一文件夹下,点击按钮【纯文本转换为Excel】可导出为Excel文件; 2.将WOS中列表符分割(win)格式生成的Excel文件与本程序置于同一文件夹下,点击按钮【Excel转为txt】可导出为纯文本文件( 目前该功能可一次转换数量约为1000篇), 可再导入endnote、TDA(选择WOS Filter)或Citespace中使用。 本工具的编写致谢国科图青年人才领域前沿项目。 欢迎点击下载使用: SCI转换工具.rar
个人分类: 数据分析工具|47900 次阅读|11 个评论
文献数据分析工具之EI数据库数据格式转换工具
热度 6 PSLibrarian 2013-3-5 17:25
使用说明: 1.将从EI中按Detailed record和Plain text格式导出的系列txt文件与本程序置于同一文件夹下。 2.点击按钮【导出xls】可导出为Excel文件; 点击按钮【导出txt】可导出为txt文件(目前该功能可一次转换数量约为1000篇),该文件可导入TDA(选择WOS Filter)或Citespace中使用。 本工具的编写致谢国科图青年人才领域前沿项目。 欢迎点击下载使用: EI转换工具.rar
个人分类: 数据分析工具|9152 次阅读|11 个评论
CSSCI格式转换软件的下载链接
热度 8 ChaomeiChen 2013-1-21 11:00
用CiteSpace处理分析CSSCI数据前, 需将CSSCI数据经 格式转换。 CSSCI 数据库的格式最近有所变动,刘盛博 更新 了 CSSCI格式 转换软件,可从下面链接下载: 下载软件
个人分类: 未分类|14328 次阅读|12 个评论
使用DataSource和DataSink
lixiangdong 2012-5-24 09:19
weka中有许多实现数据格式转换的工具,都包含在weka.core.converters包中。 其中的DataSource和DataSink最值一提。 原来我们这样写: BufferedReader reader = new BufferedReader(new FileReader(trainsetfile)); ArffReader arff = new ArffReader(reader); Instances dataFiltered = arff.getData(); 其实可以这样写: Instances dataFiltered=DataSource.read("dataFiltered.arff"); 输出arff文件: DataSink.write("dataWritten.arff", dataFiltered); weka.core.converters可以实现下列文件之间的转换: • ARFF files (ArffLoader, ArffSaver) • C4.5 files (C45Loader, C45Saver) • CSV files (CSVLoader, CSVSaver) • files containing serialized instances (SerializedInstancesLoader, Serial- izedInstancesSaver) • JDBC databases (DatabaseLoader, DatabaseSaver) • libsvm files (LibSVMLoader, LibSVMSaver) • XRFF files (XRFFLoader, XRFFSaver) • text directories for text mining (TextDirectoryLoader)
个人分类: weka|4602 次阅读|0 个评论
[转载]Linux下转换图片格式
PengJiDing 2012-4-24 19:59
GNU/linux平台 将jpeg,png,gif转换为eps格式最好用的工具是Imagemagik,它的功能强大,本人也在摸索中。 安装 sudo apt-get install imagemagik 使用 convert tiger.png tiger.eps 把eps格式转换为jpeg,png,gif等众多格式,还是使用GhostScript,在终端输入 gs -dBATCH -dEPSCrop -sDEVICE=png256 -sOutputFile=tiger.png tiger.eps
个人分类: 备忘录|8184 次阅读|0 个评论
ncbi上的格式转换工具
liujd 2012-4-7 23:49
ftp://ftp.ncbi.nih.gov/toolbox/ncbi_tools/converters
个人分类: 生物信息|1678 次阅读|0 个评论
[转载]Google Earth KML数据格式转换成Shp数据格式
dodobirddlq 2012-3-8 15:52
Google Earth KML数据格式转换成Shp数据格式 1 打开Google Earth ,用 工具条可以绘制点线面,比如画一条道路面: 点击OK结束画图操作 2 保存为KMZ或KML文件格式 File—Save—Save Place As 3 利用ArcGis的Data Interoperability Tools工具进行Kml到shp格式的转换 Data Interoperability Tools是esri公司集成了著名空间数据集成工具FME后提供的一个扩展模块,提供了上百种数据格式之间的数据转换。 打开ArcMap,Tools—Extensions 把Data Interoperability勾上 点开 打开ArcToolbox工具条 如果是第一次使用Data Interoperability Tools工具条,即使扩展模块已经装上,但arctoolbox也不会显示出来, 此时可以通过右击ArcToolbox 打开加载Toolbox对话框,到arcgis安装目录底下的ArcToolBox\Toolboxes 目录底下,比如: C:\Program Files\ArcGIS\ArcToolBox\Toolboxes 点击Data Interoperability Tools中的Quick Export导出工具 选择Input Dataset—Foramt选择kml 在选择Dataset的数据源所在位置 选择输出位置:此时只能导出为Geodatabase数据格式 Geodatabase数据格式 现在是Esri公司大力推广的一种非常强大的数据格式。如果一定要求数据格式是shp,可以通过如下方式进行GeoDatabas到shp的数据格式转换 导出成功后 在arcmap中打开 右健选择图层列表中的多边形图层,Data-Export Data 选择导出位置,点击确定即可导出为shp文件数据格式 End!
个人分类: ArcGIS|397 次阅读|0 个评论
[转载]Grib格式转换心得
xiaoxinghe 2012-1-7 21:12
FROM:http://hi.baidu.com/zhjstef/blog/item/c28d82cbc1f3654ef21fe7a5.html Grib格式转换心得 1、wgrib的使用 在cmd命令行下键入wgrib后即可察看wgrib相关命令参数,简要介绍如下: l Inventory/diagnostic–output selections 详细目录或诊断的输出选择 -s short inventory 简短目录 -v verbose inventory 详细目录 -V diagnostic output not inventory 诊断输出 none regular inventory 一般目录 例如:wgrib E:\GrADS\Data\grib2005071500 –va.txt Options 相关选项 -PDS/-PDS10 print PDS in hex/decimal 十六进制或二进制绘制PDS图 -GDS/-GDS10 print GDS in hex/decimal 十六进制或二进制绘制GDS图 -verf print forecast verification time -ncep_opn/-ncep_rean default T62 NCEP grib table -4yr print year using 4 digits l Decoding GRIB selection GRIB格式解码选项 -d decode record number 按编号输出数据 -p decode record at byte position 按二进制位置输出数据 -i decode controlled by stdin inventory list 按输入流控制编码,一般转化Grib文件都要加 none no decoding Options 相关选项 -text/-ieee/-grib/-bin conver to text/ieee/grib/bin 转化格式控制 -nh/-h output will have no headers/headers 是否包含标题头 -H output will include PDS and GDS -bin/-ieee only 输出否否包含PDS和GDS -append append to output file 在输出文件上添加而不是替换 -o output file name, ‘dump’ is default 输出文件名 综合使用实例: DOS命令行下: wgrib grib_file_name | find “:GAP:” | wgrib grib_file_name –i –nh –text –o temp linux shell命令行下: % wgrib grib_file_name | grep “:GAP:” | wgrib grib_file_name –i –nh –text –o temp 从Grib格式文件中选择GAP参数相关的数据生成名为temp的文本文件 2、 Grib文件目录说明 l wgrib –s生成目录: 1:0:d=05071500:HGT:1000 mb:anl:NAve=0 1) 记录号 2) 二进制位置 3) 时间 4) 参数名称 5) 层次值 6) analysis分析数据,也可能是fcst(forecast 预报数据) 7) 用于求平均的格点数 l wgrib –v 生成目录: 1:0:D=2005071500:HGT:1000 mb:kpds=7,100,1000:anl:"Geopotential height 1) 记录号 2) 二进制位置 3) 时间 4) 参数名称 5) 层次值 6) kpds,第一个数字是Grib参数编号,比如PRES是1,TMP是11;第二个数字是层次类型(高度层或等压面层);第三个数字是层次值; 7) analysis分析数据,也可能是fcst(forecast 预报数据) 8) 该参数的解释及单位 l wgrib –V 生成目录: rec 1:0:date 2005071500 HGT kpds5=7 kpds6=100 kpds7=1000 levels=(3,232) grid=3 1000 mb anl: HGT=Geopotential height timerange 10 P1 0 P2 0 TimeU 1 nx 360 ny 181 GDS grid 0 num_in_ave 0 missing 0 center 7 subcenter 0 process 82 Table 2 latlon: lat 90.000000 to -90.000000 by 1.000000 nxny 65160 long 0.000000 to -1.000000 by 1.000000, (360 x 181) scan 0 mode 128 bdsgrid 1 min/max data -631 334 num bits 14 BDS_Ref -6310 DecScale 1 BinScale 0 这个综合几种两种目录显示目前只能看明白其中一部分…… l wgrib none 生成目录: 1:0:d=05071500:HGT:kpds5=7:kpds6=100:kpds7=1000:TR=10:P1=0:P2=0:TimeU=1:1000 mb:anl:NAve=0 1) 记录号 2) 二进制位置 3) 时间 4) 参数名称 5) Grib参数编号,比如PRES是1,TMP是11 6) 层次类型(高度层或等压面层) 7) 层次值 8) 时间范围 9) 时间1的时段 10) 时间2的时段 11) 预报时间单位 12) 层次值 13) analysis分析数据,也可能是fcst(forecast 预报数据) 14) 用于求平均的格点数 3、 利用C程序转化Grib格式文件与读取Grib文件 C# 实例(Web平台上) /*调用Dos命令实现Grib文件到Text文件的转换*/ private void GribToText() { Process process = new Process(); process.StartInfo.FileName = "cmd.exe"; process.StartInfo.UseShellExecute = false; process.StartInfo.RedirectStandardInput = true; process.StartInfo.RedirectStandardOutput = true; process.StartInfo.CreateNoWindow = true; //不创建窗口 process.Start(); string command = "wgrib E:\\Projects\\AtmosData\\grib2005071500 | find \":5WAVA:\" | wgrib E:\\Projects\\AtmosData\\grib2005071500 -i -nh -text -o E:\\Projects\\AtmosData\\temp"; process.StandardInput.WriteLine(command); //调用Dos命令 process.StandardInput.WriteLine("exit"); process.WaitForExit(); string output = process.StandardOutput.ReadToEnd(); Response.Write(output); //将执行结果输出 } /*将Text文件中的Grib数据读入临时数组*/ private void ReadTextData() { StreamReader GribText = new StreamReader("E:\\Projects\\AtmosData\\temp"); string ; //360*181个格点数据 float ; for (int i = 0; i 1000; i++) { aryReadResult = GribText.ReadLine(); aryData = Convert.ToSingle(aryReadResult ); } GribText.Close(); } C++实例(控制台下) /*调用DOS命令将Grib文件转化为临时文本文件*/ system("wgrib E:\\Projects\\AtmosData\\grib2005071500 | find \":5WAVA:\" | wgrib E:\\Projects\\AtmosData\\grib2005071500 -i -nh -text -o E:\\Projects\\AtmosData\\temp"); /*使用文件输入输出流将text文件读入数组中*/ FILE *fp; long int i; float wava ={0}; char *path ="E:\\Projects\\AtmosData\\temp"; if((fp=fopen(path,"r")) == NULL) { printf("Can not open file!"); exit(1); } for( i=0; iGRIBNUMBER; i++) { fscanf_s(fp,"%f",wava ); } for( i=0; iGRIBNUMBER; i++)printf("%f ",wava ); fclose(fp);
个人分类: wgrib|1 次阅读|0 个评论
各种格式转换在线工具
linghu2049 2011-11-21 15:08
http://www.bugaco.com/converter/biology/sequences/index.php Sequence conversion Provided by Bioinf @ Bugaco Conversion map: ace to clustal ace to fasta ace to fastq ace to fastq-solexa ace to fastq-illumina ace to genbank ace to nexus ace to phylip ace to stockholm ace to tab ace to qual clustal to fasta clustal to fastq clustal to fastq-solexa clustal to fastq-illumina clustal to genbank clustal to nexus clustal to phylip clustal to stockholm clustal to tab clustal to qual embl to clustal embl to fasta embl to fastq embl to fastq-solexa embl to fastq-illumina embl to genbank embl to nexus embl to phylip embl to stockholm embl to tab embl to qual fasta to clustal fasta to fastq fasta to fastq-solexa fasta to fastq-illumina fasta to genbank fasta to nexus fasta to phylip fasta to stockholm fasta to tab fasta to qual fastq to clustal fastq to fasta fastq to fastq-solexa fastq to fastq-illumina fastq to genbank fastq to nexus fastq to phylip fastq to stockholm fastq to tab fastq to qual fastq-solexa to clustal fastq-solexa to fasta fastq-solexa to fastq fastq-solexa to fastq-illumina fastq-solexa to genbank fastq-solexa to nexus fastq-solexa to phylip fastq-solexa to stockholm fastq-solexa to tab fastq-solexa to qual fastq-illumina to clustal fastq-illumina to fasta fastq-illumina to fastq fastq-illumina to fastq-solexa fastq-illumina to genbank fastq-illumina to nexus fastq-illumina to phylip fastq-illumina to stockholm fastq-illumina to tab fastq-illumina to qual genbank to clustal genbank to fasta genbank to fastq genbank to fastq-solexa genbank to fastq-illumina genbank to nexus genbank to phylip genbank to stockholm genbank to tab genbank to qual ig to clustal ig to fasta ig to fastq ig to fastq-solexa ig to fastq-illumina ig to genbank ig to nexus ig to phylip ig to stockholm ig to tab ig to qual nexus to clustal nexus to fasta nexus to fastq nexus to fastq- solexa nexus to fastq-illumina nexus to genbank nexus to phylip nexus to stockholm nexus to tab nexus to qual phd to clustal phd to fasta phd to fastq phd to fastq-solexa phd to fastq-illumina phd to genbank phd to nexus phd to phylip phd to stockholm phd to tab phd to qual phylip to clustal phylip to fasta phylip to fastq phylip to fastq- solexa phylip to fastq-illumina phylip to genbank phylip to nexus phylip to stockholm phylip to tab phylip to qual pir to clustal pir to fasta pir to fastq pir to fastq-solexa pir to fastq-illumina pir to genbank pir to nexus pir to phylip pir to stockholm pir to tab pir to qual stockholm to clustal stockholm to fasta stockholm to fastq stockholm to fastq-solexa stockholm to fastq-illumina stockholm to genbank stockholm to nexus stockholm to phylip stockholm to tab stockholm to qual swiss to clustal swiss to fasta swiss to fastq swiss to fastq- solexa swiss to fastq-illumina swiss to genbank swiss to nexus swiss to phylip swiss to stockholm swiss to tab swiss to qual tab to clustal tab to fasta tab to fastq tab to fastq-solexa tab to fastq-illumina tab to genbank tab to nexus tab to phylip tab to stockholm tab to qual qual to clustal qual to fasta qual to fastq qual to fastq-solexa qual to fastq-illumina qual to genbank qual to nexus qual to phylip qual to stockholm qual to tab
个人分类: biology|11179 次阅读|0 个评论
将htm页面转换为pdf的方法
热度 2 barsterd 2011-8-22 16:52
尝试:根据网上提供的各种方法(比如在线转换,浏览器插件,“另存为...”),都没有得到好的结果。 我的办法:1.将页面以htm的格式保存;2.以word方式打开该页面;3.在word中另存为pdf格式。
个人分类: |7505 次阅读|4 个评论
[转载]文件格式转换工具——Open Babel
swx0789 2011-7-26 18:45
Open Babel 最新版本: 2.2 官方主页: http://openbabel.sourceforge.net/ 下载地址: http://www.namipan.com/d/980c6a2eb3ccf7f640a454ffb01a3e23d66510d3bb5e6200 简介   格式转换和编辑工具。 功能   支持大量的常见化学文件格式。 支持的输入类型有:alc (Alchemy文件),prep (Amber PREP文件),bs (Ball Stick文件),caccrt (Cacao直角坐标文件),ccc (CCC文件),c3d1 (Chem3D直角坐标1文件),c3d2 (Chem3D直角坐标2文件),cml (Chemical Markup Language文件),crk2d (CRK2D文件),crk3d (CRK3D文件),box (Dock 3.5 Box文件),dmol (DMol3直角坐标文件),feat (Feature文件),gam (GAMESS输出文件),gamout (GAMESS输出文件),gpr (Ghemical工程文件),mm1gp (Ghemical MM文件),qm1gp (Ghemical QM文件),hin (HyperChem HIN文件),jout (Jaguar输出文件),mmd (MacroModel文件),mmod (MacroModel文件),out (MacroModel文件),dat (MacroModel文件),car (MSI Biosym/Insight II CAR文件),sdf (MDL Isis SDF文件),sd (MDL Isis SDF文件),mdl (MDL Molfile文件),mol (MDL Molfile 文件),mopcrt (MOPAC直角坐标文件),mopout (MOPAC输出文件),mmads (MMADS文件),mpqc (MPQC文件),bgf (MSI BGF文件),nwo (NWChem输出文件),pdb (PDB文件),ent (PDB文件),pqs (PQS文件),qcout (Q-Chem输出文件),res (ShelX文件),ins (ShelX文件),smi (SMILES文件),mol2 (Sybyl Mol2文件),unixyz (UniChem XYZ文件),vmol (ViewMol文件),xyz (XYZ文件)。 支持的输出类型有:alc (Alchemy文件),bs (Ball Stick文件),caccrt (Cacao直角坐标文件),cacint (Cacao内坐标文件),cache (CAChe MolStruct文件),c3d1 (Chem3D直角坐标1文件),c3d2 (Chem3D直角坐标2文件),ct (ChemDraw连接关系表文件),cht (Chemtool文件),cml (Chemical Markup Language文件),crk2d (CRK2D文件),crk3d (CRK3D文件),cssr (CSD CSSR文件),box (Dock 3.5 Box文件),dmol (DMol3文件),feat (Feature文件),fh (Fenske-Hall Z-Matrix文件),gamin (GAMESS输入文件),inp (GAMESS输入文件),gcart (Gaussian直角坐标文件),gau (Gaussian输入文件),gpr (Ghemical工程文件),gr96a (GROMOS96 (A)文件),gr96n (GROMOS96 (nm)文件),hin (HyperChem HIN文件),jin (Jaguar输入文件),bin (OpenEye二进制文件),mmd (MacroModel文件),mmod (MacroModel文件),out (MacroModel文件),dat (MacroModel文件),sdf (MDL Isis SDF文件),sd (MDL Isis SDF文件),mdl (MDL Molfile文件),mol (MDL Molfile文件),mopcrt (MOPAC直角坐标文件),mmads (MMADS文件),bgf (MSI BGF文件),csr (MSI Quanta CSR文件),nw (NWChem输入文件),pdb (PDB文件),ent (PDB文件),pov (POV-Ray输出文件),pqs (PQS文件),report (Report文件),qcin (Q-Chem输入文件),smi (SMILES文件),fix (SMILES Fix文件),mol2 (Sybyl Mol2文件),txyz (Tinker XYZ文件),txt (Titles文件),unixyz (UniChem XYZ文件),vmol (ViewMol文件),xed (XED文件),xyz (XYZ文件),zin (ZINDO输入文件)。文件类型基于扩展名。 支持化学MIME。 SMARTS匹配器。 柔性原子打印。 柔性键打印。 部分电荷计算。 添加或删除氢。 支持同位素,进行平均计算。 自动猜测环,键,杂化,芳香性。 多构象分子存储。 命令行转换一个文件中的多个分子。 命令行界面。 二进制矢量类。 矢量与矩阵的转换。 分子测试组。
6259 次阅读|0 个评论

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-17 12:15

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部