Rank: 3243 based on 15 downloads (last 30 days) and 1 file submitted
photo

Demetris Stathakis

E-mail

Personal Profile:

http://www.stathakis.org

Professional Interests:

 

Watch this Author's files

 

Files Posted by Demetris
Updated   File Tags Downloads
(last 30 days)
Comments Rating
22 Feb 2010 DEM to volumetiric converts a Digital Elevation Model (or 2.5D data) to a volumetric raster (or true 3D data) Author: Demetris Stathakis fractal dimension, volumetric, box count, dem, digital elevation mod... 15 1
Comments and Ratings on Demetris' Files
Updated File Comment by Comments Rating
22 Feb 2010 DEM to volumetiric converts a Digital Elevation Model (or 2.5D data) to a volumetric raster (or true 3D data) Author: Demetris Stathakis Schwanghart, Wolfgang

While this function has a reasonable help, it lacks various features that I'd wish to see in the future to make this function valuable for others. First, provide a h1 line. It's the first line in your help block and can be found by lookfor. Currently, your h1 line is empty and thus the function can never be found.

You allocate a 3d-array of zeros which you subsequently fill with ones in 3 nested while loops. If there are only ones and zeros, why don't you use a logical array. It requires much less memory than using double precision.

In line 9 you than call the function zeros in following manner:
XYZ = zeros(size(XY,1), size(XY,2), max(max(XY)));

This may produce a warning (actually I was wondering that it not even returns an error) for DEMs with a maximum elevation that is not an integer value.
Warning: Size vector should be a row vector with integer elements.

As such, you implicitly assume that everyone uses integer representations of DEMs, that may often be not the case. Moreover, wouln't it be better to give the user more control on how your function handles pixel to voxel conversion? I think, you should allow the user to define a base level (now it will always be the sea level or another fixed reference value) and vertical resolution of the generated 3d-array. Moreover, I'd like to see that the function returns a coordinate system for the 3d array (for example by calling meshgrid(x,y,z) or so.

Currently the function is heavily looped and I am sure there are ways to make it computationally more efficient.
 

Top Tags Applied by Demetris
box count, dem, digital elevation model, fractal dimension, volumetric
Files Tagged by Demetris
Updated   File Tags Downloads
(last 30 days)
Comments Rating
22 Feb 2010 DEM to volumetiric converts a Digital Elevation Model (or 2.5D data) to a volumetric raster (or true 3D data) Author: Demetris Stathakis fractal dimension, volumetric, box count, dem, digital elevation mod... 15 1

Contact us at files@mathworks.com