Re: [QGIS-Developer] GetFeatureInfo, difference between JSON/XML

2020-04-19 Thread Alessandro Pasotti
On Sun, Apr 19, 2020 at 3:13 PM Tom Palan  wrote:
>
> Hi,
>
> could somebody please explain why the fetching of a GetFeatureInfo
> request in application/json format instead of text/xml does need to
> query the layer again to get the feature values, again?
>
> I am talking about qgswmsrenderer.cpp, method convertFeatureInfoToJson,
> around line 2167. The conversion to json is the only one that needs to
> re-fetch the feature data instead of using the "result" (QDomDocument)
> directly.
>
> Is this because we need to get the correct field types for json
> conversion instead of returning just string values? Is this a real
> necessity?
> I noticed this because a postgis layer had problems with its id-column,
> and the json request failed while the xml request worked just fine. Of
> course the id-column will be fixed, but the re-fetching of every
> feature are also means that in the best case the db-query count goes up
> from 1 to 1+.
>
> Thanks for your input,
> Tom
>


AFAICS there is no good reason, the dom document is only used to get
the layers list, if you are on it I would recommend you to skip the
line

QDomDocument result = featureInfoDocument( layers, mapSettings,
outputImage.get(), version );

in case the format is json and pass in the list of layers to render
instead of the doc to QgsRenderer::convertFeatureInfoToJson.

To give you some more context, json export format was implemented
recently, after the server refactoring that happened in 3.0, perhaps
this is the reason why it was added as another "switch" in the format
list.


-- 
Alessandro Pasotti
w3:   www.itopen.it
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] GetFeatureInfo, difference between JSON/XML

2020-04-19 Thread Tom Palan
Hi,

could somebody please explain why the fetching of a GetFeatureInfo
request in application/json format instead of text/xml does need to
query the layer again to get the feature values, again?

I am talking about qgswmsrenderer.cpp, method convertFeatureInfoToJson,
around line 2167. The conversion to json is the only one that needs to
re-fetch the feature data instead of using the "result" (QDomDocument)
directly.

Is this because we need to get the correct field types for json
conversion instead of returning just string values? Is this a real
necessity?
I noticed this because a postgis layer had problems with its id-column, 
and the json request failed while the xml request worked just fine. Of
course the id-column will be fixed, but the re-fetching of every
feature are also means that in the best case the db-query count goes up
from 1 to 1+.

Thanks for your input,
Tom


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] EditInPlace Processing script

2020-04-19 Thread uclaros
Hi Matteo,
not sure what exactly you want to achieve, but you can do a union and
dissolve by doing a buffer with zero buffer distance and enabling the
dissolve result checkbox.

Regards,
Stefanos




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Plugin [2032] Queensland property boundaries approval notification.

2020-04-19 Thread noreply

Plugin Queensland property boundaries approval by pcav.
The plugin version "[2032] Queensland property boundaries 1.3" is now approved
Link: http://plugins.qgis.org/plugins/qld_property_boundaries/
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer