aboutsummaryrefslogtreecommitdiff
path: root/test/unit/test_datum.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-08-08 20:04:20 +0200
committerEven Rouault <even.rouault@spatialys.com>2019-08-09 13:22:25 +0200
commit89f2cc7ec4178a369e73e9cd115a2552a55d870a (patch)
treeb5a96d4248a0bb866477ed3c865fdb5648dc0a06 /test/unit/test_datum.cpp
parentec49c9cd0aa9de24623920b8de226daf05a0e90f (diff)
downloadPROJ-89f2cc7ec4178a369e73e9cd115a2552a55d870a.tar.gz
PROJ-89f2cc7ec4178a369e73e9cd115a2552a55d870a.zip
PROJJSON export: use more compact form
Diffstat (limited to 'test/unit/test_datum.cpp')
-rw-r--r--test/unit/test_datum.cpp27
1 files changed, 19 insertions, 8 deletions
diff --git a/test/unit/test_datum.cpp b/test/unit/test_datum.cpp
index cf2e2f3a..d8fab1f0 100644
--- a/test/unit/test_datum.cpp
+++ b/test/unit/test_datum.cpp
@@ -212,19 +212,30 @@ TEST(datum, prime_meridian_to_JSON) {
"{\n"
" \"type\": \"PrimeMeridian\",\n"
" \"name\": \"Greenwich\",\n"
- " \"longitude\": {\n"
- " \"value\": 0,\n"
- " \"unit\": {\n"
- " \"type\": \"AngularUnit\",\n"
- " \"name\": \"degree\",\n"
- " \"conversion_factor\": 0.0174532925199433\n"
- " }\n"
- " },\n"
+ " \"longitude\": 0,\n"
" \"id\": {\n"
" \"authority\": \"EPSG\",\n"
" \"code\": 8901\n"
" }\n"
"}");
+
+ EXPECT_EQ(PrimeMeridian::PARIS->exportToJSON(JSONFormatter::create().get()),
+ "{\n"
+ " \"type\": \"PrimeMeridian\",\n"
+ " \"name\": \"Paris\",\n"
+ " \"longitude\": {\n"
+ " \"value\": 2.5969213,\n"
+ " \"unit\": {\n"
+ " \"type\": \"AngularUnit\",\n"
+ " \"name\": \"grad\",\n"
+ " \"conversion_factor\": 0.015707963267949\n"
+ " }\n"
+ " },\n"
+ " \"id\": {\n"
+ " \"authority\": \"EPSG\",\n"
+ " \"code\": 8903\n"
+ " }\n"
+ "}");
}
// ---------------------------------------------------------------------------