EarthLifeConsortium / pilot_api

Early pilot version of an API
MIT License
1 stars 0 forks source link

Geography bounding box issue #6

Closed SimonGoring closed 8 years ago

SimonGoring commented 8 years ago

The call:

https://training.paleobiodb.org/comp1.0/occs/list.json?max_ma=2&bbox=-180,-90,10,180&vocab=neotoma

Fails on the neotoma side (as it should, since there is no 180^oN):

"warnings":[
"Neotoma: Request failed",
"Neotoma:  WKT not properly formatted: Polygon((-180 -90,10 -90,10 180,-180 180,-180 -90))"
]

but it seems to work with PBDB. This should fail universally.

mmcclenn commented 8 years ago

Good point. The PBDB API allows longitude values outside of the range -180,180, but there is really no reason to allow latitude values outside of -90,90.

mmcclenn commented 8 years ago

I have updated the composite API to return an error if the bbox coordinates are outside of the range -180..180 (longitude) and -90..90 (latitude).

SimonGoring commented 8 years ago

Awesome! Thanks @mmcclenn!

SimonGoring commented 8 years ago

This fix is referencing commit: https://github.com/EarthLifeConsortium/earthlife_API/commit/a742f49be394e7ddc11df6526b3e0c2f4b619602