![]() |
|
|||||||
| Bug Reports If you've found a bug in World Wind, discuss it here. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Jan 2012
Posts: 94
![]() |
Hi there,
haven't seen this anywhere yet, so here I go. Under some circumstances the labels of the FireSupportLine (and possibly other Symbology lines/graphics) are shifted heavily on a round globe, if they are provided a height. On a flat globe, everything looks as expected (if the total ignorance of the height value is to be expected): However, the exact same line has labels shifted along the line when we switch to a round globe (don't mind the different map zoom): Here is the test code for easy reproducability: Code:
public class TestFireSupport extends ApplicationTemplate {
final static int LAT = 45;
final static int LON = 0;
public static class MyApp extends ApplicationTemplate.AppFrame {
public MyApp() {
this.setExtendedState(MAXIMIZED_BOTH); // maximize window
RenderableLayer layer = new RenderableLayer();
layer.setPickEnabled(false);
// FireSupport
FireSupportLine fireSupportLine = new FireSupportLine("GFFPLCF--------");
fireSupportLine.setText("Text");
fireSupportLine.setAdditionalText("Additional Text");
ArrayList<Position> positions = new ArrayList<Position>();
positions.add(Position.fromDegrees(LAT-1, LON-1, 100000));
positions.add(Position.fromDegrees(LAT+1, LON-1, 100000));
positions.add(Position.fromDegrees(LAT+1, LON+1, 100000));
positions.add(Position.fromDegrees(LAT-1, LON+1, 100000));
fireSupportLine.setPositions(positions);
layer.addRenderable(fireSupportLine);
getWwd().getModel().getLayers().add(layer);
getLayerPanel().update(getWwd());
this.getLayerPanel().add(new FlatWorldPanel(this.getWwd()), BorderLayout.SOUTH);
}
}
public static void main(String[] args) {
Configuration.setValue(AVKey.INITIAL_LATITUDE, LAT);
Configuration.setValue(AVKey.INITIAL_LONGITUDE, LON);
Configuration.setValue(AVKey.INITIAL_ALTITUDE, 500000);
ApplicationTemplate.start(MyApp.class.getEnclosingClass().getSimpleName(), MyApp.class);
}
}
- The bigger the height value, the further the shifting. - More shifting far from the equator, no visible shifting exactly at the equator. - Maximum shifting at longitude 0° (and probably 180°), no shifting at + or - 90°. The last two points seem to indicate an error in coordinate conversion. Cheers! |
|
|
|
|
|
#2 |
|
WW Dev. Team
Join Date: Sep 2010
Location: Boston, MA, USA
Posts: 325
![]() |
This will be fixed in the 8/7 build (svn revision #709).
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Aug 2009
Location: Adelaide, South Australia
Posts: 22
![]() |
This is a slightly different problem with the same class, FireSupportLine.
MunitionFlightPath extends FireSupportLine, however FireSupportLine:createPath() line 439 specifies WorldWind.CLAMP_TO_GROUND This is not appropriate for MunitionFlightPath (for example representing the trajectory of a ballistic missile) since it is better to be able to see the altitude of the trajectory rather than just the path projected over the ground. When I tried replacing CLAMP_TO_GROUND with ABSOLUTE, the MunitionFlightPath rendered correctly, however this revealed a problem with the positioning of labels (or staff comments etc) for the graphic... TacticalGraphicUtil.placeLabelsOnPath() line 161 uses LatLon.interpolateGreatCircle() and positions the label at ground level. This is fine if the altitude mode is CLAMP_TO_GROUND but no good for ABSOLUTE since the label sits on the terrain far below the trajectory. This can be simply fixed by instead calling Position.interpolateGreatCircle() so that the label is given the same altitude as the path. Last edited by gb96; 01-31-2013 at 05:38 AM. Reason: punctuation was interpreted as a smiley, fixed typos |
|
|
|
![]() |
| Tags |
| firesupportline, height, label, round, shift |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|