Skip to content
Permalink
Browse files

Move classes representing GCP based transformations from app to analy…

…sis,

and make ready for exposure to public API
  • Loading branch information
nyalldawson committed Feb 21, 2021
1 parent af0fb8b commit 8bf253d6ef080def43c33ae2becf2d655ca6e4e1
@@ -110,6 +110,7 @@ if(WITH_APIDOC)
${CMAKE_SOURCE_DIR}/src/gui/vectortile
${CMAKE_SOURCE_DIR}/src/analysis
${CMAKE_SOURCE_DIR}/src/analysis/mesh
${CMAKE_SOURCE_DIR}/src/analysis/georeferencing
${CMAKE_SOURCE_DIR}/src/analysis/interpolation
${CMAKE_SOURCE_DIR}/src/analysis/network
${CMAKE_SOURCE_DIR}/src/analysis/processing
@@ -245,6 +245,7 @@ if(WITH_ANALYSIS)
include_directories(BEFORE

${CMAKE_BINARY_DIR}/src/analysis/processing
${CMAKE_BINARY_DIR}/src/analysis/georeferencing
${CMAKE_BINARY_DIR}/src/analysis/vector
${CMAKE_BINARY_DIR}/src/analysis/mesh
${CMAKE_BINARY_DIR}/src/analysis/raster
@@ -1,5 +1,6 @@
// Include auto-generated SIP files
%Include auto_generated/qgsanalysis.sip
%Include auto_generated/georeferencing/qgsgcptransformer.sip
%Include auto_generated/interpolation/qgsgridfilewriter.sip
%Include auto_generated/interpolation/qgsidwinterpolator.sip
%Include auto_generated/interpolation/qgsinterpolator.sip
@@ -0,0 +1,60 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/georeferencing/qgsgcptransformer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/



class QgsGcpTransformerInterface /Abstract/
{
%Docstring
An interface for Ground Control Points (GCP) based transformations.

:py:class:`QgsGcpTransformerInterface` implementations are able to transform point locations
based on a transformation method and a list of GCPs.

.. versionadded:: 3.20
%End

%TypeHeaderCode
#include "qgsgcptransformer.h"
%End
public:

QgsGcpTransformerInterface();

virtual ~QgsGcpTransformerInterface();



virtual bool updateParametersFromGcps( const QVector<QgsPointXY> &mapCoordinates, const QVector<QgsPointXY> &pixelCoordinates ) = 0;
%Docstring
Fits transformation parameters using the specified Ground Control Points (GCPs) lists of map coordinates and pixel coordinates.

:return: ``True`` on success, ``False`` on failure
%End

virtual int minimumGcpCount() const = 0;
%Docstring
Returns the minimum number of Ground Control Points (GCPs) required for parameter fitting.
%End


private:
QgsGcpTransformerInterface( const QgsGcpTransformerInterface &other );
};





/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/georeferencing/qgsgcptransformer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
@@ -3,6 +3,8 @@

set(QGIS_ANALYSIS_SRCS
qgsanalysis.cpp
georeferencing/qgsgcptransformer.cpp
georeferencing/qgsleastsquares.cpp

interpolation/qgsgridfilewriter.cpp
interpolation/qgsidwinterpolator.cpp
@@ -283,6 +285,8 @@ set(QGIS_ANALYSIS_SRCS
set(QGIS_ANALYSIS_HDRS
qgsanalysis.h

georeferencing/qgsgcptransformer.h

interpolation/Bezier3D.h
interpolation/CloughTocherInterpolator.h
interpolation/qgsdualedgetriangulation.h
@@ -391,6 +395,7 @@ find_package(EXIV2 REQUIRED)
include_directories(SYSTEM ${SPATIALITE_INCLUDE_DIR})
include_directories(SYSTEM ${SPATIALINDEX_INCLUDE_DIR})
include_directories(SYSTEM ${SQLITE3_INCLUDE_DIR})
include_directories(SYSTEM ${GSL_INCLUDE_DIR})
include_directories(BEFORE raster)
include_directories(BEFORE mesh)

@@ -437,6 +442,7 @@ add_library(qgis_analysis ${LIBRARY_TYPE} ${QGIS_ANALYSIS_SRCS} ${QGIS_ANALYSIS_

target_include_directories(qgis_analysis PUBLIC
${CMAKE_SOURCE_DIR}/src/analysis
${CMAKE_SOURCE_DIR}/src/analysis/georeferencing
${CMAKE_SOURCE_DIR}/src/analysis/interpolation
${CMAKE_SOURCE_DIR}/src/analysis/mesh
${CMAKE_SOURCE_DIR}/src/analysis/network
@@ -497,6 +503,7 @@ target_link_libraries(
qgis_analysis
qgis_core
${EXIV2_LIBRARY}
${GSL_LIBRARIES}
)

if(HAVE_OPENCL)

0 comments on commit 8bf253d

Please sign in to comment.