Compile & install GRASS 6.4 on ubuntu intrepid

首先,需要自己重新编译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

然后就可以安装了,你若不想安装,可以使用我已经编译好的,(添加我自己的源):

http://ubuntu.westgis.ac.cn/ubuntu

然后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/

qgis 0.8.1 版本发布

参考:
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/

GRASS 6.2.0发布了

原文见:http://grass.itc.it/announces/announce_grass620.html
GRASS于10月31日发布最新的6.2.0稳定版,开发版6.3正在继续开发中。相比上一版本,增加了相当多的新特性,支持最新的GIS数据格式,本地化进一步加强,增加了多种语言的最新翻译。
地理资源分析支持系统(Geographic Resources Analysis Support System),简称GRASS,是一个融合高效的栅格、矢量、地理分析引擎为一体的GIS系统。 GRASS中包含以下工具:空间建模、栅格/矢量数据可视化、地理数据的管理和分析、航空影像/卫星影像处理、地图制图。
GRASS被广泛应用在学术和商业领域中,也被很多政府机构和环境顾问公司所使用,可以运行在目前流行的硬件平台上,同时是一个采用GPL授权协议的免费开源的软件。
GRASS 6系列引入了新型的支持拓扑的2D/3D矢量数据引擎,以支持矢量网络分析、基于SQL的DBMS的属性数据管理。这个版本提升了栅格和矢量引擎的整合和功能,并极大增强了3D栅格体模型(voxel)的支持。
此外,这个版本初次引入了一个新的图形管理工具:gis.m,同时旧的图形管理工具d.m也进行了功能增强并将继续提供支持。NVIZ可视化工具可以显示3D矢量数据和栅格体数据,还支持创建动态飞行动画,支持本地化,支持FreeType字体,包括多字节的亚洲字体,这对中日韩三国的本地化显得有特别重要,支持新投影的自动创建,可从已有投影的数据文件提取投影,也可以从EPSG代码进行创建。
同时,这是作为OSGF项目后首次发布的版本。联合了众多的开源地理软件,GRASS中采用了最新的GDAL/OGR库,这使其支持大量的栅格和矢量数据格式,还采用了PROJ.4库,这使其支持绝大多数已知的投影,同时还可以自定义新投影。
支持平台包括以下:

  • GNU/Linux
  • Mac OS X/Darwin
  • Microsoft Windows (分本地化支持和Cygwin支持)
  • Sun Solaris (SPARC/Intel)
  • Silicon Graphics Irix
  • HP-UX
  • DEC-Alpha
  • AIX
  • BSD
  • iPAQ/Linux
  • UNIX compliant platforms

GRASS可运行在32位系统和64位系统上,还提供大文件(>2GB)支持。

GRASS 6.1cvs重打包

首先更新:
cvs up
然后更改control/rules
把TCL/TK 8.3版本替换成8.4版本,FFTW换成版本3,添加上sqlite支持。
然后:
dch -i
dpkg-buildpackage -rfakeroot
但是出现错误,检查发现是patches出现了问题,于是手工修改对应的文件,然后把此patch删除。
继续打包,最后出现错误,检查后是grass.install中的目录有一个发生了改变。

Grass 6.1cvs 在 Debian Sarge下的编译

quoted from the grass’s user mail list.

1) The DebianGIS project publishes backported packages of GRASS 6.0.2
and 6.1-cvs for Debian/Stable (sarge) as well as other geospatial
software (eg gdal 1.3.1).

see http://pkg-grass.alioth.debian.org/cgi-bin/wiki.pl

2) If you explore the “build depends” line in the package description
you can quickly figure out what packages you need to compile it
yourself. You can even use the debian package building framework as a
one line command. See the debian/ directory in the GRASS source code.

see http://freegis.org/cgi-bin/viewcvs.cgi/grass6/debian/

(Paulo, could you write up a quick README file for there on how to build
your own packages? I don’t know the “correct” way.)

3) compile it yourself. If you get *latest* CVS code you can compile
with tcltk 8.4 and fftw3, otherwise use tcltk8.3 and fftw2 without
losing anything.

I think for the FFMPEG animation support in NVIZ you need to get some
non-Free packages from Christian Marillat’s repository:

add to /etc/apt/sources.list:
deb ftp://ftp.nerim.net/debian-marillat/ sarge main

./configure step: (season to taste)

CFLAGS=”-ggdb -march=pentium4 -Wall” ./configure \
–with-tcltk-includes=/usr/include/tcl8.3 \
–with-motif –with-motif-includes=/usr/X11R6/include \
–with-readline –with-cxx –with-glw –with-odbc –with-sqlite \
–with-freetype –with-freetype-includes=/usr/include/freetype2 \
–without-postgres \
2>&1 | tee config_log.txt

# –with-ffmpeg –with-ffmpeg-includes=/usr/include/ffmpeg

$ make

To run GRASS, simply start (or symlink to)
$ ./bin.$ARCH/grass61

or, as root,
# make install

GRASS 6.1-cvs Compile package reqs for Debian/Stable, 31 Oct 2005

gcc # for compile
libc6-dev # for basics
flex # for lex
bison # for yacc
libncurses5-dev # for curses
zlib1g-dev # zlib
libreadline5-dev # readline
libjpeg62-dev or libjpeg-mmx-dev # for JPEG support
libtiff4-dev # for TIFF support
libpng12-dev # for PNG support
tcl8.3-dev # for TCL
tk8.3-dev # for TK
#postgresql # for Postgresql support
#postgresql-dev # for Postgresql support
xlibmesa-gl-dev # for OpenGL
#libstdc++5-3.3-dev # for glu-dev
xlibmesa-glu-dev # for OpenGL
unixodbc-dev # for ODBC
fftw-dev # for FFT functions
lesstif2-dev # for Motif
libfreetype6-dev # for Freetype Fonts
libgdal1-dev # for GDAL
gdal-bin # for GDAL (doesn’t include libraries or gdal-config)
proj # for PROJ.4
sqlite3 # for SQLite
libsqlite3-dev # for SQLite
#libavcodec-dev # for FFMPEG support
libavcodeccvs-dev# for FFMPEG support
libavutilcvs-dev # for FFMPEG support

make # won’t get far without this..
g++ # for r.terraflow

new:
tcl8.4-dev # for TCL
tk8.4-dev # for TK
fftw3-dev # for FFT modules

good luck,
Hamish

看样子,原来NVIZ在TCL/TK 8.4下的BUG已经解决了,而且支持FFTW3了,还可以输出视频了。

grass与gmt的结合

来源: http://169.237.35.250/~dylan/grass_user_group/grass & gmt

General methods for working with GRASS and GMT

1. Importing data into GRASS:

* r.in.gdal raster data
* v.in.ogr vector data

2. Exporting data from GRASS, in a GMT-ready format

* r.out.bin -h [-i] as floating point or optionally integer binary grid

* use -i to integer cat labels instead of actual cell values raster.grd[=1|=2] access file as floating point [=1], or integer [=2]

CELL type rasters are accessed via [=2]
FCELL type rasters are accessed via [=1]
* DCELL type rasters (convert to FCELL with r.mapcalc float(raster)) v.out.ascii | awk >file.xy vectors as y,x records

3. GMT

* grdimage render raster image
* grdcontour contour raster data
* makecpt make a color pallette file for raster data
* grd2cpt make a color pallette based on values in raster data
* psbasemap create clean line, scale, north arrow, etc.
* psxy render point, line, or polygon data from xyz text file
* pslegend create a legend
* gmtset set GMT variables such as paper and font size