9

For past couple of days, i m trying to determine how many mountain peaks are visible (line of sight) from a given location using POSTGIS.

The data i have is DEM for Swiss and address locations from Swiss which are stored in a table in postgis database. I downloaded the mountain peak points from OSM(Open street Map), and then wrote a function in postgis to find if the peak is visible from a given address location using address data from the table, elevation raster(imported in the postgis db), and mountain peak data imported from OSM to POSTGIS...

The Funtion is giving me output but the quality of the results are very poor as OSM mountain peaks are not proper and are not aligned to the mountain peak points in the elevation raster(problem with OSM data Quality). projections are matching of both the layers.. so now to solve this problem i need to get the exact mountain peaks. So i was just wondering if i can extract mountain peaks from elevation raster. with it co-ordinates n elevation.. which i can then used to calculate Line of sight...

can anyone here please help me?? i m not sure if this is possible

Thanks in advance

3
  • It takes some art to do this well, because different landscape types require different operational definitions of "mountain peak." A simple, quick way to identify possible peaks is to compare the DEM to a focal maximum (as illustrated at gis.stackexchange.com/a/50190/664): a "peak" occurs wherever the two rasters agree. By using this comparison as the zone grid in a zonal summary of coordinate grids, you can just as easily and quickly extract all the coordinates of these peaks.
    – whuber
    Nov 15, 2013 at 15:55
  • I already have peak values which i got from OSM but the problem is that the co-ordinates in OSM data are approximate which i cant use to find the line of sight.. That is the reason i m trying to find some mathematical/geometrical expression which can determine the peak points. 1 method i figured is.. I can find the peak points by generating Contour from the DEM of min interval and then use centroid pt of the contour line with max elevation and min area as the peak points of different classification but i know it will be very time consuming n heavy on CPU consumption.
    – Yogendra
    Nov 16, 2013 at 5:32
  • gis.stackexchange.com/questions/84043/…
    – user31059
    Jun 5, 2014 at 14:41

3 Answers 3

6

There's a really good academic GIS paper on this topic:

Chaudhry, O. Z., & Mackaness, W. A. (2008). Creating Mountains out of Mole Hills: Automatic Identification of Hills and Ranges Using Morphometric Analysis. Transactions in GIS, 12(5), 567–589. https://era.ed.ac.uk/bitstream/handle/1842/2385/Appendix%20V.pdf?isAllowed=y&sequence=1

1
  • Unfortunately, we did not meet at the ITC, however, we could make it her in the GIS SE :)
    – Taras
    May 9, 2022 at 15:29
4

There are probably a few different ways to do this. I can think of two here. Someone else can probably find a more elegant solution.

1.) If there are not many peaks, or if your study area is small, you could simply extract the peaks manually by viewing them in any GIS software. Simply add a point at every peak, use a function to assign the raster value (elevation) to the point attribute table, and you are done.

2.) If there are many peaks, or if your study area is large, you could reclass the DEM so that everything below a certain value is null and everything above a certain value is "1". That value is best based off your knowledge of the study area. The goal would be to find a value that nulls almost all of the DEM, leaving only the highest areas of peaks as "1". Once you have your Null, 1 raster simply convert 1 values to polygons and then take the geometric center of those polygons as peak locations. Assign the peak points the value taken from the original DEM raster and you are done. This method won't be exact, since we are assuming that the center of the "peak" polygons is the actual highest point.

2
  • To improve on method 2) you could also find the highest elevation value in each 'peak' after nulling the lower values, rather than just using the centroid. Nov 15, 2013 at 13:20
  • 1
    Thanks for a quick reply.. I already have peak values which i got from OSM but the problem is that the co-ordinates in OSM data are approximate which i cant use to find the line of sight.. That is the reason i m trying to find some mathematical/geometrical expression which can determine the peak points. 1 method i figured is.. I can find the peak points by generating Contour from the DEM of min interval and then use centroid pt of the contour line with max elevation and min area as the peak points of different classification but i know it will be very time consuming n heavy on CPU consumption.
    – Yogendra
    Nov 16, 2013 at 5:33
3

I am getting your point but can you just elaborate your conclusion and expectation?.

I got https://stackoverflow.com/questions/9074202/opencv-2-centroid to calculate centroid for contour..

Hope this link will helpful to your work Regards

2
  • when i calculate the Centroid of the contours the resulting point wont give me the exact peak point of the mountain (i.e. the pixel with the highest elevation point of a mountain) whine i need to calculate to see if the mountain is visible from a random position in the locality.. if i take a point with centroid as peak point this point may lie on the shadow part of the mountain.. and the problem is to calculate the line of sight i m using the pitch angle to see a points visibility.. this link might help u.. davidrowley.blogspot.in/2013/08/…
    – Yogendra
    Nov 19, 2013 at 10:14
  • i have a scatch of my expectation done in paint which i would like to mail you this file... here is my email id [email protected]
    – Yogendra
    Nov 19, 2013 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.