diff options
| author | snowman2 <alansnow21@gmail.com> | 2020-01-01 20:29:16 -0600 |
|---|---|---|
| committer | snowman2 <alansnow21@gmail.com> | 2020-01-01 22:46:48 -0600 |
| commit | ea311993551f0019f38de361a5bc47fc630ee871 (patch) | |
| tree | 24b8f80e009cbcf67df64eb6457bc7ef12361ed2 /src/iso19111/coordinatesystem.cpp | |
| parent | 2fd6f7fc0b2db4f5f7d54271e48577f3db7564bf (diff) | |
| download | PROJ-ea311993551f0019f38de361a5bc47fc630ee871.tar.gz PROJ-ea311993551f0019f38de361a5bc47fc630ee871.zip | |
fix exporting CoordinateSystem to PROJ JSON with ID
Diffstat (limited to 'src/iso19111/coordinatesystem.cpp')
| -rw-r--r-- | src/iso19111/coordinatesystem.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/iso19111/coordinatesystem.cpp b/src/iso19111/coordinatesystem.cpp index 6769b486..688351f4 100644 --- a/src/iso19111/coordinatesystem.cpp +++ b/src/iso19111/coordinatesystem.cpp @@ -581,11 +581,13 @@ void CoordinateSystem::_exportToJSON( writer.Add(getWKT2Type(true)); writer.AddObjKey("axis"); - auto axisContext(writer.MakeArrayContext(false)); - const auto &l_axisList = axisList(); - for (auto &axis : l_axisList) { - formatter->setOmitTypeInImmediateChild(); - axis->_exportToJSON(formatter); + { + auto axisContext(writer.MakeArrayContext(false)); + const auto &l_axisList = axisList(); + for (auto &axis : l_axisList) { + formatter->setOmitTypeInImmediateChild(); + axis->_exportToJSON(formatter); + } } if (formatter->outputId()) { |
