Skip to content

Commit

Permalink
Merge pull request #1810 from rouault/projinfo_wkt1_gdal_no_longer_bo…
Browse files Browse the repository at this point in the history
…undcrs

projinfo: no longer call createBoundCRSToWGS84IfPossible() for WKT1:GDAL
  • Loading branch information
kbevers authored Dec 25, 2019
2 parents 1003bf3 + d11804f commit e4f952c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
3 changes: 3 additions & 0 deletions docs/source/apps/projinfo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ The following control parameters can appear in any order:

.. note:: WKT2_2019 was previously called WKT2_2018.

.. note:: Before PROJ 6.3.0, WKT1:GDAL was implicitly calling --boundcrs-to-wgs84.
This is no longer the case.

.. option:: -k crs|operation|ellipsoid

When used to query a single object with a AUTHORITY:CODE, determines the (k)ind of the object
Expand Down
9 changes: 9 additions & 0 deletions docs/source/usage/differences.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,12 @@ exclusive with :option:`+t_epoch`. :option:`+dt` is used when deformation
for a set amount of time is needed and :option:`+t_epoch` is used (in
conjunction with the observation time of the input coordinate) when
deformation from a specific epoch to the observation time is needed.

Version 6.3.0
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

projinfo
--------

Before PROJ 6.3.0, WKT1:GDAL was implicitly calling --boundcrs-to-wgs84, to
add a TOWGS84[] node in some cases. This is no longer the case.
13 changes: 1 addition & 12 deletions src/apps/projinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,24 +423,13 @@ static void outputObject(
std::cout << "WKT1:GDAL string:" << std::endl;
}

auto crs = nn_dynamic_pointer_cast<CRS>(obj);
std::shared_ptr<IWKTExportable> objToExport;
if (crs) {
objToExport = nn_dynamic_pointer_cast<IWKTExportable>(
crs->createBoundCRSToWGS84IfPossible(
dbContext, allowUseIntermediateCRS));
}
if (!objToExport) {
objToExport = wktExportable;
}

auto formatter =
WKTFormatter::create(WKTFormatter::Convention::WKT1_GDAL);
if (outputOpt.singleLine) {
formatter->setMultiLine(false);
}
formatter->setStrict(outputOpt.strict);
auto wkt = objToExport->exportToWKT(formatter.get());
auto wkt = wktExportable->exportToWKT(formatter.get());
if (outputOpt.c_ify) {
wkt = c_ify_string(wkt);
}
Expand Down

0 comments on commit e4f952c

Please sign in to comment.