eosdatadump: EOS免费数据自动下载与重发布
Posted on 十二月 8th, 2008 in Computer, GIS | No Comments »
模拟页面动作,自动下载EOS的免费数据,详细内容请参考文章:
2007年6月第三期,冰川冻土,EOS Data Dumper---EOS免费数据自动下载与重发布系统
代码:
eosdatadump
模拟页面动作,自动下载EOS的免费数据,详细内容请参考文章:
2007年6月第三期,冰川冻土,EOS Data Dumper---EOS免费数据自动下载与重发布系统
代码:
eosdatadump
geonetwork默认的用户密码加密方法是SHA1,但别的多数都是用的MD5,因此需要修改这个算法。
you just have to update the files :
/src/org/fao/geonet/services/login/Login.java
/src/org/fao/geonet/services/user/PwUpdate.java
/src/org/fao/geonet/services/user/Update.java
/src/org/fao/geonet/services/util/MainUtil.java
经过测试,只需要修改前面3个文件,修改完成后,直接运行ant生效。
注意其中的Util.scramble函数应该是处理SHA1加密算法的,可以去除,然后在SQL语句中直接添加为MD5函数就可以了。
参考:
1 http://www.nabble.com/set-pass-without-encryption-algorithms-or-CRYPT,-MD5-algorithm-td19666430.html
首先,需要自己重新编译GDAL,目前UBUNTU源里的GDAL有BUG。
然后,从svn中下载grass 6.4:
svn co https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass-6.4
cd grass-6.4/debian
svn://svn.debian.org/pkg-grass/packages/grass/branches/6.4/debian debiangis
mv debiangis/* .
目前,这个DEB控制还有点小问题,需要自己作些修改:
nano grass.conf
把路径修改为:
/usr/lib/grass64/lib
然后修改grass-preview-doc.links,修改为:
usr/share/doc/grass-preview-doc/html usr/lib/grass64/docs/html
还需要连接一个so库:
locate _gdi_.so
我的机器上有两个地址,一个是python 2.4,一个是python 2.5,我选择了python 2.5的地址,然后作了个连接:
sudo ln -s /usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_gdi_.so /usr/loca/lib/libgdi.so
然后就可以编译了:
debuild binary
然后就可以安装了,你若不想安装,可以使用我已经编译好的,(添加我自己的源):
然后sudo aptitude install grass-preview就可以了。
如要安装文档:
sudo aptitude install grass-preview-doc
sudo mkdir /usr/lib/grass64/docs
sudo ln -s /usr/share/doc/grass-preview-doc/html /usr/lib/grass64/docs/
按照英文版的安装指南在ubuntu hardy进行了试验。
安装过程中有几点要注意的:
1、mdweb本身提供的sql文件是需要采用LATIN1编码的,而在中文LOCAL下还无法创建,因此我后来就转换成了UTF8编码,即用iconv -f LATIN1 -t UTF8来进行转换。
2、要对php.ini进行参数的修改,否则mdweb的程序无法正常运行。
安装好简单试用了一下,不支持中文的元数据,出来是乱码,看了下代码,是在保存到数据库的时候,进行了utf8_decode操作,转换为了latin1编码,导致不支持中文。
程序中的说明和变量基本都是用法文的,多数都要靠猜。系统的界面和功能还有待增强。
BTW,其网站上的2.0演示的搜索界面很强,把What, When, Where, Who的搜索界面集成到一起了。
给定一定数量的经纬度坐标点,比如用GPS得到的一些点坐标,如何计算这些点之间的距离?
方法一:若数量少的话,直接利用一些网页工具计算点之间的距离,如这个地址,使用了WGS84的椭球参数。
方法二:采用ms office/openoffice里的宏功能,创建自定义函数,计算经纬度坐标对的距离。
你还有其他的方法么?
参考:
http://qgis.org/content/view/143/99/
It is our great pleasure to announce the immediate availability of Quantum GIS (QGIS) Version 0.8.1. The release includes numerous bug fixes and stability improvements to the 0.8 code base. QGIS is available is source form, and will be available as binary executables for Microsoft Windows, Mac OS X, and GNU/Linux. All versions can be obtained from our download page. If the version for your platform is not available please check back in a day or two as some packages are still being built. Many thanks to all the developers who worked so hard to make this release a reality.
新特性:
Whats New in 0.8.1
Version 0.8.1 is primarily a bug fix release. Some of the changes include:* Numerous bug fixes
* Improvements in how segment lengths appear in the measure tool. The current segment length is shown/updated in the list of segments
* Improvement to zoom-in speed for rasters
* Improve line/area measuring behaviour when the user has been informed that they are probably using the wrong projection for the map canvas
* Added tooltips to the scale and coordinate position displays in the status bar
* Removed ugly console on WIN32 when not debugging
* Added icons to all GRASS tools. All GRASS tools are now on the toolbar
* New GRASS modules added to the GRASS toolbox
* The GRASS plugin is now fully internationalized
* Launcher plugin added to core plugins
下载:http://download.qgis.org/qgis/
本文以MS4W为例,介绍如何建立一个简单的kamap!系统,并假设你已经做好了相关的数据,并建立了对应的map文件。
1、下载
若要简单的先浏览一下kamap!在本机上建立后的效果,需要下载下面对应的软件,所有软件都在www.maptools.org的网站上。
MS4W 2.2.3
ka-map! 1.0
gmap demo
其中,gmap是为了演示kamap!的功能的,若你有自己的数据,则可以不用下载。
2、安装
把上面下载的3个zip文件,都解压缩到c:\目录下。最终形成了一个c:\ms4w的目录,所有文件都安装到了这个目录下。
然后执行c:\ms4w\apache-install.bat文件。
ok,这样一个基本系统就搭建好了,你可以通过在WWW浏览器如IE、FIREFOX中浏览本机地址:
http://localhost/
而kamap的地址是:
http://localhost/kamap/
注意:
若在浏览kamap是无法得到地图数据,则有可能是因为浏览器缓存的问题,请先清空浏览器的缓存再试验看看。
3、定制
如何添加自己的数据集?
打开c:\ms4w\apps\ka-map-1.0\include\config.php文件,注意要用写字板或别的能支持硬回车的文本编辑软件来进行编辑。
注意看到这部分内容:
$aszGMap = array (
'title' => 'GMap 75',
'path' => '../../gmap/htdocs/gmap75.map',
'scales' => array( 40000000, 25000000, 12000000, 7500000, 3000000, 1000000 ),
'format' =>'PNG'
/* Sample authorized_users entry. See auth.php for more details:
* ,'authorized_users' => array('popplace' => array('user1', 'user2'),
* 'park' => array('user1')
*/
);$aszMapFiles = array( 'gmap' => $aszGMap
/* Add more elements to this array to offer multiple mapfiles */
);
/******************************************************************************
* figure out which map file to use and set up the necessary variables for
* the rest of the code to use. This does need to be done on every page load
* unfortunately.
*
* szMap should be set to the default map file to use but can change if
* this script is called with map=<mapname>.
*/
$szMap = 'gmap';
假设把你的map文件和地图数据拷贝到c:\ms4w\apps\lzu\目录下,你的map文件为lzu.map,则可以这样定制:
$aszGMap = array...这部分可以不用动,当然你若不需要,也可以删除之。然后添加:
$lzuMap = array (
'title' => 'LZU',
'path' => '../../lzu/lzu.map',
'scales' => array( 40000000, 25000000, 12000000, 7500000, 3000000, 1000000 ),
'format' =>'PNG'
);
然后这部分要根据上面的信息进行修改:
$aszMapFiles = array( 'gmap' => $aszGMap,'lzu'=>$lzuMap);
注意,这部分的比例尺数据要根据自己的实际情况进行修改:
'scales' => array( 40000000, 25000000, 12000000, 7500000, 3000000, 1000000 ),
如何修改对应的主页文件?
用网页编辑器打开c:\ms4w\apps\ka-map-1.0\htdocs\index.html文件,然后里面的信息则可以自己进行定制。
参考http://wlx.westgis.ac.cn/32/,注意其中遗漏了一点,就是北半球和南半球的百万编号,需要在编号后加N或S进行区别,而我们国家都是在北半球,通常都把N给省略了。
昨天给学生给问倒了,今天才找着,呵呵。
WMS最早是由OGC提出的,现在已经被ISO所采纳,形成了ISO 19128标准。
WMS提供了3个操作来支持创建和显示地图。
WMS分为客户端和服务器端。客户端支持意味着可以使用别的WMS服务器端。
The OpenGIS® Web Map Service (WMS) Implementation Specification provides three operations (GetCapabilities, GetMap, and GetFeatureInfo) in support of the creation and display of registered and superimposed map-like views of information that come simultaneously from multiple remote and heterogeneous sources.
When client and server software implements WMS, any client can access maps from any server. Any client can combine maps (overlay them like clear acetate sheets) from one or more servers. Any client can query information from a map provided by any server. While programmers need to write code to implement the specifications, end users can take advantage of products that include them to publish and access geospatial information. Software buyers can choose the best solution for their needs and not worry about if it will work with other solutions; if they all implement the same standard, WMS, they will all work together.
In particular WMS defines:
1. How to request and provide a map as a picture or set of features (GetMap)
2. How to get and provide information about the content of a map such as the value of a feature at a location (GetFeatureInfo)
3. How to get and provide information about what types of maps a server can deliver (GetCapabilities)