Monday, 28 March 2016

qgis - Contour lines with imported shapefile using Blender GIS - wrong Z values


I've been making experiments with Blender GIS and QGIS.


I'm having problems when importing Shapefiles with contour lines, with a field for elevation (ELEVATION FROM FIELD selected when importing).


I'm describing them below (Blender 2.75 and QGIS 2.10).





  1. When there are contour lines that have no value for elevation (in QGIS for example, Z is NULL) mixed with contour lines that have values, Blender GIS cannot load the SHP. This is no real problem actually, since it's easy to fix in QGIS.




  2. Now the real problem: when I import a shapefile into Blender with all the contour lines with Z values, it worked with a shapefile with only 3 contour lines (3 features in QGIS), with Z values 20, 40 and 60.




But when I imported a shapefile with 49 contour lines (49 features in QGIS) with Z values from 0 to 800 (20m interval), the import result was very messy. It appeared that the contour lines assumed random values, but still inside the original values from the shapefile.


enter image description here


Now the fun part: when importing, instead of selecting ELEVATION FROM FIELD, if I select EXTRUSION FROM FIELD, everything is right.



enter image description here


Then I can just delete the 0 value vertices and I end up with just the contour lines in the right Z position (so I can apply Delaunay triangulation to have a surface).


enter image description here


So, conclusion is, I can reach the final result I want, but it needs a bit more working.


Anyone have an idea of what is going on with ELEVATION FROM FIELD selected?



Answer



Solved!


I've e-mailed the developer (Dominique Lyszczarz), and sent him the SHP. Turned out it was a bug in the add on. He corrected it and now it's working fine!


I've added some images to illustrate the import results. I've used a 1375 contour lines (features) SHP. But I'm still to push the limit!


The SHP imported into Blender: enter image description here



TIN model out of the contour lines (also from Blender GIS add on): enter image description here


Perspective view of the TIN model and the contour lines: enter image description here


If someone wants to try it, just a tip: delete all the NULL value geometries/features, otherwise Blender GIS won't load it.


Now, to refine the model, it's just a matter of adding contour lines where necessary, before importing the SHP into Blender.


Hope it helps anyone looking for 3D representation using contour lines.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...