connection string. In GeoNetwork 2.6.4 code is used this comparison to use
PostGis jdbc driver:
I think at some moment was used jdbc:postgis:... , but maybe I'm wrong or
was changed later to postgres_postgis. Anyway, the check in Java code seem
requires at least postgis written in lowercase in connection string (
postgresql_postgis).
Hi Jose,****
** **
Thanks for explaining how the spatial indexing is used in Geonetwork.****
** **
The postgis JDBC string didn’t work. My Geonetwork instance failed to
start with that JDBC string.****
** **
So I changed it back again to postgresql_postGIS and restarted the tomcat
server.****
** **
I noticed the following in the geonetwork log file:****
** **
...****
2012-09-13 17:22:45,061 INFO [jeeves.apphand] - Server is Enabled.**
**
2012-09-13 17:22:45,063 INFO [jeeves.apphand] - - Search...****
2012-09-13 17:22:45,063 INFO [jeeves.apphand] - Using shapefile
/usr/local/geonetwork/WEB-INF/lucene/spatial/spatialindex.shp****
2012-09-13 17:22:45,072 DEBUG [org.jzkit.z3950.server.Z3950Listener] -
Starting ZServer on port 2100 (timeout=300000)****
2012-09-13 17:22:45,079 DEBUG [org.jzkit.z3950.server.Z3950Listener] -
Waiting for connection****
*2012-09-13 17:22:46,665 INFO [jeeves.apphand] - NOTE: Using shapefile
for spatial index, this can be slow for larger catalogs*
2012-09-13 17:22:46,745 DEBUG [geonetwork.stopwordparser] - StopwordParser
parsing file: /usr/local/geonetwork/resources/stopwords/english_stop.txt**
**
...****
** **
So I then searched for the datastore creation failure message but I
couldn’t find any in the log neither the ‘Using the POSTGIS for spatial
index’ message.****
** **
2012-09-13 17:22:41,639 INFO [jeeves.engine] - Initializing profiles...**
**
2012-09-13 17:22:41,671 INFO [jeeves.engine] - Found handler :
org.fao.geonet.Geonetwork****
2012-09-13 17:22:41,706 INFO [jeeves.engine] - --- Starting handler
--------------------------------------****
2012-09-13 17:22:41,715 INFO [jeeves.apphand] - Initializing GeoNetwork
2.6.4.SNAPSHOT ...****
*2012-09-13 17:22:41,916 INFO [jeeves.apphand] - - Database connection
on jdbc:postgresql_postGIS://<host>:5432/geonetwork ...*
*2012-09-13 17:22:41,985 INFO [jeeves.apphand] - Found an existing
GeoNetwork database.*
2012-09-13 17:22:41,985 INFO [jeeves.apphand] - - Setting manager...***
*
2012-09-13 17:22:42,043 INFO [jeeves.apphand] - - Migration ...****
2012-09-13 17:22:42,044 DEBUG [jeeves.apphand] - Webapp
version:2.6.4 subversion:SNAPSHOT****
2012-09-13 17:22:42,044 DEBUG [jeeves.apphand] - Database
version:2.6.4 subversion:0****
2012-09-13 17:22:42,044 INFO [jeeves.apphand] - Webapp version =
Database version, no migration task to apply.****
2012-09-13 17:22:42,044 INFO [jeeves.apphand] - - Thesaurus...****
2012-09-13 17:22:42,448 DEBUG [geonetwork.thesaurus-man] - Adding
thesaurus : external.place.regions****
2012-09-13 17:22:43,015 DEBUG [geonetwork.thesaurus-man] - Adding
thesaurus : external.theme.inspire-theme****
2012-09-13 17:22:43,141 INFO [jeeves.apphand] - - Z39.50...****
2012-09-13 17:22:43,199 INFO [jeeves.apphand] - Repositories file
built from template.****
2012-09-13 17:22:44,275 DEBUG
[org.jzkit.search.util.RecordBuilder.RecordBuilderService] - new
RecordBuilderService****
2012-09-13 17:22:44,282 DEBUG
[org.jzkit.search.util.RecordBuilder.RecordBuilderService] -
RecordBuilderService::init****
2012-09-13 17:22:44,665 DEBUG [org.jzkit.z3950.server.Z3950Listener] - new
Z3950Listener()****
2012-09-13 17:22:44,676 DEBUG [org.jzkit.service.z3950server.JZKitBackend]
- New JZKitBackend 1752161445****
2012-09-13 17:22:44,702 DEBUG
[org.jzkit.configuration.provider.xml.InMemoryImpl] -
setApplicationContext...****
2012-09-13 17:22:44,702 DEBUG
[org.jzkit.configuration.provider.xml.InMemoryImpl] - Load config:
/JZKitConfig.xml****
2012-09-13 17:22:44,704 DEBUG
[org.jzkit.configuration.provider.xml.InMemoryImpl] - Loading rules :
jar:file:/usr/local/geonetwork/WEB-IN****
F/lib/jzkit-service-3.r260.geonetwork.patch.1.jar!/org/jzkit/configuration/provider/xml/DigesterRules.xml
****
2012-09-13 17:22:44,753 DEBUG
[org.jzkit.configuration.provider.xml.InMemoryImpl] - Parsing config****
2012-09-13 17:22:44,754 DEBUG
[org.jzkit.configuration.provider.xml.InMemoryImpl] -
registerClasspathProfile : profiles/geo.xml (ctx=org.****
springframework.context.support.ClassPathXmlApplicationContext@anonymised.com:
display name [org.springframework.context.support.ClassPathXmlAp****
plicationContext@anonymised.com]; startup date [Thu Sep 13 17:22:43 EST 2012];
root of context hierarchy)****
** **
Cheers****
Richard Goh****
** **
*From:* Jose Garcia [mailto:jose.garcia@anonymised.com]
*Sent:* Thursday, 13 September 2012 2:44 PM
*To:* Goh, Richard (CESRE, Kensington)
*Cc:* geonetwork-users@lists.sourceforge.net
*Subject:* Re: [GeoNetwork-users] How to enable PostGIS spatial features
in Geonetwork 2.6.4?****
** **
Hi Richard****
** **
About spatial index in PostGis, unless a very large catalog should not be
a performance issue. I think Simon Pigot did some comparisons and until 20
thousand records in catalog was fine to use shapefile for spatial
indexing. The spatial index is used in CSW and search UI bbox queries.****
** **
In your configuration I see you use this syntax:****
** **
<url>jdbc:postgresql_postGIS://<host>:5432/geonetwork</url>****
** **
Please use this instead:****
** **
<url>jdbc:postgis://<host>:5432/geonetwork</url>****
** **
Check also the geonetwork log file, should indicate in startup if really
using the spatial index in shapefile or PostGis. If using PostGis should
contain:****
** **
NOTE: Using POSTGIS for spatial index****
** **
otherwise:****
** **
Failed to create datastore for ..... Will use shapefile instead.****
** **
Regards,****
Jose García****
** **
On Thu, Sep 13, 2012 at 3:20 AM, <Richard.Goh@anonymised.com> wrote:****
Hi Jose,****
****
I tried all the steps mentioned in your email. ****
****
The WEB-INF/lucene/spatial folder got recreated.****
****
Unfortunately, I still can’t see the ‘spatialindex’ table get used by my
Geonetwork instance. ****
****
I’m just wondering how does Geonetwork use the ‘spatialindex’ table. Will
there be any performance issue if that table is not being used?****
****
Many thanks for your help.****
****
Cheers****
Richard Goh****
****
*From:* Jose Garcia [mailto:jose.garcia@anonymised.com]
*Sent:* Wednesday, 12 September 2012 7:22 PM****
*To:* Goh, Richard (CESRE, Kensington)
*Cc:* geonetwork-users@lists.sourceforge.net
*Subject:* Re: [GeoNetwork-users] How to enable PostGIS spatial features
in Geonetwork 2.6.4?****
****
Hi Richard****
****
I expected the spatial index was recreated in PostGis after rebuild index,
but seem not the case. Check if this works:****
****
* Stop GeoNetwork****
****
* Delete files in WEB-INF/lucene/spatial folder (make a backup, just in
case)****
****
* Start GeoNetwork again****
****
Hopefully that should work to recreate spatial index properly in PostGis.*
***
Regards,****
Jose García****
****
****
****
** **
-- **
GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on
GeoServer and GeoNetwork. Visit http://geocat.net for details. ****
_________________________****
Jose García****
GeoCat bv****
Veenderweg 13****
6721 WD Bennekom****
The Netherlands****
http://GeoCat.net/>\*\*\*\*
** **
** **