Adjust height of KML in the KML-file

Joined
Sep 17, 2016
Messages
86
Reaction score
12
Age
58
I have a project I'm about to deliver to a customer. In this a kml which opens a 3D in Google Earth Pro. What annoys me is that the 3D floats hundreds of meters above ground. So I have to adjust the height via Properties of the 3D.
I would like to deliver the project with the height "locked" at the correct level which removes the adjustment from the customer. I want the 3D to float at the correct level every time the customers opens the kml.

I can get the height perfect by editing the Height under "Preferences" but when I add
<altitude>-161m</altitude> (It's empty first)
in the kml nothing happens.

Is this possible? What am I doing wrong? I thought this was a "No-brainer"..

Roger
 
Can you place the text of the kml that you are placing this tag in here? That might help.
 
The whole deal downloaded from Maps Made Easy as a KMZ and then unpacked..


<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
<Placemark>
<name>Palohuornas 2</name>
<description>ISO 200 F Varierande Tid 1240</description>
<Model id="model1">
<altitudeMode>absolute</altitudeMode>
<Location>
<longitude>21.4122875115</longitude>
<latitude>66.9248471395</latitude>
<altitude></altitude>
</Location>
<Orientation>
<heading>0.0000000000</heading>
<tilt>0.0000000000</tilt>
<roll>0.0000000000</roll>
</Orientation>
<Scale>
<x>1.0000000000</x>
<y>1.0000000000</y>
<z>1.0000000000</z>
</Scale>
<Link>
<href>model.dae</href>
</Link>
</Model>
</Placemark>
</kml>
 
the 3D floats hundreds of meters above ground
A couple of things come to mind. First, the model is calculating elevations based on the drone's GPS, which can be hundreds of meters off of reality, which is why you're seeing what you're seeing. If you were to add ground control points, even if they're from photo points that you can see in Google Earth, the model will snap down to that plane. This is assuming that Maps Made Easy allows ground control, which I don't use. This is the best method, although would take more work on your end.

The second thought is that you should be able to set the model to snap to the ground elevation in the Google Earth properties. (Properties-> Altitude-> Clamped to ground). If you save that and then resave the kml/kmz, it should retain that setting.
 
A couple of things come to mind. First, the model is calculating elevations based on the drone's GPS, which can be hundreds of meters off of reality, which is why you're seeing what you're seeing. If you were to add ground control points, even if they're from photo points that you can see in Google Earth, the model will snap down to that plane. This is assuming that Maps Made Easy allows ground control, which I don't use. This is the best method, although would take more work on your end.

The second thought is that you should be able to set the model to snap to the ground elevation in the Google Earth properties. (Properties-> Altitude-> Clamped to ground). If you save that and then resave the kml/kmz, it should retain that setting.

I cannot find any such settings (Properties-> Altitude-> Clamped to ground) in Google Earth Pro. I can Clamp the 3D to the ground by its properties, but that's only resulting in the 3D floating hundreds of meters up in the sky.
I have seen it somewhere that you can "Major - Set" the height in the KML itself, but I can't find it now.

When I set the Height to "Absolute" -161m it sticks to the ground. When I try to edit the KML to..:
<altitudeMode>absolute</altitudeMode>
<Location>
<longitude>21.4122875115</longitude>
<latitude>66.9248471395</latitude>
<altitude>-161m</altitude>
</Location>

Nothing happens. At all.
 

Attachments

  • Capture_Google_Clamped.JPG
    Capture_Google_Clamped.JPG
    45 KB · Views: 482
Right click the 3D model in the Places Window, select Properties, select Altitude, Clamped to Ground. Google is your friend: Change placemark altitudes - Google Earth Help
That's exactly what I've tried. When so, the floating 3D disappeares. Gone! I have to add "absolute" and "-161m" under "Properties" - "Height" to see it.
But the question is still if I can help the customer by doing some magic with a text editor in the KML-file. That is: Hard code "absolute" and "-161m".

Is it possible?
 
Is it possible?
I'm sure we can figure something out... Can you share the data so I can take a look? Or at least share some screenshots to see what you're seeing? I would imagine that if you made edits to that file and then resaved the KML/KMZ back out of GE, that it would save those changes. Have you tried that?
 
I'm sure we can figure something out... Can you share the data so I can take a look? Or at least share some screenshots to see what you're seeing? I would imagine that if you made edits to that file and then resaved the KML/KMZ back out of GE, that it would save those changes. Have you tried that?

The data (kml) is already posted here. I have only tried to Edit the kml direct via Notepad++ by manually adding/editing altitude mode and meters. But the next time I bring the kml i to GE pro nothing has happend.
A screen shot shows my 3d floating above the ground..
I'm in bed now, but I'll post it tomorrow. For what It's worth..

Rgds Roger
 
A screen shot. If I clamp it to the ground it disappeares. The screens shot has "Absolute" and "0m" (which seems like a default coming from somwhere..) which makes it float 161 meters up in the air. When I change the height to "-161m" it sticks to the ground.
upload_2018-9-8_9-52-25.png
 
When I change the height to "-161m" it sticks to the
Make all of your edits in Google Earth. Get the model to lay on the ground through whatever method works (as you've shown above). Now, right click the model and click save as and save it out of Google Earth under a new name. Now open that file. Does it come in at the correct level or not?
 
I know this is an old thread, but I've had the same issue and managed to accidentally find the solution in part from workarounds on here.

The way that worked for me was to right-click on the path in Google Earth, and select 'properties'. Select the 'Altitude' tab. Select 'relative to ground' and enter the height above ground of your first point. Everything else then falls straight into place.
 
  • Like
Reactions: MikeA138

Members online

Forum statistics

Threads
143,085
Messages
1,467,523
Members
104,963
Latest member
BoguSlav