[GeoNetwork-users] Bounding box search

Dear all,

Some users report me issues related to the geographic search.

Example :

2 metadata :
A : N47.80666 S45.82944 W5.96701 E10.48821
B : N46.59355155 S46.37311511 W7.93978178 E8.16021822

If we make a search overlapse on the switzerland (box equal to metadata A)
we may find the both metadata
but en fact only the first one A apear.

Why ? because of the lucene query.

I don't know why we add or delete 1 degree ?
Maybe to have a less restrictive area but finaly in case like in my example
1 degree is important :wink:

Example with overlapse query

  <BooleanClause required="true" prohibited="false">
    <RangeQuery fld="eastBL"
            lowerTxt="{$westBL + 1}"
            upperTxt="{180 + 360}"
            inclusive="true"/>
  </BooleanClause>
  <BooleanClause required="true" prohibited="false">
    <RangeQuery fld="westBL"
            lowerTxt="{-180 + 360}"
            upperTxt="{$eastBL - 1}"
            inclusive="true"/>
  </BooleanClause>
  <BooleanClause required="true" prohibited="false">
    <RangeQuery fld="northBL"
            lowerTxt="{$southBL + 1}"
            upperTxt="{90 + 360}"
            inclusive="true"/>
  </BooleanClause>
  <BooleanClause required="true" prohibited="false">
    <RangeQuery fld="southBL"
            lowerTxt="{-90 + 360}"
            upperTxt="{$northBL - 1}"
            inclusive="true"/>
  </BooleanClause>

For my side i delete all this +- 1 degree and the result look better.

May I have some comment about the original reason of this +-1 degree.
Why 1 degree ? why not 0.1 Degree ? or 0.001 ...

Maybe i miss something important on this query.

Best regards,
Fabien Bachraty
--
View this message in context: http://www.nabble.com/Bounding-box-search-tp19759823p19759823.html
Sent from the geonetwork-users mailing list archive at Nabble.com.

Dear Fabien,

I do not understand too much about the processes in which this code is used.
But am I understanding right, that the search box coordinate inputs are
modified (+-1) before beeing compared to the bounding box of the metadata?
If it is so, in the case of "overlaps", the algebraic sign is not
reasonable, for example:

$westBL +1 shifts the west boundary coordinate to the east, $eastBL-1 shifts
to the west, the resulting search box is smaller! The same for south and
north. In the case of search box smaller than 2 degree, the search box would
collapse. Turning the signs works...

I can't answer your question "why 1, not 0.1, ...". But there are a few
ideas about it:

1) It is a matter of scale, if your datasets include continents, 1 degree is
nothing. If your data refers to the local scale, there is no sense in
modifiing the search box.

2) Generally my searches use the "encloses" search type option. But perhaps
for the "equal" option, it seems to make some sense to work with this
tolerance. But I need more understanding or testing of this.

3) It could be a great idea for the GN-devellopers to include the setting of
this tolerance as an option in the advanced search - a little bit similar to
the "search accuracy" for text search.

So, best regards and thank you

Ralf Hoffmann

--
View this message in context: http://www.nabble.com/Bounding-box-search-tp19759823p19762745.html
Sent from the geonetwork-users mailing list archive at Nabble.com.

Yes, you right for me also the sign is not reasonable in this case.

Anyway regarding your answer I have the feeling that you understand my
question when I said "why 1, not 0.1, ..."
It is what you explain 1 degree is nothing for a continent but locally this
is very important. And my question is to understand why developers choose 1
degree and not a smaller step. The choice of a degree look hazardous for me.

But at the beginning the tool is certainly done to make continental search.

Your idea to include a tolerance as an option is good and it can maybe
automatized regarding the size of the bouding box search. (proportional)

The goal of my post is also to advice that in some case like in my example
the search don't work.

Have a nice day.
Fabien Bachraty

rhoffmann wrote:

Dear Fabien,

I do not understand too much about the processes in which this code is
used. But am I understanding right, that the search box coordinate inputs
are modified (+-1) before beeing compared to the bounding box of the
metadata? If it is so, in the case of "overlaps", the algebraic sign is
not reasonable, for example:

$westBL +1 shifts the west boundary coordinate to the east, $eastBL-1
shifts to the west, the resulting search box is smaller! The same for
south and north. In the case of search box smaller than 2 degree, the
search box would collapse. Turning the signs works...

I can't answer your question "why 1, not 0.1, ...". But there are a few
ideas about it:

1) It is a matter of scale, if your datasets include continents, 1 degree
is nothing. If your data refers to the local scale, there is no sense in
modifiing the search box.

2) Generally my searches use the "encloses" search type option. But
perhaps for the "equal" option, it seems to make some sense to work with
this tolerance. But I need more understanding or testing of this.

3) It could be a great idea for the GN-devellopers to include the setting
of this tolerance as an option in the advanced search - a little bit
similar to the "search accuracy" for text search.

So, best regards and thank you

Ralf Hoffmann

--
View this message in context: http://www.nabble.com/Bounding-box-search-tp19759823p19773943.html
Sent from the geonetwork-users mailing list archive at Nabble.com.