Extension:Geoserver

From MediaWiki.org

Jump to: navigation, search
Manual on MediaWiki Extensions
List of MediaWiki Extensions
Geoserver Extension

Release status: unknown

Implementation Database
Description An extension to add maps to wiki articles and to store wiki articles in a spatial database
Author(s) Jens Frank
Version 0.1
MediaWiki 1.11
Download see below
Added rights GPL

Contents

[edit] Installation

The installation is described for Linux.

[edit] Install a Java Runtime

If you don't have a JRE already, you have to install one. You can skip this if you already have a compatible JRE.

  • Download a JRE from Sun, e.g. Java Runtime Environment (JRE) 5.0 Update 12, copy the .bin file to /opt.
  • cd /opt
    
  • chmod a+x jre-1_5_0_12-linux-i586.bin
    
  • ./jre-1_5_0_12-linux-i586.bin
    
    Follow the on-screen instructions


[edit] Install Geoserver

  • cd /opt
    
  • Download the binary edition of geoserver (use the .war version if you already have a Java Servlet Engine running), e.g. geoserver-1.5.1-bin.zip,
    wget http://downloads.sourceforge.net/geoserver/geoserver-1.5.1-bin.zip
    
  • unzip geoserver-1.5.1-bin.zip
    
  • export JAVA_HOME=/opt/jre1.5.0_12/
    
  • cd geoserver; bin/startup.sh
    

[edit] Install PostGIS (PostgreSQL with spatial data extension)

PostGIS is part of most Linux distributions. Install it using e.g.

apt-get install postgis postgresql-8.1-postgis

for Debian/Ubuntu or

yum install postgis

on Fedora.

[edit] Configuration

[edit] Configre PostGIS

  • Log in as postgres user
  • Create a new database:
    createdb geowiki -U postgres
    
  • Install stored procedure support:
    createlang -U postgres plpgsql geowiki
    
  • Install GIS support:
    psql -U postgres geowiki < /usr/share/postgresql-8.1-postgis/lwpostgis.sql
    
  • Create the geodata table with the geoserver.psql script from the extension directory
    psql -U postgres geowiki < geoserver.psql
    

[edit] Configure Geoserver

  • Go to http://your server:8080/geoserver/
  • Log in to the admin account
  • Create a new namespace ( Config -> Data -> Namespace -> New ), e.g. wikipedia
  • Add a new datastore, pointing to the PostGIS DB created above
  • Add a new featuretype using the datastore

[edit] Configure MediaWiki

...

[edit] Helpful tools

  • GDAL
  • ogr2ogr
  • shp2pgsql
Personal tools