Ways to render a real world 3D environment given a GPS coordinate

I am attempting to display a 3d version of a real world location. Inside my Unity3D app, the user will specify the GPS coordinates of a location, then my app will have to generate a 3d plane(anything doesn’t have to be a plane) of that location. The plane will show a 500 metre by 500 metre 3d snapshot of that location.

How would you suggest I achieve this in Unity3D? What methodology would you use to achieve this?

NOTE: I understand that this is a very difficult endevour(to render real world locations dynamically in Unity3d) so I expect to perform many actions to achieve this. I just don’t know of all the technologies out there and which would be best for my needs

For example:

Suggested methodology 1:

  • Prompt user to specify GPS coords
  • Use Google earth API and HTTP to programmatically obtain a .khm file
    describing that location(Not sure if
    google earth provides that capability
  • does it?)
  • Unzip the .khm so I have the .dae file
  • Convert that file to a .3ds file using ??? third party converter(is
    there a converter that exists?)
  • Import .3ds into Unity3D at runtime as a plane(is this possible)?

Suggested methodology 2:

  • Prompt user to specify GPS coords
  • Use Google earth API and HTTP to programmatically obtain a .khm file
    describing that location(Not sure if
    google earth provides that capability
  • does it?)
  • Unzip the .khm so I have the .dae file
  • Parse .dae file using my own C# parser I will write(do you think its
    possible to write a .dae parser that
    can parse the .dae into an array of
    Vector3 that describe the height map
    of that location?)
  • Dynamically create a plane in Unity3D and populate it with my
    array/list of Vector3 points(is it
    possible to create a plane this way?)
    Maybe I am meant to create a mesh
    instead of a plane?

Can you think of any other ways I could render a real world 3d environment in Unity3D?

This answer might be useless to you, put awhile back, I took a screenshot of an area on googleearth, then I used that image as a texture on the unity3d terrain, and modeled up the landscape that way.

Peace

You should check the google API and their licenses before you attempt something like that. Especially when you want to create a commercial project you should be aware of googles copyright on all of their data.

I’m still not sure what data you want to display / use. Do you want to display a terrain with the heightmap information from google? The heightmap from google is not very accurate, so for what purpose do you want to display this information?

Next thing is: a plane is a mesh. The most simplest plane usually has 4 vertices and 2 triangles. In your case you need a Mesh with a vertex for each height sample. So it’a not really a plane (in the sense of planar) it’s a mesh grid.

You can also use Unity’s terrain engine and use TerrainData.SetHeights

Btw. Unity can’t import any mesh data format at runtime besides assetbundles (and this text-based-scene-format afaik) which is (are) Unity pro features. There are scripts for importing obj and some other simple formats, but it wouldn’t make much sense since you would need a converter to that format.

Check out the cloud system on the Unity Assets store
there is a free verson, it would spice up scene dramatically. If you are going for the up in the air kinda view
Its very easy to learn, might take for 5 mins if that.