67 Commits

Author SHA1 Message Date
Alexander Bruy
75bd622ccc [processing] restore and fix extraction of OGR layer names 2016-11-12 13:31:45 +02:00
Alexander Bruy
a6bd9f0207 Revert "Fix extraction of ogr LayerName from multi-layer dataset URIs"
This reverts commit 6c5364186dd8d45ac51e5bd1a72c6a542f032cb1.

As it breaks all OGR geoprocessing algoroithms.
2016-11-12 13:31:42 +02:00
Alexander Bruy
5991eccb47 [processing] simple test for ogr buffering 2016-11-12 13:31:42 +02:00
Alexander Bruy
ee9e1c3328 [processing] add missed spatial index constructor (follow up 700441eec9) 2016-10-19 09:19:00 +03:00
Alexander Bruy
700441eec9 [processing] remove debug line and fix spatial index creation 2016-10-18 16:55:19 +03:00
volaya
90db246488 [processing] use only selected features for spatial index
fixes #15584
2016-10-18 16:55:19 +03:00
Sandro Santilli
8843de88c7 Fix ogrLayerName handling of PostgreSQL dataset URIs
Also document "uri" parameter semantic, and add more tests.
See for background
https://lists.osgeo.org/pipermail/qgis-developer/2016-October/045311.html
REF #15698
2016-10-18 11:05:31 +02:00
Sandro Santilli
52a0082ade Fix extraction of ogr LayerName from database dataset URIs
See 6c5364186d (commitcomment-19439676)
Includes testcase.

REF #15698
2016-10-17 11:55:35 +02:00
Sandro Santilli
6c5364186d Fix extraction of ogr LayerName from multi-layer dataset URIs
Adds supports for "layerid" when present.
Drop special handling for "table=" portions found in URI,
making the code more generic.

Includes testcase.

Fixes #15698 - import geodatabase to postgis via processing
2016-10-15 09:13:18 +02:00
Nyall Dawson
6605a2274f [processing] Optimise uniqueValues method
Now it uses the standard QgsVectorLayer.uniqueValues() method
where possible so that provider side optimisations are used

Also add test, and optimise request when using selected
features only
2016-10-12 17:05:15 +10:00
Nyall Dawson
05ea4be7c3 [processing] Fix inefficient values() method
Method was iterating over ever feature in a layer, including
geometries and all attributes for EVERY attribute requested

Add test and refactor so only one optimised iteration (eg no
geometry, only required attributes) is used
2016-10-12 16:56:29 +10:00
Nyall Dawson
90aebd117d [processing] Add geometry info should add z/m values (fix #14659) 2016-10-11 09:30:41 +10:00
Alexander Bruy
eeb8269464 [processing] drop GEOM_TYPE_MAP in favour of QgsWkbTypes.displayString() 2016-10-05 09:45:55 +03:00
Alexander Bruy
a4bdfb76c0 [processing] support more geometry types in memory layers (fix #15508) 2016-10-05 09:42:56 +03:00
Matthias Kuhn
4a7a8ff263 Update python code 2016-10-01 15:39:03 +02:00
Juergen E. Fischer
31df84aa6b run 2to3 on source 2016-09-21 23:30:04 +02:00
Nyall Dawson
fe65063c2b Remove many deprecated methods 2016-09-15 18:34:15 +10:00
Nyall Dawson
9bc61e77c7 [processing] Create vector files using default dataset/layer options
Fixes missing CRS when saving to GML (fix #14544)
2016-08-12 07:01:04 +10:00
Nyall Dawson
9e66e1593b [processing] Fix broken output of multipoint since WKB type merge 2016-08-10 16:19:29 +10:00
Alexander Bruy
acdde31b3d [processing] more cleanups (follow up 06c4b07222) 2016-08-05 15:05:36 +03:00
Matthias Kuhn
bb79d13e82 Remove deprecated Qgis::WKBType and API cleanup (#3325)
* Remove deprecated Qgis::WKBType and API cleanup

Renames QgsWKBTypes to QgsWkbTypes

Replaces usage of the enums:

* Qgis::WKBType with QgsWkbTypes::Type
* Qgis::GeometryType with QgsWkbTypes::GeometryType

Their values should be forward compatible (a fact that was already
explited up to now by casting between the types)

Renames some SSLxxx to SslXxx and URIxxx to UriXxx

* Fix build warnings and simplify type handling

* Add a fixer to rewrite imports

* The forgotten rebase conflictThe forgotten rebase conflicts

* QgsDataSourcURI > QgsDataSourceUri

* QgsWKBTypes > QgsWkbTypes

* Qgis.WKBGeom > QgsWkbTypes.Geom

* Further python fixes

* Guess what... Qgis::wkbDimensions != QgsWkbTypes::wkbDimensions

* Fix tests

* Python 3 updates

* [travis] pull request caching cannot be disabled

so at least use it in r/w mode

* Fix python3 print in plugins
2016-08-04 09:10:08 +02:00
Nyall Dawson
1a2231f10c Rename QGis class to Qgis, for capitalisation consistency 2016-07-21 22:01:38 +10:00
Nyall Dawson
9e1ddcb54d [processing] Allow modification of feature request when using
vector.features

Allows for optimising the request through subsets of attributes
or no geometry fetching
2016-07-13 12:06:41 +10:00
Alexander Bruy
2d9b2a354b [processing] use bulk features loading to speedup spatial index creation 2016-06-21 16:56:21 +03:00
Nyall Dawson
3a005cda36 Indentation 2016-06-02 08:50:27 +10:00
Alexander Bruy
57b16187e6 [processing] move spatialite and postgis utils into tools package 2016-06-01 14:15:46 +03:00
arnaud.morvan@camptocamp.com
63d23d2905 Processing - Support no geometry in VectorWriter 2016-05-17 14:16:15 +02:00
Denis Rouzaud
8071acd064 move PyQt compat folder to python/qgis 2016-04-29 14:10:26 +02:00
Juergen E. Fischer
2526d3e3c8 processing: switch to pyqt wrappers, flake8 fixes 2016-03-21 17:00:25 +01:00
Juergen E. Fischer
c6d921729e python fixes:
* issues identified by pyflakes (star and unused imports)
* pyqtwrapper: add QtSvg
* some exceptions e.message => unicode(e)
* some translations tr("..." % foo) => tr("...") % foo
* TODO:
  python/console/console_sci.py:547 QsciScintillaCompat?
  python/plugins/db_manager/dlg_query_builder.py:304 pop_up_error?
2016-03-15 17:25:23 +01:00
Alexander Bruy
dbd83b3ee1 Merge pull request #2733 from nirvn/processing_memory_datetime
[processing] add date, datetime, time fields to memory output
2016-02-04 20:10:51 +02:00
nirvn
427b9c9734 [processing] add date, datetime, time fields to memory output
(fixes #14163)
2016-02-01 09:09:33 +07:00
Nyall Dawson
cbe8cb7282 Formatting update, using newer autopep8 version 2016-01-30 09:33:24 +11:00
Alexander Bruy
9193d8f5a0 [processing] drop GdalScriptAlgorithm as it is not used
Also remove OgrAlgorithm base class at it almost completely duplicates
GdalAlgorithm class. All affected algorithms updated accordingly.
2016-01-22 15:47:20 +02:00
Juergen E. Fischer
9a89408b72 indentation update 2015-11-10 20:21:10 +00:00
volaya
55c18a5e45 [processing] fixed creation of vector layer as PostGIS Table
fixes error introduced in last commit
2015-11-09 08:50:54 +01:00
rldhont
e4996d77cd [processing] allow output directly on Spatialite tables
like 11b5092140f5a966dbb2d85cb64face1e927ff90 but for Spatialite
2015-11-06 17:54:58 +01:00
volaya
11b5092140 [processing] allow output directly on PostGIS tables 2015-11-06 11:36:27 +01:00
Juergen E. Fischer
f996c54776 indentation update 2015-10-30 23:30:16 +01:00
arnaud.morvan@camptocamp.com
fa12502995 [Processing] Add precision parameter to by location algorithms 2015-09-29 14:25:12 +02:00
Juergen E. Fischer
b39055b39c indentation update (now including autopep8) 2015-08-22 14:29:41 +02:00
Matthias Kuhn
9fc1b48bf3 Replace str() with unicode() and some PEP 8 2015-08-16 20:58:43 +02:00
volaya
38a247f26c [processing] fixed attribute types in memory layers
fixes #12894
2015-06-23 14:15:08 +02:00
Juergen E. Fischer
e748281667 processing: add uuid parameter to memory: outputs (followup f64730e) 2015-02-17 21:41:26 +01:00
Juergen E. Fischer
956c155e8f fix python pep8 warnings and fix some revealed errors
pep8 --ignore=E111,E128,E201,E202,E203,E211,E221,E222,E225,E226,E227,E231,E241,E261,E265,E272,E302,E303,E501,E701 \
     --exclude="ui_*.py,debian/*,python/ext-libs/*" \
     .
2015-02-01 20:46:47 +01:00
Alexander Bruy
69fe922a54 [processing] fix VectorWriter class (fix #11875) 2014-12-18 09:18:41 +02:00
volaya
6e334d645a [processing] Added missing field type to vector tools 2014-11-21 15:02:21 +01:00
Alexander Bruy
25fa170539 cleanup in vector utils 2014-10-03 11:40:50 +03:00
Alexander Bruy
6130505c79 [processing] fix vector functions definitions 2014-08-28 09:33:05 +03:00
volaya
dab96382e6 [processing] allow definition of vector fields with plain names and types 2014-08-14 10:58:51 +02:00