簡體   English   中英

為node-mapnik構建occi插件

[英]Building occi plugin for node-mapnik

我正在嘗試為node-mapnik構建occi插件。 我的目的是在tilelive-bridge節點模塊的node-mapnik安裝中使用該插件。

這是我首先要做的:

git clone https://github.com/mapnik/mapnik --depth 5
cd mapnik
git submodule update --init

完成此操作后,我可以使用以下命令構建postgis插件:

python scons/scons.py INPUT_PLUGINS='postgis'

生成的postgis.input文件在plugins / input目錄中可用。

我克隆了mapnik / non-core-plugins存儲庫,將occi插件復制到plugins / input目錄中,使用zip安裝的oracle Instantclient 11.2.0.4.0版本(rpm安裝沒有給我提供include文件夾和/或.h文件) ),編輯了SConstruct文件,並將此行添加到了plugins對象中:

'occi':{'default':False,'path':'OCCI','inc':'occi.h','lib':'clntsh','lang':'C++'},

然后,我編輯了config.py文件並添加了以下內容:

OCCI_INCLUDES = '/usr/lib/oracle/10.2.0.3/client/include'
OCCI_LIBS = '/usr/lib/oracle/10.2.0.3/client'

另外,我更改了這一行:

PathVariable('OCCI_LIBS', 'Search path for OCCI library files', '/usr/lib/oracle/10.2.0.3/client' + LIBDIR_SCHEMA_DEFAULT, PathVariable.PathAccept),

進入

PathVariable('OCCI_LIBS', 'Search path for OCCI library files', '/usr/lib/oracle/10.2.0.3/client', PathVariable.PathAccept),

然后我將這3行添加到〜/ .bashrc中:

export ORACLE_HOME=/usr/lib/oracle/10.2.0.3/client
export PATH=$ORACLE_HOME:$PATH
export LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.3/client

請注意,我使用的不是10.2.0.3版本,而是11.2.0.4.0,我只是將該文件夾命名為適合SConstruct中的默認文件夾(我也可以更改默認文件夾,但是我不確定是默認文件夾,因此我將其保留為原樣)。

然后我輸入:

source ~/.bashrc

並轉到mapnik文件夾以運行構建:

python scons/scons.py INPUT_PLUGINS='occi'

它說:

Checking for C++ library clntsh... yes

但是它沒有說:

Checking for C++ library ociei... yes

就像github中的mapnik Wiki的occi頁面建議的那樣。

我得到的錯誤:

In file included from plugins/input/occi/occi_datasource.cpp:24:0:
plugins/input/occi/occi_featureset.hpp:55:43: error: ‘geometry_type’ in namespace ‘mapnik’ does not name a type
                         const mapnik::geometry_type::types& geom_type,
                                       ^
plugins/input/occi/occi_featureset.hpp:55:63: error: expected unqualified-id before ‘&’ token
                         const mapnik::geometry_type::types& geom_type,
                                                           ^
plugins/input/occi/occi_featureset.hpp:55:63: error: expected ‘)’ before ‘&’ token
plugins/input/occi/occi_featureset.hpp:55:63: error: expected ‘;’ at end of member declaration
plugins/input/occi/occi_featureset.hpp:55:65: error: ‘geom_type’ does not name a type
                         const mapnik::geometry_type::types& geom_type,
                                                             ^
plugins/input/occi/occi_featureset.hpp:61:38: error: ‘mapnik::geometry_type’ has not been declared
     void fill_geometry_type (mapnik::geometry_type* geom,
                                  ^
scons: *** [plugins/input/occi/occi_datasource.os] Error 1
scons: building terminated because of errors.

Tilelive-bridge並未隨附具有occi插件的mapnik安裝,並且在刪除occi支持之前的版本將無法編譯。

你能告訴我我想念的東西嗎?

預先感謝您的所有幫助

原來OCCI插件甚至不適用於該版本的Mapnik。 如果要獲得Oracle Spatial數據庫連接性,則必須使用OGR插件。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM