+ Reply to Thread
Results 1 to 2 of 2

Finding Elevation Peaks?

  1. #1
    Registered User
    Join Date
    04-18-2013
    Location
    Edwards, CA
    MS-Off Ver
    Excel 2010
    Posts
    1

    Finding Elevation Peaks?

    Hi All,

    I just finished a programming assignment in C that required to determine peak elevations from a grid, among other things. I usually try to double check all my work in Excel as the built in formulas are quite nifty for that sort of thing. I breezed through the assignment only to hit a stumper in Excel.

    I have no idea how to use Excel to compare the North, South, East, and West neighbor values to determine a true peak.

    Let's say you have 5x5 of elevation values. A true peak can only be determined when N, S, E, & W neighbors exist and are of a lesser elevation. Border values are excluded because they don't have four neighbors, so you're really only working with the bold data.

    2050 2100 2300 2200 1850
    1990 3000 4400 2000 1980
    2000 3300 2000 2150 2150
    2300 4000 2150 6000 2050
    2150 2200 2300 2250 2200

    Therefore, 4000 @B4, 4400 @C2, and 6000 @D4 would be the peaks. I'm really scaling this down for example's sake. The table of values can be massive, but I hope you get the idea.


    Any ideas?
    Last edited by eric_f; 04-18-2013 at 09:21 PM.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,391

    Re: Finding Elevation Peaks?

    Here's how I'd probably start:

    1) In another part of the spreadsheet (or maybe in an adjacent tab, if the data table is large enough), I would build a table of booleans to test for peaks. If done correctly, the peaks would be where the TRUE values are in this second table (pardon my use of r1c1 notation, but I think it makes the formula more readable for something like this):
    Please Login or Register  to view this content.
    I've kind of assumed doing this in a 2nd tab, where the position corresponds to the position of the data point in the "data" tab. The TRUE values should mark the peaks, so now it is a question of whether you would need to do more to "highlight" the TRUE's, or highlight the peaks in the original data, or exactly how you would want to show the results.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1