Fix TileJSON conversion to allow single point bounds

This commit is contained in:
Asheem Mamoowala
2018-08-02 11:35:38 -07:00
parent 1a840281b5
commit a5fea5febf
2 changed files with 12 additions and 2 deletions

View File

@@ -95,12 +95,12 @@ optional<Tileset> Converter<Tileset>::operator()(const Convertible& value, Error
bottom = util::clamp(*bottom, -90.0, 90.0);
top = util::clamp(*top, -90.0, 90.0);
if (top <= bottom){
if (*top < *bottom){
error.message = "bounds bottom latitude must be smaller than top latitude";
return nullopt;
}
if(*left >= *right) {
if(*left > *right) {
error.message = "bounds left longitude should be less than right longitude";
return nullopt;
}