aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2019-03-28 20:52:33 +0100
committerKristian Evers <kristianevers@gmail.com>2019-03-28 21:59:22 +0100
commit3d670b859026218045cf972e4b38af9e3e9a3c6f (patch)
tree7c5c455d43ed3b5ac1207a22a6a9531decd43139 /src
parent4754220ec8e3febd3d96e8096df8291c7a78fdb1 (diff)
downloadPROJ-3d670b859026218045cf972e4b38af9e3e9a3c6f.tar.gz
PROJ-3d670b859026218045cf972e4b38af9e3e9a3c6f.zip
Add no-op operation. It does nothing.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am1
-rw-r--r--src/conversions/noop.cpp19
-rw-r--r--src/lib_proj.cmake1
-rw-r--r--src/pj_list.h1
4 files changed, 22 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index b62a11b0..9858d78f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -173,6 +173,7 @@ libproj_la_SOURCES = \
conversions/cart.cpp \
conversions/geoc.cpp \
conversions/geocent.cpp \
+ conversions/noop.cpp \
conversions/unitconvert.cpp \
\
transformations/affine.cpp \
diff --git a/src/conversions/noop.cpp b/src/conversions/noop.cpp
new file mode 100644
index 00000000..a5dd6023
--- /dev/null
+++ b/src/conversions/noop.cpp
@@ -0,0 +1,19 @@
+#define PJ_LIB__
+
+#include "proj_internal.h"
+
+PROJ_HEAD(noop, "No operation");
+
+static PJ_COORD noop(PJ_COORD coord, PJ *P) {
+ (void) P;
+ return coord;
+}
+
+PJ *CONVERSION(noop, 0) {
+ P->fwd4d = noop;
+ P->inv4d = noop;
+ P->left = PJ_IO_UNITS_WHATEVER;
+ P->right = PJ_IO_UNITS_WHATEVER;
+ return P;
+}
+
diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake
index 72a8cc59..38bc05d8 100644
--- a/src/lib_proj.cmake
+++ b/src/lib_proj.cmake
@@ -174,6 +174,7 @@ set(SRC_LIBPROJ_CONVERSIONS
conversions/cart.cpp
conversions/geoc.cpp
conversions/geocent.cpp
+ conversions/noop.cpp
conversions/unitconvert.cpp
)
diff --git a/src/pj_list.h b/src/pj_list.h
index 8ab4cdc0..0923bba8 100644
--- a/src/pj_list.h
+++ b/src/pj_list.h
@@ -106,6 +106,7 @@ PROJ_HEAD(nell_h, "Nell-Hammer")
PROJ_HEAD(nicol, "Nicolosi Globular")
PROJ_HEAD(nsper, "Near-sided perspective")
PROJ_HEAD(nzmg, "New Zealand Map Grid")
+PROJ_HEAD(noop, "No operation")
PROJ_HEAD(ob_tran, "General Oblique Transformation")
PROJ_HEAD(ocea, "Oblique Cylindrical Equal Area")
PROJ_HEAD(oea, "Oblated Equal Area")