4548 Commits

Author SHA1 Message Date
Matthias Kuhn
d1d26e96b0
Fix test 2017-09-19 12:24:01 +02:00
Nyall Dawson
9526d487ad Astyle 2017-09-19 19:39:54 +10:00
Matthias Kuhn
44e32e18c0
Fix tests for new QgsVectorFileWriter python API 2017-09-19 11:00:49 +02:00
Nyall Dawson
b744820bc3 Boost test coverage of geometry classes 2017-09-19 17:22:33 +10:00
Nyall Dawson
1540448334 Boost test coverage of geometry classes 2017-09-19 17:22:33 +10:00
Nyall Dawson
bb425e4540 Cleaner signature for QgsAbstractGeometry::closestSegment 2017-09-19 17:22:33 +10:00
Nyall Dawson
1f40f62011 Expand geometry test coverage 2017-09-19 17:22:33 +10:00
Nyall Dawson
fd3a38fcd8 More tests 2017-09-19 17:22:33 +10:00
Nyall Dawson
5bb359db90 Boost test coverage of geometry classes 2017-09-19 17:22:33 +10:00
Nyall Dawson
9b6e79cd18 Expand QgsTriangle test coverage 2017-09-19 17:22:32 +10:00
Nyall Dawson
a15340fc2c Extend geometry test coverage 2017-09-19 17:22:32 +10:00
Nyall Dawson
d3db082cd2 Extend unit tests for QgsPolygonV2, QgsPoint 2017-09-19 17:22:32 +10:00
Nyall Dawson
6b07b9bbfb Extend geometry unit test coverage 2017-09-19 17:22:32 +10:00
Nyall Dawson
328fc9cb8d Consistently use unsigned int for QgsRegularPolygon 2017-09-19 17:22:32 +10:00
rldhont
10fbfb3737 [Server] WMS GetPrint refactoring - Update tests 2017-09-19 07:34:33 +02:00
rldhont
7c1d397288 [Server] WMS GetPrint refactoring 2017-09-19 07:34:33 +02:00
rldhont
bb61db2e8d [Server] test: add response content in message when it's not an image 2017-09-19 07:34:33 +02:00
Nyall Dawson
dd441f6154 [processing] A non-optional multiple enum parameter must have at
least one choice selected to be valid
2017-09-16 09:59:13 +10:00
Vincent Mora
f63c302420 [FEATURE] Add undo and redo on transaction groups (#4765)
* [FEATURE] adds undo/redo for transaction groups

[needs-docs] the undo/redo now works with transcation groups. Just check
that there is no restriction in the transaction groups doc concerning
undo.

related to #14799

The undo/redo is implemented using SAVEPOINT.

The QgsTransaction interface has been enlarged to allow savepoints
creation and management. The savepoint is destroyed on
rollbackToSavepoint to have the same behavior has the sql ROLLBACK TO
SAVEPPOINT.

To avoid the creation of a savepoint for each feature modified in bulk
editing (e.g. paste, field calculator) the logic is a bit complicated: the
savepoint is created on QgsVectorLayer::editCommandStarted and the first
actual undo command (QgsVectorLayerUndoPassthroughCommand) is
responsible for the re-creation of the savepoint in case of undo-redo.
Since the behavior must be different in case edition doesn't take place
inside an edit command, a member function has been added to
QgsVectorLayer to expose the mEditCommandActive state.

Another (commented) tricky bit is the modification of the database
structure on add/delete attributes. On undo, the attribute is removed
before the rollback to savepoint, i.e. there is a useless ALTER TABLE
issued to restore the structure just before restoring it with the
ROLLBACK TO SAVEPOINT. This is necessary to make the provider
aware of the change of structure. It could be nicer/cleaner to have a way
to reload providers metadata.

The editPaste function has also been modified to use addFeatures instead of
addFeature (plural/singular), this is at the expense of an additional "cpy"
of the clipboard in memory, but it should improve perf with postgis provider.

* fixup operator aliases
2017-09-15 14:55:43 +02:00
Martin Dobias
3d0ce5f101 Fix build with Qt 5.9 2017-09-15 10:38:23 +02:00
David Marteau
5534d743f1 Execute ln command with GNU compatible options
On some OSX macport installation, GNU commands may be used in favor
    of native commands and 'make install' fail with
         'ln: invalid option -- 'h'"

    As BSD ln support the GNU -n option as an equivalent of the -h option
    it shoud be preferred over the specific BSD option.
2017-09-15 09:27:31 +02:00
Nyall Dawson
9b112284c7 Add method to recover extent parameter CRS 2017-09-15 14:09:27 +10:00
Nyall Dawson
cfdc3c71e7 Use geometry of reproject extent parameters for more accurate clipping 2017-09-15 08:35:42 +10:00
Nyall Dawson
74565e22de Nicer display of rectangle parameter values 2017-09-15 08:34:13 +10:00
Nyall Dawson
ae8bc04b6c Allow use of Qgs(Referenced)Rectangle for processing extent parameter values
And add a new target CRS argument to parameterAsExtent. If set, and
the source CRS of the rectangle parameter can be determined, then
the returned value will be the rectangle automatically reprojected
to the desired target CRS.
2017-09-15 08:33:45 +10:00
Nyall Dawson
4ec1b4b348 [processing] Transparently map 'qgis' algorithms to 'native' algorithms
This allows us to freely move algorithms from the qgis python library
to the c++ native provider without breaking API or existing models
2017-09-14 11:41:38 +10:00
Nyall Dawson
742f3e5b4d Merge pull request #5112 from nyalldawson/locator_core
Move locator non-gui classes to core
2017-09-13 18:50:28 +10:00
Nyall Dawson
ac15df9863 Add support for updating a uri with GeoNode WFS/WMS related connection settings 2017-09-13 05:47:53 +10:00
Nyall Dawson
05e047d779 Generalize some WFS/WMS connection setting handling 2017-09-13 05:47:53 +10:00
Nyall Dawson
e1562df16b [geonode] Don't block data source manager while connecting to a server
Also add missing docstrings
2017-09-13 05:47:53 +10:00
Nyall Dawson
1a19283634 Class shuffle 2017-09-13 05:47:53 +10:00
Nyall Dawson
e6a8980b97 Run all GeoNode tests locally, but skip ones which rely on a remote server on Travis 2017-09-13 05:47:53 +10:00
Nyall Dawson
61e70c93a6 Slight folder restructuring 2017-09-13 05:47:53 +10:00
Nyall Dawson
378a9e90dd Split QgsGeoNodeConnection into two classes
Move utility functions to QgsGeoNodeConnectionUtils
2017-09-13 05:47:20 +10:00
Ismail Sunni
cad8fa8bb2 Fix can not delete geonode instance from browser. 2017-09-13 05:47:19 +10:00
Ismail Sunni
3016158558 Add style retriever for a geonode layer. 2017-09-13 05:47:19 +10:00
Muhammad Yarjuna Rohmat
bea89b32ca [FEATURE] QGIS - GeoNode Integration: Integrate with QGIS Browser Panel (#4816)
* add Geonode connection menu to the toolbar

* add header files for geonode-qgis client

* add action to launch geonode connection dialog from menubar

* Move to proper directory

* Add geonodeconnection class.

* Add unit test for geonode connection.

* Use const static to avoid typo.

* Get list layers from geonode.

* Add get maps method.

* Geonode connection dialog (#13)

* add new geonode connection dialog

* apply functionality to the geonode connection manager dialog

* add save and load geonode connection functionality

* edit baseKey and credentialBaseKey

* remove auto-connect slots

* Add unit test for geonode connection.

* Add wms url getter.

* Add uuid and layer name in the table.

* Add handler for the list layer clicked. WIP.

* Use new style connect, better hacky to get wms url.

* update gitignore

* Make QGIS able to add WMS layer from geonode. With hacky code.

* Fix Docstring.

* Show web service type (WMS/WFS) in layer table.

* fix http and toolbar menu

* add geonode data item to the browser panel as an extention of ows provider

* [WIP] Add WFS.

* Add geonode get service url.

* combobox functionality and test geonode connection

* Add WFS.

* Disable add button if it's a map. Currently we can't do anything for map.

* Add busy cursor when add layer.

* get service uri capabilitites

* add available layers to the geonode browser panel

* remove debugging footprint and replace old style connect

* add actions (new, edit, delete) to geonode browser panel

* fix getLayers by WMS url

* add Geonode connection menu to the toolbar

* Filter out invalid layer / map.

* Fix service url method.

* Add service url for XYZ for GeoNode QGIS Server backend.

* Add XYZ url to geonode connection  dialog.

* Add XYZ layer to QGIS.

* fix double geonode submenu

* add wfs/wms layers from browser panel using its native provider

* comply with qgis3 new class naming

* Handle different prefix for layer in GeoNode QGIS Server backend.

* base class for cms connection

* make geonode connection as a derived class from cms connection

* update cmakelists

* move geonode connection to geocms dir

* update CMakeLists

* Handle geonode 2.7 with new API.

* Handle multiple geoserver url in one geonode.

* Fix add xyz for qgis server. Fix add wms, wfs, xyz for geoserver in geonode 2.7

* Refactor serviceURL to return QStringList.

* add 'add geonode layer' icon

* add geonode to the data source manager dialog

* [GeoNode-Client] Fix add WFS layer.

* fix wms url parameter

* add xyz dataitems

* Use new style connect.

* [GeoNode Client] Handle qgis server specific typename to make add WFS works.

* Code improvement.

* [GeoNode Client] Make geonode dialog in add universal layer can add layer.

* Open universal add layer when click Add GeoNode layer.

* Make sure the geonode url has protocol.

* Handle geonode version in a better way.

* make sure the serviceUrl method has scheme in its urls

* add services option to the dialog

* remove version label if not wfs

* construct wms url with parameters for geonode connection

* handle layer from multi service urls for every wfs, wms, & xyz services

* fix new style connect using static_cast

* hode close button if dialog is in embedded mode

* fix xyz layer naming in the browser tree

* create base class for geocms dataitems

* fix compiling warning

* Use struct instead QVariantMap.

* tidy up code

* Tidy up code, use QgsStringMap instead QVariantMap.

* Add spellok for catalogue.

* update sip

* update sip

* Use naming convention for QgsGeoCmsConnection and use QUuid.

* Async by using GeoNodeRequest class.

* Move geonode to src/gui.

* Use stack not heap.

* Remove unused includes.

* Use signal to handle request.

* Use QStringLiteral.

* Switch to use Q_FOREACH.

* Use Q_FOREACH and addressing PR's review.

* Set private for data members.

* update sip

* Update sip.

* Update sip.

* Fix sip problem to make it buildable again.

* Remove geocms

* Tidy up code.

* Use QgsSetting Scope::Provider.

* Fix missing zip.h
2017-09-13 05:47:19 +10:00
Sandro Mani
95cd8d744d [OGR] Ensure subset string is set when reopening dataset
QgsOgrProvider::reloadData calls close() and open(), which in turn called setSubsetString with mSubsetString.
Since setSubsetString does nothing if the passed sql string is equal to mSubsetString, this resulted in the
substring not being set on re-open. This commit clears mSubsetString before calling setSubsetString, and
blocks signals when calling setSubsetString to avoid an endless recursion of emit dataChanged -> reload.
Fixes #17122.
2017-09-12 15:26:09 +02:00
Nyall Dawson
b26b8d9789 Merge pull request #5165 from Gustry/save_metadata
write metadata with XML
2017-09-12 20:32:08 +10:00
Etienne Trimaille
814ef78732 write metadata with XML 2017-09-12 07:28:54 +02:00
Nyall Dawson
6166d21289 Add missing docs 2017-09-11 21:43:15 +10:00
Nyall Dawson
7afec4bd98 Cleanup pointer comparisons to nullptr 2017-09-11 17:11:50 +10:00
Nyall Dawson
c78ca050c0 Ignore =default during doxygen coverage test 2017-09-11 17:10:31 +10:00
Alessandro Pasotti
32dee4480c Merge pull request #5156 from boundlessgeo/gpkg_tab
[feature][needs-docs] Gpkg tab in source select dialog
2017-09-11 08:15:55 +02:00
Nyall Dawson
a650681061 Merge pull request #5131 from nyalldawson/location_algs
Rework Select by Location algorithm
2017-09-11 15:50:43 +10:00
Nyall Dawson
7f5bd00cbf Merge pull request #5154 from nyalldawson/stats
[processing] Improve Stats by Categories algorithm, remove duplicate algs
2017-09-11 15:50:16 +10:00
Nyall Dawson
02e8f1e6fa Fix tests 2017-09-10 14:07:52 +10:00
Nyall Dawson
cea7eb8be5 Merge pull request #5119 from nyalldawson/layout_next3
[layouts] Undo/redo framework
2017-09-10 11:38:59 +10:00
Martin Dobias
31b6b5885f Node tool: give priority to the current layer when selecting vertex 2017-09-08 15:12:50 +02:00
Alessandro Pasotti
8abf6dc43e Update tests for OGR getLayers now returning also the geometry column name 2017-09-08 12:36:42 +02:00