Matthias Kuhn
44e32e18c0
Fix tests for new QgsVectorFileWriter python API
2017-09-19 11:00:49 +02:00
Even Rouault
7d67b02ae4
[OGR] Use OGR_F_SetFieldNull() with GDAL >= 2.2 to avoid GeoJSON fields to be unset ( fixes #16812 )
2017-07-08 14:01:10 +02:00
Matthias Kuhn
881dfef3c9
Fix python test imports
2017-06-02 19:53:37 +02:00
Matthias Kuhn
a9d7630a69
Rename QgsPointV2 to QgsPoint and QgsPoint to QgsPointXY
...
Because 3D coordinates should be the default.
References https://github.com/qgis/qgis3.0_api/issues/36
2017-06-02 19:53:37 +02:00
Nyall Dawson
ce4f93b410
Add method to retrieve corresponding OGR driver from a file extension
2017-05-03 17:13:05 +10:00
Nyall Dawson
428ca7b033
Update indentation
2017-04-22 20:13:18 +10:00
Nyall Dawson
d2f3eb1ba5
Much faster save as vector layer when using restricted extent
...
Use a provider filter rect to avoid looping through every single
feature in this case, and also use a prepared extent geometry
to speed up the remaining intersection checks.
2017-04-06 16:57:54 +10:00
Nyall Dawson
26495dbd81
[processing] Move dataobjects.getSupportedOutputVectorLayerExtensions
...
to QgsVectorFileWriter
2017-04-03 15:41:32 +10:00
Juergen E. Fischer
c77172ed3d
fix more flake8 warnings
2017-03-05 10:21:24 +01:00
Nyall Dawson
b0bc763475
Bump minimum GDAL version to 2.0, remove old version #ifdefs
2017-01-03 15:10:28 +10:00
Even Rouault
34894c6f5a
[FEATURE] Vector layer save as: offer file/layer overwriting, new layer creation, feature and field appending
...
When saving a vector layer into an existing file, depending on the capabilities
of the output driver, the user can now decide whether:
- to overwrite the whole file
- to overwrite only the target layer (layer name is now configurable)
- to append features to the existing target layer
- to append features, add new fields if there are any.
All above is available for drivers like GPKG, SpatiaLite, FileGDB, ...
For drivers like Shapefile, MapInfo .tab, feature append is also available.
2016-10-13 11:38:41 +02:00
Matthias Kuhn
4a7a8ff263
Update python code
2016-10-01 15:39:03 +02:00
Nyall Dawson
d49b656055
Permantly convert python tests to python 3
2016-09-21 09:12:54 +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
Even Rouault
400a4d70a5
[QgsVectorFileWriter + OGR provider] Create Integer64 fields as Real fields when output driver doesn't support Integer64
...
Fix #15405
2016-08-08 15:53:19 +02: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
Matthias Kuhn
50c7970ed4
Use unittest assertXXX methods
2016-05-22 21:52:55 +02:00
Even Rouault
abd182c50c
Merge pull request #3061 from rouault/saveas_human_readable_values
...
[FEATURE] Export vector layer with "human-readable" values from edit widgets
2016-05-14 14:23:10 +02:00
Even Rouault
038b3b7950
QgsVectorFileWriter: add capability to export displayed values of fields (typically coming from edit widgets) instead of their raw values
2016-05-14 12:33:10 +02:00
Matthias Kuhn
af1de6e3e0
Migrate more tests to Python3
2016-05-14 00:02:20 +02:00
Denis Rouzaud
8071acd064
move PyQt compat folder to python/qgis
2016-04-29 14:10:26 +02:00
Matthias Kuhn
c268f7e996
Run next_call fixer on tests
2016-04-15 09:20:39 +02:00
Nyall Dawson
83036886b7
Fix test failure on GDAL >= 2.0
2016-04-15 07:52:12 +10:00
Nyall Dawson
23daead08b
Fix PyQgsVectorFileWriter test on Windows
2016-04-13 15:42:24 +10:00
Matthias Kuhn
c825f46534
Writing shapefiles with Z dimensions is gdal version dependent
2016-04-09 09:48:46 +02:00
Nyall Dawson
cbad546b09
Followup 99d5e4, add unit tests
2016-04-04 06:20:07 +10:00
Juergen E. Fischer
f41304637c
switch tests to pyqt wrappers
2016-03-21 17:00:26 +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
Matthias Kuhn
c79aeba0db
Python unittest.expectedFailure improvements
...
Raises an _UnexpectedSuccess exception
Takes a boolean parameter with a condition under which the test is
expected to fail
2016-02-26 13:40:53 +01:00
Nyall Dawson
ae347bfd89
Followup fb7c683, 4e4743
2016-02-26 19:05:46 +11:00
Nyall Dawson
fb7c683969
Temporarily disable test which unexpectedly fails on Travis
2016-02-26 16:29:13 +11:00
Nyall Dawson
4e4743a2cd
Fix saving vector layers with z dimension ( fix #14006 , #12373 )
2016-02-26 15:07:35 +11:00
Juergen E. Fischer
76fcb1f7c9
PyQgsVectorFileWriter: fix comment (followup 17f20bb)
2016-02-26 02:01:17 +01:00
Juergen E. Fischer
17f20bbb36
PyQgsVectorFileWriter: adapt to a3f03f02
2016-02-25 20:31:20 +01:00
Juergen E. Fischer
5c4bf99ce2
debian packaging update: manually merge some changes from PR#2818 and
...
some spelling fixes.
2016-02-20 16:55:16 +01:00
Matthias Kuhn
c21889f945
Add qgis.testing module for generic qgis test helpers
2016-02-04 13:36:13 +01:00
Nyall Dawson
49e45675ee
Correct handling of date and time values in mssql provider
2016-01-30 08:33:09 +11:00
Nyall Dawson
7dc5eac8bd
Improve handling of time values in attributes
...
- make QgsVectorFileWriter respect QTime field values and only
convert to string if required by output format
- list time types as native types for memory, postgres and OGR
providers (OGR support depends on file format)
2016-01-28 22:14:25 +11:00
Juergen E. Fischer
b39055b39c
indentation update (now including autopep8)
2015-08-22 14:29:41 +02: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
Juergen E. Fischer
51074d7b82
test fixes:
...
* port python test to sip api v2 (fixes #8314 )
* introduce compareWkt for more tolerant WKT comparisions in C++ tests
* require UTF-8 locale for regression1141 test on linux
2013-07-19 21:59:58 +02:00
Juergen E. Fischer
15539f34ce
more Quantum GIS => QGIS updates
2013-05-30 16:19:19 +02:00
Martin Dobias
9317ffd89a
Merge remote-tracking branch 'origin/master' into new_vector_api
...
Also disabled mapserver until compilation is fixed.
Fixed tests.
Conflicts:
src/app/legend/qgslegendlayer.cpp
src/app/qgsattributedialog.cpp
src/app/qgsattributedialog.h
src/app/qgslabelpropertydialog.cpp
src/app/qgsmaptoollabel.cpp
src/app/qgsvectorlayerproperties.cpp
src/core/CMakeLists.txt
src/core/composer/qgsatlascomposition.cpp
src/core/qgsexpression.cpp
src/core/qgspallabeling.cpp
src/core/qgsvectorlayer.cpp
src/core/qgsvectorlayer.h
src/core/qgsvectorlayerimport.cpp
src/mapserver/qgsprojectparser.cpp
src/mapserver/qgswfsserver.cpp
src/mapserver/qgswfsserver.h
src/mapserver/qgswmsserver.cpp
src/providers/postgres/qgspostgresprovider.cpp
src/providers/spatialite/qgsspatialiteprovider.h
tests/src/core/testqgsexpression.cpp
tests/src/python/test_qgsmemoryprovider.py
2012-12-18 01:35:06 +01:00
Tim Sutton
c98967360e
Test improvements - moved writeShape to utilities for DRY. Added clip test to geometry python tests.
2012-11-28 08:21:11 +02:00
Tim Sutton
1a26f593e2
../src/core/qgsvectorfilewriter.h
2012-11-22 11:03:04 +02:00
Larry Shaffer
6b3aed014f
Better fix for QgsVectorFileWriter segfault and test
...
- Revert test to 735c255 commit, excepting 'assert myResult==QgsVectorFileWriter.NoError' edit
2012-11-21 18:16:15 -07:00
Larry Shaffer
89eb054d44
Fix for PyQgsVectorFileWriter test segfault on Mac
...
- Initialize newFilename to QString(), or QgsDebugMsg for newFilename segfaults (line 650)
- Set test assert to QgsVectorFileWriter::WriterError enum for success (NoError = 0, i.e. false)
2012-11-21 15:59:08 -07:00
Tim Sutton
735c25520c
Mark vector file writer test as expected to fail.
2012-11-15 16:07:36 +02:00
Tim Sutton
3f72a6a593
Added from uri test for mem provider. Simplified the vector writer test.
2012-11-09 15:00:54 +02:00
Tim Sutton
3564eaeb57
Added unit test for vector file writer as it is currently segfaulting in master
2012-11-09 12:42:23 +02:00