aboutsummaryrefslogtreecommitdiff
path: root/src/apps
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-09-23 13:26:02 +0200
committerEven Rouault <even.rouault@spatialys.com>2019-09-23 13:26:02 +0200
commitda802e250b2487d41013829437740628b2ede667 (patch)
tree4b3bcb89b8b94d9718f4cbf73db70f548ce798c0 /src/apps
parent91d3d51a5abafb773fca3e4aae3223cdedfc51af (diff)
downloadPROJ-da802e250b2487d41013829437740628b2ede667.tar.gz
PROJ-da802e250b2487d41013829437740628b2ede667.zip
Document the autopromotion to 3D when mix of 2D/3D CRS in createOperations(), and test it (fixes #1623)
Diffstat (limited to 'src/apps')
-rw-r--r--src/apps/projinfo.cpp40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/apps/projinfo.cpp b/src/apps/projinfo.cpp
index 1760ae29..fd9b2f46 100644
--- a/src/apps/projinfo.cpp
+++ b/src/apps/projinfo.cpp
@@ -601,37 +601,6 @@ static void outputOperationSummary(const CoordinateOperationNNPtr &op,
// ---------------------------------------------------------------------------
-static size_t getAxisCount(const CRSNNPtr &crs) {
- const auto singleCRS = dynamic_cast<const SingleCRS *>(crs.get());
- if (singleCRS) {
- return singleCRS->coordinateSystem()->axisList().size();
- }
- const auto compoundCRS = dynamic_cast<const CompoundCRS *>(crs.get());
- if (compoundCRS) {
- size_t axisCount = 0;
- const auto &components = compoundCRS->componentReferenceSystems();
- for (const auto &subCRS : components) {
- axisCount += getAxisCount(subCRS);
- }
- return axisCount;
- }
- const auto boundCRS = dynamic_cast<const BoundCRS *>(crs.get());
- if (boundCRS) {
- return getAxisCount(boundCRS->baseCRS());
- }
- return 0;
-}
-
-// ---------------------------------------------------------------------------
-
-static bool is2D(const CRSNNPtr &crs) { return getAxisCount(crs) == 2; }
-
-// ---------------------------------------------------------------------------
-
-static bool is3D(const CRSNNPtr &crs) { return getAxisCount(crs) == 3; }
-
-// ---------------------------------------------------------------------------
-
static void outputOperations(
DatabaseContextPtr dbContext, const std::string &sourceCRSStr,
const std::string &targetCRSStr, const ExtentPtr &bboxFilter,
@@ -666,15 +635,6 @@ static void outputOperations(
}
auto nnTargetCRS = NN_NO_CHECK(targetCRS);
- if (!promoteTo3D && !outputOpt.quiet &&
- ((is2D(nnSourceCRS) && is3D(nnTargetCRS)) ||
- (is3D(nnSourceCRS) && is2D(nnTargetCRS)))) {
- std::cerr << "Warning: mix of 2D and 3D CRS. Vertical transformations, "
- "if available, will not be applied. Consider using 3D "
- "version of the CRS, or the --3d switch"
- << std::endl;
- }
-
std::vector<CoordinateOperationNNPtr> list;
size_t spatialCriterionPartialIntersectionResultCount = 0;
try {