Dear GeoNetwork developers,
I've been studying the OpenSearch geo extension specification [1] and
analyzed the GeoNetwork implementation. I've found some issues, and
made a patch (attached), so GeoNetwork can take the most from
OpenSearch-geo.
The GeoNetwork's opensearch description document claims to acccept a
bbox={geo:box} param, but GeoNetwork is ignoring it. OpenSearch-geo
needs the bbox parameter to be in the form "xmin,ymin,xmax,ymax". So
I've added that param to the main.search service. The Search class
will split that param into the four [north|south|east|west]BL original
ones, so the search internals can remain untouched.
Other things I've added to OpenSearch description document:
* Added the 'geo' xml namespace, mandatory for a 'valid' document.
* Shortened the ShortName tag. Added a LongName tag.
* Changed url mime type to "application/rss+xml", as it is the
response format for rss.search service.
* Added a second url with type="text/html" whose searches go through
main.search service. And made that service available to guest user.
That means that Firefox/IE will show HTML resultsets instead of rss,
much more human-readable.
* Added geometry, name, and hitsPerPage request parameters.
* Changed favicon mime type to "image/x-icon", more standard.
I'd like to know your opinion and if this changes could be commited to
trunk for the next release.
I'm also implementing an OpenSearch client in OpenLayers [2]. With the
proposed changes, adding a geonetwork search engine to an OpenLayers
viewer would become trivial:
new OpenLayers.Control.OpenSearch({div:$('geonetwork'), description:"http://localhost:8080/geonetwork/srv/en/portal.opensearch"\});
Regards,
Oscar.
[1] http://www.opensearch.org/Specifications/OpenSearch/Extensions/Geo/1.0/Draft_1
[2] http://geoportal.dlsi.uji.es/OpenSearch/openlayers-sandbox/opensearch/examples/opensearch.html
(attachments)
geonetwork-opensearch.patch (5.88 KB)