Skip to content

Commit

Permalink
createFromUserInput(): add capability to import PROJJSON
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Aug 9, 2019
1 parent 89f2cc7 commit 81bd57d
Show file tree
Hide file tree
Showing 9 changed files with 23,765 additions and 9 deletions.
4 changes: 1 addition & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,6 @@ AX_CHECK_COMPILE_FLAG([-Wdeprecated], [CXX_WFLAGS="$CXX_WFLAGS -Wdeprecated"],,[
AX_CHECK_COMPILE_FLAG([-Wabstract-vbase-init], [CXX_WFLAGS="$CXX_WFLAGS -Wabstract-vbase-init"],,[$ERROR_ON_UNKNOWN_OPTIONS])
AX_CHECK_COMPILE_FLAG([-Winconsistent-missing-destructor-override], [CXX_WFLAGS="$CXX_WFLAGS -Winconsistent-missing-destructor-override"],,[$ERROR_ON_UNKNOWN_OPTIONS])

dnl Forbid use of 'or', 'and', ... alias operators
AX_CHECK_COMPILE_FLAG([-fno-operator-names], [CXX_WFLAGS="$CXX_WFLAGS -fno-operator-names"],,[$ERROR_ON_UNKNOWN_OPTIONS])

HAVE_GCC_WARNING_ZERO_AS_NULL_POINTER_CONSTANT=no
AX_CHECK_COMPILE_FLAG([-Wzero-as-null-pointer-constant], [CXX_WFLAGS="$CXX_WFLAGS -Wzero-as-null-pointer-constant" HAVE_GCC_WARNING_ZERO_AS_NULL_POINTER_CONSTANT=yes NO_ZERO_AS_NULL_POINTER_CONSTANT_FLAG="-Wno-zero-as-null-pointer-constant"],,[$ERROR_ON_UNKNOWN_OPTIONS])
if test "$HAVE_GCC_WARNING_ZERO_AS_NULL_POINTER_CONSTANT" = "yes"; then
Expand Down Expand Up @@ -344,6 +341,7 @@ dnl Generate files
dnl ---------------------------------------------------------------------------

AC_CONFIG_FILES([Makefile cmake/Makefile src/Makefile include/Makefile include/proj/Makefile include/proj/internal/Makefile
include/proj/internal/nlohmann/Makefile
test/Makefile test/cli/Makefile test/gie/Makefile test/gigs/Makefile test/unit/Makefile
man/Makefile man/man1/Makefile man/man3/Makefile data/Makefile
jniwrap/Makefile jniwrap/org.osgeo.proj/Makefile jniwrap/org.osgeo.proj/org/Makefile jniwrap/org.osgeo.proj/org/proj4/Makefile])
Expand Down
5 changes: 4 additions & 1 deletion include/proj/internal/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
SUBDIRS = nlohmann

noinst_HEADERS = \
coordinateoperation_constants.hpp \
coordinateoperation_internal.hpp \
esri_projection_mappings.hpp \
coordinatesystem_internal.hpp \
internal.hpp \
io_internal.hpp \
lru_cache.hpp
lru_cache.hpp \
include_nlohmann_json.hpp
10 changes: 10 additions & 0 deletions include/proj/internal/include_nlohmann_json.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#if defined(__GNUC__)
#pragma GCC system_header
#endif

// to avoid any clash if PROJ users have another version of nlohmann/json.hpp
#define nlohmann proj_nlohmann

#if !defined(DOXYGEN_ENABLED)
#include "nlohmann/json.hpp"
#endif
2 changes: 2 additions & 0 deletions include/proj/internal/nlohmann/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
noinst_HEADERS = \
json.hpp
Loading

0 comments on commit 81bd57d

Please sign in to comment.