43 Commits

Author SHA1 Message Date
Even Rouault
dc1583bd7c
QgsJsonUtils: add a way to disable use of field formatters
Fixes #58861
2024-09-24 22:49:08 +02:00
Nyall Dawson
ef0289f3ec Fix formatting of Python ..deprecated annotations in docstrings
Fixes https://github.com/qgis/pyqgis-api-docs-builder/issues/174
2024-09-02 11:42:12 +10:00
Nyall Dawson
3a578d6712 Header update 2024-08-13 20:28:55 +10:00
Julien Cabieces
848fb16785 Add \deprecated tag 2024-05-31 08:46:33 +10:00
Julien Cabieces
255d46230a sipify 2024-05-31 08:46:33 +10:00
Julien Cabieces
97f1c8df97 make python API backward compatible 2024-05-31 08:46:33 +10:00
Julien Cabieces
0ccaf2d299 sipify 2024-05-31 08:46:33 +10:00
Julien Cabieces
101a5cccf7 [Feat] Add crs information in WMS GetFeatureInfo output 2024-03-06 19:07:05 +01:00
Even Rouault
15ea5c46bc
Header files: remove all mentions of '\since QGIS 3.0' 2024-02-18 20:57:23 +01:00
Even Rouault
02caeb9db7
Header files: remove all mentions of '\since QGIS 2.' 2024-02-18 20:46:01 +01:00
Nyall Dawson
38691bff84 Expose method to directly convert json object to QVariantMap
All the existing methods require intermediate steps through
encoded strings, which is inefficient if we already have a json
object
2023-12-12 19:40:01 +10:00
Nyall Dawson
a54fbf092d Add optimised methods to convert GeoJSON geometries to QgsGeometry
Allows direct construction of geometries from raw json objects,
instead of requiring translation through another library's geometry
structures.
2023-11-15 05:24:17 +10:00
Alessandro Pasotti
507851224d Server WFS: add srsName support to JSON output 2022-12-14 14:48:22 +10:00
Nyall Dawson
5fd9b209ac [feature] Allow input parameter values for qgis_process to be
specified as a JSON object passed via stdin to qgis_process

This provides a mechanism to support complex input parameters
for algorithms, and a way for qgis_process to gain support
for parameter types which are themselves specified as a dictionary
type object.

To indicate that parameters will be specified via stdin then
the qgis_process command must follow the format

    qgis_process run algid -

(with a trailing - in place of the usual arguments list).

The JSON object must contain an "inputs" key, which is a map
of the input parameter values.

E.g.

    echo "{"inputs": {\"INPUT\": \"my_shape.shp\", DISTANCE: 5}}" | qgis_process run native:buffer -

Specifying input parameters via stdin implies automatically
the --json output format for results.

One big motivation behind this enhancement is to provide a way for
the qgisprocess R libraries to support parameter types such as
aggregates.

Refs https://github.com/paleolimbot/qgisprocess/issues/56
Refs https://github.com/paleolimbot/qgisprocess/issues/44

Sponsored by the Research Institute for Nature and Forest, Flemish Govt
2021-12-20 11:33:50 +10:00
Sandro Mani
f67c071ed1 Remove unused include 2021-08-17 15:30:38 +02:00
nirvn
256dc35a09 Make a couple of QgsJsonUtils accessible via QML environment 2021-06-10 23:12:23 -07:00
Denis Rouzaud
ba8a445850 run sipify 2021-03-22 21:13:52 +01:00
Nyall Dawson
50b9beaad6 [sipify] Catch more class references and insert :py:class: annotations 2021-01-31 05:41:22 +10:00
Nyall Dawson
81a9db9f57 [sipify] Fix creation of cross references 2020-06-15 13:43:58 +10:00
Blottiere Paul
0a2b92ab22 Update sip 2019-10-31 14:15:14 +01:00
Blottiere Paul
e3371fd9be Update sip 2019-10-31 14:15:14 +01:00
Matthias Kuhn
72ebbc0688 Add default values to QgsJsonUtils::stringToFeatureList
Because we can assume the user does not care for fields if he does not specify
them and that UTF-8 is the default except when it's not.
2019-10-28 17:22:12 +01:00
Alessandro Pasotti
92ac7a2e93
[server] Server api and WFS3 (#10016)
Implementation of OGC API and WFS3 core draft specification
2019-08-06 16:38:21 +02:00
Alessandro Pasotti
d2a93501f2 Remove empty lines 2019-06-08 20:32:02 +02:00
Alessandro Pasotti
3ea542a433 Fix json hanlding of bools and complete json(b) PG support
Fixes #30131 and add tests for jsonutils
2019-06-08 20:29:48 +02:00
Alessandro Pasotti
564fd50e43 Fix spatialite handling of JSON arrays
Fixes #21986

plus:

- fix multiple string keys with commas in value relation widget
- more robust JSON and array (un)marshalling
- uniform array representation in value relation widgets
- lot of test coverage
- automatic QVariant type conversions in JSON utils
2019-05-27 09:20:34 +02:00
Juergen E. Fischer
e9a80d6799 fix build 2019-05-12 17:19:50 +02:00
Alessandro Pasotti
ea0a70bd13 Merge branch 'qjson-nlohmann' of github.com:elpaso/QGIS into qjson-nlohmann 2019-05-03 20:15:24 +02:00
Alessandro Pasotti
bd3d75fce8 Indent on JSON export 2019-05-03 19:02:58 +02:00
Alessandro Pasotti
748a73ab80 Fix 3D build 2019-05-02 17:39:50 +02:00
Alessandro Pasotti
63711510b6 Dear Qt, I love you but ...
... you are too slow and QJson API is so ugly.

Now using this wonderful json lib:
https://github.com/nlohmann/json

Results in release mode (QJson tests are not shown but
QJson was even slower than string concat).

PASS   : TestQgsJsonUtils::testExportAttributesJson(Use json)
RESULT : TestQgsJsonUtils::testExportAttributesJson():"Use json":
     0.0022 msecs per iteration (total: 75, iterations: 32768)
PASS   : TestQgsJsonUtils::testExportAttributesJson(Use old string concat)
RESULT : TestQgsJsonUtils::testExportAttributesJson():"Use old string concat":
     0.0032 msecs per iteration (total: 54, iterations: 16384)
PASS   : TestQgsJsonUtils::testExportFeatureJson(Use json)
RESULT : TestQgsJsonUtils::testExportFeatureJson():"Use json":
     0.011 msecs per iteration (total: 96, iterations: 8192)
PASS   : TestQgsJsonUtils::testExportFeatureJson(Use old string concat)
RESULT : TestQgsJsonUtils::testExportFeatureJson():"Use old string concat":
     0.015 msecs per iteration (total: 64, iterations: 4096)
PASS   : TestQgsJsonUtils::testExportGeomToJson(Use json)
RESULT : TestQgsJsonUtils::testExportGeomToJson():"Use json":
     0.76 msecs per iteration (total: 98, iterations: 128)
PASS   : TestQgsJsonUtils::testExportGeomToJson(Use old string concat)
RESULT : TestQgsJsonUtils::testExportGeomToJson():"Use old string concat":
     0.85 msecs per iteration (total: 55, iterations: 64)
PASS   : TestQgsJsonUtils::cleanupTestCase()
2019-04-18 17:04:30 +02:00
Alessandro Pasotti
64fdbe3d76 Added tests and doxy 2019-04-16 15:17:25 +02:00
Alessandro Pasotti
be8822ed8b Precision and 3d 2019-04-16 14:00:59 +02:00
Alessandro Pasotti
722282828e Use QJson for JSON encoding of features 2019-04-16 14:00:59 +02:00
Nyall Dawson
6248bb8eea Fix failing TestQgsJsonUtils 2019-04-02 14:34:46 +10:00
Nyall Dawson
b6d66becab Sipify 2019-02-27 09:41:11 +10:00
Blottiere Paul
7dbc96b614 Update sip 2019-01-28 11:42:14 +00:00
Blottiere Paul
7f19cb81e6 Update sip 2019-01-28 11:42:14 +00:00
Blottiere Paul
8e3f7b131b Update sip 2019-01-28 11:42:14 +00:00
Matthias Kuhn
17279a42e2 Only include qgsvectorlayer.h where required 2018-09-05 08:54:11 +02:00
Nyall Dawson
f8bc97030b Remove extra space added before first line of docstring 2018-05-28 08:22:11 +10:00
Nyall Dawson
38850bdb94 [pyqgis] Ensure that multiline param tags are indented for additional lines 2018-05-27 18:54:09 +10:00
Denis Rouzaud
7df2593caf move auto generated sip file in dedicated folder 2018-05-14 10:23:37 -04:00