c# - Quickly find and render terrain above a given elevation -


given elevation map consisting of lat/lon/elevation pairs, fastest way find points above given elevation level (or better yet, the 2d concave hull)?

i'm working on gis app need render overlay on top of map visually indicate regions of higher elevation; it's determining polygon/region has me stumped (for now). have simple array of lat/lon/elevation pairs (more specifically, gtopo30 dem files), i'm free transform data structure suggest.

we've been pointed toward triangulated irregular networks (tins), i'm not sure how efficiently query data once we've generated tin. wouldn't surprised if our problem solved how 1 generate contour map, don't have experience it. suggestions awesome.

it sounds you're attempting create polygonal representation of boundary of high land.

if you're working raster data (sampled on rectangular grid), try this.

think of grid assembly of right triangles.

let's have 3x3 grid of points

  • a b c
  • d e f
  • g h k

your triangles are:

  • abd part of rectangle abed
  • bde other part of rectangle abed
  • bef part of rectangle bcfe
  • cef other part of rectangle bcfe
  • dge ... , on

your algorithm has these steps.

  1. build list of triangles above elevation threshold.

  2. take union of these triangles make polygonal area.

  3. determine boundary of polygon.

  4. if necessary, smooth polygon boundary make layer ok when displayed.

if you're trying generate looking contour lines, step 4 hard to right.

step 1 key problem.

for each triangle, if 3 vertices above threshold, include whole triangle in list. if below, forget triangle. if vertices above , others below, split triangle 3 adding new vertices lie precisely on elevation line (by interpolating elevation). include 1 or 2 of new triangles in highland list.

for rest of steps you'll need decent 2d geometry processing library.

if points not on regular grid, start using delaunay algorithm (which can up) organize pointss in triangles. follow same algorith mentioned above. warning. going kind of sketchy if don't have many points.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -