Closed sgrellet closed 7 years ago
When testing the URIs above on release 1.1.4 I have the stack trace below. Testing on URI that do not contain nested Allow nested FeatureCollection/members and /or Handle multi geometries works fine though (ex: http://ressource.brgm-rec.fr/data/Piezometre/02713X0132/PZ-8.2 or https://forge.brgm.fr/svnrepository/epos/trunk/instances/BoreholeView.xml). The stack trace:
UnboundLocalError: local variable 'layer' referenced before assignment Traceback (most recent call last): File "C:/Users/grellets/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gml_application_schema_toolbox\gui\xml_tree_widget.py", line 272, in onResolveNewLayer new_layer = load_as_xml_layer(uri, True, swap_xy=self.swap_xy) File "C:/Users/grellets/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gml_application_schema_toolbox\core\load_gml_as_xml.py", line 55, in load_as_xml_layer return s.load_complex_gml(xml_uri, is_remote, attributes, geometry_mapping, logger, swap_xy) File "C:/Users/grellets/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gml_application_schema_toolbox\core\load_gml_as_xml.py", line 305, in load_complex_gml self._add_properties_to_layer(layer, xml_uri, is_remote, attributes, geometry_mapping) UnboundLocalError: local variable 'layer' referenced before assignment
Indeed, the "Swap X/Y" feature does not work well on multi polygons. Working on it ...
Fixed
Tested on v1.2.0-rc2 and the 3 URIs above work now in XML Mode and cannot be tested in GMLAS mode because of #53. However the 3 geom are wrongly located (near Somalia); still the swap issue (#7). From memory the geom was fine in GMLAS mode on those 3 URIs.
same as above under GMLAS toolbox plugin : v1.2.0-rc3 Python : 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] QGIS : 3.0.1-Girona Girona, a86bec25ebw
same as above under GMLAS toolbox plugin : v1.2.0-rc4 Python : 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] QGIS : 3.0.1-Girona Girona, a86bec25ebw
Can you explain "same as above" ? For me it works for both XML and GMLAS modes, with the same X/Y orientation.
tested ok on GMLAS toolbox plugin : v1.2.0-rc6 (both XML and relational mode) Python : 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] QGIS : 3.0.1-Girona Girona, a86bec25ebw tested using the 3 URIs above
As for the "same as above" it refers to the fact that the geom is not correctly located (specific to that WFS flow). Will give more input in #7
FeatureCollection / Member should just be considered as containers of domain features
When loading the following URIs in XML Mode
it considers the information source is the FeatureCollection. But the first one is empty (related to a Geoserver app-schema configuration issue).
When loading this 3rd URI : http://ressource.brgm-rec.fr/data/EntiteHydroGeol/121AT30 The first feature collection contains something, then the feature is correctly displayed (not sure it is properly handled see other issue #30 )
Note that in mode GDAL GMLAS, GMLAS drivers identifies properly the information source with those 3 URIs and does not propose FeatureCollection nor Member