Getting elevated point details (x and y) in a given area.

mg.srikanthmg.srikanth Global Mapper UserPosts: 27
edited November 2012 in SDK
Hi,
How do I get the most elevated point (x and y)/(lat-lon) in a given area (circle or polygon) or in a given line?

I could draw view shed analysis on the map with the help of TestViewShedCalculation function provided in the sample app. I require to draw the visible area and invisible area of view shed analysis in two different colors (eg. RED for visible and Green for invisible i.e. drawing entire circle), how do i do this?

How do i draw the LOS profile? How do i draw it on map with RED/GREEN colors indicating visible and invisible portion on the map?

Plz help.


Srikanth.

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited November 2012
    You could use GM_CalcAreaElevStats to get the stats for elevations in an area feature. That doesn't currently store the location of the highest elevation, but I could easily add that. For a line you would use the GM_GetPathProfileLOS function.

    To get the view shed in 2 different colors you would basically have to run it twice, one with mShowHiddenPoints in the GM_ViewShedParams_t set to TRUE and again with it set to FALSE and with different mColor values each time.

    For the LOS profile there isn't really an easy way to draw the line on the map with the blocked part colored differently. If the LOS is clear then the points can be seen from each other, if it is not clear then they can't be seen. The view shed would be more appropriate to see exactly what is visible from a point rather than just checking visibility between 2 points. You could simulate a line I guess by doing a very small width view shed beam in the direction between two points, then again in the reverse direction, but that is kind of clunky.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • mg.srikanthmg.srikanth Global Mapper User Posts: 27
    edited November 2012
    Thank you Mike,

    For a view shed analysis my application is taking half a minute with default values, if i run the view shed again to draw a full circle with another color then it will take another half minute, total of 1 minute will be consumed. Is there any technique to minimize the time?

    Srikanth.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited November 2012
    What you could do after running it once is run build your own in-memory raster that you build by scanning through all of the samples in the view shed layer using GM_GetPixelColor. If that returns an error then the pixel is not covered and you can fill it with green, otherwise fill it with the front color. You would also need to check to make sure the pixel is in the radius. Once you have your in-memory raster layer then use GM_CreateCustomRasterLayer to create a new image layer from the in-memory color array.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
Sign In or Register to comment.