= Proposal number : !GeoServer Integration = || '''Date''' || 2008/01/14 || || '''Contact(s)''' || Francois, Eric Lemoine, [http://wiki.osgeo.org/index.php/User:Ticheler 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 === Links === * '''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 == [[Image(geopub-tiff.png)]] 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 ==== [[Image(geopub-style.png)]] ==== With PostGIS layers ==== [[Image(geopub-db.png)]] === 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): {{{ geoserverEmbedded GeoServer (workspace: gn) gn http://geonetwork-opensource.org http://localhost:8080/geoserver/rest http://localhost:8080/geoserver/wms http://localhost:8080/geoserver/wfs http://localhost:8080/geoserver/styler/index.html admin geoserver }}} === 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)