wiki:GeoServer_integration

Proposal number : GeoServer Integration

Date 2008/01/14
Contact(s) Francois, Eric Lemoine, Jeroen Ticheler
Last edited
Status draft
Assigned to release 2.7.0
Resources
Ticket #159

Overview

The purpose of this integration is to allow users to upload a GeoTIFF file or a zipped Shapefile to a metadata record and deploy that dataset as a Web Map Service on one or more GeoServer node. After upload, the user will see a button that allows her/him to trigger this deployment. The metadata online source section is updated.

Proposal Type

  • Type: GUI Change and new geopublisher service
  • App: GeoNetwork
  • Module: Metadata editor
  • Documents:
  • Email discussions:
  • Other wiki discussions:
  • Patch: #159

Voting History

  • CFV 05/10/2010
    • +1 from Patrizia, Jeroen, Francois (PSC member)
    • +1 from Mathieu, Douglas Nebert, Miguel Angel Manso (Community member)

Motivations

Integration of a map server allows users to quickly configure their data for interactive access without the need to go through the complexities of setting up and configuring a web map server. Web map server supported:

  • GeoServer embedded with GeoNetwork
  • Remote GeoServer node (tested with 2.0.x)

Proposal

The following use case is covered by the proposal :

  • A user edits a metadata, uploading the file as it is needed.
  • In edit mode, online source section with a file for download attached, will provide the geopublisher panel:
    • Select a node to publish the dataset in (See configuration for details on adding a node)
    • GeoNetwork checks if:
      • the file provided is correct (eg. ZIP contains one Shapefile or a tiff)
      • the layer has already been published to that node. If yes, the layer is added to the map preview.
    • Publish button: Publish current dataset to remote node. If dataset is already publish in that node, it will be updated.
    • Unpublish button: Remove current dataset from remote node.
    • Add online source button: Add an onlinesource section to the current metadata record pointing to the WMS and layername in order to display the layer in the map viewer of the search interface.
    • Style button: Only available if the GeoServer styler has been installed and declared in the configuration.

No layer names are asked to the user. Layer name is compute from file name.

In case of ZIP compression, ZIP file base name must be equal to Shapefile or GeoTiff base name.

  • One Datastore, FeatureType, Layer and Style are created for a vector dataset (one to one relation).
  • One CoverageStore, Coverage, Layer are created for a raster dataset (one to one relation).

Other screenshots

With GeoServer styler installed

With PostGIS layers

Configuration

When the publish button is pressed, GeoNetwork create the REST URLs needed by GeoServer to publish the given layer. The REST URL follow http://docs.geoserver.org/trunk/en/user/extensions/rest/rest-config-api.html

An option is added to config-gui in order to turn on/off the feature. This feature is not available by default.

GeoNetwork configuration to register GeoServer nodes (geoserver-nodes.xml):

<nodes>
	<!-- 
		Add here all geoserver node which could
		be configure by GeoNetwork.
		
		GeoServer 2.x or later are supported. The REST API must be installed in the GeoServer node.
		If you want to be able to publish in different workspaces, create as many nodes as 
		workspaces.
		
		@param name 		Name of the GeoServer node, display to metadata editor
		@param namespace	Namespace to use. If not set, GeoServer will link store to another namespace.
		@param adminUrl		GeoServer REST service config URL
		@param wmsUrl		GeoServer WMS service URL use to display map preview
		@param wfsUrl		(Not used) GeoServer WFS service URL use to display map preview
		@param stylerUrl	(Optional) GeoServer WFS service URL use to display map preview
		@param user			GeoServer user login
		@param password		GeoServer user password 
	-->
	<node>
		<id>geoserverEmbedded</id>
		<name>GeoServer (workspace: gn)</name>
		<namespacePrefix>gn</namespacePrefix>
		<namespaceUrl>http://geonetwork-opensource.org</namespaceUrl>
		<adminUrl>http://localhost:8080/geoserver/rest</adminUrl>
		<wmsUrl>http://localhost:8080/geoserver/wms</wmsUrl>
		<wfsUrl>http://localhost:8080/geoserver/wfs</wfsUrl>
		<stylerUrl>http://localhost:8080/geoserver/styler/index.html</stylerUrl>
		<user>admin</user>
		<password>geoserver</password>
	</node>
</nodes>

Other improvements

Some use cases not covered by this proposal and related to the topic:

  • the Capabilities document of GeoServer could provide a link back to the GeoNetwork metadata record (REST API does not look to be able to define that part of the configuration)
  • be able to publish on ZIP file with many Shapefiles in it

Backwards Compatibility Issues

The functionality should not have any impact on other systems harvesting or connecting to the specific catalog that has this functionality implemented.

Risks

Due to the limited resources, complex scenario's will not be dealt with and not all data may be suitable for use. Both GeoTiff and Shapefiles require to be properly formatted before they are uploaded.

For big files (more than 100M), OutOfMemoryError could be triggered on GeoNetwork side during file copy. Changing -Xmx and -XX:MaxPermSize parameters fixed the issue.

Participants

  • Francois
  • Éric Lemoine
  • Emanuele Tajariol (GeoNetwork)
  • Jeroen Ticheler (GeoNetwork)
  • Andrea Aime (GeoServer)
Last modified 14 years ago Last modified on Oct 6, 2010, 9:16:56 AM

Attachments (5)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.