tubackkhoa / gbif-dataportal

Automatically exported from code.google.com/p/gbif-dataportal
0 stars 1 forks source link

Decimal coordinate searches do not work #103

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Please see the bounding box searches (also shown in web service searches)

http://data.gbif.org/occurrences/search.htm?c%5B0%5D.s=20&c%5B0%5D.p=0&c%5B0%5D.
o=2431762&c%5B1%5D.s=19&c%5B1%5D.p=0&c%5B1%5D.o=122W%2C35N%2C121W%2C36N

http://data.gbif.org/occurrences/search.htm?c%5B0%5D.s=20&c%5B0%5D.p=0&c%5B0%5D.
o=2431762&c%5B1%5D.s=19&c%5B1%5D.p=0&c%5B1%5D.o=122W%2C35N%2C121W%2C35.5N

Looking at the code, it uses the BoundingBoxUtils which does not work as the 
calling action expects.

Propose that this needs to add the cell_id to the query, AND include the 
minimum, maximum latitude and longitude filters, to limit the results properly.

Original issue reported on code.google.com by timrobertson100 on 23 Nov 2011 at 1:01

GoogleCodeExporter commented 8 years ago
This highlights the problem:

    public static void main(String[] args) {
      System.out.println("35-36");
      List<PropertyStoreTripletDTO> results = getTripletsFromLatLongBoundingBox("GBIF:Portal-Service:1.0", new LatLongBoundingBox(-122, 35, -121, 36));
    for (PropertyStoreTripletDTO d : results) {
      System.out.println(d.getSubject() + " " + d.getPredicate() + " " + d.getObject());
    }

    System.out.println("35-35.5");
    results = getTripletsFromLatLongBoundingBox("GBIF:Portal-Service:1.0", new LatLongBoundingBox(-122, 35.0f, -121, 35.5f));
    for (PropertyStoreTripletDTO d : results) {
      System.out.println(d.getSubject() + " " + d.getPredicate() + " " + d.getObject());
    }
  }

Original comment by timrobertson100 on 23 Nov 2011 at 1:02

GoogleCodeExporter commented 8 years ago
Fixed in r312

Original comment by josecua...@gmail.com on 23 Nov 2011 at 3:28