Rank: 257 based on 316 downloads (last 30 days) and 13 files submitted
photo

Wolfgang Schwanghart

E-mail
Company/University
University of Basel
Lat/Long
47.56169891357422, 7.58060884475708

Personal Profile:

Professional Interests:
GIS, Physical Geography, Hydrology

 

Watch this Author's files

 

Files Posted by Wolfgang View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
23 Feb 2010 Screenshot variogramfit fits different theoretical variograms to an experimental variogram Author: Wolfgang Schwanghart kriging, geostatistics, optimization, variogram, statistics, spatial statistics 68 0
09 Feb 2010 Screenshot Experimental (Semi-) Variogram calculate the isotropic and anisotropic experimental (semi-) variogram Author: Wolfgang Schwanghart variogram, geostatistics, kriging, spatial modelling, dimensions 78 5
  • 5.0
5.0 | 2 ratings
21 Sep 2009 Screenshot cropmat crop arrays with axis-aligned minimum bounding box Author: Wolfgang Schwanghart matrix, matrix manipulation, image processing 12 0
16 Sep 2009 Screenshot shuffle label randomly relabel a label matrix Author: Wolfgang Schwanghart matrix manipulation, image processing 12 0
15 Jun 2009 Screenshot Line Simplification Recursive Douglas-Peucker Polyline Simplification Author: Wolfgang Schwanghart interpolation, vertex reduction, polyline, approximations, mathematics, approximation 27 3
Comments and Ratings by Wolfgang View all
Updated File 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

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.
 

18 Feb 2010 Flow Accumulation (upslope area) Flow accumulation algorithm that routes through flats Author: Wolfgang Schwanghart

To all: TopoToolbox is now available here: http://physiogeo.unibas.ch/topotoolbox/

TopoToolbox can handle larger grids than wflowacc can and has many more utilities related to digital elevation model analysis.

06 Jan 2010 Nonnan.m A function to ignore NaN values within an single-dimensional array of numbers. Author: Avinash Rude

Sorry, this function is absolutely useless. It can be easily replaced by a one-liner
x2 = x(~isnan(x));

Your function uses a loop and is incredibly slow since it does not preallocate the result vector.

06 Jan 2010 qplot - quicken qif file parsing and plotting Parses and plots data from Quicken qif file Author: Brandon Dewberry

I did not run the function, but note, that there is already a function named qplot. Hence, I'd rename it to avoid a name clash.

12 Aug 2009 IPDM: Inter-Point Distance Matrix An efficient and accurate Inter-Point Distance Matrix Author: John D'Errico

Thanks for this great contribution! Would it, however, be possible that ipdm (in case only data1 is provided) only returns the row and column indices and distances so that they are arranged in the order (distance(rowix,colix)): (2,1), (3,1), ..., (n,1), (3,2), ..., (n,2), ..., (n,n–1)). That is the way pdist (part of the statistics toolbox) returns the distance matrix in a vector to be more memory efficient. pdist, however, does not support distance subsets.

So far, I use this workaround in my code.

% remove distances were d.columnindex = d.rowindex
I = d.columnindex==d.rowindex;
d.columnindex(I) = [];
d.rowindex(I) = [];
d.distance(I) = [];

% remove double entry of pairs
[dtemp, m] = unique(sort([d.rowindex d.columnindex],2),'rows');
d.rowindex = dtemp(:,1);
d.columnindex = dtemp(:,2);
d.distance = d.distance(m);

This reduces the size of d by more than a half. But it doesn't avoid the generation of the huge struct returned by ipdm, which is a real memory bottleneck for me. Would it be possible to calculate this more efficient output within ipdm? So far I don't see a straightforward way, but perhaps you do?

Best regards,
Wolfgang

Comments and Ratings on Wolfgang's Files View all
Updated File Comment by Comments Rating
26 Feb 2010 Experimental (Semi-) Variogram calculate the isotropic and anisotropic experimental (semi-) variogram Author: Wolfgang Schwanghart Kendall, Anthony

Thanks a lot for this function, it works very well (though as you mentioned it is a bit of a memory hog, I had to subsample my data but the variogram was robust).

18 Feb 2010 Flow Accumulation (upslope area) Flow accumulation algorithm that routes through flats Author: Wolfgang Schwanghart Schwanghart, Wolfgang

To all: TopoToolbox is now available here: http://physiogeo.unibas.ch/topotoolbox/

TopoToolbox can handle larger grids than wflowacc can and has many more utilities related to digital elevation model analysis.

17 Aug 2009 Experimental (Semi-) Variogram calculate the isotropic and anisotropic experimental (semi-) variogram Author: Wolfgang Schwanghart Gharasoo, Shazux

sorry, I found out that these values are saved already in variable 'd' as a structure. thanks though

17 Aug 2009 Experimental (Semi-) Variogram calculate the isotropic and anisotropic experimental (semi-) variogram Author: Wolfgang Schwanghart Gharasoo, Shazux

that was what I meant, thank you :)
one more question, how to pass the data that has been plot? i mean here:
plot(out.distance,out.val,marker)
I need to do some curve fitting on those values...

02 Aug 2009 Experimental (Semi-) Variogram calculate the isotropic and anisotropic experimental (semi-) variogram Author: Wolfgang Schwanghart Schwanghart, Wolfgang

Hi Shazux,

the distance measure used here is the euclidean distance. I guess that is what you mean by direct distance, do you?

Best regards,
Wolfgang

Top Tags Applied by Wolfgang
geomorphology, hydrology, image processing, matrix manipulation, digital elevation model
Files Tagged by Wolfgang View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
25 Feb 2010 Screenshot Robust spline smoothing for 1-D to N-D data SMOOTHN allows automatized and robust smoothing in one and higher dimensions w/wo missing values Author: Damien Garcia statistics, smooth, image processing, signal processing 214 5
  • 4.8
4.8 | 5 ratings
23 Feb 2010 Screenshot variogramfit fits different theoretical variograms to an experimental variogram Author: Wolfgang Schwanghart kriging, geostatistics, optimization, variogram, statistics, spatial statistics 68 0
09 Feb 2010 Screenshot Experimental (Semi-) Variogram calculate the isotropic and anisotropic experimental (semi-) variogram Author: Wolfgang Schwanghart variogram, geostatistics, kriging, spatial modelling, dimensions 78 5
  • 5.0
5.0 | 2 ratings
21 Sep 2009 Screenshot cropmat crop arrays with axis-aligned minimum bounding box Author: Wolfgang Schwanghart matrix, matrix manipulation, image processing 12 0
16 Sep 2009 Screenshot shuffle label randomly relabel a label matrix Author: Wolfgang Schwanghart matrix manipulation, image processing 12 0
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com