Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error and crash #298

Open
Shemesh opened this issue Nov 26, 2022 · 3 comments
Open

error and crash #298

Shemesh opened this issue Nov 26, 2022 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@Shemesh
Copy link

Shemesh commented Nov 26, 2022

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
Copy link
Author

Shemesh commented Nov 28, 2022

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
Copy link
Author

Shemesh commented Dec 1, 2022

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)

@minorua minorua added this to the v.2.7.2 milestone Dec 1, 2022
@minorua minorua added the bug Something isn't working label Mar 7, 2023
@minorua
Copy link
Owner

minorua commented Jan 10, 2024

Thanks for your bug report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants