From 0801a9324be12dbe131863483ce789cdaefd0902 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Fri, 3 Nov 2017 15:25:14 -0700 Subject: [PATCH] Silence the projection warning if you asked for --quiet --- geojson.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/geojson.cpp b/geojson.cpp index 178236dc..7b39ad0e 100644 --- a/geojson.cpp +++ b/geojson.cpp @@ -219,8 +219,10 @@ void check_crs(json_object *j, const char *reading) { json_object *name = json_hash_get(properties, "name"); if (name->type == JSON_STRING) { if (strcmp(name->string, projection->alias) != 0) { - fprintf(stderr, "%s: Warning: GeoJSON specified projection \"%s\", not the expected \"%s\".\n", reading, name->string, projection->alias); - fprintf(stderr, "%s: If \"%s\" is not the expected projection, use -s to specify the right one.\n", reading, projection->alias); + if (!quiet) { + fprintf(stderr, "%s: Warning: GeoJSON specified projection \"%s\", not the expected \"%s\".\n", reading, name->string, projection->alias); + fprintf(stderr, "%s: If \"%s\" is not the expected projection, use -s to specify the right one.\n", reading, projection->alias); + } } } }