Skip to content
Browse files

Merge branch 'master' into sirs_db_manager

  • Loading branch information
Ailurupoda committed Jan 10, 2019
2 parents 238ea72 + fd00cd5 commit 5c0bcd986fb5a0f58b342f43b7251fb7c786538b
Showing 505 changed files with 13,927 additions and 3,738 deletions.
@@ -480,13 +480,15 @@ IF (PEDANTIC)

# disable warnings
SET(_warnings "${_warnings} /wd4091 ") # 'typedef': ignored on left of '' when no variable is declared (occurs in MS DbgHelp.h header)
SET(_warnings "${_warnings} /wd4100 ") # unused formal parameters
SET(_warnings "${_warnings} /wd4127 ") # constant conditional expressions (used in Qt template classes)
SET(_warnings "${_warnings} /wd4190 ") # 'identifier' has C-linkage specified, but returns UDT 'identifier2' which is incompatible with C
SET(_warnings "${_warnings} /wd4231 ") # nonstandard extension used : 'identifier' before template explicit instantiation (used in Qt template classes)
SET(_warnings "${_warnings} /wd4244 ") # conversion from '...' to '...' possible loss of data
SET(_warnings "${_warnings} /wd4251 ") # needs to have dll-interface to be used by clients of class (occurs in Qt template classes)
SET(_warnings "${_warnings} /wd4275 ") # non dll-interface class '...' used as base for dll-interface class '...'
SET(_warnings "${_warnings} /wd4290 ") # c++ exception specification ignored except to indicate a function is not __declspec(nothrow) (occurs in sip generated bindings)
SET(_warnings "${_warnings} /wd4456 ") # declaration of '...' hides previous local declaration
SET(_warnings "${_warnings} /wd4457 ") # declaration of '...' hides a function parameter
SET(_warnings "${_warnings} /wd4458 ") # declaration of '...' hides class member
@@ -167,7 +167,7 @@ IF (UNIX)
FOREACH (PATH /usr/lib64 /usr/lib)
FOREACH (VERSION grass70, grass72, grass74)
FOREACH (VERSION grass76, grass74, grass72, grass70)
@@ -178,10 +178,10 @@ ENDIF (UNIX)
@@ -1,2 +1,4 @@
@@ -4,6 +4,5 @@ usr/lib/python*/*-packages/qgis/core/*
#sid buster bionic cosmic#usr/lib/python*/*-packages/qgis/3d/*
@@ -78,6 +78,7 @@ IF(WITH_APIDOC)
@@ -87,7 +88,9 @@ IF(WITH_APIDOC)
@@ -96,6 +99,7 @@ IF(WITH_APIDOC)
@@ -37,14 +37,15 @@ RequestExecutionLevel admin

!addplugindir osgeo4w/untgz
!addplugindir osgeo4w/nsis
!addplugindir osgeo4w/inetc


;Publisher variables

!define PUBLISHER "QGIS Development Team"
!define WEB_SITE ""
!define WIKI_PAGE ""
!define WEB_SITE ""
!define WIKI_PAGE ""


@@ -404,9 +405,9 @@ Function DownloadDataSet
SetShellVarContext current
Pop $0
StrCmp $0 "success" download_ok download_failed
inetc::get /caption "$ARCHIVE_NAME" /canceltext "Cancel" "$HTTP_PATH/$ARCHIVE_NAME" "$TEMP\$ARCHIVE_NAME" /end
Pop $0 # return value = exit code, "OK" means OK
StrCmp $0 "OK" download_ok download_failed

@@ -443,7 +444,7 @@ Section /O "North Carolina Data Set" SecNorthCarolinaSDB
;Set the size (in KB) of the unpacked archive file
AddSize 293314

StrCpy $HTTP_PATH ""
StrCpy $HTTP_PATH ""
StrCpy $ARCHIVE_NAME "nc_spm_latest.tar.gz"
StrCpy $EXTENDED_ARCHIVE_NAME "North Carolina"
@@ -461,7 +462,7 @@ Section /O "South Dakota (Spearfish) Data Set" SecSpearfishSDB
;Set the size (in KB) of the unpacked archive file
AddSize 42171

StrCpy $HTTP_PATH ""
StrCpy $HTTP_PATH ""
StrCpy $ARCHIVE_NAME "spearfish_grass60data-0.3.tar.gz"
StrCpy $EXTENDED_ARCHIVE_NAME "South Dakota (Spearfish)"
StrCpy $ORIGINAL_UNTAR_FOLDER "spearfish60"
@@ -479,7 +480,7 @@ Section /O "Alaska Data Set" SecAlaskaSDB
;Set the size (in KB) of the unpacked archive file
AddSize 33914

StrCpy $HTTP_PATH ""
StrCpy $HTTP_PATH ""
StrCpy $ARCHIVE_NAME "qgis_sample_data.tar.gz"
StrCpy $ORIGINAL_UNTAR_FOLDER "qgis_sample_data"
@@ -78,6 +78,9 @@ BEGIN
system "wget $wgetopt -c" unless -f "";
die "download of failed" if $?;

system "wget $wgetopt -c" unless -f "";
die "download of failed" if $?;

my %dep;
my %file;
my %lic;
@@ -386,6 +389,12 @@ sub getDeps {
die "unpacking failed" if $?;

unless(-d "inetc") {
mkdir "inetc", 0755;
system "unzip -p $packages/ Plugins/x86-ansi/INetC.dll >inetc/INetC.dll";
die "unpacking failed" if $?;

chdir "..";

@@ -116,6 +116,7 @@ INCLUDE_DIRECTORIES(

${CMAKE_BINARY_DIR} # qgsconfig.h, qgsversion.h
@@ -27,12 +27,16 @@ A feature pool is based on a vector layer and caches features.
#include "qgsfeaturepool.h"

QgsFeaturePool( QgsVectorLayer *layer );
Creates a new feature pool for ``layer``.
virtual ~QgsFeaturePool();

bool getFeature( QgsFeatureId id, QgsFeature &feature, QgsFeedback *feedback = 0 );
Retrieve the feature with the specified ``id`` into ``feature``.
Retrieves the feature with the specified ``id`` into ``feature``.
It will be retrieved from the cache or from the underlying layer if unavailable.
If the feature is neither available from the cache nor from the layer it will return false.
If ``feedback`` is specified, the call may return if the feedback is canceled.
@@ -55,7 +59,7 @@ Implementations will remove the feature from the layer or from the data provider

QgsVectorLayer *layer() const;
Get a pointer to the underlying layer.
Gets a pointer to the underlying layer.
May return a ``None`` if the layer has been deleted.
This must only be called from the main thread.
@@ -13,10 +13,90 @@
class QgsGeometryCheck
This class manages all known geometry check factories.
This class implements a geometry check.

QgsGeometryCheckRegistry is not usually directly created, but rather accessed through
Geometry checks run over a set of features and can detect errors like topological
or other issues which are reported in the geometry validation panel in QGIS and
help a user to create valid geometries.

Implementing a custom geometry check consists of the following parts

### Writing the check

A new subclass of QgsGeometryCheck needs to be written and at least the following
abstract methods need to be implemented:

- `compatibleGeometryTypes()`

A list of geometry types to which this check applies

- `resolutionMethods()`

A list of names for (automated) resolution methods that can be used to fix errors of this type

- `description()`

A description for the geometry check.

- `id()`

A unique id for this check.

- `checkType()`

One of QgsGeometryCheck.LayerCheck, QgsGeometryCheck.FeatureCheck,QgsGeometryCheck.FeatureNodeCheck

- \link collectErrors() `collectErrors(featurePools, errors, messages, feedback, ids)`\endlink

This method will be called to validate geometries. All geometries which should be validated are passed
into this method with the parameter ids and should be retrieved from the available featurePools to make
use of caching. New errors should be appended to the error list and other message strings to messages.
The method needs to return a tuple (errors, messages).

### Creating a geometry check factory

A Geometry check factory manages meta information for checks. There will always be one single
geometry check factory created per check type, but it's possible that multiple QgsGeometryCheck
instances are created and used in parallel.

A new subclass of QgsGeometryCheckFactory needs to be written and at least the following
abstract methods need to be implemented:

- \link QgsGeometryCheckFactory.createGeometryCheck() `createGeometryCheck(context, configuration)`\endlink

Needs to return a new subclassed QgsGeometryCheck object that has been written in the previous step.

- \link `id()\endlink

A unique id for this geometry check.

- \link QgsGeometryCheckFactory.description() `description()\endlink

A description for this geometry check that can be presented to the user for more explanation.

- \link QgsGeometryCheckFactory.isCompatible() `QgsGeometryCheckFactory.isCompatible(layer)`\endlink

Returns a boolean that determines if this check is available for a given layer. This often
checks for the geometry type of the layer.

- \link QgsGeometryCheckFactory.flags() `flags()`\endlink

Returns additional flags for a geometry check. If unsure return QgsGeometryCheck.AvailableInValidation.

- \link QgsGeometryCheckFactory.checkType() `checkType()`\endlink

Returns the type of this geometry check.

### Registering the geometry check

Finally the geometry check factory needs to be registered in QGIS, so the system
is aware of the available geometry checks.

.. code-block:: python

# Make sure you always keep a
checkFactory = MyGeometryCheckFactory()

.. note::

@@ -164,6 +244,10 @@ Returns the context



0 comments on commit 5c0bcd9

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