Solved

KMLTourBuilder orbit over point


@DeanAtSafe

I saw your article on using KMLTourBuilder linked below. It is very helpful however I'm getting stuck creating my tour. I would like my tour to orbit over a single point. I have created a buffer around my subject point and set my tour to follow the buffer circle. This seems to work but I need to adjust my heading as I work my way around the circle. Ideally this would be a heading adjustment of thoroughly 7 roughly 51 times (360 degrees) so my camera view (heading) is always facing the middle of the circle.

http://fmepedia.safe.com/articles/Samples_and_Demos/Climbing-Sydney-Harbour-Bridge-with-FME

icon

Best answer by jdh 17 May 2017, 22:43

View original

7 replies

Badge +22

I haven't used the KMLTourBuilder, but I suspect the heading when not set to calculate can only have one value per feature.

 

 

I recommend chopping your buffered circle (max 1 vertex), using a neighborfinder, with the chopped vertices as your Base, and the original single point as your candidate.

 

This will give you the _angle from the view point to the center, CCW from the x axis, you'll need to convert that to a heading (CW from y axis), which you can then use in the KMLTourBuilder
Badge +22

I haven't used the KMLTourBuilder, but I suspect the heading when not set to calculate can only have one value per feature.

 

 

I recommend chopping your buffered circle (max 1 vertex), using a neighborfinder, with the chopped vertices as your Base, and the original single point as your candidate.

 

This will give you the _angle from the view point to the center, CCW from the x axis, you'll need to convert that to a heading (CW from y axis), which you can then use in the KMLTourBuilder
It appears to work. Here's a sample file I created with the above proceedure. tour.kml

 

Turn on 3D buildings to get the full effect.

I haven't used the KMLTourBuilder, but I suspect the heading when not set to calculate can only have one value per feature.

 

 

I recommend chopping your buffered circle (max 1 vertex), using a neighborfinder, with the chopped vertices as your Base, and the original single point as your candidate.

 

This will give you the _angle from the view point to the center, CCW from the x axis, you'll need to convert that to a heading (CW from y axis), which you can then use in the KMLTourBuilder
@jdh

 

Brilliant! This is exactly the effect I'm going for. I'm to entirely sure I understand the steps you completed to get here though. Can you share the workspace?

 

 

 

Badge +22
@jdh

 

Brilliant! This is exactly the effect I'm going for. I'm to entirely sure I understand the steps you completed to get here though. Can you share the workspace?

 

 

 

 

If you have multiple data points, add a counter to get an UniqueID, and use that as the Group-By in the NeighborFinder.

 

 

If your data point is 2D, you might want to add a 3DForcer to raise your viewpoints in the kml tour, otherwise they are clamped to the ground.

 

 

I haven't used the KMLTourBuilder, but I suspect the heading when not set to calculate can only have one value per feature.

 

 

I recommend chopping your buffered circle (max 1 vertex), using a neighborfinder, with the chopped vertices as your Base, and the original single point as your candidate.

 

This will give you the _angle from the view point to the center, CCW from the x axis, you'll need to convert that to a heading (CW from y axis), which you can then use in the KMLTourBuilder
@jdh

 

Great. Thanks to you I'm nearly there. Using your workspace diagram I was able to create these orbit tours as needed. I have only a few more small tweeks I need to make before the desired output. I now need to adjust the time to fly between tours. I would like to set it to a specific time such as 5 seconds. Currently when I move between multiple tour kml files I is nealy instantaneous making for a disorientating viewing experience. Also I would like to start the orbit tour with a North heading. Currently the tour starts at kml_1 which is facing West. I would like to change that to North (kml_17). Thanks again so much for sharing your expertise.

 

I haven't used the KMLTourBuilder, but I suspect the heading when not set to calculate can only have one value per feature.

 

 

I recommend chopping your buffered circle (max 1 vertex), using a neighborfinder, with the chopped vertices as your Base, and the original single point as your candidate.

 

This will give you the _angle from the view point to the center, CCW from the x axis, you'll need to convert that to a heading (CW from y axis), which you can then use in the KMLTourBuilder
@jdh

 

Any ideas on changing the tour starting point heading? I can't seem to figure out how to change the starting position of the tour to facing north. I have been playing around with the heading equation you developed (@fmod(450-@Value(_angle),360)) but I'm just getting further away from my desired output. I also can't seem to get the fly-to set to a set time. I can set it in the xml file with just a few quick lines of code but can't figure out how to do it in any of the kml transformers.

 

Badge +22
@jdh

 

Any ideas on changing the tour starting point heading? I can't seem to figure out how to change the starting position of the tour to facing north. I have been playing around with the heading equation you developed (@fmod(450-@Value(_angle),360)) but I'm just getting further away from my desired output. I also can't seem to get the fly-to set to a set time. I can set it in the xml file with just a few quick lines of code but can't figure out how to do it in any of the kml transformers.

 

The equation just converts an angle (CCW positive X) to an azimuth (CW North).

 

 

If you want your tour to start facing north, then you need to arrange your input points so that the one faces north is the first to enter the tourBuilder.

 

 

Reply