注意 本人的博客都迁移到本人自己搭建的博客地址,通过此处可查看。
rasdaman(“raster data manager”)格数据管理器: 号称是世界上最灵活和可伸缩的阵列引擎。
它允许存储和查询大量多维数组,如传感器、图像、模拟和统计数据,这些数据出现在地球、空间和生命科学等领域。这个全球领先的阵列分析引擎以其灵活性、性能和可扩展性而著称。rasdaman可以处理驻留在文件系统目录和数据库中的数组。
一个常用的同义词是栅格数据阵列,如二维光栅图形;这实际上促使名称rasdaman。然而,rasdaman在维度数目没有限制它可以,例如,一维二维测量数据、卫星图像、三维X/Y/T的时间序列图像和X、Y、Z的勘探资料,四维的海洋和气候数据,甚至超越时空的维度。
新一代地理栅格服务器 :从简单的地理图像服务到复杂的分析,rasdaman提供了时空光栅数据的所有功能——包括规则网格和不规则网格。正如最近的科学基准所显示的那样,它的性能和可扩展性是前所未有的。为了利用这种支持技术,用户不必学习新的接口:rasdaman与R、OpenLayers、Leaflet、NASA WorldWind、GDAL、MapServer、ESRI ArcGIS等软件进行了平滑集成,想要了解更多可点击这里。
下面介绍一下rasdaman的几种安装方法:
sudo - root
curl "http://download.rasdaman.org/packages/rpm/stable/CentOS/7/x86_64/rasdaman.repo" -o /etc/yum.repos.d/rasdaman.repo
yum clean all
yum update
yum search rasdaman
输出:
rasdaman.x86_64 : Rasdaman is the leading Array Database for flexible, scalable
: analytics of massive multi-dimensional array (raster) data,
: such as spatio-temporal datacubes.
yum install epel-release
yum install rasdaman
source /etc/profile.d/rasdaman.sh
注: 要想使用petascope,必须配置数据库为postgres,目前的rpm包都是以sqlite为默认包,后期会有更想,请期待!
rasql -q 'select c from RAS_COLLECTIONNAMES as c' --out string
输出结果:
rasql: rasdaman query tool v1.0, rasdaman v9.7.0 -- generated on 02.07.2015 08:44:56.
opening database RASBASE at localhost:7001...ok
Executing retrieval query...ok
Query result collection has 0 element(s):
rasql done.
http://localhost:8080/rasdaman/ows
# http://192.168.231.131:8080/rasdaman/ows
注: 这个在其他机器启动时会出现不能链接情况,需要将端口号开放或者关闭服务器的防火墙。
/opt/rasdaman
下无论什么时候有一个新的版本发布,通过以下步骤便进行升级更新:
su - root
service rasdaman stop
yum clean all
yum update rasdaman
service rasdaman start
#如果使用petascope需要启动下面的
service tomcat restart
migrate_petascopedb.sh
执行完以上步骤后,你的rasdaman将会被更新。
当以上步骤被执行完成后,rasdaman安装或者根更新完成后,这部分提供管理者一些额外后台信息:
service rasdaman start
service rasdaman stop
service rasdaman status
相似的,tomact
/tomact6
和postgresql
服务也可以被启动或者停止。
yum install epel-release
adduser rasdaman
passwd rasdaman
# 切换到rasdaman用户
sudo -u rasdaman -i
注: 修改/etc/sudoers
vi /etc/sudoers
## 方法一: 把前面的注释(#)去掉
## Allows people in group wheel to run all commands
%wheel ALL=(ALL) ALL
## 然后修改用户,使其属于root组(wheel),命令如下:
#usermod -g root tommy
## 方法二:在root下面添加一行,如下所示:
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
rasdaman ALL=(ALL) ALL
sudo yum install \
git make libtool pkgconfig m4 unzip curl \
bison gcc gcc-c++ libedit-devel zlib-devel openssl-devel \
flex flex-devel boost-devel libstdc++-static \
gdal-devel hdf-devel netcdf-devel grib_api-devel netcdf-cxx-devel netcdf4-python \
postgresql-devel postgresql-contrib postgresql-server sqlite-devel \
gdal-python gdal-java python-setuptools python-pip python-magic python2-netcdf4 grib_api\
java-1.8.0-openjdk java-1.8.0-openjdk-devel java-1.8.0-openjdk-headless tomcat maven2 \
libgeotiff libgeotiff-devel libtiff libtiff-devel \
doxygen
sudo yum install cmake3
sudo pip install glob2
注:源码编译安装boost,安装过程请参考boost1.67,
java -version
javac -version
sudo adduser $USER tomcat
# reboot or logout/login is necessary for this command to take effect
sudo -u postgres createuser -s $USER
修改etc/default/tomcat7的JAVA_OPTS=Xmx1024m,然重启tomcat sudo service tomcat restart.
。
git clone https://github.com/javyxu/rasdaman.git # this creates subdirectory rasdaman/
cd rasdaman/
~/.bashrc
文件export RMANHOME=/var/local/rasdaman
export RMANSRC=/home/rasdaman/Downloads/rasdaman # rasdaman sources
export RASDATA="$RMANHOME/data"
export CATALINA_HOME=/var/local/tomcat-8.5
export PATH=$PATH:$RMANHOME/bin
source ~/.bashrc
mkdir build
cd build
cmake3 ../rasdaman -DCMAKE_INSTALL_PREFIX=/var/local/rasdaman \
-DFILE_DATA_DIR=/var/local/rasdaman/data -DDEFAULT_BASEDB=postgresql \w
-DENABLE_PROFILING=ON -DGENERATE_DOCS=ON -DUSE_GRIB=ON -DUSE_NETCDF=ON \
-DENABLE_BENCHMARK=ON
make
make install
**cmake参数的数码: **
参数 | 可选 | 描述 |
---|---|---|
CMAKE_INSTALL_PREFIX | (default /opt/rasdaman) | 安装目录 |
CMAKE_BUILD_TYPE | Release,Debug (default Release) | 指定编译类型 |
CMAKE_VERBOSE_OUTPUT | ON/OFF | 是否输出make的详细信息 |
DEFAULT_BASEDB | sqlite/postgresql | 知道存储RASBASE的数据库 |
ENABLE_BENCHMARK | ON/OFF | 生成输出的二进制文件 |
ENABLE_PROFILING | ON/OFF | 是否用google-perftools进行分析查询 |
ENABLE_DEBUG | ON/OFF | 生成可以调试/生成调试日志的二进制文件 |
ENABLE_STRICT | ON/OFF | 在严格模式下启用编译(警告终止编译) |
ENABLE_R | ON/OFF | 是否支持R编译 |
GENERATE_DOCS | ON/OFF | 生成安装文档 |
GENERATE_PIC | ON/OFF | 生成位置独立的代码 |
ENABLE_JAVA | ON/OFF | 生成和安装基于java的组件(rasj, petascope, secore) |
JAVA_SERVER | external/embedded | 设置Java应用程序部署模式 |
USE_GDAL | ON/OFF | 安装的时候是否包含GDAL |
USE_GRIB | ON/OFF | 安装的时候是否包含GRIB |
USE_HDF4 | ON/OFF | 安装的时候是否包含HDF4 |
USE_NETCDF | ON/OFF | 安装的时候是否包含netCDF |
FILE_DATA_DIR | (default $RMANHOME/data) | 服务器存储切片文件地址 |
WAR_DIR | (default | |
$RMANHOME/share/rasdaman/war) | Java war 文件被安装的路径 |
create_db.sh
start_rasdaman.sh
rasdaman_insertdemo.sh [r]: url "title"
检查数据库是否正常:
rasql -q 'select c from RAS_COLLECTIONNAMES as c' --out string
停止/重启数据库
stop_rasdaman.sh
start_rasdaman.sh
Petascope是rasdaman的geo Web服务前端。它在数组之上添加了geo语义,从而支持基于OGC覆盖标准的规则网格和不规则网格。
Petascope自动安装为rasdaman.war,除非指定了-DENABLE_JAVA=OFF cmake选项。所有war文件的部署目录可以在cmake选项设置-dwarf _dir =
;默认情况下,这是$RMANHOME/share/rasdaman/war。
安装petascope
在rasdaman下配置postgresql,如果使用源码安装PostgreSQL,也可以参考此篇文章.
为petascope添加一个postgresql用户:
sudo -u postgres createuser -s -P
> enter password
在$RMANHOME/etc/petascope.properties
设置参数 spring.datasource.username=petauser
/spring.datasource.password=petapasswd
和metadata_user/metadata_pass
确保PostgreSQL允许,拷贝rasdaman.war向tomcat目录下,并启动或者重启tomcat。
完全部署成功后,可以在http://localhost:8080/rasdaman/ows。
SECORE(语义坐标引用系统解析器)是一个将CRS url映射到CRS定义的服务。这个组件是标准rasdaman分布的一部分,被开放地理空间联盟(OGC)用于运行他们的官方CRS解析器。Petascope使用SECORE来解析它所持有的覆盖率的CRS定义,如果SECORE作为def.war
在本地部署,最好与Petascope的rasdaman.war
一起部署。配置安装路径或禁用安装的方式与petascope相同。
vi default.toml
[general]
# The user running rasdaman
user = "rasdaman"
# Run the installation automatically without requiring any user input
auto = false
# Build and install rasdaman? Updating an existing installation is supported
install = true
#
# Configure actions before rasdaman building and installation starts
#
[pre_install]
# Install third party dependencies needed to compile / run rasdaman with
# apt-get/yum for packages available in the standard package manager, or with
# pip for python packages.
# If this is set to false, the installer will just print the package list and
# probably fail compilation or some further step if a package is missing.
install_dependencies = true
#
# Configure how to install rasdaman
#
[install]
# Install rasdaman from: "source" or "package"
from = "source"
# Target installation directory ($RMANHOME)
install_path = "/opt/rasdaman/"
[install.source]
# Rasdaman sources will be fetched from this repo
repository = "git://rasdaman.org/rasdaman.git"
# Rasdaman version to compile, e.g. master, v9.5.0, etc.
version = "master"
# Generate debug-ready binaries (slower performance)
debug = false
# Common servlet container settings for an externally deployed petascope/SECORE.
[install.webapps]
# Install Java web applications (petascope, SECORE)
enable = true
# Deployment type: "external" (e.g. in Tomcat), or "standalone"
deployment = "external"
[install.webapps.petascope]
# petascope will use this port when deployment is "standalone"
standalone_port = 9009
# JDBC connection URL
petascopedb_url = "jdbc:postgresql://localhost:5432/petascopedb"
# Database username
petascopedb_username = "petauser"
# Database password; a random password will be generated if it is empty
petascopedb_password = ""
[install.webapps.secore]
# SECORE will use this port when deployment is "standalone"
standalone_port = 9010
#
# Configure what to do after rasdaman is installed and running
#
[post_install]
# Ingest demo collections (with rasdaman_insertdemo.sh) and demo coverages
# (with petascope_insertdemo.sh)
insert_demo = true
# Run the systemtest
systemtest = false
wget http://download.rasdaman.org/installer/install.sh
bash install.sh -j default.toml
update_rasdaman.sh
在安过程中也许会出现cmake下载失败的错误
解决方法:可以先安装cmake3,安装方法sudo yum install cmake3
使用配置文件安装存在会有很多缺少,出现很多意想不到的问题