Search by region / bbox

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Search by region / bbox

Mathieu Coudert-2

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.
Reply | Threaded
Open this post in threaded view
|

Re: Search by region / bbox

Jeroen Ticheler-3
Hi, this may duplicate an earlier email, but due to sending problems last week I prefer to resend than to hear I never replied ;-)

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 OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Reply | Threaded
Open this post in threaded view
|

Re: Search by region / bbox

Mathieu Coudert-2

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 : [hidden email] [mailto:[hidden email]] De la part de Jeroen Ticheler
Envoyé : mardi 20 juin 2006 14:51
À : Mathieu Coudert
Cc : [hidden email]
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 ;-)

 

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 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.
Reply | Threaded
Open this post in threaded view
|

Re: Search by region / bbox

Jeroen Ticheler-3
Hi Mathieu,
I have attached the jar. Make a backup of the old one just to be sure :-)

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
Let me know if it works.
Ciao,
Jeroen

geonetwork.jar (53K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Search by region / bbox

Mathieu Coudert-2

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&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&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&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 : [hidden email] [mailto:[hidden email]] De la part de Jeroen Ticheler
Envoyé : mercredi 21 juin 2006 11:19
À : Mathieu Coudert
Cc : [hidden email]
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 :-)

 

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

 


--
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.
Reply | Threaded
Open this post in threaded view
|

Re: Search by region / bbox

Jeroen Ticheler-3
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:

<!-- FOLLOWING LINES TO CONSIDER THREE OPTIONS: REGION CODE; UNLISTED REGION CODE (i.e.0000); EMPTY
if region code: uses coords from xml regions.xml
if not found region code: uses coords from westBL, soutrh, east and north
if empty region code: does not apply geo search
-->
  <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 :-)
Ciao,
Jeroen


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

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&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&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&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 : [hidden email] [[hidden email]] De la part de Jeroen Ticheler
Envoyé : mercredi 21 juin 2006 11:19
À : Mathieu Coudert
Cc : [hidden email]
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 :-)

 

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

 


-- 
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.

Reply | Threaded
Open this post in threaded view
|

Re: Search by region / bbox

Mathieu Coudert-2

Thanks Jeroen, it works perfectly!

Ciao,

Mathieu

 

 


De : [hidden email] [mailto:[hidden email]] De la part de Jeroen Ticheler
Envoyé : mercredi 21 juin 2006 12:45
À : Mathieu Coudert
Cc : [hidden email]
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:

 

<!-- FOLLOWING LINES TO CONSIDER THREE OPTIONS: REGION CODE; UNLISTED REGION CODE (i.e.0000); EMPTY

if region code: uses coords from xml regions.xml

if not found region code: uses coords from westBL, soutrh, east and north

if empty region code: does not apply geo search

-->

  <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 :-)

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.