'''Note:''' Warning: Using this, all metadata record's bounding box will be visible to all. Spatial index contains all metadata record and the WMS will not take care of filtering bounding box according to privileges.
= How-to browse your GeoNetwork spatial index using WMS in !GeoServer ? =
=== Create a link between spatial index directory to !GeoServer data directory ===
{{{
cd trunk/data/geoserver_data/data
ln -s ../../../web/geonetwork/WEB-INF/lucene/spatial/ spatialindex
}}}
Note: Here maybe there could be lock issue on the Shapefile if both !GeoNetwork and !GeoServer open the file (not tested).
A better option could be to make a copy of the files on a regular basis.
=== Configure !GeoServer to deploy the spatial index Shapefile ===
[[Image(1-datastore.png)]]
[[Image(2-set-shapefile.png)]]
[[Image(3-feature-type.png)]]
==== Really simple SLD style ====
{{{
Catalogue bounding box styleCataloguePolygon#0000003Times New RomanNormal140.50.5
}}}
==== Access the WMS using a WMS client (eg. !OpenLayers, !GoogleEarth) ====
==== OpenLayers ====
[[Image(4-openlayers.png)]]
==== !GoogleEarth ====
You could use [http://docs.geoserver.org/1.7.x/en/user/google-earth/index.html GeoServer KML templating system] in order to style your KML. On issue will be that only the metadata record ID (internal !GeoNetwork identifier) is available.
[[Image(4-googleearth.png)]]
KML Demo template:
* title
{{{
Metadata: ${id.value}
}}}
* description
{{{
Metadata id: ${id.value}.
Metadata Metadata (XML)
}}}
Note: Here the privilege filter is applied by the catalogue.
=== Comments ===
* Another option at least for KML output is to create a searcher which output KML (Done in geocat.ch sandbox on top of a CSW searcher).
* In order to retrieve more information from the shapefile using Talend ETL could be an option to create a more complete shapefile with metadata title, change date, ...
See http://www.talendforge.org/wiki/doku.php?id=sdi:geonetworkmetadataextractfields