[GeoNetwork-devel] OpenSearch-geo

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)

Hello Oscar,

2010/2/9 Oscar Fonts <oscar.fonts.lists@anonymised.com>:

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.

Your changes sounds good to me, I'll commit them soon to trunk (for
2.5 release).

Did you work or plan to work on opensearch suggestion support which
could be a great feature to have as suggested by Tom in a previous
thread ?
http://n2.nabble.com/OpenSearch-suggestion-support-td4476557.html#a4476557

Thanks.

Francois

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&quot;\});

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

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Thank you, François.

I would have opened a trac ticket, but seems I need special permission.

Did you work or plan to work on opensearch suggestion support which
could be a great feature to have as suggested by Tom in a previous
thread ?
http://n2.nabble.com/OpenSearch-suggestion-support-td4476557.html#a4476557

I would like to see responses in many other formats, like KML, Atom or
even GeoJSON. This can be accomplished via xsl over main.search, as in
rss, at least for xml-based formats.

Suggestion has a particular requirement: To be useful, the suggestion
response has to reach the client "as s/he types", that meaning a
response time of under 100 ms, based on my own experience. So
optimizing this probably would mean a harder work, going deeper in the
search engine. We would need lucene(?) to generate a word list from
its index that 'start with' the given text, instead of the complete
metadata items. Is this easy to achieve? Could you help with this?

Tank you,

Oscar.

2010/2/11 Oscar Fonts <oscar.fonts.lists@anonymised.com>:

Thank you, François.

I would have opened a trac ticket, but seems I need special permission.

Here is the ticket
http://trac.osgeo.org/geonetwork/ticket/190

I will commit your patch after testing.

You should be able to create tickets with an OSGeo account.

Ciao.

Francois

Did you work or plan to work on opensearch suggestion support which
could be a great feature to have as suggested by Tom in a previous
thread ?
http://n2.nabble.com/OpenSearch-suggestion-support-td4476557.html#a4476557

I would like to see responses in many other formats, like KML, Atom or
even GeoJSON. This can be accomplished via xsl over main.search, as in
rss, at least for xml-based formats.

Suggestion has a particular requirement: To be useful, the suggestion
response has to reach the client "as s/he types", that meaning a
response time of under 100 ms, based on my own experience. So
optimizing this probably would mean a harder work, going deeper in the
search engine. We would need lucene(?) to generate a word list from
its index that 'start with' the given text, instead of the complete
metadata items. Is this easy to achieve? Could you help with this?

Tank you,

Oscar.