Bug report #12114
QGIS Server: proper handling of NULL values in GetFeatureInfo response
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Jürgen Fischer | ||
Category: | QGIS Server | ||
Affected QGIS version: | 2.6.0 | Regression?: | No |
Operating System: | All | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 20308 |
Description
Currently, QGIS server does not properly display NULL values as "NULL" string. String data types appear as empty string "", numeric types appear as "0" - which is clearly wrong and misleading.
Intended behaviour:
QGIS should write "NULL" or the corresponding NULL-Value representation in the response of the GetFeatureInfo request.
Question:
in QGIS desktop we have a setting for in Settings -> Options -> data sources --> Representation of NULL values
- how do we handle this in server context? An environment variable? Could "NULL" be the default, if no setting is specified?
Tested with PostgreSQL layers.
Associated revisions
History
#1 Updated by Jürgen Fischer over 9 years ago
- Assignee set to Jürgen Fischer
#2 Updated by Jürgen Fischer over 9 years ago
- Status changed from Open to Closed
Fixed in changeset 1e9774fdcf3fca2f9d1fa9165f874e7f450c34ff.
#3 Updated by Jürgen Fischer over 9 years ago
- Status changed from Closed to In Progress
For the configuration QSettings
is used. You can use the enviroment variable QGIS_OPTION_PATH
to set where your ini file lives, put a QGIS.ini
there and set the representation with:
[Qgis] nullValue=foobar
#4 Updated by Jürgen Fischer over 9 years ago
- Status changed from In Progress to Closed