I would like to add placemarks to parts of collada geometry in google earth. To do this I need to translate the geometry coordinates in the xml to match the transformation to the model in google earth. Given longitude latitude and orientation how do I translate geometry coordinate to match the google earth transformation?
1 Answers
I believe models are located on the earth using only 1 coordinate which is used to position the 'center' of the model. How that is determined I am not sure, and might even depend on the kind/shape of the model.
The coordinate is easily found in the kml structure for the model which is referenced here http://code.google.com/apis/kml/documentation/models.html
Determining how far a certain part of your geometry is from the middle might be very complex but here is an example of some code that will provide you the distance between two points. http://earth-api-utility-library.googlecode.com/svn/trunk/extensions/examples/ruler.html
It is based upon the google earth extensions (gex) library http://code.google.com/p/earth-api-utility-library/
Perhaps you could use SketchUp to help determine the location of your points of interest within the geometry? http://sketchup.google.com/

- 1,229
- 1
- 15
- 22
-
I will check these links out. If I come up with an answer I'll post it here. – Fuji Feb 24 '12 at 02:03