Skip to content
Permalink
Browse files

Add --json option to qgis_process tool

This allows external tools to more easily use the standalong qgis_process
tool without resorting to fragile string parsing of the outputs from
that tool.

Refs paleolimbot/qgisprocess#21, and means
that we play nice with other tools who want to use QGIS algorithms!
  • Loading branch information
nyalldawson committed Oct 13, 2020
1 parent 7b7a909 commit fc8d916b8dd444b3edaee3c18ec308e74a9bb91e
Showing with 514 additions and 84 deletions.
  1. +8 −0 src/process/CMakeLists.txt
  2. +422 −80 src/process/qgsprocess.cpp
  3. +14 −4 src/process/qgsprocess.h
  4. +70 −0 tests/src/python/test_qgsprocessexecutable.py
@@ -4,6 +4,7 @@
SET(QGIS_PROCESS_SRCS
main.cpp
qgsprocess.cpp
${CMAKE_SOURCE_DIR}/external/nlohmann/json_fwd.hpp
)

IF (UNIX AND NOT ANDROID)
@@ -23,6 +24,9 @@ INCLUDE_DIRECTORIES(
INCLUDE_DIRECTORIES(SYSTEM
${QT_INCLUDE_DIR}
${QGIS_INCLUDE_DIR}
${PROJ_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
${GEOS_INCLUDE_DIR}
)

IF (UNIX AND NOT ANDROID)
@@ -42,6 +46,7 @@ INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/src/analysis/processing
${CMAKE_SOURCE_DIR}/src/python
${CMAKE_SOURCE_DIR}/external/nlohmann
${CMAKE_SOURCE_DIR}/external

${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/python
@@ -67,6 +72,9 @@ TARGET_LINK_LIBRARIES(qgis_process
qgis_core
qgis_analysis
${Qt5Core_LIBRARIES}
${PROJ_LIBRARY}
${GEOS_LIBRARY}
${GDAL_LIBRARY}
)

IF (WITH_3D)

0 comments on commit fc8d916

Please sign in to comment.
You can’t perform that action at this time.