Skip to content

Commit

Permalink
Merge branch 'qgis:master' into deterministic_labeling
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrikSylve authored Feb 3, 2025
2 parents 2cc1c22 + 3cca51b commit 9f52acb
Show file tree
Hide file tree
Showing 131 changed files with 2,657 additions and 2,817 deletions.
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set(CMAKE_AUTORCC ON)
# set path to additional CMake modules
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
# POLICIES
if(NOT "${CMAKE_VERSION}" VERSION_LESS "3.27")
if("${CMAKE_VERSION}" VERSION_GREATER_EQUAL "3.27")
# include(Dart) still used, as is the "Experimental" target
cmake_policy(SET CMP0145 OLD)
endif()
Expand Down Expand Up @@ -435,6 +435,10 @@ if(WITH_CORE)
# required
find_package(Proj REQUIRED)
message(STATUS "Found Proj: ${PROJ_VERSION} ${PROJ_DIR}")
if(PROJ_VERSION VERSION_LESS "8.1")
message(FATAL_ERROR "Cannot build QGIS using Proj older than 8.1")
endif()

find_package(GEOS REQUIRED)
message(STATUS "Found Geos: ${GEOS_VERSION} ${GEOS_DIR}")
find_package(GDAL REQUIRED)
Expand Down Expand Up @@ -691,8 +695,10 @@ if (ENABLE_TESTS)
set (PUSH_TO_CDASH FALSE CACHE BOOL "Determines whether test results should be pushed to CDASH site")
set(QT_USE_QTTEST TRUE)
enable_testing()
# Adds some testing specific build targets e.g. make Experimental
include(Dart)
if (PUSH_TO_CDASH)
# Adds some testing specific build targets e.g. make Experimental
include(Dart)
endif()
# Additional test configuration options e.g. max upload size of test report
configure_file(
"${CMAKE_SOURCE_DIR}/cmake_templates/CTestCustom.cmake.in"
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Required build tools:
Required build dependencies:

* Qt >= 5.15.2
* Proj >= 7.2.0
* Proj >= 8.1.0
* GEOS >= 3.9
* Sqlite3 >= 3.0.0
* SpatiaLite >= 4.2.0
Expand Down
30 changes: 3 additions & 27 deletions cmake/FindProj.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ if(NOT PROJ_FOUND)
OR NOT CMAKE_FIND_FRAMEWORK)
SET (CMAKE_FIND_FRAMEWORK_save ${CMAKE_FIND_FRAMEWORK} CACHE STRING "" FORCE)
SET (CMAKE_FIND_FRAMEWORK "ONLY" CACHE STRING "" FORCE)
#FIND_PATH(PROJ_INCLUDE_DIR PROJ/proj_api.h)
FIND_LIBRARY(PROJ_LIBRARY PROJ)
IF (PROJ_LIBRARY)
# FIND_PATH doesn't add "Headers" for a framework
Expand All @@ -39,17 +38,11 @@ if(NOT PROJ_FOUND)
SET (CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_save} CACHE STRING "" FORCE)
ENDIF ()
ENDIF (APPLE)
FIND_PATH(PROJ_INCLUDE_DIR proj_api.h

FIND_PATH(PROJ_INCLUDE_DIR proj.h
"$ENV{INCLUDE}"
"$ENV{LIB_DIR}/include"
)
IF (NOT PROJ_INCLUDE_DIR)
FIND_PATH(PROJ_INCLUDE_DIR proj.h
"$ENV{INCLUDE}"
"$ENV{LIB_DIR}/include"
)
ENDIF (NOT PROJ_INCLUDE_DIR)
)

FIND_LIBRARY(PROJ_LIBRARY NAMES proj_i proj PATHS
"$ENV{LIB}"
Expand All @@ -67,23 +60,6 @@ if(NOT PROJ_FOUND)
STRING(REGEX REPLACE "^.*PROJ_VERSION_MINOR +([0-9]+).*$" "\\1" PROJ_VERSION_MINOR "${proj_version}")
STRING(REGEX REPLACE "^.*PROJ_VERSION_PATCH +([0-9]+).*$" "\\1" PROJ_VERSION_PATCH "${proj_version}")
STRING(CONCAT PROJ_VERSION_STR "(" ${PROJ_VERSION_MAJOR} "." ${PROJ_VERSION_MINOR} "." ${PROJ_VERSION_PATCH} ")")
IF ((PROJ_VERSION_MAJOR EQUAL 7) AND ((PROJ_VERSION_MINOR LESS 2) OR (PROJ_VERSION_MAJOR LESS 7)))
MESSAGE (FATAL_ERROR "Cannot build QGIS using Proj ${PROJ_VERSION_MAJOR}.${PROJ_VERSION_MINOR}.${PROJ_VERSION_PATCH} Use 7.2.0 or higher.")
ENDIF ((PROJ_VERSION_MAJOR EQUAL 7) AND ((PROJ_VERSION_MINOR LESS 2) OR (PROJ_VERSION_MAJOR LESS 7)))
ELSE(EXISTS ${PROJ_INCLUDE_DIR}/proj.h AND EXISTS ${PROJ_INCLUDE_DIR}/proj_experimental.h)
FILE(READ ${PROJ_INCLUDE_DIR}/proj_api.h proj_version)
STRING(REGEX REPLACE "^.*PJ_VERSION ([0-9]+).*$" "\\1" PJ_VERSION "${proj_version}")

# This will break if 4.10.0 ever will be released (highly unlikely)
STRING(REGEX REPLACE "([0-9])([0-9])([0-9])" "\\1" PROJ_VERSION_MAJOR "${PJ_VERSION}")
STRING(REGEX REPLACE "([0-9])([0-9])([0-9])" "\\2" PROJ_VERSION_MINOR "${PJ_VERSION}")
STRING(REGEX REPLACE "([0-9])([0-9])([0-9])" "\\3" PROJ_VERSION_PATCH "${PJ_VERSION}")
STRING(CONCAT PROJ_VERSION_STR "(" ${PROJ_VERSION_MAJOR} "." ${PROJ_VERSION_MINOR} "." ${PROJ_VERSION_PATCH} ")")

# Minimum Proj version required is 4.9.3
IF ((PROJ_VERSION_MAJOR EQUAL 4) AND ((PROJ_VERSION_MINOR LESS 9) OR ((PROJ_VERSION_MINOR EQUAL 9) AND (PROJ_VERSION_PATCH LESS 3))))
MESSAGE(FATAL_ERROR "Found Proj: ${PROJ_VERSION_MAJOR}.${PROJ_VERSION_MINOR}.${PROJ_VERSION_PATCH}. Cannot build QGIS using Proj older than 4.9.3.")
ENDIF((PROJ_VERSION_MAJOR EQUAL 4) AND ((PROJ_VERSION_MINOR LESS 9) OR ((PROJ_VERSION_MINOR EQUAL 9) AND (PROJ_VERSION_PATCH LESS 3))))
ENDIF(EXISTS ${PROJ_INCLUDE_DIR}/proj.h AND EXISTS ${PROJ_INCLUDE_DIR}/proj_experimental.h)
IF (NOT PROJ_FIND_QUIETLY)
MESSAGE(STATUS "Found Proj: ${PROJ_LIBRARY} version ${PROJ_VERSION_MAJOR} ${PROJ_VERSION_STR}")
Expand Down
13 changes: 8 additions & 5 deletions cmake/SIPMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,14 @@ MACRO(GENERATE_SIP_PYTHON_MODULE_CODE MODULE_NAME MODULE_SIP SIP_FILES CPP_FILES
CONFIGURE_FILE(${_sip_file} ${_out_sip_file})

# Deprecated annotation supports message only since version 6.9.0
if(${SIP_VERSION_STR} VERSION_LESS 6.9.0)
file(READ ${_out_sip_file} _content)
string(REGEX REPLACE "([/,])Deprecated=\"[^\"]*\"([/,])" "\\1Deprecated\\2" _content "${_content}")
file(GENERATE OUTPUT ${_out_sip_file} CONTENT "${_content}")
endif()
# if(${SIP_VERSION_STR} VERSION_LESS 6.9.0)

# For now disabling SIP deprecated because it crashes the application
file(READ ${_out_sip_file} _content)
string(REGEX REPLACE "([/,])Deprecated=\"[^\"]*\"([/,])" "\\1Deprecated\\2" _content "${_content}")
file(GENERATE OUTPUT ${_out_sip_file} CONTENT "${_content}")

# endif()

ENDFOREACH (_sip_file)

Expand Down
11 changes: 10 additions & 1 deletion images/themes/default/console/iconClassBrowserConsole.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion images/themes/default/console/iconCommentEditorConsole.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion python/PyQt6/core/auto_additions/qgsmimedatautils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The following has been generated automatically from src/core/qgsmimedatautils.h
try:
QgsMimeDataUtils.Uri.__attribute_docs__ = {'layerType': 'Type of URI.\n\nRecognized types include\n\n- "vector": vector layers\n- "raster": raster layers\n- "mesh": mesh layers\n- "pointcloud": point cloud layers\n- "vector-tile": vector tile layers\n- "tiled-scene": tiled scene layers\n- "plugin": plugin layers\n- "custom": custom types\n- "project": QGS/QGZ project file\n- "directory": directory path\n\nMime data from plugins may use additional custom layer types.', 'providerKey': 'For "vector" / "raster" type: provider id.\nFor "plugin" type: plugin layer type name.\nFor "custom" type: key of its :py:class:`QgsCustomDropHandler`\nFor "project" and "directory" types: unused', 'name': 'Human readable name to be used e.g. in layer tree', 'uri': 'Identifier of the data source recognized by its providerKey', 'layerId': 'Layer ID, if uri is associated with a layer from a :py:class:`QgsProject`.\n\n.. versionadded:: 3.8', 'pId': 'Unique ID associated with application instance. Can be used to identify\nif mime data was created inside the current application instance or not.\n\n.. versionadded:: 3.8', 'wkbType': 'WKB type, if associated with a vector layer, or :py:class:`QgsWkbTypes`.Unknown if not\nyet known.\n\n.. versionadded:: 3.8', 'filePath': 'Path to file, if uri is associated with a file.\n\n.. versionadded:: 3.22'}
QgsMimeDataUtils.Uri.__attribute_docs__ = {'layerType': 'Type of URI.\n\nRecognized types include\n\n- "vector": vector layers\n- "raster": raster layers\n- "mesh": mesh layers\n- "point-cloud": point cloud layers (spelled with a dash since QGIS 3.42.0. In prior versions, there was no dash)\n- "vector-tile": vector tile layers\n- "tiled-scene": tiled scene layers\n- "annotation": annotation layers\n- "group": group layers\n- "plugin": plugin layers\n- "custom": custom types\n- "project": QGS/QGZ project file\n- "directory": directory path\n\nNote: use :py:func:`QgsMapLayerFactory.typeToString()` to convert from a\n:py:class:`Qgis`.LayerType to a string (except for "custom", "project" and\n"directory")\n\nMime data from plugins may use additional custom layer types.', 'providerKey': 'For "vector" / "raster" type: provider id.\nFor "plugin" type: plugin layer type name.\nFor "custom" type: key of its :py:class:`QgsCustomDropHandler`\nFor "project" and "directory" types: unused', 'name': 'Human readable name to be used e.g. in layer tree', 'uri': 'Identifier of the data source recognized by its providerKey', 'layerId': 'Layer ID, if uri is associated with a layer from a :py:class:`QgsProject`.\n\n.. versionadded:: 3.8', 'pId': 'Unique ID associated with application instance. Can be used to identify\nif mime data was created inside the current application instance or not.\n\n.. versionadded:: 3.8', 'wkbType': 'WKB type, if associated with a vector layer, or :py:class:`QgsWkbTypes`.Unknown if not\nyet known.\n\n.. versionadded:: 3.8', 'filePath': 'Path to file, if uri is associated with a file.\n\n.. versionadded:: 3.22'}
except (NameError, AttributeError):
pass
try:
Expand Down
14 changes: 13 additions & 1 deletion python/PyQt6/core/auto_generated/geometry/qgsbox3d.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -375,12 +375,24 @@ Expands the bbox so that it covers both the original rectangle and the given poi
Converts the box to a 2D rectangle.
%End

double distanceTo( const QVector3D &point ) const /HoldGIL/;
double distanceTo( const QVector3D &point ) const /Deprecated="Since 3.42. Use distanceTo() with QgsVector3D instead (QVector3D uses floats)."/;
%Docstring
Returns the smallest distance between the box and the point ``point``
(returns 0 if the point is inside the box)

.. versionadded:: 3.18

.. deprecated:: 3.42

Use :py:func:`~QgsBox3D.distanceTo` with :py:class:`QgsVector3D` instead (QVector3D uses floats).
%End

double distanceTo( const QgsVector3D &point ) const /HoldGIL/;
%Docstring
Returns the smallest distance between the box and the point ``point``
(returns 0 if the point is inside the box)

.. versionadded:: 3.42
%End

bool operator==( const QgsBox3D &other ) const /HoldGIL/;
Expand Down
12 changes: 10 additions & 2 deletions python/PyQt6/core/auto_generated/network/qgshttpheaders.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,22 @@ KEY_REFERER value will be available at key "KEY_PREFIX+KEY_REFERER" and key "KEY
:return: ``True`` if the update succeed
%End

bool updateDomElement( QDomElement &el ) const;
bool updateDomElement( QDomElement &el ) const /Deprecated="Since 3.42. Will be removed in QGIS 4.0."/;
%Docstring
Updates a ``map`` by adding all the HTTP headers
Updates a DOM element by adding all the HTTP headers

KEY_REFERER value will be available at attribute "KEY_PREFIX+KEY_REFERER" and attribute "KEY_REFERER" (for backward compatibility)

:param el: DOM element

:return: ``True`` if the update succeed

.. deprecated:: 3.42

Will be removed in QGIS 4.0.
%End


void setFromSettings( const QgsSettings &settings, const QString &key = QString() );
%Docstring
Loads headers from the ``settings``
Expand Down Expand Up @@ -185,6 +192,7 @@ Returns key/value pairs as strings separated by space

};


/************************************************************************
* This file has been generated automatically from *
* *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -850,25 +850,13 @@ be returned.

In the case of a compound crs, this method will always return the datum ensemble for the horizontal component.

.. warning::

This method requires PROJ 8.0 or later

:raises QgsNotSupportedException: on QGIS builds based on PROJ 7 or earlier.

.. versionadded:: 3.20
%End

QString celestialBodyName() const;
%Docstring
Attempts to retrieve the name of the celestial body associated with the CRS (e.g. "Earth").

.. warning::

This method requires PROJ 8.1 or later

:raises QgsNotSupportedException: on QGIS builds based on PROJ 8.0 or earlier.

.. versionadded:: 3.20
%End

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,6 @@ The map keys correspond to PROJ operation IDs.
%Docstring
Returns a list of all known celestial bodies.

.. warning::

This method requires PROJ 8.1 or later

:raises QgsNotSupportedException: on QGIS builds based on PROJ 8.0 or earlier.

.. versionadded:: 3.20
%End

Expand Down
3 changes: 2 additions & 1 deletion python/PyQt6/core/auto_generated/qgsmaplayer.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -567,13 +567,14 @@ or other problem. Child classes set this flag when initialized.
:return: ``True`` if the layer is valid and can be accessed
%End


QString publicSource( bool hidePassword = false ) const;
%Docstring
Gets a version of the internal layer definition that has sensitive
bits removed (for example, the password). This function should
be used when displaying the source name for general viewing.

:param hidePassword: False, if the password should be removed or replaced by an arbitrary string, since QGIS 3.34
:param hidePassword: ``True`` to replace the value of credentials with 'xxxxxxxx', ``False`` to completely remove credentials (key and value). Since QGIS 3.34

.. seealso:: :py:func:`source`
%End
Expand Down
Loading

0 comments on commit 9f52acb

Please sign in to comment.