gbif / occurrence

Occurrence store, download, search
Apache License 2.0
22 stars 15 forks source link

Simple wkt query fails #34

Open MortenHofft opened 6 years ago

MortenHofft commented 6 years ago

works this works POLYGON((-180 31,-180 48,180 48,180 31,-180 31)) View on site)

API: https://api.gbif.org/v1/occurrence/search?has_coordinate=true&geometry=POLYGON((-180%2031,-180%2048,180%2048,180%2031,-180%2031))

Fails But this fails POLYGON((-179 31,-180 48,180 48,180 31,-179 31)) View on site)

API: https://api.gbif.org/v1/occurrence/search?has_coordinate=true&geometry=POLYGON((-179%2031,-180%2048,180%2048,180%2031,-179%2031))

Both seem valid to me and both is read by leaflet

Tha later throws

HTTP ERROR 500
Problem accessing /occurrence/search. Reason:

    Server Error
Caused by:
org.gbif.common.search.SearchException: org.apache.solr.client.solrj.SolrServerException: No live SolrServers available to handle this request:[http://c5n7.gbif.org:8983/solr/occurrence, http://c5n9.gbif.org:8983/solr/occurrence, http://c5n1.gbif.org:8983/solr/occurrence, http://c5n3.gbif.org:8983/solr/occurrence, http://c5n8.gbif.org:8983/solr/occurrence, http://c5n6.gbif.org:8983/solr/occurrence, http://c5n10.gbif.org:8983/solr/occurrence, http://c5n4.gbif.org:8983/solr/occurrence]
fmendezh commented 6 years ago

For some reason Solr decides that is a GeometryCollection: java.lang.IllegalArgumentException: This method does not support GeometryCollection arguments at com.vividsolutions.jts.geom.Geometry.checkNotGeometryCollection(Geometry.java:1782) at com.vividsolutions.jts.geom.Geometry.relate(Geometry.java:1033) at com.vividsolutions.jts.geom.Geometry.covers(Geometry.java:962) at com.vividsolutions.jts.geom.prep.BasicPreparedGeometry.covers(BasicPreparedGeometry.java:164) at com.spatial4j.core.shape.jts.JtsGeometry.relate(JtsGeometry.java:281) at com.spatial4j.core.shape.jts.JtsGeometry.relate(JtsGeometry.java:238) at com.spatial4j.core.shape.jts.JtsGeometry.relate(JtsGeometry.java:212)