The spatial_ref_sys table has srid column with ID of CRS entries.
I believe the IDs can be arbitrary, however it has been a good habit
to use EPSG number for srid (at least in GDAL - and the same thing
happens in PostGIS - srid values are the same as EPSG numbers).
In QGIS import if we add a new row to spatial_ref_sys table, the code
was using srsid() as ID which is internal ID in QGIS srs.db and it has
nothing to do with other IDs. Some pieces of code (probably incorrectly)
expect that srid is actually the EPSG number, so let's use those
so that we are consistent with GDAL and fix these minor issues
(for example, tooltip of MS SQL layers in browser show srid - which
in case of layers loaded with QGIS were meaningless)
Even though not all errors are caught by these new tests, it could
expose if otb is broken or if processing api is changed to adopt
optional status of parameters at run-time.
`alg.processAlgorithm()` is running and failing correctly.
But `parameter.checkValueIsAcceptable()` and `alg.checkParameterValues()`
aren't working as expected.
Parameters are marked required in descriptor file for certian
applications but they are only required if a parent parameter has a
"certain" value. So initial idea was to make all of those parameters
optional from OTB part. So that qgis can work correctly and was a easy
fix. But.. we (me and Antonie) decided not to take that route and
found a better fix.
`OtbParameterChoice` and its wrapper will update optional status of
all sub-parameters depending on the value of a choice parameter.
A test has been added to check this issue and will be available in
next commit.
getWindowsCodePage is taken from Grass7Utils.py
Instead of writing a cli_file at startup, provider now pass all
required env_variables directly to subprocess.popen. This has known to
cause issues when handling with windows path names. subprocess.Popen
handles it correctly depending on platform
Logging of output from otbalgorithm and updating progress bar is
slightly updated.
Algoirthm is now launched directly using otbApplicationLauncherCommandLine
`encoding` (on windows) and env arguments passed to subprocess is
logged in QgsMessageLog
In QGIS Server 2.* the WMS GetPrint request could genrate JPEG image. QGIS Server 3.4 has lost this capabilities.
```
<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0" capture-installed="true">
<ServiceException code="InvalidFormat">
Output format jpg is not supported by the GetPrint request
</ServiceException>
</ServiceExceptionReport>
```
To fix this regression, it is necessary to accept JPEG output format.
And to avoid this regression to come back, the QGIS Server tests has been updated to accept jpg image test.
This class temporarily removes ALL cursor overrides for the
QApplication for the lifetime of the object, and restores them
(in the same order) upon object destruction.