<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>LiangXu Wang &#187; Linux</title>
	<atom:link href="http://wlx.westgis.ac.cn/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://wlx.westgis.ac.cn</link>
	<description>research of gis, rs, opensource.</description>
	<lastBuildDate>Wed, 28 Jul 2010 17:08:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>cout float的显示问题</title>
		<link>http://wlx.westgis.ac.cn/589/</link>
		<comments>http://wlx.westgis.ac.cn/589/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 04:52:05 +0000</pubDate>
		<dc:creator>wlx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Program]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[cout]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://wlx.westgis.ac.cn/?p=589</guid>
		<description><![CDATA[在c++，使用cout直接显示float类型的数据，在不同系统上显示方式可能有所不同。
测试代码：
#include &#60;iostream&#62;
using namespace std;
int main()
{
    float t=0.000000277;
    cout&#60;&#60;t&#60;&#60;endl;
    return 0;
}
在LINUX上：
2.77e-07
而在WINDOWS上结果如下：
2.77e-007
]]></description>
			<content:encoded><![CDATA[<p>在c++，使用cout直接显示float类型的数据，在不同系统上显示方式可能有所不同。<br />
测试代码：<br />
<code>#include &lt;iostream&gt;</p>
<p>using namespace std;</p>
<p>int main()<br />
{<br />
    float t=0.000000277;<br />
    cout&lt;&lt;t&lt;&lt;endl;<br />
    return 0;<br />
}</code><br />
在LINUX上：</p>
<blockquote><p>2.77e-07</p></blockquote>
<p>而在WINDOWS上结果如下：</p>
<blockquote><p>2.77e-007</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://wlx.westgis.ac.cn/589/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux shell获取当前文件的时间</title>
		<link>http://wlx.westgis.ac.cn/507/</link>
		<comments>http://wlx.westgis.ac.cn/507/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 06:27:37 +0000</pubDate>
		<dc:creator>wlx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://wlx.westgis.ac.cn/?p=507</guid>
		<description><![CDATA[主要的目的是想用文件的创建时间给文件重新命令。这在从数码相机中导入录像的时候有用。
 stat geoserver-1.6.5-bin.zip  &#124; grep Modify  &#124; awk '{print $2 $3}'  &#124; cut -d"." -f1  &#124; sed -e 's/-//g' -e 's/://g'

或者：
stat -c %y geoserver-1.6.5-bin.zip  &#124;  awk '{print $1 $2 $3}'  &#124; cut -d"." -f1  &#124; sed -e 's/-//g' -e 's/://g' 
]]></description>
			<content:encoded><![CDATA[<p>主要的目的是想用文件的创建时间给文件重新命令。这在从数码相机中导入录像的时候有用。</p>
<blockquote><p> stat geoserver-1.6.5-bin.zip  | grep Modify  | awk '{print $2 $3}'  | cut -d"." -f1  | sed -e 's/-//g' -e 's/://g'
</p></blockquote>
<p>或者：</p>
<blockquote><p>stat -c %y geoserver-1.6.5-bin.zip  |  awk '{print $1 $2 $3}'  | cut -d"." -f1  | sed -e 's/-//g' -e 's/://g' </p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://wlx.westgis.ac.cn/507/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>skype for linux支持视频了</title>
		<link>http://wlx.westgis.ac.cn/463/</link>
		<comments>http://wlx.westgis.ac.cn/463/#comments</comments>
		<pubDate>Thu, 08 Nov 2007 08:44:46 +0000</pubDate>
		<dc:creator>wlx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ekiga]]></category>
		<category><![CDATA[openwengophone]]></category>
		<category><![CDATA[skype]]></category>

		<guid isPermaLink="false">http://wlx.westgis.ac.cn/463/</guid>
		<description><![CDATA[skype for linux 2.0.0.13发布了，是一个beta版本，但开始支持视频了！
这是一个期待了很长时间的特性。
期间，曾经试验了其他的支持视频的软件，比如，我曾经尝试过ekiga、openwengophone，但最后都还是放弃了。（ekiga是因为缺少一个稳定的windows版本，而wengophone则一直是处于不稳定状态，且连接国内有时会断）。
这个skype的beta版本试用中间不是很稳定，崩溃过一次。
]]></description>
			<content:encoded><![CDATA[<p>skype for linux 2.0.0.13发布了，是一个beta版本，但开始支持视频了！<br />
这是一个期待了很长时间的特性。<br />
期间，曾经试验了其他的支持视频的软件，比如，我曾经尝试过ekiga、<a href="http://wlx.westgis.ac.cn/154/">openwengophone</a>，但最后都还是放弃了。（ekiga是因为缺少一个稳定的windows版本，而wengophone则一直是处于不稳定状态，且连接国内有时会断）。<br />
这个skype的beta版本试用中间不是很稳定，崩溃过一次。</p>
]]></content:encoded>
			<wfw:commentRss>http://wlx.westgis.ac.cn/463/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>flash player 9 beta 2 for linux</title>
		<link>http://wlx.westgis.ac.cn/314/</link>
		<comments>http://wlx.westgis.ac.cn/314/#comments</comments>
		<pubDate>Sun, 17 Dec 2006 14:54:10 +0000</pubDate>
		<dc:creator>wlx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[中文]]></category>

		<guid isPermaLink="false">http://wlx.westgis.ac.cn/314/</guid>
		<description><![CDATA[flash player 9 for linux beta2 发布已经有一段时间了，在beta1发布的时候，曾经简单测试了一下。在ubuntu edgy，zh_CN.UTF8环境下FLASH退出存在段错误，这样就会导致firefox crash。
这个问题在beta2中仍然没有解决。
]]></description>
			<content:encoded><![CDATA[<p>flash player 9 for linux beta2 发布已经有一段时间了，在beta1发布的时候，曾经简单测试了一下。在ubuntu edgy，zh_CN.UTF8环境下FLASH退出存在段错误，这样就会导致firefox crash。<br />
这个问题在beta2中仍然没有解决。</p>
]]></content:encoded>
			<wfw:commentRss>http://wlx.westgis.ac.cn/314/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>更酷的top：htop</title>
		<link>http://wlx.westgis.ac.cn/312/</link>
		<comments>http://wlx.westgis.ac.cn/312/#comments</comments>
		<pubDate>Thu, 14 Dec 2006 15:09:17 +0000</pubDate>
		<dc:creator>wlx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[htop]]></category>
		<category><![CDATA[top]]></category>

		<guid isPermaLink="false">http://wlx.westgis.ac.cn/312/</guid>
		<description><![CDATA[一直对top显示的内容一知半解，没想到还有一个更酷的东西：htop。
感谢pczou的介绍。
在ubuntu下安装倒是非常简单：
sudo aptitude install htop
运行起来，可以支持方向键移动了。

    * 可以进行水平或竖直滚动 (总算可以看到所有进程和全部命令行了)
    * 可以跟踪进程 (通过集成strace实现)
    * 主页面上显示常用功能项，很方便。top里可以要'h'一下。
    * 支持进程树状显示
    * 可以按名称查找进程
    * 支持鼠标
]]></description>
			<content:encoded><![CDATA[<p>一直对top显示的内容一知半解，没想到还有一个更酷的东西：htop。<br />
感谢<a href="http://pczou.bokee.com/index.html">pczou</a>的<a href="http://pczou.bokee.com/4634202.html">介绍</a>。<br />
在ubuntu下安装倒是非常简单：</p>
<blockquote><p>sudo aptitude install htop</p></blockquote>
<p>运行起来，可以支持方向键移动了。</p>
<blockquote><p>
    * 可以进行水平或竖直滚动 (总算可以看到所有进程和全部命令行了)<br />
    * 可以跟踪进程 (通过集成strace实现)<br />
    * 主页面上显示常用功能项，很方便。top里可以要'h'一下。<br />
    * 支持进程树状显示<br />
    * 可以按名称查找进程<br />
    * 支持鼠标</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://wlx.westgis.ac.cn/312/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gaia - Open Source Google Earth - but not permitted</title>
		<link>http://wlx.westgis.ac.cn/282/</link>
		<comments>http://wlx.westgis.ac.cn/282/#comments</comments>
		<pubDate>Sat, 25 Nov 2006 17:46:50 +0000</pubDate>
		<dc:creator>wlx</dc:creator>
				<category><![CDATA[GIS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[gaia]]></category>
		<category><![CDATA[google-earth]]></category>

		<guid isPermaLink="false">http://wlxblog.westgis.ac.cn/282/</guid>
		<description><![CDATA[刚刚在solidot上看到的消息：
Gaia试图开源Google Earth未果
到其网站看了一下，果然有通知：
25 November 2006, we've got the letter from Michael Jones, the Chief Technologist of Google Earth, Google Maps, and Google Local search, requesting us to cease reverse engineering and improper usage of licensed data that Google Earth use. We understand and respect Google's position on the case, so we've removed all downloads from this [...]]]></description>
			<content:encoded><![CDATA[<p>刚刚在solidot上看到的消息：<br />
<a href="http://opensource.solidot.org/opensource/06/11/25/040212.shtml">Gaia试图开源Google Earth未果</a><br />
到其网站看了一下，果然有通知：</p>
<blockquote><p>25 November 2006, we've got the letter from Michael Jones, the Chief Technologist of Google Earth, Google Maps, and Google Local search, requesting us to cease reverse engineering and improper usage of licensed data that Google Earth use. We understand and respect Google's position on the case, so we've removed all downloads from this page and we ask everybody who have ever downloaded gaia 0.1.0 and prior versions to delete all files concerned with the project, which include source code, binary files and image cache (~/.gaia).</p></blockquote>
<p>站点上的下载连接都删除了，但我原来一直不知道这个项目，就满世界的找其镜像，功夫不负有心人，最终在gentoo的库里找到了，下载编译试用了一下，感觉还可以，不过只有最基本的功能，就是浏览图像，但程序比较稳定。其比google earth for linux的优势就是可以把其代码集成到自己的程序里，然后再混合自己的地图服务，可以得到很好的效果。（当然，还有别的功能，自己体会，呵呵）<br />
当然，google封杀这个项目也可以理解。<br />
下载：<a href='http://wlx.westgis.ac.cn/uploads/2008/03/gaia-010.tar.bz2' title='gaia 0.10'>gaia 0.10</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wlx.westgis.ac.cn/282/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>使用tcl 8.4程序的编译</title>
		<link>http://wlx.westgis.ac.cn/272/</link>
		<comments>http://wlx.westgis.ac.cn/272/#comments</comments>
		<pubDate>Wed, 18 Oct 2006 08:41:10 +0000</pubDate>
		<dc:creator>wlx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[SME]]></category>
		<category><![CDATA[TCL]]></category>

		<guid isPermaLink="false">http://wlxblog.westgis.ac.cn/272/</guid>
		<description><![CDATA[在编译SME-3.2.73的时候，遇到了Tcl_CreateCommand程序调用编译错误，后来在网络上google才知道这是tcl升级到8.4的问题。
 invalid conversion from ‘int (*)(void*, Tcl_Interp*, int, char**)’ to ‘int (*)(void*, Tcl_Interp*, int, const char**)’
后来在http://wiki.tcl.tk/3669找到了答案。
解决办法：
1 可以在g++编译的时候加上-DUSE_NON_CONST参数
2 可以在代码中引入tcl.h之前定义此宏。
#define USE_NON_CONST
#include "tcl.h"
]]></description>
			<content:encoded><![CDATA[<p>在编译SME-3.2.73的时候，遇到了Tcl_CreateCommand程序调用编译错误，后来在网络上google才知道这是tcl升级到8.4的问题。</p>
<blockquote><p> invalid conversion from ‘int (*)(void*, Tcl_Interp*, int, char**)’ to ‘int (*)(void*, Tcl_Interp*, int, const char**)’</p></blockquote>
<p>后来在<a href="http://wiki.tcl.tk/3669">http://wiki.tcl.tk/3669</a>找到了答案。<br />
解决办法：<br />
1 可以在g++编译的时候加上-DUSE_NON_CONST参数<br />
2 可以在代码中引入tcl.h之前定义此宏。</p>
<blockquote><p>#define USE_NON_CONST<br />
#include "tcl.h"</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://wlx.westgis.ac.cn/272/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Earth for linux推新版了：4.0.2091</title>
		<link>http://wlx.westgis.ac.cn/252/</link>
		<comments>http://wlx.westgis.ac.cn/252/#comments</comments>
		<pubDate>Fri, 15 Sep 2006 11:21:35 +0000</pubDate>
		<dc:creator>wlx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[earth]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://wlxblog.westgis.ac.cn/252/</guid>
		<description><![CDATA[前天在gearthblog上看到google earth进行了升级，但当时只有windows版本是升级的，LINUX版本没有变化，但今天上去就看到了变化：版本号升级到了4.0.2091。
]]></description>
			<content:encoded><![CDATA[<p>前天在gearthblog上看到<a href="http://www.gearthblog.com/blog/archives/2006/09/new_version_of_googl.html">google earth进行了升级</a>，但当时只有windows版本是升级的，LINUX版本没有变化，但今天上去就看到了变化：版本号升级到了4.0.2091。</p>
]]></content:encoded>
			<wfw:commentRss>http://wlx.westgis.ac.cn/252/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>导入landuse数据的最终脚本</title>
		<link>http://wlx.westgis.ac.cn/243/</link>
		<comments>http://wlx.westgis.ac.cn/243/#comments</comments>
		<pubDate>Mon, 04 Sep 2006 13:48:44 +0000</pubDate>
		<dc:creator>wlx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PostGIS]]></category>

		<guid isPermaLink="false">http://wlxblog.westgis.ac.cn/243/</guid>
		<description><![CDATA[经过漫长的测试（3天的运行），修改后的最终版本可以实现：
保存当前进度
下次运行可以从上次进度运行
可以更新县区代码
可以更新时间
最终的代码如下：
#!/bin/sh
# cd /opt/to_reback/data/landuse
#set -x
d1=./tmpdata1
d2=./tmpdata2
YEAR="80年代末 1995年 2000年"
for a in $YEAR; do
  for b in $a/*; do #province, 目录判断
    if [ -d $b ]; then
      rm -fdr $d1
      rm -fdr $d2
      for c in $b/ld*; do # areacode, [...]]]></description>
			<content:encoded><![CDATA[<p>经过漫长的测试（3天的运行），修改后的最终版本可以实现：</p>
<blockquote><p>保存当前进度<br />
下次运行可以从上次进度运行<br />
可以更新县区代码<br />
可以更新时间</p></blockquote>
<p>最终的代码如下：</p>
<blockquote><p>#!/bin/sh<br />
# cd /opt/to_reback/data/landuse<br />
#set -x<br />
d1=./tmpdata1<br />
d2=./tmpdata2<br />
YEAR="80年代末 1995年 2000年"<br />
for a in $YEAR; do<br />
  for b in $a/*; do #province, 目录判断<br />
    if [ -d $b ]; then<br />
      rm -fdr $d1<br />
      rm -fdr $d2<br />
      for c in $b/ld*; do # areacode, 县级区域<br />
        bb=`echo $b | sed "s/\///g"` # 去除/特殊字符，否则sed罢工<br />
        areacode=`echo $c | sed "s/\///g" | sed "s/$bb//g" | sed "s/ld//g"`<br />
        #echo $c<br />
        if [ `cat work.log | grep "$c"` ]; then<br />
          echo $c<br />
          echo "already done!"<br />
       else<br />
        ogr2ogr $d1 $c &#038;& ogr2ogr $d2 $d1/PAL.shp -f "ESRI Shapefile" -select area,perimeter,r_area,ln71,ln72,ln73,ln74,aftln,tm20,tm30,tm40,tm50,tm60,afttm,ph41,ph52,ph53,net || exit<br />
    shp2pgsql -a -g the_geom -i $d2/PAL.shp landuse | psql -d westdc || exit<br />
        psql -d westdc -c "update landuse set areacode='$areacode' where areacode=''" || exit<br />
      echo $c >> work.log<br />
     #  echo "here not done"<br />
       echo $c<br />
        #exit<br />
       fi<br />
      done<br />
      #vacuumdb westdc<br />
     fi<br />
  done<br />
  psql -d westdc -c "update landuse set year='$a' where year=''" || exit<br />
done<br />
#set +x
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://wlx.westgis.ac.cn/243/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xgl的更新</title>
		<link>http://wlx.westgis.ac.cn/242/</link>
		<comments>http://wlx.westgis.ac.cn/242/#comments</comments>
		<pubDate>Mon, 04 Sep 2006 13:39:15 +0000</pubDate>
		<dc:creator>wlx</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://wlxblog.westgis.ac.cn/242/</guid>
		<description><![CDATA[今天更新系统后发现又出现XGL/aiglx的老问题了：menu bar消失。
到ubuntuforums上一看，已经有解决方案了。原来是compiz使用了新的启动方法了：
compiz-start
修改插件可以使用：
csm
注意在使用csm命令前要修改.compiz目录的权限：
chmod 755 ~/.compiz -R
还可以在会话中加入compiz-start。
不过，I915下要把blue和water效果去掉，否则速度会很慢的。
]]></description>
			<content:encoded><![CDATA[<p>今天更新系统后发现又出现XGL/aiglx的老问题了：menu bar消失。<br />
到ubuntuforums上一看，已经有解决方案了。原来是compiz使用了新的启动方法了：</p>
<blockquote><p>compiz-start</p></blockquote>
<p>修改插件可以使用：</p>
<blockquote><p>csm</p></blockquote>
<p>注意在使用csm命令前要修改.compiz目录的权限：</p>
<blockquote><p>chmod 755 ~/.compiz -R</p></blockquote>
<p>还可以在会话中加入compiz-start。</p>
<p>不过，I915下要把blue和water效果去掉，否则速度会很慢的。</p>
]]></content:encoded>
			<wfw:commentRss>http://wlx.westgis.ac.cn/242/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
