[GeoNetwork-users] Search by region / bbox

Hi list,

Actually, I know that’s possible to use the criterion “&region=ID” to search metadata for a specific area (and parameters are store in the file region.xml).

I would like to know if I can use criteria such as “&westBL=…&eastBL=…&southBL=…&northBL=…” to search for a specific BBOX.

Any idea about this? How is it working?

Do I need to modify something ?

Thanks for your help,

Mathieu


Ce message a ete verifie par MailScanner pour des virus ou des polluriels et rien de suspect n’a ete trouve.

Les donnees et renseignements contenus dans ce message sont personnels, confidentiels et priv?s.Toute publication, utilisation ou diffusion, meme partielle, doit etre autorisee.
Any data and information contained in this electronic mail is personal, confidential and private. Any total or partial publication, use or distribution must be authorized.

Hi, this may duplicate an earlier email, but due to sending problems last week I prefer to resend than to hear I never replied :wink:

Hi Mathieu,Unfortunately you can not in the 2.0.2 release. It requires a small fix to the software that has been added to the code now. I would have to check exactly where it was added. It may be sufficient to replace the geonetwork.jar with a custom one that contains the fix. How critical is it for you to have that quickly?
Ciao,
Jeroen

On Jun 15, 2006, at 10:59 AM, Mathieu Coudert wrote:

Hi list,

Actually, I know that’s possible to use the criterion “&region=ID” to search metadata for a specific area (and parameters are store in the file region.xml).

I would like to know if I can use criteria such as “&westBL=…&eastBL=…&southBL=…&northBL=…” to search for a specific BBOX.

Any idea about this? How is it working?

Do I need to modify something ?

Thanks for your help,

Mathieu


Ce message a ete verifie par MailScanner pour des virus ou des polluriels et rien de suspect n’a ete trouve.

Les donnees et renseignements contenus dans ce message sont personnels, confidentiels et privés.Toute publication, utilisation ou diffusion, meme partielle, doit etre autorisee.
Any data and information contained in this electronic mail is personal, confidential and private. Any total or partial publication, use or distribution must be authorized._______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Hi Jeroen,

Thanks for your answer.

I’m actually working on a project in order to link GeoNetwork and Cartoweb. It would be appreciable to get the geonetwork.jar that contains the fix.

Maybe you can just send me the part of the code that has been added?

It could be great to get it before the new release of Geonetwork because I need to present my work in few weeks.

Is it possible to send me “something” before the end of june?

Ciao,

Mathieu


De : geonetwork-users-bounces@lists.sourceforge.net [mailto:geonetwork-users-bounces@lists.sourceforge.net] De la part de Jeroen Ticheler
Envoyé : mardi 20 juin 2006 14:51
À : Mathieu Coudert
Cc : geonetwork-users@lists.sourceforge.net
Objet : Re: [GeoNetwork-users] Search by region / bbox

Hi, this may duplicate an earlier email, but due to sending problems last week I prefer to resend than to hear I never replied :wink:

Hi Mathieu,

Unfortunately you can not in the 2.0.2 release. It requires a small fix to the software that has been added to the code now. I would have to check exactly where it was added. It may be sufficient to replace the geonetwork.jar with a custom one that contains the fix. How critical is it for you to have that quickly?

Ciao,

Jeroen

On Jun 15, 2006, at 10:59 AM, Mathieu Coudert wrote:

Hi list,

Actually, I know that’s possible to use the criterion “&region=ID” to search metadata for a specific area (and parameters are store in the file region.xml).

I would like to know if I can use criteria such as “&westBL=…&eastBL=…&southBL=…&northBL=…” to search for a specific BBOX.

Any idea about this? How is it working?

Do I need to modify something ?

Thanks for your help,

Mathieu


Ce message a ete verifie par MailScanner pour des virus ou des polluriels et rien de suspect n’a ete trouve.

Les donnees et renseignements contenus dans ce message sont personnels, confidentiels et privés.Toute publication, utilisation ou diffusion, meme partielle, doit etre autorisee.

Any data and information contained in this electronic mail is personal, confidential and private. Any total or partial publication, use or distribution must be authorized.


GeoNetwork-users mailing list

GeoNetwork-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/geonetwork-users

GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork


Ce message a ete verifie par MailScanner pour des virus ou des polluriels et rien de suspect n’a ete trouve.

Les donnees et renseignements contenus dans ce message sont personnels, confidentiels et privés.Toute publication, utilisation ou diffusion, meme partielle, doit etre autorisee.
Any data and information contained in this electronic mail is personal, confidential and private. Any total or partial publication, use or distribution must be authorized.

Ce message a ete verifie par MailScanner pour des virus ou des polluriels et rien de suspect n’a ete trouve.

Les donnees et renseignements contenus dans ce message sont personnels, confidentiels et privés.Toute publication, utilisation ou diffusion, meme partielle, doit etre autorisee.
Any data and information contained in this electronic mail is personal, confidential and private. Any total or partial publication, use or distribution must be authorized.

Hi Mathieu,
I have attached the jar. Make a backup of the old one just to be sure :slight_smile:

There is one important thing to consider (just found out while checking this for you). In the query string, you will have to provide the region variable that is set to 0000 . Otherwise the coordinates will be ignored. The way the system will search is that it will first use the region code and use related internally stored coordinates. If region=0000 it will ignore the region and instead use the coordinates.

example query string: http://localhost:8080/geonetwork/srv/en/main.search?region=0000&northBL=34.554&westBL=-5.949&eastBL=13.616&southBL=19.338&relation=overlaps

(attachments)

geonetwork.jar (258 KB)

Thanks Jeroen,

However I still have some problems with the search by bbox.

When I search by this way :
http://localhost:8080/geonetwork/srv/en/main.search?relation=overlaps
<http://localhost:8080/geonetwork/srv/en/main.search?relation=overlaps&regio
n=338> &region=338 I got 2 results in my project (region=338 means:
searching for Africa).

But when I tried to search by the “bbox way”, I got nothing.
http://localhost:8080/geonetwork/srv/en/main.search?relation=overlaps
<http://localhost:8080/geonetwork/srv/en/main.search?relation=overlaps&regio
n=0000&northBL=38.2&westBL=-17.3&eastBL=51.1&southBL=-34.6>
&region=0000&northBL=38.2&westBL=-17.3&eastBL=51.1&southBL=-34.6

Any idea to explain why I get no results??

Even If I search
http://localhost:8080/geonetwork/srv/en/main.search?relation=overlaps
<http://localhost:8080/geonetwork/srv/en/main.search?relation=overlaps&regio
n=0000&northBL=90&westBL=-180&eastBL=180&southBL=-90>
&region=0000&northBL=90&westBL=-180&eastBL=180&southBL=-90

I get anything.

Mathieu

<region>

<id>338</id>

            <name_en>Africa</name_en>

            <name_fr>Africa</name_fr>

            <name_es>Africa</name_es>

            <name_cn>Africa</name_cn>

            <name_ar>Africa</name_ar>

            <west>-17.3</west>

            <east>51.1</east>

            <south>-34.6</south>

            <north>38.2</north>

</region>

  _____

De : geonetwork-users-bounces@lists.sourceforge.net
[mailto:geonetwork-users-bounces@lists.sourceforge.net] De la part de Jeroen
Ticheler
Envoyé : mercredi 21 juin 2006 11:19
À : Mathieu Coudert
Cc : geonetwork-users@lists.sourceforge.net
Objet : Re: [GeoNetwork-users] Search by region / bbox

Hi Mathieu,

I have attached the jar. Make a backup of the old one just to be sure :slight_smile:

There is one important thing to consider (just found out while checking this
for you). In the query string, you will have to provide the region variable
that is set to 0000 . Otherwise the coordinates will be ignored. The way the
system will search is that it will first use the region code and use related
internally stored coordinates. If region=0000 it will ignore the region and
instead use the coordinates.

example query string:
http://localhost:8080/geonetwork/srv/en/main.search?region=0000&northBL=34.5
54&westBL=-5.949&eastBL=13.616&southBL=19.338&relation=overlaps

--
Ce message a ete verifie par MailScanner pour des virus ou des polluriels et rien de suspect n'a ete trouve.

Les donnees et renseignements contenus dans ce message sont personnels, confidentiels et prives. Toute publication, utilisation ou diffusion, meme partielle, doit etre autorisee.

Any data and information contained in this electronic mail is personal, confidential and secret. Any total or partial publication, use or distribution must be authorized.

Mathieu,
Sorry, I didn’t mention one more change that has to be applied to the lucene.xsl file:

The first part of the file has to be updated with this, starting at line 15:

<xsl:variable name=“region” select=“string(/request/region)”/>
<xsl:variable name=“regionData” select=“$regions/regions/*[string(id)=$region]”/>
<xsl:variable name=“westBL”>
xsl:choose
<xsl:when test=“$regionData”><xsl:value-of select=“$regionData/west + 360”/></xsl:when>
xsl:otherwise<xsl:value-of select=“/request/westBL + 360”/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name=“eastBL”>
xsl:choose
<xsl:when test=“$regionData”><xsl:value-of select=“$regionData/east + 360”/></xsl:when>
xsl:otherwise<xsl:value-of select=“/request/eastBL + 360”/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name=“southBL”>
xsl:choose
<xsl:when test=“$regionData”><xsl:value-of select=“$regionData/south + 360”/></xsl:when>
xsl:otherwise<xsl:value-of select=“/request/southBL + 360”/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name=“northBL”>
xsl:choose
<xsl:when test=“$regionData”><xsl:value-of select=“$regionData/north + 360”/></xsl:when>
xsl:otherwise<xsl:value-of select=“/request/northBL + 360”/></xsl:otherwise>
</xsl:choose>
</xsl:variable>

And that should do the job if I don’t forget other things :slight_smile:
Ciao,
Jeroen

On Jun 21, 2006, at 12:19 PM, Mathieu Coudert wrote:

Thanks Jeroen, it works perfectly!

Ciao,

Mathieu


De : geonetwork-users-bounces@lists.sourceforge.net [mailto:geonetwork-users-bounces@lists.sourceforge.net] De la part de Jeroen Ticheler
Envoyé : mercredi 21 juin 2006 12:45
À : Mathieu Coudert
Cc : geonetwork-users@lists.sourceforge.net
Objet : Re: [GeoNetwork-users] Search by region / bbox

Mathieu,

Sorry, I didn’t mention one more change that has to be applied to the lucene.xsl file:

The first part of the file has to be updated with this, starting at line 15:

<xsl:variable name=“region” select=“string(/request/region)”/>

<xsl:variable name=“regionData” select=“$regions/regions/*[string(id)=$region]”/>

<xsl:variable name=“westBL”>

xsl:choose

<xsl:when test=“$regionData”><xsl:value-of select=“$regionData/west + 360”/></xsl:when>

xsl:otherwise<xsl:value-of select=“/request/westBL + 360”/></xsl:otherwise>

</xsl:choose>

</xsl:variable>

<xsl:variable name=“eastBL”>

xsl:choose

<xsl:when test=“$regionData”><xsl:value-of select=“$regionData/east + 360”/></xsl:when>

xsl:otherwise<xsl:value-of select=“/request/eastBL + 360”/></xsl:otherwise>

</xsl:choose>

</xsl:variable>

<xsl:variable name=“southBL”>

xsl:choose

<xsl:when test=“$regionData”><xsl:value-of select=“$regionData/south + 360”/></xsl:when>

xsl:otherwise<xsl:value-of select=“/request/southBL + 360”/></xsl:otherwise>

</xsl:choose>

</xsl:variable>

<xsl:variable name=“northBL”>

xsl:choose

<xsl:when test=“$regionData”><xsl:value-of select=“$regionData/north + 360”/></xsl:when>

xsl:otherwise<xsl:value-of select=“/request/northBL + 360”/></xsl:otherwise>

</xsl:choose>

</xsl:variable>

And that should do the job if I don’t forget other things :slight_smile:

Ciao,

Jeroen


Ce message a ete verifie par MailScanner pour des virus ou des polluriels et rien de suspect n’a ete trouve.

Les donnees et renseignements contenus dans ce message sont personnels, confidentiels et privés.Toute publication, utilisation ou diffusion, meme partielle, doit etre autorisee.
Any data and information contained in this electronic mail is personal, confidential and private. Any total or partial publication, use or distribution must be authorized.

Ce message a ete verifie par MailScanner pour des virus ou des polluriels et rien de suspect n’a ete trouve.

Les donnees et renseignements contenus dans ce message sont personnels, confidentiels et privés.Toute publication, utilisation ou diffusion, meme partielle, doit etre autorisee.
Any data and information contained in this electronic mail is personal, confidential and private. Any total or partial publication, use or distribution must be authorized.