You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 17 Next »

Requirements

  • Postgres database with Postgis extensions enabled.
  • Tomcat 6
  • Java 1.7 (Tested with Java version "1.7.0_45")


Geonetwork configuration

For Geonetwork to work correctly on a server, the hostname and port of the server have to be configured. In the Admin console in the Catalog server section the following fields have to match the servername geonetwork is deployed to:

There is another setting that is server dependent:

Resource identifier prefix.http://dl-tc006.xtr.deltares.nl:8080/geonetwork/srv/metadata/

The latest Deltares geonetwork build, can be downloaded from (see artifacts): https://build.deltares.nl/viewType.html?buildTypeId=Geonetwork_GeonetworkInstall).

Tomcat 6 Configuration

To store indexes and other Geonetwork specific data, pass a java environment data directory to tomcat.

"-Dgeonetwork.dir=/var/lib/geonetwork_data"

To make sure tomcat has enough memory available, use the following java parameters:

"-Dfile.encoding=UTF-8 -Xms128m -Xmx712m -XX:PermSize=128m -XX:MaxPermSize=128m"

On CentOS these settings can be set in the /usr/share/tomcat6/conf/tomcat6.conf file.

  • JAVA_OPTS="-Dgeonetwork.dir=/var/lib/geonetwork_data -Dfile.encoding=UTF-8 -Xms128m -Xmx712m -XX:PermSize=128m -XX:MaxPermSize=128m"

On windows the JAVA_OPTS can be added to the sentenv.bat file in the tomcat bin directory.

Put the jdbc.properties in the tomcat conf directory to override the default jdbc.properties.

 

To allow searching in the ISO19139 temporal extent meta data using a When search from the Geonetwork 3 gui, the following java -D parameter should be passed.

-Dgeonetwork.search.temporal.extent.overrule=true

Otherwise Geonetwork 3 will only search for creation date and modification date of the metadata.

Configuring the Geonetwork 3 sources

N.B.: The following changes in the geonetwork sources have be applied In the openearth repository of geonetwork:  https://github.com/openearth/core-geonetwork; these changes have been added to the 3.0.x-deltares branch.

To make Geonetwork 3 use the Postgres with postgis where the spatial indexes are stored in postgis, a new configuration is added. the following has to be changed/added in the "web/src/main/webapp/" directory:

  • WEB-INF\config-node\srv.xml -->  Change to: <import resource="../config-db/postgres-postgis.xml"/>
  • WEB-INF\config-db\postgres-postgis.xml will be added. (content displayed hereafter).
  • WEB-INF\config-db\jdbc.properties --> Fill in the database host, portname, username and password (used for local development).

 

Configure the postgres-postgis.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<beans default-lazy-init="true"
       xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="
      http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
      http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
   ">
    <!--  Postgresql database with postgis extenstion to allow storing spatial index in postgres. -->

    <!-- allow loading properties from the tomcat conf directory. If not found the default jdbc.properties will be used. -->
    <context:property-placeholder location="file:${catalina.home}/conf/jdbc.properties" ignore-resource-not-found="true" file-encoding="UTF-8" ignore-unresolvable="true" order="0"/>

    <import resource="defaultJdbcDataSource.xml"/>
    <import resource="postgis-alternate-datasource.xml"/>

    <bean id="jpaVendorAdapterDatabaseParam" class="java.lang.String">
        <constructor-arg value="POSTGRESQL"/>
    </bean>

    <bean id="jdbcDriverClassName" class="java.lang.String">
        <constructor-arg value="org.postgis.DriverWrapper"/>
    </bean>

    <bean id="jdbcURL" class="java.lang.String">
    <constructor-arg value="jdbc:postgresql_postGIS://${jdbc.host}:${jdbc.port}/${jdbc.database}"/>
    </bean>
</beans>

 

Geonetwork uses stopwords to create indexes and to filter them from queries. This leads to unexpected results if a user uses the english user interface and types a dutch query. For example the query "het water" wil be interpreted as an english query. The stopword "het" won't be removed from the query. During indexing dutch documents the stop words will be removed, so only "water" is stored in the index. So searching for "het water" will not find any results.

To work around this issue, the english and dutch stop words have been merged:

webapp/resources/stopwords

  • eng.txt
  • dut.txt

 

Geonetwork uses a generic html header. This leads to problems on some IE installations where the browser is set to favourite IE 7 to display the page instead of a newer iteration. We can force IE to show the page in its newest iteration by changing the metatag to:

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

The above can be added to the base-layout.xsl which can be found in web/src/main/webapp/xslt.  This needs to be changed every update.

 

 

 

 

 

  • No labels