aboutsummaryrefslogtreecommitdiff
path: root/src/iso19111/coordinatesystem.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-08-10 17:44:53 +0200
committerEven Rouault <even.rouault@spatialys.com>2019-08-10 17:44:53 +0200
commit0a1261781de96d2bb8c76fbd905ebf8b0121d3a6 (patch)
treebc08254e1603339aa5450a5ee1b680a92de66315 /src/iso19111/coordinatesystem.cpp
parent63981af418d84749cd4d70752f83fd551100389f (diff)
downloadPROJ-0a1261781de96d2bb8c76fbd905ebf8b0121d3a6.tar.gz
PROJ-0a1261781de96d2bb8c76fbd905ebf8b0121d3a6.zip
PROJJSON: a few fixes, and add import of DerivedCRS, EngineeringCRS, ParametricCRS and TemporalCRS
Diffstat (limited to 'src/iso19111/coordinatesystem.cpp')
-rw-r--r--src/iso19111/coordinatesystem.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/iso19111/coordinatesystem.cpp b/src/iso19111/coordinatesystem.cpp
index ef53dd57..5a852b0d 100644
--- a/src/iso19111/coordinatesystem.cpp
+++ b/src/iso19111/coordinatesystem.cpp
@@ -409,12 +409,13 @@ void CoordinateSystemAxis::_exportToJSON(
writer.AddObjKey("direction");
writer.Add(direction().toString());
- writer.AddObjKey("unit");
const auto &l_unit(unit());
if (l_unit == common::UnitOfMeasure::METRE ||
l_unit == common::UnitOfMeasure::DEGREE) {
+ writer.AddObjKey("unit");
writer.Add(l_unit.name());
- } else {
+ } else if (l_unit.type() != common::UnitOfMeasure::Type::NONE) {
+ writer.AddObjKey("unit");
l_unit._exportToJSON(formatter);
}