Search code examples
androidmapsgisandroid-contentprovider

Android and Elevation Data


I'm trying to build a simulator which needs to know what the terrain looks like in front of a given location.

I know that we can get elevation data from the National Elevation Dataset, but once I have it.. I'm pretty lost.

I was reading through the comments on this question, and the answers make sense, but I can't run a Postgres server for the data on Android like they can for a website that needs the same information.

I need to be able to load the elevations for points a given distance in front of my current GPS lat/long, so I need to be able to search the dataset.

Additionally, I need this to work without a data connection, so it has to all be on the phone with no network needed other than a GPS connection.

Where should I start? I'm pretty much lost =\

I guess, what I need is.... I have the elevation data in ArcGRID or GRIDFLOAT format from the USGS. Now what? I can't find good examples of working with the data.


Solution

  • Android has SQLite baked right in so you can use this to store your data and then search through it as required. Start here and I'm sure you'll find what you're looking for.

    You can also review the "searchable dictionary" example Google has up for a good how-to on searching within a content provider.

    Update: For working with the ArcGRID stuff, again, this is beyond my realm of expertise, but I did find a general Java based toolset called GeoTools that has code that works with spatial databases. You may be able to pull this code down and analyze how it's working with the other data providers and then base your design on SQLite to emulate this? There is also a tutorial on querying.

    Update 2: Check out the Android Documentation on GeoTools. Some good information there as well.