From de46cfa79852a6870afd420bbba842cfa1fb323c Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Wed, 1 Jun 2016 17:09:20 -0700 Subject: [PATCH] Do the more common check first. Forgot to swap these max/min pairs. --- geojson.cpp | 8 ++++---- main.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/geojson.cpp b/geojson.cpp index c2ef911..e880abb 100644 --- a/geojson.cpp +++ b/geojson.cpp @@ -491,11 +491,11 @@ void parse_json(json_pull *jp, const char *reading, volatile long long *layer_se } } - if (strcmp(type->string, "FeatureCollection") == 0) { - check_crs(j, reading); - } - if (strcmp(type->string, "Feature") != 0) { + if (strcmp(type->string, "FeatureCollection") == 0) { + check_crs(j, reading); + } + continue; } diff --git a/main.cpp b/main.cpp index db7b716..c162edb 100644 --- a/main.cpp +++ b/main.cpp @@ -1634,8 +1634,8 @@ int read_input(std::vector &sources, char *fname, const char *layername, double minlat = 0, minlon = 0, maxlat = 0, maxlon = 0, midlat = 0, midlon = 0; - tile2lonlat(midx, midy, maxzoom, &maxlon, &minlat); - tile2lonlat(midx + 1, midy + 1, maxzoom, &minlon, &maxlat); + tile2lonlat(midx, midy, maxzoom, &minlon, &maxlat); + tile2lonlat(midx + 1, midy + 1, maxzoom, &maxlon, &minlat); midlat = (maxlat + minlat) / 2; midlon = (maxlon + minlon) / 2;