Qgis2threejs icon indicating copy to clipboard operation
Qgis2threejs copied to clipboard

error and crash

Open Shemesh opened this issue 1 year ago • 3 comments

hi, while trying to render a polygon layer the plugin crash with this error. what does it mean?

WARNING Traceback (most recent call last): File "C:\Users/ooo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Qgis2threejs\q3dcontroller.py", line 330, in _processRequests self.buildLayer(item) File "C:\Users/ooo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Qgis2threejs\q3dcontroller.py", line 236, in buildLayer ret = self._buildLayer(layer) File "C:\Users/ooo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Qgis2threejs\q3dcontroller.py", line 275, in _buildLayer obj = builder.build() File "C:\Users/ooo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Qgis2threejs\buildvector.py", line 424, in build d["geom"] = obj_geom_func(f, f.geometry(self.z_func, mapTo3d, self.useZM, be, self.grid)) File "C:\Users/ooo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Qgis2threejs\buildvector.py", line 70, in geometry return TINGeometry.fromQgsGeometry(self.geom, zf, transform_func, File "C:\Users/ooo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Qgis2threejs\geometry.py", line 397, in fromQgsGeometry pt = geometry.centroid().asPoint() ValueError: Null geometry cannot be converted to a point.

Shemesh avatar Nov 26 '22 20:11 Shemesh

I've narrowed my kml down to the problematic point. p.s. using plugin "KML Tools" to import because native qgis don't know to import polygons. here is my kml: what is wrong with it?

<?xml version="1.0" encoding="UTF-8"?> <kml xmlnx="http://www.opengis.net/kml/2.2"> <Document> <name>kkk</name> <Placemark> <altitudeMode>absolute</altitudeMode> <MultiGeometry> <Polygon> <outerBoundaryIs> <LinearRing> <coordinates> 35.541556,32.776548,-1.392 35.541556,32.776548,-1.392 35.541556,32.776548,-1.392 </coordinates> </LinearRing> </outerBoundaryIs> </Polygon> </MultiGeometry> </Placemark> </Document> </kml>

Shemesh avatar Nov 28 '22 11:11 Shemesh

taking a deeper look at the kml (above) seems like the coordinates are all the same. which actually means nothing. @minorua - in such case can the plugin ignore it? (rather than crashing)

Shemesh avatar Dec 01 '22 07:12 Shemesh

Thanks for your bug report.

minorua avatar Jan 10 '24 02:01 minorua