I need to create contour in 3d in android like this http://3dfmaps.com/maps/3d_map.htm.

I have elevation, longitude and latitude values. I need to create 3D contour. What is the solution?


closed as not a real question by Anko, MichaelHouse, Josh, Maik Semder, Sean Middleditch Jun 5 '13 at 18:26

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    \$\begingroup\$ @user1365067 welcome to the site. Your question is asking for a general how-to guide, and that type of question is discouraged on SE. Please read the faq about that. On this site you will find more appropriate questions which are helpful by searching. Try this search for procedural terrain. \$\endgroup\$ – Seth Battin Jun 5 '13 at 12:51

There are a number of algorithms and approaches for creating 3d contours you can find by searching for "3d contour algorithm". As written, your question gives us no information about the number of points you want to handle, about how frequently the contours need to change, or about how the user/app will interact with the contours once you've made them.

Lacking those requirements, below is a quick-n-dirty heuristic you can use to make a "contour map":

  • Build a grid of your points so that x,y is the location and z is the elevation
  • Create an empty grid of the same size to hold a contour map, initialized to all zeros
  • Determine the range of the elevation data between the min/max z values and the number of contours bins your app needs (could be pre-computed, could be set based on the range of the dataset).
  • For each contour bin, determine the min and a max elevation of that bin by dividing the range into # of contour chunks. For example, if min z=1, max z = 100, and # bins = 10 then the first contour bin would contain elevations from 1 to 10, the second from 11 to 20, etc.
  • Iterate over your point grid and set a value in your contour grid for every point greater than the min elevation for your first bin
  • Repeat the last step, setting a value in your contour grid for every point greater than the min elevation for the second bin, and so on...
  • \$\begingroup\$ How can I do it in android? \$\endgroup\$ – user1365067 Jun 5 '13 at 11:51

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