Qgis2threejs
Qgis2threejs copied to clipboard
Relative to DEM mode on lines is not picking up z values
Hello Minoru, Thank you very much for your effort on the plugin, it is amazing and very useful. I have an issue where the lines are not picking up the z values from the DEM. I have attached some screenshots, which describe the issue by themselves.
Would you know if this is a bug and if there is a workaround?
Many thanks!
Since elevation values are taken from the DEM only at vertices of linestrings, a part of the line will be hidden if there is a mountain between two vertices. You can split the linestring to short segments so the linestring appears above the mountain.
The generated result is not expected. It can be said that this is a bug.
I also have this same issue and I cannot properly use any points, lines, or polygons at any scale. The "relative to DEM" just doesn't seem to be working at all :(
I'm using QGIS 2.16.2
I think I have the same problem. Relative to DEM mode doesn't give vector layers draped on DEM, they appear flat as in this screenshot :
Hi @minorua , any luck finding where this bug might be? Thank you for all your help and support keeping this awesome tool alive :+1:
@minorua is it possible for me to sponsor this bug getting fixed? It is critical in my occupation and I am willing to help throw money at this to get it resolved. I couldn't find a pay-pal or sponsor link on this page or the documentation site either. :(
This might be a CRS issue. Is each layer CRS correctly set? When on-the-fly CRS transformation is enabled, are the data correctly drawn on the map canvas?
--- "relative to DEM" works for me.
@goney3 Thanks, but I don't need money to help solve this issue :|
@minorua I've re-projected all data to EPSG 3857, both the raster elevation as well as my line. It won't work in either On-The-Fly or as a set 3857 projection. With it in 3857 I no longer get the "degrees" error message, but the results are the same as all the screenshots above in this thread. Is it because its a geo-tiff and not a ".hgt" file? The hills will render as with your example, but in QGIS v2.18 the line refuses to be relative to the DEM :(
I just tried using SRTM elevation data as well (geo-tiff), same problem. Could it be my projection choice of 3857? I'm only using two layers to see if I can get it to work: elevation and a single line. I've ran validity tools, topology checkers, any valid results don't work either. So I'm left to scratch my head on what to try next?
@minorua I am facing the same problem than @goney3 since I downloaded the LasPalmas QGIS version. could it be related somehow? My projects using "relative to DEM" mode worked perfectly with the previous version. Once again, thanks a lot for this great tool and support.
Hello Minoru,
it's a big big problem for me too. I use your plugin intensivly for major and minor projects. Is it possible, that you offer the previous version in the repository?
Actually, i have a major project "Windmills".
And this is the result now in the latest version:
Please find a solution for this big problem soon.
Thank you very much Best regards Joachim
My qgis-version is 2.14.7 Essen. Joachim
@jodeutmann Previous version can be downloaded from the version page linked from "Versions" tab in the plugin page.
Hi, thank you for your quick answer, I think it is a problem with qgis 2,14..., not with your plugin, because. I deinstall qgis2threejs v1.4 and install qgis2threejs v1.3 and i get the same problem as above.
If i choose "build frame" instead of "build sides" i get a python error:
**Ein Fehler trat bei der Ausführung von Python-Code auf:
NameError: global name 'clip_option' is not defined Traceback (most recent call last): File "C:/Users/deutmannj/.qgis2/python/plugins\Qgis2threejs\qgis2threejsdialog.py", line 530, in run ret = exportToThreeJS(export_settings, self.iface.legendInterface(), self.objectTypeManager, self.progress) File "C:/Users/deutmannj/.qgis2/python/plugins\Qgis2threejs\qgis2threejsmain.py", line 472, in exportToThreeJS writeSimpleDEM(writer, demProperties, progress) File "C:/Users/deutmannj/.qgis2/python/plugins\Qgis2threejs\qgis2threejsmain.py", line 602, in writeSimpleDEM if properties.get("checkBox_Frame", False) and not clip_option: NameError: global name 'clip_option' is not defined
Python-Version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] QGIS-Version: 2.14.7-Essen Essen, ed8807c
Python-Pfad: C:/Users/deutmannj/.qgis2/python/plugins\processing C:/Users/deutmannj/.qgis2/python/plugins\postgis_geoprocessing C:/Users/deutmannj/.qgis2/python/plugins\ntv2_transformations C:/PROGRA~1/QGIS2~1.14/apps/qgis-ltr/./python C:/Users/deutmannj/.qgis2/python C:/Users/deutmannj/.qgis2/python/plugins C:/PROGRA~1/QGIS2~1.14/apps/qgis-ltr/./python/plugins C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\site-packages\matplotlib-1.3.1-py2.7-win-amd64.egg C:\Users\deutmannj.qgis2\python\plugins\geoserverexplorer\ext-libs\httplib2-0.8-py2.7.egg C:\Users\deutmannj.qgis2\python\plugins\geoserverexplorer\ext-libs\python_dateutil-2.2-py2.7.egg C:\Users\deutmannj.qgis2\python\plugins\geoserverexplorer\ext-libs\six-1.10.0-py2.7.egg C:\Users\deutmannj.qgis2\python\plugins\geoserverexplorer\ext-libs\requests-2.5.0-py2.7.egg C:\Users\deutmannj.qgis2\python\plugins\geoserverexplorer\ext-libs\gsconfig-1.0.6-py2.7.egg C:\Users\deutmannj.qgis2\python\plugins\geoserverexplorer\ext-libs\gisdata-0.5.4-py2.7.egg C:\Users\deutmannj.qgis2\python\plugins\geoserverexplorer\ext-libs\gsimporter-1.0.0-py2.7.egg C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\site-packages\nose-1.3.3-py2.7.egg C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\site-packages\tornado-4.0.1-py2.7-win-amd64.egg C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\site-packages\backports.ssl_match_hostname-3.4.0.2-py2.7.egg C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\site-packages\certifi-14.05.14-py2.7.egg C:\PROGRA~1\QGIS2~1.14\bin\python27.zip C:\PROGRA~1\QGIS2~1.14\apps\Python27\DLLs C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\plat-win C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\lib-tk C:\PROGRA~1\QGIS2~1.14\bin C:\PROGRA~1\QGIS2~1.14\apps\Python27 C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\site-packages C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\site-packages\PIL C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\site-packages\jinja2-2.7.2-py2.7.egg C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\site-packages\markupsafe-0.23-py2.7-win-amd64.egg C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\site-packages\pytz-2012j-py2.7.egg C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\site-packages\win32 C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\site-packages\win32\lib C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\site-packages\Pythonwin C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\site-packages\wx-2.8-msw-unicode C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\site-packages\xlrd-0.9.2-py2.7.egg C:\PROGRA~1\QGIS2~1.14\apps\Python27\lib\site-packages\xlwt-0.7.5-py2.7.egg C:/Users/deutmannj/.qgis2//python C:/Users/deutmannj/.qgis2/python/plugins\DataDrivenInputMask C:\Users\deutmannj.qgis2\python\plugins\DigitizingTools\tools C:\Users\deutmannj.qgis2\python\plugins\geoserverexplorer\ext-libs C:\Users\deutmannj.qgis2\python\plugins\HouseNumbering/forms C:\Users\deutmannj.qgis2\python\plugins\mmqgis/forms C:\Users\deutmannj.qgis2\python\plugins\opeNoise\tools . C:\Users\deutmannj.qgis2\python\plugins C:/Users/deutmannj/.qgis2/python/plugins\qgis_resource_sharing C:\Users\deutmannj.qgis2\python\plugins\qgis_resource_sharing C:\Users\deutmannj.qgis2\python\plugins\qgis_resource_sharing\ext_libs C:\PROGRA~1\QGIS2~1.14\apps\qgis-ltr\python\plugins\fTools\tools
If i use your latest version 1.4 in qgis 2.8.2, there are no problems.
@minorua Hello, do you have any idea to solve this problem in the near future? It would be very nice, if you can solve it soon. Thank you very much best regards Joachim
Hello, next test: using the same project with the same parameters in qgis2threejs 1.4.2 and than i take a look in the files "test_282.js" and "test_2147.js".
- in QGIS 2.82 i produce the "test_282.js" file.
- in QGIS 2.14 i produce the "test_2147.js" file.
The main difference between the files is, that the "zs: " parameter in the file created with QGIS 2.14.7, is always "0.0".
The both results of using qgis2threejs you can see in the zip-files below. I hope this is helpful for you for solving the problem.
Best regards Joachim Deutmann
@minorua Hello, after a few more tests* i think, it is not a major problem of QGIS or your plugin. A complete uninstall of QGIS and a complete delete of all registry entries, that correspond with qgis or your plugin and deleting the folder .qgis2 and then a complete fresh install of QGIS and qgis2threejs doesnt have any effect. The problem (see above) is still alive. So, i think that i have to search the failure in my operating system Win7. Do you have any idea, where? best regards Joachim Deutmann
- installations of QGIS 2.14 and qgis2threejs on different computers work without any problem
Test now: uninstall and reinstall of JAVA is no solution for the problem.
It seems, that this is a problem with my user profile or with the registry, because :
Login with a different user on the same computer, and everything works fine, login with my current user and the problem occurs again. Do you have an idea, why?
Thanks and best regards Joachim Deutmann
Gave me a clue: removing ~/.qgis2 and ~/.config/QGIS folders then installing the plugin again solved the problem for me (on Debian, I don't know how to deal on Windows).
In Windows, QGIS settings are stored in registry.
@privatemajory @minorua Thank you very much for your comments, but my problem is more difficult. Uninstall of QGIS and deleting .qgis2 doesn't have any effect. See my comment 4 days ago. I also delete all (i think) registry entries, related to qgis or qgis2threejs, but the problem is still there. So i think, it is a problem beside QGIS or qgis2threejs settings. My last chance is to drop my user account and create a new one, but this step is to big at this time, so i hope that you have any idea.
But wait, when I install a set of plugins the problem occurs again! It seems like plugins break others or something like that. Installation of Semi-automatic Classification Plugin, for example, broke the things and even when I uninstall the plugin the problem remains until I clear the ~/.qgis2 folder. Hope this helps @minorua @jodeutmann.
@privatemajory @minorua
now, after several tests and comments in this forum, i go the hard way: first, I have delete my windows user profile and the users registry (HKEY_CURRENT_USER) completly from my computer. Then i have delete the folder .qgis2 completly.
Next, my it-administration setup a new profile for me (i lost all my settings of any programs...). So, i get a clear version of my windows and a clear version of my QGIS 2.14.14.
After that, i have install qgis2threejs and open one of my 3D-projects.
Here is the result:
Everything is OK now. The problem has an solution... but it was an hard one. And very bad: i have no idea where the problem was exactly.
Nevertheless, thank you for very much your support!
Best regards
Glad you found a solution!
Hi,
I'm arriving at this thread because I had a small scare. At first my polygons were draping well over the surface, and then later I was running into the same bug as mentioned here. I realized that the problem was that I was working with 4 separate DEM tiles. So, one was selected in the "DEM" panel of the plugin settings, and the other three were selected in "Additional DEMs".
![screen shot 2018-03-08 at 10 57 06](https://user-images.githubusercontent.com/32238159/37144833-838d76a2-22bf-11e8-93cd-9aa660bf768f.png)
Well, it turns out that the "Relative to DEM" height setting for polygons only considers the one DEM selected in the "DEM" panel, so if your polygons fall outside of that DEM, you will have problems.
Thus, a best practice is to work with a single DEM. That being said, it would be nice if each polygon took its height cues from the DEM it intersects, if additional DEMs are selected. Otherwise there is very little functionality in the "Additional DEMs" feature.
This may not be what universally causes this issue, but I figured this comment would be helpful to others like me who may run into trouble for the same reason.
Thanks (and thanks for the great plugin!), Daniel R.