Neo4j Spatial Geoserver 插件
测试环境:GeoServer 2.1.1 |
部署到 Geoserver
-
将 target/xxxx-server-plugin.zip 解压到 $GEOSERVER_HOME/webapps/geoserver/WEB-INF/lib
-
重启 geoserver
-
配置新的工作空间
-
在您的工作空间中配置新的 Neo4j 数据源。将“Neo4j 数据库的目录路径:”参数指向包含图层的 Neo4j Spatial 数据库的相对路径(相对于 GeoServer 工作目录)或绝对路径(参见 Neo4j Spatial)
-
在图层中,点击“添加新资源”,选择您的 Neo4j 数据存储以查看现有的 Neo4j Spatial 图层并添加它们。
在 GeoServer trunk 中测试
-
检出 geoserver 源代码
svn co https://svn.codehaus.org/geoserver/trunk geoserver-trunk
-
构建源代码
cd geoserver-trunk mvn clean install
-
检查您是否可以按照 GeoServer Maven 构建指南运行 Web 应用程序
cd src/web/app mvn jetty:run
-
在 $GEOSERVER_SOURCE/src/web/app/pom.xml (https://svn.codehaus.org/geoserver/trunk/src/web/app/pom.xml) 中,在 profiles 部分下添加以下行
<profile> <id>neo4j</id> <dependencies> <dependency> <groupId>org.neo4j</groupId> <artifactId>neo4j-spatial</artifactId> <version>0.7-SNAPSHOT</version> </dependency> </dependencies> </profile>
-
使用添加的 neo4j profile 再次启动 GeoServer Web 应用程序
cd $GEOSERVER_SRC/src/web/app mvn jetty:run -Pneo4j
-
在 https://:8080 下找到已安装为数据源的 Neo4j
更多信息请访问 Neo4j Wiki 关于 Geoserver 的页面